SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
ArduRadio:
Playing Internet Radio with Arduino
            Javier Montaner
          montanerj@yahoo.com
               @tumaku_
Agenda
           Introduction
           Bill of Materials
           Key Learnings
           Project Status & Next Steps




2
    © Javier Montaner 2012
Introduction




3
    © Javier Montaner 2012
Internet Radio on Arduino
           Exploratory work to understand what can(not) be done with
           Arduino and similar HW platforms
           Based on commercial Arduino boards and shields: 7
              Arduino Mega
              Ethernet
              MP3
              NFC
           Final source code will be opened through github




4
    © Javier Montaner 2012
Project Scope
         Build an Arduino-based device that plays internet streaming
         radio
         Use simple touch user interface (NFC/RFID) to select radio
         stations
         Learn about open HW
         Share results with the community

         A similar concept has been explored by Jordi Parra (@zenona)
         in its SpotifyBox project: http://postscapes.com/spotify-box


5
    © Javier Montaner 2012
Bill of Materials (BOM)




6
    © Javier Montaner 2012
Arduino Mega 2560

              256 KB
              54 Digital I/O Pins

       Can be implemented on Arduino
       UNO but memory and available
       PINs start being a problem

                        http://arduino.cc/en/Main/ArduinoBoardMega2560



7
    © Javier Montaner 2012
Arduino Ethernet Shield

            Based on WiznetW5100
            10/100 Mb
            TCP/IP library
            Includes micro-SD card slot
            Controlled through SPI


                         http://arduino.cc/en/Main/ArduinoEthernetShield



8
    © Javier Montaner 2012
Sparkfun MP3 Player Shield

            Based onVS1053B
            Plays Ogg Vorbis/MP3/
            AAC/WMA/MIDI
            3.5mm stereo output jack
            Includes micro SD card slot
            Controlled through SPI

                             https://www.sparkfun.com/products/10628



9
    © Javier Montaner 2012
SeeedStudio NFC Shield

             Based on NXP PN532
             Suppport Reader, Card
             emulation and Peer to Peer
             PCB printed antenna
             Controlled through
             software SPI

                     http://www.seeedstudio.com/depot/nfc-shield-p-916.html



10
     © Javier Montaner 2012
Unyka UK-1 Portable Speaker

           USB Powered with Lithium Ion
           built-in battery (500mAh)
           Includes micro SD card slot
           USB and 3,5mm audio jack
           Volume control
           Frequency range: 90Hz -20kHz
           Power: 2 watts




11
     © Javier Montaner 2012
Total Cost of Prototype in €

     Component                       Price
     Arduino Mega                      €41
     Ethernet Shield                   €29
     MP3 Shield                        €32
     NFC Shield                        €24
     Speaker                           €15
     Total                            €141



      This cost is not suitable for a commercial product but it is extremely cheap to build a
                                         working prototype
12
     © Javier Montaner 2012
Where to buy?

 I have bought hardware in all these web stores, but there are many
 more out there in internet

       Adafruit                http://www.adafruit.com/
       Arduino store           http://store.arduino.cc/
       Cooking-Hacks           http://www.cooking-hacks.com/
       SeeedStudio             http://www.seeedstudio.com/depot/
       Sparkfun Electronics    http://www.sparkfun.com/



13
     © Javier Montaner 2012
Key Learnings




14
     © Javier Montaner 2012
General
            Open HW community is very active
            Quality of documentation varies greatly but people are
            usually helpful and reactive
            Google is a great source of (hidden) information
            Arduino is a learning and prototyping tool. There are
            definitely more powerful and cheaper platforms but almost
            any technology that you can think of has already been
            integrated in/through an Arduino shield
            There are other HW solutions from alternative vendors for
            all the elements in the BOM

15
     © Javier Montaner 2012
Arduino
            I started with Arduino Uno,
            but soon ran out of PINs and
            memory so I easily moved to
            Arduino Mega
            Interoperability between
            shields usually requires some
            rewiring (physical or in
            libraries) but no soldering
            There is always somebody that
            has experienced and solved
            your problem. Check arduino
            forums and google

16
     © Javier Montaner 2012
Arduino
         Dig into Arduino open libraries to
         learn (I did learn a lot about SPI,
         registers, interruptions, etc.)
         Update the official libraries to add
         new functionality. If you mess it
         up, you can easily restore them
         Arduino IDE is very simple to
         start but it becomes too simple
         when you want to work on more
         complex projects

