Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Using stereo 3.5mm jack to communicate with IR remote

I was thinking about making a universal 3.5mm jack device (IR and more).

This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.

Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
    For IR remote, the first approach is to communicate to 3.5mm jack, it seems that you can pre-record messages as 36kHz - 44kHz, 16bit Stereo square PCM (pulse-code modulation) wave files. Here is a geeky in-depth article from 8051projects.net.

    RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:

    Here are the components needed as provided by RedMote:



    Hackint0sh.org (Former Bender) is providing great schematics for the project:



    Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."


    The optimal solution of course it to develop a sound generator and plug in the remote specifications.
    Here is a listing of remote specifications.



    I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
    • IR emitter for controlling AV equipment (and add some social sharing component to TV watching)
    • IR proximity sensor to trigger stuff like alarm, or camera/voice recording
    • Ultrasound Sonar for various distance detection
    • and more..









    It take time and effort to create tutorials, please support my efforts with a couple dollar donation, any amount will be greatly appreciated!



    As an Amazon Associate I earn from qualifying purchases.

    Using stereo 3.5mm jack to communicate with IR remote

    I was thinking about making a universal 3.5mm jack device (IR and more).

    This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.

    Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
      For IR remote, the first approach is to communicate to 3.5mm jack, it seems that you can pre-record messages as 36kHz - 44kHz, 16bit Stereo square PCM (pulse-code modulation) wave files. Here is a geeky in-depth article from 8051projects.net.

      RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:

      Here are the components needed as provided by RedMote:



      Hackint0sh.org (Former Bender) is providing great schematics for the project:



      Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."


      The optimal solution of course it to develop a sound generator and plug in the remote specifications.
      Here is a listing of remote specifications.



      I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
      • IR emitter for controlling AV equipment (and add some social sharing component to TV watching)
      • IR proximity sensor to trigger stuff like alarm, or camera/voice recording
      • Ultrasound Sonar for various distance detection
      • and more..









      It take time and effort to create tutorials, please support my efforts with a couple dollar donation, any amount will be greatly appreciated!



      As an Amazon Associate I earn from qualifying purchases.

      Arduino Mega 2560 - use of pins


      pins 2 to 13: Provide 8-bit pulse width modulation (PWM) output with the analogWrite(pin, value) function where value is between 0 (off) and 255 (full on). Used to light a LED at varying brightnesses or drive a motor at various speeds.The frequency of the PWM signal is approximately 490 Hz.


      int ledPin = 9; // LED connected to digital pin 9
      int analogPin = 3; // potentiometer connected to analog pin 3
      int val = 0; // variable to store the read value
      void setup()
      {
         pinMode(ledPin, OUTPUT); // sets the pin as output
      }
      void loop()
      {
         val = analogRead(analogPin); // read the input pin
         analogWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values    from 0 to 255
      }


      As an Amazon Associate I earn from qualifying purchases.

      Arduino Mega 2560 - use of pins


      pins 2 to 13: Provide 8-bit pulse width modulation (PWM) output with the analogWrite(pin, value) function where value is between 0 (off) and 255 (full on). Used to light a LED at varying brightnesses or drive a motor at various speeds.The frequency of the PWM signal is approximately 490 Hz.


      int ledPin = 9; // LED connected to digital pin 9
      int analogPin = 3; // potentiometer connected to analog pin 3
      int val = 0; // variable to store the read value
      void setup()
      {
         pinMode(ledPin, OUTPUT); // sets the pin as output
      }
      void loop()
      {
         val = analogRead(analogPin); // read the input pin
         analogWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values    from 0 to 255
      }


      As an Amazon Associate I earn from qualifying purchases.

      Google ADK - running DemoKit Android application

      Set up of Eclipse and Arduino is necessary prior to following this tutorial.

      Step ..
      Eclipse > File > New Project > Android > Android Project



      The source code for the DemoKit app is in:
      ~/Documents/Arduino/ADK_release_0512/app/AndroidManifest.xml


      For Build Target, select Google APIs (Platform 2.3.3, API Level 10).

      Step..



      Possible problems:


      Problem 1: Android 3.0 NOT 3.1

      [2011-07-19 22:39:02 - DemoKit] Performing com.google.android.DemoKit.DemoKitLaunch activity launch
      [2011-07-19 22:39:06 - DemoKit] Uploading DemoKit.apk onto device '380624742017317'
      [2011-07-19 22:39:08 - DemoKit] Installing DemoKit.apk...
      [2011-07-19 22:39:09 - DemoKit] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
      [2011-07-19 22:39:09 - DemoKit] Please check logcat output for more details.
      [2011-07-19 22:39:09 - DemoKit] Launch canceled!

      [2011-07-19 22:40:49 - DemoKit] ERROR: Application requires API version 12. Device API version is 11 (Android 3.0.1).
      [2011-07-19 22:40:49 - DemoKit] Launch canceled!




      Solution (partial):
      Samsung Galaxy Tab 10.1 is NOT 3.1, but 3.0.1 as of this writing therefore the libraries are missing.  Update the device to current 3.1 in the 
      Settings > About tablet > System Updates > Update


      Problem 2: Missing UsbManager

      07-20 06:29:53.880: ERROR/AndroidRuntime(7879): FATAL EXCEPTION: main
      07-20 06:29:53.880: ERROR/AndroidRuntime(7879): java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
      07-20 06:29:53.880: ERROR/AndroidRuntime(7879):     at com.google.android.DemoKit.DemoKitActivity.onCreate(DemoKitActivity.java:152)

      Solution: TBD

      Answer from Samsung on StockOverflow

      Accessory mode currently doesn't work with the Samsung Galaxy Tab 10.1. Samsung is aware of the issue and is working on resolving it. When the device does support accessory mode you should be able to use the com.android.future.usb.* APIs which will make it easier for you to write an app that works both with Android 3.1 and 2.3.4.







      As an Amazon Associate I earn from qualifying purchases.

      Google ADK - running DemoKit Android application

      Set up of Eclipse and Arduino is necessary prior to following this tutorial.

      Step ..
      Eclipse > File > New Project > Android > Android Project



      The source code for the DemoKit app is in:
      ~/Documents/Arduino/ADK_release_0512/app/AndroidManifest.xml


      For Build Target, select Google APIs (Platform 2.3.3, API Level 10).

      Step..



      Possible problems:


      Problem 1: Android 3.0 NOT 3.1

      [2011-07-19 22:39:02 - DemoKit] Performing com.google.android.DemoKit.DemoKitLaunch activity launch
      [2011-07-19 22:39:06 - DemoKit] Uploading DemoKit.apk onto device '380624742017317'
      [2011-07-19 22:39:08 - DemoKit] Installing DemoKit.apk...
      [2011-07-19 22:39:09 - DemoKit] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
      [2011-07-19 22:39:09 - DemoKit] Please check logcat output for more details.
      [2011-07-19 22:39:09 - DemoKit] Launch canceled!

      [2011-07-19 22:40:49 - DemoKit] ERROR: Application requires API version 12. Device API version is 11 (Android 3.0.1).
      [2011-07-19 22:40:49 - DemoKit] Launch canceled!




      Solution (partial):
      Samsung Galaxy Tab 10.1 is NOT 3.1, but 3.0.1 as of this writing therefore the libraries are missing.  Update the device to current 3.1 in the 
      Settings > About tablet > System Updates > Update


      Problem 2: Missing UsbManager

      07-20 06:29:53.880: ERROR/AndroidRuntime(7879): FATAL EXCEPTION: main
      07-20 06:29:53.880: ERROR/AndroidRuntime(7879): java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
      07-20 06:29:53.880: ERROR/AndroidRuntime(7879):     at com.google.android.DemoKit.DemoKitActivity.onCreate(DemoKitActivity.java:152)

      Solution: TBD

      Answer from Samsung on StockOverflow

      Accessory mode currently doesn't work with the Samsung Galaxy Tab 10.1. Samsung is aware of the issue and is working on resolving it. When the device does support accessory mode you should be able to use the com.android.future.usb.* APIs which will make it easier for you to write an app that works both with Android 3.1 and 2.3.4.







      As an Amazon Associate I earn from qualifying purchases.

      Google ADK - Arduino setup

      This tutorial explains how to set up Android ADK / Arduino environment based on the official instructions

      Step ..
      Copy directories from:
      ~/Documents/Arduino/ADK_release_0512/firmware/arduino_libs
      copy to:
      ~/Documents/Arduino/libraries


      Step ..
      Create directory:
      ~/Documents/Arduino/libraries/CapSense

      Step ..
      Copy .. 
      ~/Documents/Arduino/libraries/CapSense $ ls
      CapSense.cpp CapSense.h


      Step ..
      Installing the Google APIs Add-On (instructions
      Install "Third party Add-ons" -  Google APIs 10 revision 2











      As an Amazon Associate I earn from qualifying purchases.

      Google ADK - Arduino setup

      This tutorial explains how to set up Android ADK / Arduino environment based on the official instructions

      Step ..
      Copy directories from:
      ~/Documents/Arduino/ADK_release_0512/firmware/arduino_libs
      copy to:
      ~/Documents/Arduino/libraries


      Step ..
      Create directory:
      ~/Documents/Arduino/libraries/CapSense

      Step ..
      Copy .. 
      ~/Documents/Arduino/libraries/CapSense $ ls
      CapSense.cpp CapSense.h


      Step ..
      Installing the Google APIs Add-On (instructions
      Install "Third party Add-ons" -  Google APIs 10 revision 2











      As an Amazon Associate I earn from qualifying purchases.

      apt quotation..