Dawn Simulator Device Hardware


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:

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 next picture is a close-up view of the BASICAtom board.

The components in the above picture are as follows:

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.


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.

[Python Powered]
All the Perl that's Practical to Extract and Report

06727 visits since July 14, 2008