In my prior blogs, I shared the code that I used to generate a simple LCD menuing system (DMX diagnostic tool - Getting started ) and the actual DMX transmission and receive function. Today I am sharing a bunch of new changes to the system, in terms of hardware, software and mechanical designs.
Summary of changes and/or new area working:
Hardware: Change the old 2 x 42 character LCD for a 4 x 20 character LCD. Prototyped the serial memory (24cw1280 16K bytes of storage). Integrated the Li-Ion battery pack designed for WalkyII (Walky the Biped Robot - Power pack ). Completed the schematic and layout of a motherboard (Nano, LCD, Joystick, Li-Ion battery pack and necessary support electronics.
Software: Updated menuing software to accommodate the new 4 x 20 character LCD. Added I2C communication in support of the serial memory.
Mechanical: Designed (and started fabricating pieces) an enclosure for the hardware.
First, after doing my initial sketches of my mechanical enclosure, I was not happy with how things were coming together. I thought that the old 2 x 24 LCD was just too long to fit into a nice handheld case (~1 1/2" longer), plus I was not in love with the soldered on 14-pin ribbon cable, so I swapped it out for a nice new 4 x 20 LCD with a pair of single row headers on opposite ends of the PCB. A nice aspect of the new display is that although in is a four line display, the height of the module is only slightly larger than the old two line module. This format allowed me to position the X/Y joystick along side of the display (instead of under it) and keep the enclosure under 5" in width. (More on this later).
Here are a couple of screen images with the new display:
After connecting up the new LCD and modifying the software to change to a new format (minor changes) I moved on to testing out the I2C connection to the serial memory. Here is a code snippet that I used to verify the ability to read and write to the 24CW1280 device:
#include <Wire.h> const byte EEPROM_ID = 0x50; byte data; int Address = 0; // Inside of the setup() loop Wire.begin(); // write 0x55 to address 0 Wire.beginTransmission(EEPROM_ID); Wire.write((int)highByte(Address)); Wire.write((int)lowByte(Address)); Wire.write((byte)0x55); Wire.endTransmission(); delay(5); // read data at address 0 Wire.beginTransmission(EEPROM_ID); Wire.write((int)highByte(Address)); Wire.write((int)lowByte(Address)); Wire.endTransmission(); Wire.requestFrom(EEPROM_ID, (byte)1); while(Wire.available() == 0) ; data = Wire.read();
With all the major parts of the design tested, I decided to complete the schematic and layout so that I could get PCBs on order. Here is the schematic and layout of the board:
Final size on the motherboard was 2.55" x 4.25".
With the PCB designed, I was able to start working on the mechanical/packaging design. Working from a pretty cool recent post by Phoenix Contact--- (Is there a place for Raspberry Pi and other single board computers within the industrial market place? ) I decided to try a more modular enclosure design. I wanted something based on a collection of panels (top, bottom, sides), such that I could simplify some of the printing (and re-printing).
Here is the top lid:
The top panel has an opening for the LCD, Joystick, Pushbutton (small rectangular opening at the bottom that provide access to the power pack below) and three openings for the light pipes that show the charge rate from the power pack. The bottom of the top panel has slots along the edges to hold in the side panels. The bottom panel is the same as the top panel, but with no openings. The motherboard sits on the raised, inner most sides of the slots for the side panels (side panels will be flush with the PCB edges).
In each of the corners, a corner post is added to draw the top and bottom panels together and to capture the side panels into the slots. Here are an image of the corner posts:
The corner posts have fingers/slots to capture the side panels and top and bottom fingers to hold the PCB to the bottom panel. Because of the way that sub-assemblies mount to the motherboard, the corners may capture a single thickness of the PCB or potential a stack of multiple PCBs. The corner posts can be flipped to capture a single thickness of the PCB (0.064") or a multiple thickness with a small space between two PCBs (0.064 + 0.064 + 0.05). The hollowed out space between the fingers holds a hex standoff (2/56), that accepts screws from both ends to draw the whole assembly together.
The side panel come in two sizes, one for the left/right sides and the other for the top/bottom sides. Here are some images of the side panels:
Those parts cover the basic enclosure, wait there is more. In order to press the power on bottom of the power pack assembly and to see the charge rate indicators, more parts needed to be fabricated. Here are those parts:
The two guide assemblies (lightpipe and the power switch) and held captive by the battery holder on the power pack assembly. The lightpipes and the pushbutton extender both go through the top panel, through appropriate openings. Here are some pictures of a mock up of the front panel assembly:
(Note, the power pack does not have the battery holder soldered in place, but is being driven by a power supply, simulating a charged cell being in place)
I still have a few more parts to print, but the enclosure seems to be coming along nicely.
Once the PCB and the rest of the parts come in I will complete the assembly and upload all of the documentation (code, parts list.etc.)
Thanks all for now. Stay tuned as I bring all the pieces together.