17
     © Javier Montaner 2012
Arduino Ethernet Shield
         There is an Arduino Ethernet
         board that could make the BOM
         cheaper
                                              client.print("GET ");
         The Ethernet library implements      client.print(ndefPath);
         TCP/IP stack but not http -> you     client.println("
                                              HTTP/1.1");
         need to hardcode http protocol       client.println("Connection:
                                                     Keep-Alive");
         yourself                             client.print("HOST: ");
                                              client.println(ndefServer);
         The good point is that the library   client.println();
         design makes your code
         “interoperable” (easily portable)
         when you replace Ethernet by
         WiFi or GPRS ☺
18
     © Javier Montaner 2012
MP3 Player Shield
         The original library is not fully working
         and showed (at least for me) some
         interoperability issues. However Bill
         Porter (@Bill_Porter) has shared an
         excellent library (great to learn about
         Arduino interruptions) that works
         asynchronously
         Another helpful example is available at
         Rui’s The Techman blog
         The shield itself supports any bitrate but
         Arduino speed limits it only to 32kbps
         streams. If you try to play higher
         bitrates the sound becomes bumpy

                   http://www.billporter.info/sparkfun-mp3-shield-arduino-library/
19
     http://supertechman.blogspot.com.es/2010/11/playing-mp3-with-vs1053-arduino-shield.html
     © Javier Montaner 2012
NFC Shield
         The original library uses its own software
         implementation of the SPI protocol.
         Unfortunately, it is not compatible with the
         Arduino HW library used by Ethernet/MP3
         shields. Solution → Use different PINs for
         NFC SPI implementation
         Alternatively I have created a HW version
         of Seeedstudio’s library available at github
         The library supports basic RFID
         functionality (e.g. it can read MIFARE
         Ultralight and Classic tags). However it has
         no notion of NFC protocols. If you want to
         use NFC formats (i.e. NDEF) you need to
         update the library yourself
         Although PN532 supports communication
         through SPI or I2C, the shield hardwires the
         SPI option
                              https://github.com/jmgjmg/PN532
20
     © Javier Montaner 2012
NFC Technology
         You can use the NFC shield just as a reader of RFID tags. However if you want to interact with
         NFC formatted tags, you need to check the NFC specifications
         General information and NFC specifications (formats and protocols) can be downloaded from
         NFC Forum after agreeing to their terms and conditions. You ca skip the radio layers (the
         shield/PN532 chip does the job) but you need the NDEF (NFC Data Exchange Format)
         specifications for messages and records
         http://www.nfc-forum.org/specs/spec_list/
         You also need to understand how NDEF messages are coded in different tags (e.g. I have used
         Mifare Ultralight tags and had to follow “NFC Forum Type 2 Tag Operation Specification”)
         I found very useful NFC examples and documentation for Android phones. In particular I suggest
         reading:
             Getting started with NFC on Android by Richard Legget (.net magazine)
             http://www.netmagazine.com/tutorials/getting-started-nfc-android
             Android API Guide for developers
             http://developer.android.com/guide/topics/connectivity/nfc/nfc.html
         There are two useful and free applications from NXP in the Android Play Store to read and write
         the content of different types of NFC tags:
             NFC Tag Info: https://play.google.com/store/apps/details?id=com.nxp.taginfolite
             NFC Tag Writer: https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter



21
     © Javier Montaner 2012
NDEF Formatted Mifare Ultralight Tag
                      Block       Binary content
                      [00]    *    XX:XX:XX:XX         (UID0-2, BCC0)
                      [01]    *    XX:XX:XX:XX         (UID3-6)
                      [02]    .    XX 48 00:00         (BCC1, INT, LOCK0-1)
                      [03]    .    E1:10:06:00         (OTP0-3)
                      [04]    .    03 28 D1 01         |.(..|
                      [05]    .    24 55 03 73         |$U.s|
                      [06]    .    74 72 65 61         |trea|
                      [07]    .    6D 31 2E 72         |m1.r|
                      [08]    .    61 64 69 6F         |adio|
                      [09]    .    6D 6F 6E 69         |moni|
                      [0A]    .    74 6F 72 2E         |tor.|
                      [0B]    .    63 6F 6D 2F         |com/|
                      [0C]    .    4D 6F 75 6E         |Moun|
                      [0D]    .    74 61 69 6E         |tain|
                      [0E]    .    46 4D FE 00         |FM..|
                      [0F]    .    00 00 00 00         |....|

                                    Read with NFC Tag Info Android application from NXP
22
     © Javier Montaner 2012
Project Status & Next Steps




23
     © Javier Montaner 2012
Current Status of the Project
         I have built a working and stable prototype
         It plays32kbps streams from internet
         It works with NDEF formatted Mifare Ultralight tags (type 2)
         I use Android application to write the content of the tags
         For other tag types or unformatted type 2 tags, the device
         plays hardcoded internet radio stations defined in the code
         Arduino script size is around 34kB (including all the libraries)




24
     © Javier Montaner 2012
Next Steps?
         Clean up all the code and publish it in github
         Replace the Ethernet shield by the new ArduinoWiFi shield
         and try to play streams with higher bitrates
         Integrate AM/FM Radio shield
         Improve the NFC library to support other types of NFC Tags
         Implement Card Emulation and/or Peer-to-Peer mode in
         NFC library to interact directly with an Android application
         over NFC
         Port the solution to an Android USB dongle (can be bought
         now for less than €50)

25
     © Javier Montaner 2012
More Info

        Javier Montaner (Madrid, Spain)
        montanerj@yahoo.com
        @tumaku_ (twitter)




26
     © Javier Montaner 2012

Mais conteúdo relacionado

Mais procurados

WearDuino preso for PDX-Electrohax Jan 8 2015
WearDuino preso for PDX-Electrohax Jan 8 2015WearDuino preso for PDX-Electrohax Jan 8 2015
WearDuino preso for PDX-Electrohax Jan 8 2015Mark Leavitt
 
KiwiBoard: Open Hardware with Android
KiwiBoard: Open Hardware with AndroidKiwiBoard: Open Hardware with Android
KiwiBoard: Open Hardware with Androidkiwiboard
 
Intro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial SystemIntro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial Systemtodbotdotcom
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-PrototypingLars Gregori
 
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8Microsoft Mobile Developer
 
Arduino Uno Board - Robomart
Arduino Uno Board - RobomartArduino Uno Board - Robomart
Arduino Uno Board - Robomartraspberrypib
 
The Arduino WiFi Shield
The Arduino WiFi ShieldThe Arduino WiFi Shield
The Arduino WiFi Shieldkellison00
 
IoT Devices, Which One Is Right for You to Learn?
IoT Devices, Which One Is Right for You to Learn?IoT Devices, Which One Is Right for You to Learn?
IoT Devices, Which One Is Right for You to Learn?Agustaf Ryadi
 
IDEX Smartfinger Product Data Sheet
IDEX Smartfinger Product Data SheetIDEX Smartfinger Product Data Sheet
IDEX Smartfinger Product Data SheetIDEX ASA
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoYong Heui Cho
 
IoT Devices, Which One is Right for You to Learn
IoT Devices, Which One is Right for You to LearnIoT Devices, Which One is Right for You to Learn
IoT Devices, Which One is Right for You to LearnToni Haryanto
 
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)Tech in Asia ID
 

Mais procurados (18)

WearDuino preso for PDX-Electrohax Jan 8 2015
WearDuino preso for PDX-Electrohax Jan 8 2015WearDuino preso for PDX-Electrohax Jan 8 2015
WearDuino preso for PDX-Electrohax Jan 8 2015
 
KiwiBoard: Open Hardware with Android
KiwiBoard: Open Hardware with AndroidKiwiBoard: Open Hardware with Android
KiwiBoard: Open Hardware with Android
 
Intro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial SystemIntro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial System
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
 
IoT Intro and Demo
IoT Intro and DemoIoT Intro and Demo
IoT Intro and Demo
 
Arduino
ArduinoArduino
Arduino
 
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8
LUMIA APP LABS: DEVELOPING NFC APPS IN WINDOWS PHONE 8
 
Arduino day
Arduino dayArduino day
Arduino day
 
Arduino Uno Board - Robomart
Arduino Uno Board - RobomartArduino Uno Board - Robomart
Arduino Uno Board - Robomart
 
The Arduino WiFi Shield
The Arduino WiFi ShieldThe Arduino WiFi Shield
The Arduino WiFi Shield
 
IoT Devices, Which One Is Right for You to Learn?
IoT Devices, Which One Is Right for You to Learn?IoT Devices, Which One Is Right for You to Learn?
IoT Devices, Which One Is Right for You to Learn?
 
IDEX Smartfinger Product Data Sheet
IDEX Smartfinger Product Data SheetIDEX Smartfinger Product Data Sheet
IDEX Smartfinger Product Data Sheet
 
Elektor 0304-2020
Elektor 0304-2020Elektor 0304-2020
Elektor 0304-2020
 
Ee201102 en
Ee201102 enEe201102 en
Ee201102 en
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
IoT Devices, Which One is Right for You to Learn
IoT Devices, Which One is Right for You to LearnIoT Devices, Which One is Right for You to Learn
IoT Devices, Which One is Right for You to Learn
 
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)
IoT Devices, Which One is Right for You to Learn? by Toni Haryanto (Codepolitan)
 
Ok5325 ds en
Ok5325 ds enOk5325 ds en
Ok5325 ds en
 

Semelhante a ArduRadio

ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guidehandson28
 
Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)manditalaskar123
 
