Concept
Here I left my own restriction to use only well known and world wide available parts... The microcontroller is a 8051 of the company STC in Peking which you can buy in China only. Why this?
- The performance of a 8051 is more than enough for our task
- the 8051 architecture is well supported by the open source sdcc C-compiler
- the chips can by programmed with a very cheap USB-to-TTL serial adapter (e.g. with PL2303 chip) and the wonderful program stcgal
- I was curious about how these Chinese processors work - I had no problems
- the processor is available in the PDIP40 housing - as it used to be... :o)
- the microcontroller should be easily available on ebay or AliExpress
- in opposite to modern, very complex ARM-processors 8051's are so simple: I had a lot of fun to program it (and I learned much to keep things simple...)
The tasks for the processor are:
- receive infrared signals from remote control (NEC protocol)
- interpret the commands from the rotary encoder
- control the digital potentiometer and the input selector
- feat the display with information
- generate the switch on/off commands for power supply and plop-noise protection
- store all information power-safe
Hardware
The schematic doesn't contain any surprising parts. Digital outputs are typical for a 8051 which has weak pull-up's per default. I realized the output driver as high side parts to be always in a safe state (also during startup - this avoids an unexpected switching of the relays).
An Atmel 93C46 eeprom is used as non-volatile memory. The SPI-interface of this chip is old fashioned (not 8bit oriented) but the chip is produced by many manufacturers (Microchip/Atmel, On-Semi, ST, Fremont...) and so very common. As remote control I'm using one with 21 keys and a (NEC) UPD6122 compatible chip.
The whole KiCad-project (including Gerber-files) can be found here. Remark: it was made under Linux with KiCad-version 4.0.7 using this additional libaries. The bill of material (bom) as semicolon separated text file contains some comments about part dimensioning / quality.
Software
The complete source code can be download here. Hint: I'm using fossil as software configuration management system. A compiled binary file can be found here.
To simplify the programming I added the switch SW1 which can interrupt the power supply of the microcontroller. Start stcgal with power off and actuate the switch when stcgal demands it (power cycle).
License
Please keep in mind: all content on this page is licensed under the terms of the GPLv3.
falk.richter*at*yandex.com
Last update: December 20, 2019