IR Remote Control for Resistor Based Car Stereo Control

Hi

I am a novice when it comes to electronics, and I have never used an
Arduino. I have a bit of knowledge and experience in electronics, but completely basic. So please forgive me when it comes to any incorrect terms or misconceptions I may have.

I installed a car stereo recently that has wires (2 x5v, a 1 ground) which allows the connection of two resistor based controls (5 buttons on each). I built such a control on a breadboard (5 buttons for each input wire) and it works well. I did this following the concept on http://www.instructables.com/id/How-to-access-5-buttons-through-1-Arduino-input/ but instead of plugging in to the Arduino I plugged it in to my stereo. Works well.

These wires are usually for integrated controls that are built in to the steering wheel of a car which my car does not have, and I do not want to go to the extent of running wires up my steering wheel column etc… So my question is as follows:

They do build nicely moulded strap on IR controls for steering wheels and I want to build my device so it interprets these signals and assigns (presses) the buttons I have built for example. It seems to be a relatively simple exercise with an Arduino to interpret IR signals following the https://learn.sparkfun.com/tutorials/ir-control-kit-hookup-guide guide. I will be purchasing an Arduino because I am quite interested in electronics and want to start experimenting with a lot of things, but I was wondering if there are any cheaper permanent ways for me to build this for my car after I experiment with an Arduino to see if I can implement the concept.

I hope the above makes sense.

Thanks

I’ve done something similar. Bought three stereo radios from office works for use in the house, only to find they forget their channels after a blackout, and the touch sensitive controls go nuts when we have rain, which is every few months. So I used an Arduino Uno to analyse the IR control signals, and built an Arduino Pro Mini into a plastic box with a start switch. It sends the 98 or so IR remote signals one by one to reprogram a radio with our outback ABC stations.

Yes, it can be cheaper, but it depends on how much your time is worth. It is a trade-off; use cheaper or unassembled components and you’ll be able to spend your time instead.

Yes, it can be more permanent. My Arduino Pro Mini is soldered in. Very important for a vehicle, where temperature changes and vibration will convince Arduino Uno pins and sockets to fall out. There’s also variants of the Uno without the sockets.

thanks… i don’t mind the time thing, but I’ll start with an Arduino.
What I want to do is build an Arduino to interpret IR signals from a remote control and then press buttons (turn on and off different switches) depending on what IR code it received. For something like this does the Arduino require a power source or is the 5v from the control wire on the stereo sufficient? Remembering that the switches change the resistance on this 5V for the stereo to determine the difference in buttons… I may be showing a bit of ignorance here with electronics.
Also, what Arduino would be suited to this task, but also one which is quite versatile/general purpose so I can use it for playing around with other stuff too?
Thanks

Your 5V might or might not be sufficient, it depends on how much power is available from the source, and how much power your Arduino needs at peak. To measure the power available, build a test circuit, measuring voltage and current, at varying load resistances. To measure the power your Arduino needs at peak; you will have to first build the circuit and write the software. :grin:

A resistance remote control may have a resistor between the 5V supply in the source and the wire that you have measured as 5V. This resistor will limit the power you can draw. If you could go into more detail about how the switches in the remote control are connected to the resistors, then we can get a better idea of what is going on.

For an Arduino to drive a resistance remote control gives two design choices;

  • use a relay, bilateral switch, transistor, or MOSFET in place of the mechanical switches, with the Arduino driving the device, or;

  • use the Arduino to generate the signal voltage directly, obviating the need for any switches at all, the method is called DAC, digital to analog conversion, and requires a few extra components.

The Arduino Uno is suited to the task while you are developing the idea, because it has sockets, onboard USB, and several different ways to power it. Our sponsors here sell various Uno designs, a nice competition across different products.