Arduino presentation by_warishusain
Arduino presentation by_warishusainArduino presentation by_warishusain
Arduino presentation by_warishusainstudent
 
Arduino workshop proposal
Arduino workshop proposalArduino workshop proposal
Arduino workshop proposalfreemanindia
 
Arduino seminar report
Arduino seminar reportArduino seminar report
Arduino seminar reportZaka Jutt
 
What are the different types of arduino boards
What are the different types of arduino boardsWhat are the different types of arduino boards
What are the different types of arduino boardselprocus
 
Introduction to Arduino
Introduction to Arduino Introduction to Arduino
Introduction to Arduino Dennis Espiritu
 
DRADx network penetration on BT Drone
DRADx network penetration on BT DroneDRADx network penetration on BT Drone
DRADx network penetration on BT DroneGobinda Karmakar ☁
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduinoMohamed Essam
 
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdfAdvanced View Arduino Projects List - Use Arduino for Projects 4.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdfWiseNaeem
 
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdfAdvanced View Arduino Projects List - Use Arduino for Projects 5.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdfWiseNaeem
 
Arduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsArduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsSanjay Kumar
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
 
Internet of Things & Open Hardware (LeanCamp Madrid 2012)
Internet of Things & Open Hardware (LeanCamp Madrid 2012)Internet of Things & Open Hardware (LeanCamp Madrid 2012)
Internet of Things & Open Hardware (LeanCamp Madrid 2012)iotmadrid
 
