Author Topic: IR Remote  (Read 22324 times)

agargautam

  • Newbie
  • *
  • Posts: 6
IR Remote
« on: August 17, 2012, 07:11:59 pm »
I was wondering if digispark along with IR shield can be used as an IR remote to control say a DVD player?
« Last Edit: August 17, 2012, 07:11:59 pm by agargautam »

sparr

  • Jr. Member
  • **
  • Posts: 70
IR Remote
« Reply #1 on: August 17, 2012, 09:29:17 pm »
the IR shield is for an IR receiver. an ir transmitter is just a special kind of LED, so you could incorporate that into any shield that has room for a LED.

agargautam

  • Newbie
  • *
  • Posts: 6
IR Remote
« Reply #2 on: August 18, 2012, 12:21:58 am »
thanks sparr for the reply...guess I was not very clear above...my query has two part
1. can IR shild be used to put ir transmitter instead of receiver? your reply suggest that it can be done. right.
2. does attiny85 (used in digispark) will have enough memory to mimic typical dvd player remote (if not all, say 10 odd buttons). There is an arduino IR library (https://github.com/shirriff/Arduino-IRremote) but I am not sure about the memory requirement.

sparr

  • Jr. Member
  • **
  • Posts: 70
IR Remote
« Reply #3 on: August 18, 2012, 08:51:33 am »
1. You wouldn\'t want to use the IR shield. The receiver is a lot more complicated, so that shield has a lot of extra parts on it. An IR transmitter is *JUST* an LED, with no additional hardware. If you don\'t want to put anything but an IR LED on a shield, the proto shield would be the easiest way.
2. yes, plenty. look into the tv-b-gone for an example of how many IR remote codes can be fit onto one attiny.

how do you plan to tell the digispark what you want it to tell to the DVD player? that is, will you have buttons or something else?

agargautam

  • Newbie
  • *
  • Posts: 6
IR Remote
« Reply #4 on: August 18, 2012, 10:09:34 am »
I have quite a few ideas around this, just to tell you couple of them
1. I\'ll like to control my air conditioner through IR transmitter. Essentially control temperature, swing, and on/off function based on room temperature / time of day etc. or even remotely. My AC has basic climate control functions but they are very limited.
2. Similarly in case of DVD player, whenever I switch on DVD player through remote, digispark (with IR receiver and transmitter) should detect the power on command and switch on my TV and yamaha receiver too as well as put my receiver in dvd mode.

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
IR Remote
« Reply #5 on: August 29, 2012, 10:19:53 pm »
I built an IR Transmitter using an attiny85 (same chip as the digispark) and the v-usb software usb stack already. I\'d be more than happy to publish my source code and schematics for those who\'re interested. It has a ruby interface which works well on Macs - I don\'t know about other operating systems. My circuit is a bit dodgy - I\'m overdriving the AVR\'s outputs and the infrared LEDs, and it doesn\'t seem to play well with some usb ports as a result, but that could be fixed with a few resistors and a transistor. Pics are up on my site at http://creativepony.com/gallery/browse/Craft/Infrared%20Blaster - I use it to control the ceiling fan and light in my bedroom.

My design also includes an RGB LED placed behind the two infrared LEDs as I had a couple of spare pins on my defacto-digispark. I use these as status indicators for various things - if my website goes down, or someone presses the doorbell, it can do little animations. I also have the fan remote program blink the yellow or blue LEDs when sending remote control requests to indicate it\'s working.
« Last Edit: August 29, 2012, 10:22:46 pm by Bluebie »

agargautam

  • Newbie
  • *
  • Posts: 6
IR Remote
« Reply #6 on: August 30, 2012, 10:39:31 am »
Final pic of infrared blaster is really cool. I would love to try your code once I get mu hand of digispark.
« Last Edit: August 30, 2012, 10:39:54 am by agargautam »

lahtinenk

  • Newbie
  • *
  • Posts: 2
IR Remote
« Reply #7 on: September 01, 2012, 12:55:38 am »
I have wondered how I could turn my PC on with a remote control. Perhaps I could wire a MOSFET (or transistor) in parallel with the on/off switch, but I have seen some settings about USB on/off function? Does anybody have any suggestions?

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
IR Remote
« Reply #8 on: September 01, 2012, 03:32:56 am »
It depends on the PC and the settings.  Some have wake on lan settings, where if you send an IP address to the machine, it will wake up.  But that is probably more complicated with a digispark and overkill.

Some have a setting in the firmware to wake on USB device.  It is probably meant for moving the mouse or keyboard, but it may be more general to wake on any USB event.  In which case you could have the digispark send a message down the USB serial line.  If it is only mouse or keyboard events, then you would have to have some firmware on the digispark that simulates pressing a shift or control key momentarily.  In the Arduino world, the Leonardo is more suited for this than the Uno/Mega are.  I suspect the digispark may be suited for this as well, but Erik and company would have to chime in.

If you don\'t mind hacking the computer itself, it should be a simple matter to use an opto-isolator to simulate the press of the power button (you would do it in parallel to the real button on the case).

You could use the relay shield to turn power on/off to the computer (feeding the power line through the relay).

If you don\'t want to hack the case, you could always use the digispark to drive a servo to press the button.  One of the previous kickstarter projects I backed was \"Roy\" which is a robotic arm/hand/finger and I bought 2 fingers, and I intend to use them to press buttons like camera shutters.

I tend to think using the digispark to simulate a keyboard to do the wake up is perhaps the best solution.

sparr

  • Jr. Member
  • **
  • Posts: 70
IR Remote
« Reply #9 on: September 01, 2012, 01:20:37 pm »
You wouldn\'t need a mosfet or transistor to turn on a PC. The motherboard power-button signal is a logic level signal. It isn\'t actually switching the mains power or even the whole 12V rail directly.

lahtinenk

  • Newbie
  • *
  • Posts: 2
IR Remote
« Reply #10 on: September 02, 2012, 12:40:44 am »
Thank you sparr,

I must search little more information, it has been surprisingly difficult. But basically I just need to connect (5V) logic to the power switch. I have not seen any schematics but my guess is that it is low level signal. Perhaps I need to experiment with timing.

I think the USB power on would be little more versatile and universal.    

moloned

  • Newbie
  • *
  • Posts: 7
IR Remote
« Reply #11 on: September 04, 2012, 04:29:26 am »

Emerica

  • Newbie
  • *
  • Posts: 4
IR Remote
« Reply #12 on: January 05, 2013, 10:13:13 pm »
What would be really nice is if someone with a little knowledge on the pwn timers to patch the IR Remote library to support the at45.

I got one of the sparks to take the place of my Diecimila which is transmitting remote codes to a led marquee. I have a cronjob that sends the weather to it every 10 minutes.
I made the change over to digiusb easily, to send the text, but transmission of the NEC codes via ir is tricky as the IR Remote lib wont compile and is setup for pin 3 on the Diecimila
I\'m using a Ir shield and have the whole board populated.The bridges are soldered to bring the ir led to pin 0.


driffster

  • Newbie
  • *
  • Posts: 42
IR Remote
« Reply #13 on: January 13, 2013, 08:32:01 am »
I agree with Emerica, it would be neat, I been using an Arduino to replace a button on a dead remote control (an aspect ratio... the stupid TV doesn\'t have a way to change it without the remote). I wanted to port it to the digispark, but without the library I will have to send the code manually (I\'m using the arduino to decode the protocode and send it with the IRremote library).

saperlot

  • Newbie
  • *
  • Posts: 16
IR Remote
« Reply #14 on: January 15, 2013, 07:39:26 am »
I\'ve found this ported version for the tiny\'s but i did not yet checked if it works with the Digispark:
https://github.com/TKJElectronics/ATtinyRemote