Arduino IR project (Speaker control)

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Arduino IR project (Speaker control)

Postby smilykoch » Tue Mar 13, 2012 8:42 am

Hey guys..

Can any1 tell me if this would work..?

I have a Logitech Z5500 speaker system, my plan is to crack open the control pod and put this curcuit in between the IR receiver and the Control pod PCB:

ir-htpc.JPG
Curcuit
ir-htpc.JPG (37.15 KiB) Viewed 1887 times


The result i want to achieve would be:

- Detecting when the speaker system is in standby mode and when it is on.
- reading the IR signals using the IR receiver in the control pod using the IR-remote library for arduino.
- writing ir signals from arduino to the control pod by wire directly (also using the ir-remote library).
- use the speaker system even when the arduino is unplugged.

all this only using 3 wires between the control pod unit and the arduino.

Cheers guys.
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby philba » Tue Mar 13, 2012 6:32 pm

I don't quite understand what this is doing but a couple of things jump out. The LEDs in the optoisolators need current limiting resistors. Given that you are driving 2 optoisolators from the output of an IR receiver, I'd look into how much drive capacity the receiver actually has. The ones I've played with can only do a couple mA and would probably not work for this application. I'd look at using transistors to drive the optos. This would invert the signal but since the opto also inverts the signal it would be back to how it came out of the receiver.

But to be honest, I have no idea why you would want to use optos at all since the main reason is for isolation and you aren't getting that.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR project (Speaker control)

Postby smilykoch » Thu Mar 15, 2012 2:22 am

Ohh, okay.. let me try to explain :)

i see i need the resistors, i have tougt of em, just forgot to draw em.. i reached a conclusion, that about 100 ohm on each LED was appropriate..

But, what i basicly want is to make my Z5500 speaker system 2 way controlable by my HTPC through my arduino, like:

HTPC -> Arduino -> Speakers

And

Speakers -> Arduino -> HTPC.

I honestly didnt think about how many mA my IR receiver can deliver..? so a transistor in between the IR and Optos?

I dont know if there is a better way than this, if.. please do share?

Also, the reason of the optos is, that i needed a way to do this, where the speaker system would remain working if i remove the arudino from the equation.. also it gives me a way to control the speakers through the "BASE" without backfiring anything into my IR-receiver..? is that the wrong way to do this?

Regards,
Mathias.
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby smilykoch » Thu Mar 15, 2012 2:37 am

So ur basicly saying like this?

IR-HTPC2.jpg
IR-HTPC2.jpg (161.56 KiB) Viewed 1863 times



Please do bear with me.. Im kinda noobish around electric curcuits..

Regards,
Mathias
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby philba » Thu Mar 15, 2012 2:33 pm

well, sort of... I think you have problems with way you are using the optos. Usually, they used in a "collector follower" fashion - ie, the collector is pulled to +V via a resistor (10K is common) and the output is taken from the collector/resistor junction. This inverts the signal so you'd need to re-invert it. However, If I were doing this, I'd forget the optos.

