Calendar

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

Active supporter of WikiPedia
Support Wikipedia

Geocaching

Profile for uwezi

Replacing three remotes

Idea

You know the problem – with every new gadget comes a new remote control, and while there are programmable and universal remote controls out there, they will never just do what you want.

The three main remotes in my living room.

The three main remotes in my living room.

For controlling my tv, my digital box and one of the wall lights in my living room I used to have three remote controls. Each of these remotes had a gazillion buttons which I never ever use, and the ones I use regularly were partly placed at inconvenient positions. For a couple of years now I had suggested a remote control as a microcontroller project to my students, but only this year Josefine and Tobias pursued this project and gave me a proof of concept.

Libraries

There are two great libraries to give your microcontroller project access to the world of infrared remote controls, IRMP for the receiving end and IRSND for the transmitter part. While my students combined both libraries into a single, programmable unit, I only left the self learning part as an option, but went for a fixed layout of the remote until now.

Sniffer

However, I first constructed a small infrared sniffer in order to acquire the codes sent out by my existing remote controls. It uses such a simple circuit that I didn’t bother to make a printed circuit board but rather copied the circuit directly from the breadboard to a veroboard.

breadboard construction of the "infrared sniffer"

breadboard construction of the “infrared sniffer”

with the Nokia-display in place

with the Nokia-display in place

It would have been good enough to keep the IR sniffer on a breadboard, but this time I even stuffed it into a small box.

The infrared sniffer in a small box.

The infrared sniffer in a small box.

Design

Looking at what I needed from my three remote controls I came up with 32 buttons in total which can conveniently be arranged in a 8×4 matrix – at this point I decided against the use of capacitive buttons like my students did, and opted instead for regular push buttons, and without testing anything on a breadboard first I directly went into the design of a single-sided circuit board in KiCAD. I chose to use two infrared emitting LEDs which can be either connected in series or parallel by means of jumper links – depending on the supply voltage. Since I then decided to use three AAA cells as power source, giving me nominally 4.5 V, I selected the series connected version with a 10 ohm dropper resistor in the final design.

Schematic diagram of the remote control.

Schematic diagram of the remote control.

Layout

I spent almost a day trying to make a single-sided layout around a TQFP32-packaged ATmega328 before I started over with a larger DIP28-packaged one. The biggest problem was the placement of the chip in the middle of the key matrix and still be able to route the column wires all the way through – the wide spacing of the DIP28-package makes it possible to thread the wires between two pins which is impossible for the TQFP32-package if I wanted make the circuit board using the toner-transfer technique.

KiCAD #D rendering of the circuit board, showing the button matrix.

KiCAD #D rendering of the circuit board, showing the button matrix.

KiCAD 3D rendering of the circuit board, showing the microcontroller, ISP connector and IR LEDs on the rear side.

KiCAD 3D rendering of the circuit board, showing the microcontroller, ISP connector and IR LEDs on the rear side.

Etching

For the toner transfer process I laser-printed the mirrored pcb layout onto a sheet of glossy inkjet paper before using my modified paper laminator to transfer the toner onto a cleaned piece of copper-clad FR4 base material. After etching the circuit board then in sodium persulfate solution I trimmed the board to the exact size, drilled the holes for the microcontroller, the ISP connector and the infrared LEDs. Then I tinned the traces and soldered everything in place.

The etched, drilled and tinned circuit board.

The etched, drilled and tinned circuit board.

Front side of the finished circuit board with all 32 smd push-buttons in place.

Front side of the finished circuit board with all 32 smd push-buttons in place.

Rear side of the finished circuit board showing the socket for the microcontroller, the ISP port and the infrared LEDs.

Rear side of the finished circuit board showing the socket for the microcontroller, the ISP port and the infrared LEDs.

Designing a case

The final touch was of course to make a matching case for the remote – I did this using the parametric engine of OpenSCAD, before slicing the file in Cura and printing it on my Wanhao Duplicator.

3D view of the housing ot the remote control in OpenSCAD.

3D view of the housing ot the remote control in OpenSCAD.

So here it is then, The outer front is still a bit blend and I am still thinking over the best way to label the individual keys.

Final assembly in the 3D-printed casing.

Final assembly in the 3D-printed casing.

The (almost) final remote control.

The (almost) final remote control.

Performance

  • yes, it works nicely!
  • the microcontroller is kept in sleep mode, from which it wakes up with a pin change interrupt when any button is pressed
  • peak current through the LEDs is about 150 mA
  • standby current consumption of the remote control is about 70 µA

Bill of materials

  • 1 pc Atmel ATmega328P
  • 2 pcs TSUS5400 IR LEDs
  • 1 pc MMBT2222A NPN transistor
  • 32 pcs 6 mm x 6 mm 4-pin smd push buttons
  • 1 pc 0805 ceramic capacitor 4.7 µF
  • 1 pc 0805 ceramic capacitor 100 nF
  • 1 pc 0805 resistor 10 ohm
  • 1 pc 0805 resistor 10 kohm
  • 3 pcs 0805 resistor about 470 ohm
  • 1 pc 0805 blue LED
  • 1 pc 0805 red LED (optional for self-learning)
  • 1 pc TSOP4838 IR receiver (optional for self learning)

File download area

1 comment to Replacing three remotes

  • uwezi

    2020-07-14 UPDATE

    A couple of days ago I had to change the batteries in the remote for the first time after about 3 1/4 years, at a continues current draw of 70 µA this corresponds to a total charge of 2 Ah, quite ok for a set of AA alkaline batteries including their self-discharge.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>