hi quozi, thanks for all the detail. I will go through it in depth after work today. To answer your question about the remote control the voltage does vary depending on which button is pressed as is how I assume the stereo is able to differentiate buttons on a single wire by training to the voltage it expects (there’s a feature on the stereo for doing the button training and works quite well). I have attached a couple of pictures, one which shows the resistor based control I built on a breadboard, and the second picture of it in use.
I used a volt-meter and the voltage varies for each button. (as far as incoming / outgoing I got a bit confused here when I was using the device as it seemed to be backwards to the way I expected it in my head) in other words the (incoming) live wire had the adjusted voltage (i thought this would be measured from the ground (outgoing) but I may be getting confused here either by my lack of understanding or remembering correctly from the other week where I measured it.

Please note I had to change/tweak the strength of the resistors used so they are not the values you see on the first picture which was taken before testing and tweaking. I cropped the pictures together as only allows new users to upload one file :slight_smile:

When closed, the switches connect a resistor, or a chain of resistors, from the black wire to the red wire.

It looks like there are only two wires connecting back to the system. So there will be a series resistor or two in the system before the wires leave it, otherwise the system would not be able to cheaply differentiate the resistances. So you probably won’t be able to use it for any practical purposes, without lots of energy harvesting tricks. But to be sure, I’d need to know the value in ohms of the resistors you’re able to train the system for. I think I can see 1k and 33k resistors?

thanks for your reply… I’ll have a look and let you know the resistors used when I get home. I don’t recall the values, but I remember I was able to remove the closet one to the black and also changed the resistance between each button to be the same as each other. Also, there are three wires in total from the stereo for the control feature - a ground, and 2 x 5v. The second 5v is there so you can have more buttons. In other words 5 buttons on each wire. I’m pretty sure I tested both 5v with my breadboard, but I’ll verify and double check this. It definitely works with just one and as mentioned pretty sure the second would be for more buttons.

Thanks. So do there exist any products that act as remotes to the stereo that have LEDs or a display or other power consuming features? If not, you’ll still have to do a power test.

thanks… i’ll do a power test and see what results I get… the gap I used for the buttons are 120K resistors. I remember 80-100Kish not working (as in the stereo thought different buttons were the same)… the first button has a 1K, but the rest have 120K joining them. I’m not sure how many buttons I could put in a row, I assumed 5 due to that tutorial I linked earlier… it may be more… I have tested 4. I’ll let you know the results of the power test.

did a bit of a power test… the voltage is 3.25v i was wrong in saying it was 5v. i don’t think it has much available current so i’ll have to use another source for power. the measurements i got where as follows… with just the multimeter: 3.244v, with 1K resistence 3.241v, with 121k: 3.201v, with 241k: 3.163, with 361k: 3.125v. So I assume this means I will have to use the incoming 12v from the battery that powers the car stereo and drop it down to a voltage acceptable for the arduino… time to purchase an arduino and do some experimenting :slight_smile:

edit: just woke up with all intentions of buying something - but there is too much choice!! i wish you only listed one thing above :slight_smile: I’m thinking the http://littlebirdelectronics.com.au/products/starter-pack-for-arduino-includes-arduino-uno-r3 . I’m not sure if that contains the R3 or the R3-1, it looks like the picture of the R3 which is slightly more expensive than the R3-1 (is there much difference between them or just a different manufacturer?)

Your 3.25V sounds much more reasonable than 5V, because most modern equipment uses 3.3V inside for the built-in microcontroller.

That Arduino Uno sounds fine. It has a 20V maximum input limit, according to https://www.arduino.cc/en/Main/ArduinoBoardUno but 12V recommended limit, and since car voltage is usually 14.4V perhaps during testing keep your cabin air flow going and don’t seal the Arduino in a box.

The “R3-1” is how our sponsors have named, in their shop, the same product sourced from a different wholesaler. Ignore that part of the URL, it doesn’t follow any standard naming.

I am pretty sure I understand the first option you mention, but with the second I am a little confused. I’m not sure, but I assume that the voltage is measured by the stereo from the positive wire, as there are two positive wires and 1 ground - allowing in a sense two resistance remote controls each with a series of buttons, if it was measured on the return how does it differentiate which wire it came from… i’m probably showing complete ignorance here, and will most likely go for the first option you mention as I think I understand it better.

Resistance remote controls are used where the number of wires have to be kept to a minimum, such as when the wires have to terminate at a TRS or TRRS 3.5mm plug, or where the cost and size of a keyboard matrix microcontroller can’t be justified by the designers.

Resistance remote control receivers measure a voltage, usually the voltage relative to the negative or ground inside the system.

Also inside the system is a resistor in series with one of the wires; your tests have found a resistance in series.

So the resistance in the system and the resistance near the button form a voltage divider, and the voltage is returned to the system and sampled by the receiver.

All you have to do is generate a voltage which is different to the at-rest voltage; and you have done that on a breadboard already using switches and resistors.

A relay is a magnetically activated switch. It has the advantage of galvanic isolation; no electrical connection. Disadvantage is coil current and sound. The coil current and associated backward rush of current means you need a special drive circuit between the Arduino and the relay.

A bilateral switch is a semiconductor chip such as a generic 4066, also described as a quad analog switch. It has the advantage of direct connection to the Arduino, low current, and no sound. But the two systems have to share a ground. In your scenario this is possible.

In both cases, the relay or bilateral switch replace the mechanical push button on your breadboard, and the Arduino has to drive them.

Another option I forgot to mention is an optoisolator, which is an integrated circuit package containing an LED and an optically driven transistor. The transistor can be the switch. An Arduino can drive the LED directly. You can’t see the LED. It provides full isolation.

The cheapest option without isolation is a transistor. That’s probably what I would use.

thanks quozi… really appreciate all your help and advice, and as you can tell my knowledge is very limited… from what i’ve read and understand so far about MOSFETs it sounds like the Arduino will decode the IR signal and depending on the message send signal to the appropriate MOSFET which will connect the circuit my button is currently doing… is this the same case with a transistor? Also, I’m assuming I would need 1 per button, so if I had 10 buttons I would need 10 MOSFETs? I’m assuming this is also limited by the number of outputs the Arduino has? Are you able to provide me to a link of the items I would need and maybe a tutorial that would get me familiar with the process. Do these suit: http://littlebirdelectronics.com.au/products/n-channel-mosfet-60v-30a or do you mean something else when you say transistor? Thanks again.

Yes, the Arduino does roughly the same job no matter whether you use a relay, bilateral switch, optocoupler (optoisolator), transistor or MOSFET.

Yes, you would need one of them per button that you want the Arduino to be able to “press”.

The MOSFET you link to is not what I would use. Too big, too costly. The voltage you need to switch is no more than 3.3V, and the current will be in the microamps. The MOSFET you link to is for 60V and 30 amps, designed for really big jobs by comparison.

I would use a 2N7000 because that’s what I’ve got on my shelf. It is called an N-Channel Enhancement Mode Field Effect Transistor. The source pin would go to ground on the Arduino and the black cable on your breadboard. The drain pin would go to the resistors then the red cable. The gate pin would go to an Arduino digital output.

Without the Arduino connected, a 2N7000 might be tested by giving it either 3.3V or ground on the gate pin. (But not with the gate pin disconnected, that’s called a floating gate and is unpredictable).

Sorry, I’m not aware of a tutorial, but there’s bound to be one, try searching.

Also, learn about electrostatic discharge protection. The 2N7000 can be destroyed by accidental finger touch, as can some parts of the Arduino. You don’t have to have felt the discharge to have caused damage. The damage can take weeks or months to appear after a discharge.

thanks for the info… looks like 2N7000’s are the way to go… i did read about the enhancement mode thing on a page about mosfet, but i was searching littlebird for the parts and the mosfet i found was one of the two i could find… it did seem a bit pricey, and voltage threw me off but when i read the description it seems like that was a max voltage and it only needed a small voltage at the gate to open the flow… … doesn’t look like littlebird have the 2N7000’s, only 2 of them that are part of an experimenters kit… I’ll have search around other stores. thanks… i’ll make sure to read up on how to be careful with them too.

2N7000 retail in Australia for about $0.60 to $0.65 from Altronics or Jaycar. You’re right, our sponsors here don’t seem to have them listed. Mouser have them for $0.38 in tens, or $0.166 in hundreds. Element14 have them too, about the same price. There are lots of variations, but the ones from Altronics or Jaycar are adequate to your purpose. Quite cheap, so buy extra and learn how they work and how to break them. Hope that helps.

thanks… i’ll head down to jaycar today :slight_smile:

another question if i may… i’m assuming to get the highest number of buttons on a wire i need to find the least resistance gap that my stereo will differentiate between… as mentioned, 120K seems to do the trick but I may play around a bit more to see if I can get it lower if this is the case… Also, are there specific type of resistors I am after - I was thinking of buying a bunch but I am quite lost when it comes to the different specifications besides the ohm value.

Without knowing the software in the microcontroller inside the system, and without any specifications from the manufacturer, you have to treat it as a black box and test it.

I think your earlier test of voltage may have been a series resistance with the meter. Do it again with the resistance across the wires, which means in parallel with the meter. As the resistance falls, the voltage should too. Your earlier test showed reverse.

Any of the eighth or quarter watt resistors should do for this purpose, but you can also calculate. A quarter watt resistor has a maximum power of 0.25 W when soldered down and given free or passive air flow.

A watt is measure of power. Power is calculated by multiplying the current by the voltage. Current is calculated by dividing the voltage by the resistance. Refresh your memory of ohms law if necessary.