The complexity you added is that it has to work with your arduino plugged or not. You really only need to switch the signal line. You could probably do that with a small relay that get's powered when the arduino is plugged in (or turned on?) though that's probably not good for a battery powered system. You could also do it with a demux like the 74HC4852 (though you'd use only about 1/4 of the chip).

The relay approach is like this: you need a single pole double throw relay. Connect the IR receiver output to the common terminal. Connect the NC terminal to the speaker PCB. When the coil isn't powered, it works as it always has. Connect the NO terminal to you arduino input and the output to the NC terminal (i.e. speaker PCB input). When you plug in the arduino, power the the coil and your Arduino is now in control. The demux approach is similar but a bit more confusing.

One other approach is to use your arduino to output IR control signals with an IR LED and you don't have to make any physical connections.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR project (Speaker control)

Postby smilykoch » Fri Mar 16, 2012 2:10 am

First.. i did think of using an IR-led... but that would not allow me to read the IR signals from the remote to my arduino, unless i put another receiver in also..

the relay thing could work though..

so u want it as this:

When the arduino is plugged in, the code would handle repeating the IR signal from the receiver to the Speaker PCB?
and when the arduino is unplugged it would actually just go through the relay to PCB?

but, how would i then be able to write ir-codes from the arduino to the speaker pcb with the relay method?

also one last thing is, that i would like to keep it on 3 wires so i can use a normal 3,5mm stereo jack betwen the speaker system and my HTPC..?
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby philba » Sat Mar 17, 2012 11:33 am

Hmm, more complexity. I'm not completely clear on your use scenarios but will take a stab anyway. It wouldn't hurt for you to write them out for yourself, I do when building something.

On the non-contact approach, you could use an IR receiver to read the signals from your remote. example: http://www.vishay.com/docs/81733/tsop382.pdf

The 3 wire requirement could be done by just connecting the arduino pin directly to the signal line. You would keep the pin as an input most of the time. It won't load the signal line much at all. Your arduino would listen on the line and receive (record?) the signals. When the arduino wants to transmit a signal, it would switch the pin to output and send the signal. I would put a resistor in line though to prevent a short in the event of both the arduino and IR receiver going at the same time, more on this in a bit. I looked up your receiver and it uses an NPN transistor with the collector pulled high for the output. The output signal is usually high except when receiving IR input. This means that you can put another signal on the output without it causing a problem except in one case - when it's signalling a low and your arduino is signalling a high. This will cause excessive current (i.e. a short to ground) so placing something like a 10K resistor between the arduino and the signal line would limit the current to .33 mA. By the way, the GP1UE281XK has a max dissipation current of .6mA (recommended) so your original scheme probably would have blown it rather quickly.

Now, another complication, it looks like this is a 3.3V part though max voltage is 6V, check to see what Vcc is. If Vcc is 3.3V, the simplest approach is running your arduino at 3.3V.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR project (Speaker control)

Postby smilykoch » Thu Mar 22, 2012 11:06 am

Hello again..

I know i am not listening to what you say by asking this.. but i would really love to stay on this road due to access to components..

would this reworked curcuit work? or is there something i have not thought through?

Unavngivet.jpg
Unavngivet.jpg (43.66 KiB) Viewed 1790 times


Cheers.
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby philba » Thu Mar 22, 2012 3:59 pm

I do think you are complicating things a lot by insisting on using the optos. Even so, your circuit still has a lot of problems. Firstly, it's not clear what you are doing with +5V and +3.3V. You need to sort out what runs on 3.3 and what on 5 in the original circuit. On your LEDs in ok1 and ok2 - that's not how you drive them. Here's an example of how it works.
Image
You probably don't need R3 and the R values are wrong for your application. You will want an additional NPN to invert the signal since the optos also invert the signal. Sorry if I was unclear on this earlier. It's not clear what you are using ok3 for - power on indicator? Just hook it directly to an arduino pin, if so.

Here is the simpler approach I suggested earlier. I think it would work just fine.
Image

Like I said, you would need to switch the arduino pin to input or output depending on what you are doing. I'd keep it mostly on input and only switch to output when you are sending a command from the arduino. If the speaker system runs on 3.3V, then you could use that to power the arduino (though be careful not to plug in USB when it's connected unless you have a 3.3V arduino).
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR project (Speaker control)

Postby smilykoch » Fri Mar 23, 2012 2:18 am

Okay, i get that i have made this a huge overkill..

BUT, are u absolutely positive that this way:

Image

wont kill the IR-receiver when i transmit FROM the arduino?

if you are, then that way is definetly the way to go! thanks! :D
smilykoch
 
Posts: 12
Joined: Tue Mar 13, 2012 8:31 am

Re: Arduino IR project (Speaker control)

Postby philba » Fri Mar 23, 2012 10:41 am

It won't kill it. Though you do need to sort out the voltage issues.

The reason why it's ok can be had by looking at the datasheet for the IR receiver. The output stage is an NPN transistor pulled high to Vcc (what ever that is) by, iirc, a 30K resistor. Output is taken from the transistor's collector. Applying Vcc to this won't kill it. The resistor in series with the arduino pin is there to prevent over current in the case that the output transistor gets turned on when the Arduino is outputting a high. [note: this only happens when the arduino is transmitting and someone clicks on the remote control.] Without the resistor, that would be a short. It could actually be smaller than 10K and you may need to experiment with the value. You want to keep the current below 6mA (max rating of the device) so Ohms law can guide you on that (V/R < .006). I'd probably start with 2.7K.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR project (Speaker control)

Postby CSC » Wed Mar 28, 2012 5:50 pm

Hi, I'm looking for an IR LED for control, but it must ON in both directions, something like 2 LEDs connected back to back in parallel, but I need it in a single package IR LED 940nm.
Does anybody know where I can find it?
CSC
 
Posts: 1
Joined: Wed Mar 28, 2012 5:41 pm

Re: Arduino IR project (Speaker control)

Postby philba » Wed Mar 28, 2012 11:13 pm

Do you mean you want 360 degrees of IR coverage? If so, perhaps you should just think it about it a bit more...
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm


Return to Arduino

Who is online

Users browsing this forum: No registered users and 7 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]