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.

24 button keyboard encoder

Status
Not open for further replies.

Boncuk

New Member
Hi all,

I'm designing a test controller for my self designed evaporative cooling system, consisting of two parallel three-speed fans, each supplying max. 40,000cubic meters/hour, combined with 18 spray nozzles connected to 6 solenoid water valves.

The system contains three temperature sensors (temperature to PWM-output) to measure temperature at the heat exchanger input, output and ambient air temperature.

The purpose of this unique controller is to plot power demand for each individual condition to determine the best (energy preserving method and parameters) for the final product.

So I need a total of 24 pushbuttons to switch fans and valves individually.

Four I/O ports won't suffice to accept all the desired in- and outputs.

There are three methods I'm thinking of:

1. Use a one wire encoder with a resistor network to feed the matrix voltage into an analog input of the MCU. This would work fine without overlapping voltages between keys. The downside of that method: The output voltage changes log (instead of linear) which makes a look-up table necessary (taking up memory space)

2. Use an MM74C922 and expand it from 16 to 24 buttons using NAND-gates. The output would occupy 6 I/O pins with binary coded outputs (data 'a' through 'e' + 'data available')

3. Use another MCU (ATMega8) and connect four columns and six lines to the available I/O pins + binary data 'a' through 'e', one 'data available' + one feedback 'data received' from the master MCU to clear outputs 'a' through 'e'.

The master MCU will be an ATMega32 with enough memory space to write data on an SD-card and switch outputs according to key inputs.

Which method would you prefer?

Here is the silk screen of the ATMega8 board.

Regards

Boncuk
 

Attachments

  • 24-KEY-MATRIX.gif
    24-KEY-MATRIX.gif
    37.9 KB · Views: 219
Morning Hans,
You could use the expanded 74C922 to drive a 8bit parallel to serial shift register and clock the key patten out serially.
 
Morning Hans,
You could use the expanded 74C922 to drive a 8bit parallel to serial shift register and clock the key patten out serially.

Thanks Eric,

I'm close to become a complete idiot. :D

That method would save some more I/O pins. :)

Kind regards

Hans
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top