Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Rotary volume encoder to infrared advice needed please.

Status
Not open for further replies.

Imagewerx

Member
I need to build an infrared remote master volume control for a DSP based audio system,and it needs to be RC6/Sony compliant.

So I need to take the signal from a standard rotary encoder and turn it into the RC6 equivalent of "volume up" or "volume down".I've Googled this and can only find circuits that work the other way round,i.e. that take the signal and turn it into something that can do the same to an analogue audio signal.

Can anyone please give me some advice how I'd go about this please?

Chris.
 
OK, I'll take a stab in the dark, How about starting with this: http://www.tauntek.com/irmimic2-learning-ir-remote-control-transmitter.htm

and then "convert" the rotary encoder to "UP"/"DOWN" signals and drive the inputs.

Don't know how fast, things could keep up because there would be no buffering of commands. e.g. 1/2 turn = 8 units of up/down. Don't know about required pauses either.
Thanks for that,but I don't understand how that would directly sense which way the encoder is being turned to know if it's volume up or volume down?
 
Ok thanks again,but this is way above what I really understand.I was hoping for a simple plug-and-play solution,or maybe using an Arduino?
 
Anyway, using a 2 input NAND on the UP/~DOWN output clock followed by an Open collector inverter or open drain inverter should get you the ~DOWN signal you need for the IR device.

Then taking a 2 input NAND and tie the inputs together and connect to UP/~DOWN, you get an inverted signal. Follow that with a 2 input NAND (clock and this signal) followed by the OC inverter and you should get ~UP.

The microcontroller solution works too, but you have to be able to read the encoder and generate the modulated 38kHz carrier to an IR LED.

So, it's like 3 chips. a DUAL FF, QUAD Dual NAND, HEX Open collector inverter and the IR thingy.
 
Last edited:
I don't know anything about RC6 or your rotary encoder. But most encoders use phase to determine direction. Maybe you could post the spec.
 
I think, you can test the feasability of the approach by getting something like a 16 pos/360 deg encoder and use just one of the outputs connected to an open collector inverter. It would only work in one direction, but it should prove useful.

I don;t have the means to draw (even by hand) and or scan a schematic right now.
 
Ahh, there we go. If you look at the timing diagram KISS posted for the rotary encoder you can see that the phase changed depending on the direction. You can feed these two signals into a D type flip flop and get direction out. Then it is a matter of counting the number of pulses under that direction bit.
 
Thanks for your help so far guys,but this way above what I understand how to do by myself.I was hoping for a nice ease plug-and-play solution.Judging by the number of rotary encoders in use now,I'd have thought there would be a dedicated IC somewhere to decode the output from one of these?
 
I got really lucky searching. The ELM403 looks like what you would need with the other device. https://elmelectronics.com/ebench.html#ELM415

The only other chip you might need is a HEX Open drain inverter to interface to the IR chip.

We might be able to walk you through this one. The complexity is considerably less now.

Ok thanks for that,it could well be exactly what I'm looking for!

But how will I know if I need 2x decoding or 4x decoding?
 
I mentioned an Open drain inverter and this **broken link removed** might fit the bill. It is a surface mount chip.
Any unused inputs have to be tied to Vcc or Ground.

The Open Drain acts like switch to ground. So, a positive on it;s input would make a contact to ground. This would be in esscence in parallel with the UP/DOWN switches used in the IR module.

The ELM chip can invert the UP/DOWN outputs if required.

A 5V supply can be bought from Sparkfun, for example. Here is an example: https://www.sparkfun.com/products/10804 The DC adapter would be separate.

I think what you mean by 2x or 4x encoding is how fast the encoder responds. It basically mans, can you turn the knob faster than the IR command get output? Not real sure how to answer that, except to leave room on your your PCB for a dual J-K flip flop and reset circuit. With J and K both a 1, and something is applied to the CLK input, the IC will divide by two.