Introduction to Arduino Family
Introduction to Arduino FamilyIntroduction to Arduino Family
Introduction to Arduino FamilyRobocraze
 

Semelhante a ArduRadio (20)

Arduino
ArduinoArduino
Arduino
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
 
Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)
 
Arduino presentation by_warishusain
Arduino presentation by_warishusainArduino presentation by_warishusain
Arduino presentation by_warishusain
 
Arduino workshop proposal
Arduino workshop proposalArduino workshop proposal
Arduino workshop proposal
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 
Arduino seminar report
Arduino seminar reportArduino seminar report
Arduino seminar report
 
What are the different types of arduino boards
What are the different types of arduino boardsWhat are the different types of arduino boards
What are the different types of arduino boards
 
Introduction to Arduino
Introduction to Arduino Introduction to Arduino
Introduction to Arduino
 
DRADx network penetration on BT Drone
DRADx network penetration on BT DroneDRADx network penetration on BT Drone
DRADx network penetration on BT Drone
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdfAdvanced View Arduino Projects List - Use Arduino for Projects 4.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 4.pdf
 
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdfAdvanced View Arduino Projects List - Use Arduino for Projects 5.pdf
Advanced View Arduino Projects List - Use Arduino for Projects 5.pdf
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
 
Arduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsArduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access Details
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Internet of Things & Open Hardware (LeanCamp Madrid 2012)
Internet of Things & Open Hardware (LeanCamp Madrid 2012)Internet of Things & Open Hardware (LeanCamp Madrid 2012)
Internet of Things & Open Hardware (LeanCamp Madrid 2012)
 
Let's begin io t with $10
Let's begin io t with $10Let's begin io t with $10
Let's begin io t with $10
 
Introduction to Arduino Family
Introduction to Arduino FamilyIntroduction to Arduino Family
Introduction to Arduino Family
 
ARDUINO_presentation
ARDUINO_presentationARDUINO_presentation
ARDUINO_presentation
 

Último

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

