Dawn Simulator Device Hardware
Microcontroller:
The heart of the device is a Basic Micro BASICAtom microcontroller module, which is a pin-compatible, and mostly software-compatible clone of the Parallax BASICStamp module. I chose the BASICAtom because it has a buffered hardware serial port. The Stamp and other modules must read the serial port in software, meaning that the program must be listening to the serial port at the time a character comes in. The Atom's hardware serial port stores characters in a buffer, which may be read when the software gets around to it.
I used the 24-pin version, which provides 16 I/O pins (I used them all). Please refer to the PDF-format system schematic for details, and be aware that only the 16 I/O pins of the Atom are shown. The Atom is powered by 5VDC.
I built the system on the Basic ATOM LCD Enclosure Board using the "Bare Board Parts Kit". I bought this before I realized that their layout of Atom I/O pins for the LCD display made no sense. So I didn't use the main advertised capability. On the other hand, it has really nice power distribution that their other boards don't have (as I found on my next project after this one).
DC-Controlled Lamp Dimmer:
I used a Velleman K8064 DC-Controlled Dimmer Kit to control the AC voltage provided to a connected incandescent lamp. The dimmer is controlled by a 0-10VDC input signal and can power up to 375Watts of incandescent lighting. Velleman's tech support told me that the K8064 provides 256 light levels, which are linear over the 0-10VDC input range, although my experience was a bit different.
Digital-to-Analog Converter:
I used a Maxim MX7224N DAC chip to convert binary numbers from Atom I/O pins to DC levels. I had to purchase this chip directly from Maxim (paying handling charges as well as shipping), as I couldn't find a low-volume source. I could have used the hardware Pulse Width Modulator (PWM) capabilities of the Atom to generate DC voltages, but I wanted an accurate, latched DC voltage to provide to the DC-Controlled dimmer to provide constant voltages independent of software.
The MX7224N has an 8-bit input, for 256 output levels. To converve I/O pins on the Atom, and to keep DC levels well within the maximum error of the MX7224N, I used the 6 most significant input bits for data and tied the lower 2 bits high, to provide 64 input levels. I connected Pin 17 high and Pins 14/16 low, so that data could enter the MX7224N simply by lowering Pin 15, then be latched in by raising Pin 15.
The MX7224N data sheet states that the voltage at Pin 3 (which supplies the power for the output voltage) should be at least 2 volts less than the power supply voltage for accurate output levels. Since I needed a 0-10VDC output range, I ran the MX7224 off 12VDC and regulated down to 10VDC for Pin 3.
LCD Display:
I used a Tianma TM162YBC6 2x16 LCD display, which I purchased from the Basic Micro website. It uses a Hitatchi 44780-compatible controller, making it compatible with the Atom's built-in LCD commands. Pin connections are as shown on the system schematic. The schematic shows a 10kOhm potentiometer, intended to set the LCD contract level, but I hooked Pin 3 to ground for maximum contrast.
RS-232 Interface:
I used a MAX232 chip (made by several manufacturers, mine was by Texas Instruments--Google "MAX232" to find a vendor) to convert 0-5VDC TTL levels on Atom I/O pins to the RS-232 voltages to interface with other systems to control the device. Using 10uF capacitors (be REAL careful about capacitor polarity-a reversed capacitor shorts out the power supply), the MAX232 provides around +10VDC and -10VDC output levels to the RS-232 interface from the 5VDC power supply.
SitePlayer Telnet System:
While the Dawn Simulator device was designed to communicate with the PC software using a serial port, the idea of connecting a PC on the first floor of our house to a device located in a second floor bedroom wasn't attractive. The NetMedia SitePlayer Telnet System extends RS-232 connectivity across a Telnet (TCP port 23) connection. Once a Telnet connection is established to the Siteplayer, bytes sent across the connection are forwarded directly to the attached serial device and vice versa. For $80, the Siteplayer solves a lot of connectivity problems. Aside from assigning an IP address and such to the Siteplayer, the only configuration change I made was to the "Retry Period" setting on the "Telnet Configuration" screen. I set it to zero, so the SitePlayer will start listening for a new connection immediately after a connection fails or disconnects.
Cancel/Override Switch:
A normally-open SPST pushbutton switch provides a way to manually control the device.
Power Supply:
An Omron S82K series, 12VDC, 0.6A power supply provides DC power for the electronics. Since we live on the side of a mountain and have lost equipment to lightning strikes, the power supply is isolated from the AC line voltage with an American Power Conversion LE600 Automatic Voltage Regulator (cheap protection at $45 each). DC Power from the power supply is split out as follows:
- 12VDC is provided directly to a BASICAtom LCD Enclosure Board (populated with parts from the "BareBoard Parts Kit"). The circuit board has a 5VDC regulator to power the Atom and other chips. 12VDC is also powers the MX7224 DAC chip.
- 10VDC is regulated off the 12VDC power supply to provide the Pin 3 voltage for the MX7224, so that it can supply the full 0-10VDC range for the DC-controlled dimmer. An adjustable regulator was used to obtain this voltage.
- 8VDC is regulated off the 12VDC power supply to power the SitePlayer Telnet System. Netmedia says that the SitePlayer can be powered up to 15VDC, but the confined size of it's case may cause excessive heating. By lowering its power supply voltage, the SitePlayer case doesn't even get warm.
Physical Construction
The following picture shows the internal construction of the device. It's installed in an enclosure from LMB Heeger.
The components in the above picture are as follows:
- The SitePlayer Telnet Device is the silver box at the far left side.
- The gray device immediately to the right of the SitePlayer is the Omron 12VDC Power Supply.
- Immediately above the Power Supply is a small sircuit board containing the 8VDC power supply for the SitePlayer. 12VDC power for the BASICAtom board passes through this circuit board.
- Immediately to the right of the Power Supply is the Velleman K8064 DC-controlled Dimmer kit.
- Immediately above the Dimmer is the BASICAtom board.
- The LCD Display is mounted in the center of the panel at the top of the picture.
- The Cancel/Override switch is mounted to the right of the LCD Display.
- At the lower left of the picture is an RJ-45 coupler, connecting the SitePlayer Telnet System's network interface to the outside of the enclosure.
- To the right of the RJ-45 coupler is a Schurter KM series Power Entry Module, which contains a 5A fuse, on/off switch, and a connector to interface with a standard IEC-type computer power cord (if you buy one of these, remember that the fuse holder that fits the module is a separate part). It's a really nice product that kills 3 birds (power cord, on/off switch, and fuse) with one stone, and for only a few dollars. AC line voltage connects from the Power Entry Module to the power input terminals of the Omron Power Supply and Velleman Dimmer.
- To the right of the Power Entry Module are 2 NEMA 5-15R outlets, which are connected to the output terminals of the Velleman Dimmer.
The next picture is a close-up view of the BASICAtom board.
The components in the above picture are as follows:
- The BASICAtom is the large DIP module in the upper left.
- The MAX232 chip is the top chip in the center.
- In the middle of the picture is a 14-pin DIP socket, with a 14-pin DIP header and ribbon cable that connects to the LCD display.
- The MX7224N chip is the bottom chip in the center.
- The 10VDC regulator is to the lower right of the picture.
- The blue terminal block to the left of the MAX232 chip is for connecting the Cancel/Override switch.
- The blue terminal block to the upper right of the picture is a terminal block for connecting the output of the MX7224N to the Dimmer.
- The 3 red wires running from above the MAX232 chip toward the lower right of the board connect to the RS-232 interface of the SitePlayer Telnet System.
The following picture shows the front panel of the device. The LCD display and Cancel/Override switch are visible in this view.
The following picture shows the rear panel of the device, showing the RJ-45 passthrough, Power Entry Module, and NEMA 5-15R outlets.
Suppliers
Except where mentioned otherwise above, I purchased most all my parts from Mouser Electronics. Their selection is wide, prices are reasonable, and they have data sheets for most parts available online (they'll also send a free paper catalog for browsing). A few parts (Capacitors, switch, RJ-45 coupler, PC board terminals, and standoffs) were bought from my local Radio Shack and I obtained the LCD bezel from Scott Edwards Electronics (Sorry Scott! I forgot to countersink the holes, so it doesn't lay correctly).
Disclaimer. Any and all opinions expressed on this page are solely those of the author. The author accepts no responsibility for the accuracy of data provided on this web site, nor does the author accept any responsibility for the use and /or misuse of information provided on this web site. It is the full and sole responsibility of the user to determine whether and/or how best to use the information provided within their own circumstances, and it is the full and sole responsibility of the user to accept any and all benefits and/or consquences of their actions. Please see my Privacy Policy.
Copyright 2001-2009, Tim Sharpe. You are free to use this information for personal, non-commerical use without restriction. All rights reserved for commerical, organizational, or government use. Questions or comments to tim@beaststwo.org. Flames to /dev/nul.
09592 visits since July 14, 2008