It's a little work on two parallel paths:
1) Get up/down switches to create the volume up/volume down signals
2) Get the encoder to create UP/Down signals. You can initially just apply them to the Open drain chip, a resistor and two LEDs. You can use 4 of the inverters: Two for the LEDs and Two for the interface to the IR chip.

Then connect them together.

The inverter I picked out was out of the air. I might be able to find on in a non surface mount package. You can get a chip of choice (Digikey p/n) mounted on a DIP package from a company in Canada.
 
Thanks,I guess it's pretty obvious if you stop to think about it.I've got 5 volt supplies all over the car,so at least that bit's already sorted out.

This was always planned to be a bit on the crude side.The DSP unit this has to work with will learn any standard infrared remote control commands.I was planning to use any old remote control that I can teach to it,and simply wire the outputs from the decoder across the switches on the remote's PCB without need all the other bits and pieces.Or will it never be as simple as this?
 
There are a few reasons I can think of to use the IR learner PCB:

1. Smaller
2. You probably will have to use an OPTO FET across the button contacts because the buttons are matrix scanned. e.g. **broken link removed**
3. You can probably use your TV remote or something like that to train.
 
Ok,I get your point.So apart from the IR mimic and the EL403,do I definitely need the open drain inverter and anything else?
 
You definitely need the Open drain inverter. Here is one in a PDIP package.

You need pull up resistors for the encoder and 0.1 to 0.01 uf ceramic bypass caps for all of the IC's. You might need or could use a couple of LEDs and pull up resistrs for troubleshooting. R <= 5-Vf which is about 1.8 to 3.1 depending on LED color. W > I*I*R; Generally you can use about 10 mA for the LED (10e-3 Amps.

Remember, I suggested using two of the inverters. One to drive the IR Mimic and one to drive an LED. With the extra 2 gates available you cap put it on the encoder outputs. Use a couple of colors. The LED's should give you instant satisfaction.

You need some sort of breadboard, and possibly some connectors and some headers to maybe put everything together. If you have room, you can puta coupl of tact switches on the board too. You can use these for debugging and leave them in place.

Since this is a car environment, you have to pay attention to the 5V supply. I don't know what your using, but say it used a 12 V input. It would be best to AT LEAST use an 18 V TVS diode (either bidirectional or Unidirectional) on the 12V input. And use a 1N5404 (?) 3A,200 PRV reversed biased in the imput to protect against transients.

Connectors are always trouble to select and 99% of them require some sort of crimpers. Some cases have posts to mount the PCB.
Mechanically, you will need a case and spacers.

Wire wrap wire can be used to make some of the connections. Machine pin sockets are you best bet, although for automotive no sockets at all is the absolute best.

Just make it possible to add a J-K flip flop and reset circuit like a schmidt trigger inverter, so a couple of IC's.

You can try a solderless breadboard first if you want. A ribbon cable might be useful as well even for multiple colored wires. Digikey should have them in whatever length you need. Breadboards can have no copper (I don;t think this is appropriate), pad per hole (both round and square) and strip board. This consists of strips of copper that you cut. You may need some solid wire and or tinned uninsulated wire for jumpers.

Lay it out the connections on paper first. before trying to transfer it to a PCB.

So, anyway, one to three parallel projects:
1) The power supply and protections.
2) The encoder to UP/DOWN interface. Blink UP Down LED's.
3) Get the IR MIMIC to work with push buttons first.

www.digikey.com and www.mouser.com are both good places to order parts from. www.newark.com and www.alliedelec.com and Jameco are others.

Soldering iron and solder. The ROHS solder is higher temperature. 60/40 lead/tin has different solidus and solidus temperatures, so it melts and solidifies at different temperatures. The leaded solder 63/37 is best to use for surface mount stuff.

This **broken link removed** might work for you. and these **broken link removed**

They could help mount the IR mimic on a main board.

If you need a connector crimped, I'd be happy to do it for you if I can. (East coast US)

Lots of little stuff goes into any small project.

Any questions, ask.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top