ArduRadio

  • 1. ArduRadio: Playing Internet Radio with Arduino Javier Montaner montanerj@yahoo.com @tumaku_
  • 2. Agenda Introduction Bill of Materials Key Learnings Project Status & Next Steps 2 © Javier Montaner 2012
  • 3. Introduction 3 © Javier Montaner 2012
  • 4. Internet Radio on Arduino Exploratory work to understand what can(not) be done with Arduino and similar HW platforms Based on commercial Arduino boards and shields: 7 Arduino Mega Ethernet MP3 NFC Final source code will be opened through github 4 © Javier Montaner 2012
  • 5. Project Scope Build an Arduino-based device that plays internet streaming radio Use simple touch user interface (NFC/RFID) to select radio stations Learn about open HW Share results with the community A similar concept has been explored by Jordi Parra (@zenona) in its SpotifyBox project: http://postscapes.com/spotify-box 5 © Javier Montaner 2012
  • 6. Bill of Materials (BOM) 6 © Javier Montaner 2012
  • 7. Arduino Mega 2560 256 KB 54 Digital I/O Pins Can be implemented on Arduino UNO but memory and available PINs start being a problem http://arduino.cc/en/Main/ArduinoBoardMega2560 7 © Javier Montaner 2012
  • 8. Arduino Ethernet Shield Based on WiznetW5100 10/100 Mb TCP/IP library Includes micro-SD card slot Controlled through SPI http://arduino.cc/en/Main/ArduinoEthernetShield 8 © Javier Montaner 2012
  • 9. Sparkfun MP3 Player Shield Based onVS1053B Plays Ogg Vorbis/MP3/ AAC/WMA/MIDI 3.5mm stereo output jack Includes micro SD card slot Controlled through SPI https://www.sparkfun.com/products/10628 9 © Javier Montaner 2012
  • 10. SeeedStudio NFC Shield Based on NXP PN532 Suppport Reader, Card emulation and Peer to Peer PCB printed antenna Controlled through software SPI http://www.seeedstudio.com/depot/nfc-shield-p-916.html 10 © Javier Montaner 2012
  • 11. Unyka UK-1 Portable Speaker USB Powered with Lithium Ion built-in battery (500mAh) Includes micro SD card slot USB and 3,5mm audio jack Volume control Frequency range: 90Hz -20kHz Power: 2 watts 11 © Javier Montaner 2012
  • 12. Total Cost of Prototype in € Component Price Arduino Mega €41 Ethernet Shield €29 MP3 Shield €32 NFC Shield €24 Speaker €15 Total €141 This cost is not suitable for a commercial product but it is extremely cheap to build a working prototype 12 © Javier Montaner 2012
  • 13. Where to buy? I have bought hardware in all these web stores, but there are many more out there in internet Adafruit http://www.adafruit.com/ Arduino store http://store.arduino.cc/ Cooking-Hacks http://www.cooking-hacks.com/ SeeedStudio http://www.seeedstudio.com/depot/ Sparkfun Electronics http://www.sparkfun.com/ 13 © Javier Montaner 2012
  • 14. Key Learnings 14 © Javier Montaner 2012
  • 15. General Open HW community is very active Quality of documentation varies greatly but people are usually helpful and reactive Google is a great source of (hidden) information Arduino is a learning and prototyping tool. There are definitely more powerful and cheaper platforms but almost any technology that you can think of has already been integrated in/through an Arduino shield There are other HW solutions from alternative vendors for all the elements in the BOM 15 © Javier Montaner 2012
  • 16. Arduino I started with Arduino Uno, but soon ran out of PINs and memory so I easily moved to Arduino Mega Interoperability between shields usually requires some rewiring (physical or in libraries) but no soldering There is always somebody that has experienced and solved your problem. Check arduino forums and google 16 © Javier Montaner 2012
  • 17. Arduino Dig into Arduino open libraries to learn (I did learn a lot about SPI, registers, interruptions, etc.) Update the official libraries to add new functionality. If you mess it up, you can easily restore them Arduino IDE is very simple to start but it becomes too simple when you want to work on more complex projects 17 © Javier Montaner 2012
  • 18. Arduino Ethernet Shield There is an Arduino Ethernet board that could make the BOM cheaper client.print("GET "); The Ethernet library implements client.print(ndefPath); TCP/IP stack but not http -> you client.println(" HTTP/1.1"); need to hardcode http protocol client.println("Connection: Keep-Alive"); yourself client.print("HOST: "); client.println(ndefServer); The good point is that the library client.println(); design makes your code “interoperable” (easily portable) when you replace Ethernet by WiFi or GPRS ☺ 18 © Javier Montaner 2012
  • 19. MP3 Player Shield The original library is not fully working and showed (at least for me) some interoperability issues. However Bill Porter (@Bill_Porter) has shared an excellent library (great to learn about Arduino interruptions) that works asynchronously Another helpful example is available at Rui’s The Techman blog The shield itself supports any bitrate but Arduino speed limits it only to 32kbps streams. If you try to play higher bitrates the sound becomes bumpy http://www.billporter.info/sparkfun-mp3-shield-arduino-library/ 19 http://supertechman.blogspot.com.es/2010/11/playing-mp3-with-vs1053-arduino-shield.html © Javier Montaner 2012
  • 20. NFC Shield The original library uses its own software implementation of the SPI protocol. Unfortunately, it is not compatible with the Arduino HW library used by Ethernet/MP3 shields. Solution → Use different PINs for NFC SPI implementation Alternatively I have created a HW version of Seeedstudio’s library available at github The library supports basic RFID functionality (e.g. it can read MIFARE Ultralight and Classic tags). However it has no notion of NFC protocols. If you want to use NFC formats (i.e. NDEF) you need to update the library yourself Although PN532 supports communication through SPI or I2C, the shield hardwires the SPI option https://github.com/jmgjmg/PN532 20 © Javier Montaner 2012
  • 21. NFC Technology You can use the NFC shield just as a reader of RFID tags. However if you want to interact with NFC formatted tags, you need to check the NFC specifications General information and NFC specifications (formats and protocols) can be downloaded from NFC Forum after agreeing to their terms and conditions. You ca skip the radio layers (the shield/PN532 chip does the job) but you need the NDEF (NFC Data Exchange Format) specifications for messages and records http://www.nfc-forum.org/specs/spec_list/ You also need to understand how NDEF messages are coded in different tags (e.g. I have used Mifare Ultralight tags and had to follow “NFC Forum Type 2 Tag Operation Specification”) I found very useful NFC examples and documentation for Android phones. In particular I suggest reading: Getting started with NFC on Android by Richard Legget (.net magazine) http://www.netmagazine.com/tutorials/getting-started-nfc-android Android API Guide for developers http://developer.android.com/guide/topics/connectivity/nfc/nfc.html There are two useful and free applications from NXP in the Android Play Store to read and write the content of different types of NFC tags: NFC Tag Info: https://play.google.com/store/apps/details?id=com.nxp.taginfolite NFC Tag Writer: https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter 21 © Javier Montaner 2012
  • 22. NDEF Formatted Mifare Ultralight Tag Block Binary content [00] * XX:XX:XX:XX (UID0-2, BCC0) [01] * XX:XX:XX:XX (UID3-6) [02] . XX 48 00:00 (BCC1, INT, LOCK0-1) [03] . E1:10:06:00 (OTP0-3) [04] . 03 28 D1 01 |.(..| [05] . 24 55 03 73 |$U.s| [06] . 74 72 65 61 |trea| [07] . 6D 31 2E 72 |m1.r| [08] . 61 64 69 6F |adio| [09] . 6D 6F 6E 69 |moni| [0A] . 74 6F 72 2E |tor.| [0B] . 63 6F 6D 2F |com/| [0C] . 4D 6F 75 6E |Moun| [0D] . 74 61 69 6E |tain| [0E] . 46 4D FE 00 |FM..| [0F] . 00 00 00 00 |....| Read with NFC Tag Info Android application from NXP 22 © Javier Montaner 2012
  • 23. Project Status & Next Steps 23 © Javier Montaner 2012
  • 24. Current Status of the Project I have built a working and stable prototype It plays32kbps streams from internet It works with NDEF formatted Mifare Ultralight tags (type 2) I use Android application to write the content of the tags For other tag types or unformatted type 2 tags, the device plays hardcoded internet radio stations defined in the code Arduino script size is around 34kB (including all the libraries) 24 © Javier Montaner 2012
  • 25. Next Steps? Clean up all the code and publish it in github Replace the Ethernet shield by the new ArduinoWiFi shield and try to play streams with higher bitrates Integrate AM/FM Radio shield Improve the NFC library to support other types of NFC Tags Implement Card Emulation and/or Peer-to-Peer mode in NFC library to interact directly with an Android application over NFC Port the solution to an Android USB dongle (can be bought now for less than €50) 25 © Javier Montaner 2012
  • 26. More Info Javier Montaner (Madrid, Spain) montanerj@yahoo.com @tumaku_ (twitter) 26 © Javier Montaner 2012