![]() |
![]() |
![]() |
![]() |
Arduino Data Terminal
|
Back to Automation | Data Terminal Mechanical | Data Term Electronics | Ceiling Support |
Arduino Sketch | Membrane KeyPad |
I have several projects in mind for my workshop, most of which use an arduino of some size (Uno, Nano), there are two dust collection systems (which could use a dust bucket full detector).
I also would like to monitor temp and humidity in the shop, and maybe when the overhead door is open.
I also needed some way to communicate with the latest project, automating my 4-6" dust collection system.
I need something that supports both input and output.
I want something small but with enough keys for flexible control, and enough output characters to display several lines of info.
After a little thought, I decided, instead of using several buttons to control the DC, I would build a small terminal simlar to what I did at Ti, about 45 years ago (technmology has changed a lot since then).
I have a 2004 LCD and a 4x4 keypad, so I thought these would be a great base for this project.
The actual hardware requirement is small: a Nano, the LCD2004, 16 key Keypad, and a PCF8574 I/O expander plus 3/16" oak plywood cabinet.
It also means I can directly change programming values from the keypad instead of changing the sketch then compiling & reloading (flash memory loads is a finite number).
For instance, when I'm setting servo positions I can use the Data Terminal to select a valve, display it's current value, then add or subtract using two keys, and also select open or closed (see Dust Collector sketch "Set Servo" command).
When I decided to make an Arduino data terminal for the dust collector automation project, I thought a lot about what kind of cable to use. I like not having separate data and power cables. The Arduino Nanos all have a USB connector mounted, but my research showed it isn't easy using them for master slave comm, although it would be if you could just forget the USB protocol and use the USB cable for power and RS-232 rx tx. The RS-232 voltage swing will only be 0 to +5 Volts, not +12 to -12 Volts as RS-232 is normally specified, due to the Arduinos only using 0 to +5 Volt signaling.
About the power/data connection to the Data Term, I initially used a 8 wire CAT-5 cable but after reconsidering, I will switch to a 4 wire flat cable with JST connectors, like the DustDetector,and Valve4! The RJ45 connectors for PCB mount are difficult to find and $$$ pricey. CAT-5 is normally 24AWG, I have some 4 wire secutity cable that is 22AWG which would be good (I have already used it for the DustDetector2 and Valve4 cables). Here is apparantly a good cable. At 5V DC the LCD2004 draws about 2.5Ma the Nano draws abot 20Ma, so a total of 5 - 22.5Ma for the Data Term. The Nano's weak pullup is 20K (2*10^5) so when 1 key is pressed 5/2*10^5 = 250Ua .
I saw lots of articles on Arduino, PCF8574, and 16 key matrix keypads, but they seemed a little crude, so I played around with the PCF8574 and keypad till I found an approach I liked. I ouput hi on the 4 column bits (weak pullups) and lo on the 4 row bits, then waited for an interrupt. When a key is pushed, it connects one row to one column causing the column to drop to zero volts (nearly) and the I/O expander yanks the interrupt line down. The keypads are very noisy (lots of bounce) switches but I finally got a debounce that works OK. You can't "peck" the keypad you have to actually press the key and it works great. The keypad needs to be firmly attached to something (mechanically) so it doesn't move when you push a key which exacerbates the noisy switches.
![]() |
Finished data terminal showing DustAuto Idle message with dust bin free space. |
![]() |
|
![]() |
|
![]() |
|
![]() |
|