|
06-24-2005:
It's done! The hardware, that is. Soldered on the LEDs, and hot glued them onto the back of the copper moose.
Using a drill and a Dremel, I cut out a hole for the switch in the bottom of the frame, so that if you want to turn
it off/on, you can without having to take the back of the picture off. I've already put it on and off so many times
that those little metal tabs are nearly busted. The only thing left to do is perhaps put a little bit of white paint
on the LEDs. They are all water-clear lens, rather than diffused, and you can see that some have a "search light"
effect. A little paint I think should help diffuse that a bit, to make a nicer, rounder light, like in the first two
pictures. Or perhaps first I will mess with the angle, so that it doesn't point so much toward the back.
Here's some pics of different colors. Sorry for the glare; the colors are easier to see in real life.
Here's the guts. You can see the four little yellow rectangular LEDs which display the binary code received.
The Basic Stamp 2 plugs into a hacked up ide cable. This actually works really well, because if you need to reprogram the BS2, it just folds up so you can plug in the serial cable. I'm vastly under-using the BS2 in this application right now. However, I hope to redo the receiver board to use a single RGB led instead of the several that you see I have there. Then I can do neat fade out effects and such. (Still can now, but it doesn't look quite right because the source of the light is not in the same place.)

Click here for the PBASIC code. This code reads the data input pins, figures out which
task to perform, and keeps track of all the tasks that are on and off. If more than one task is on, then it cycles
through all the "on" tasks, turning each LED on, waiting a bit, turning it off, and then going on to the next one.
One thing that bears mentioning is that the "violet" LED is really a bi-color red and blue led, so that is why it
puts high two different pins at the same time. The "What" task is where I couldn't think of any more easily
distinguishable LED colors.
Ok, finally, here's the schematics and stuff for you. Below are pics of the transmitter and receiver schematics.
I use Eagle (freeware version) for the schematic and PCB layout.
Click here to download the Receiver Eagle files.
Click here to download the Transmitter Eagle files.
A little explanation is probably needed for a couple things:
Transmitter:
- The transmitter integrates a Basic Stamp 1 and the Holtek HT-12E encoder.
- There was no ceramic resonator in an appropriate package in the standard Eagle libraries, and I didn't want to
spend the time making my own. So, "RES" in the schematic is a 3 pin header according to Eagle. But it is really the
the 4MHz ceramic resonator.
- I did the same thing with 13811-Q package. I know it's lame, but I haven't got a handle
on making Eagle libraries yet, and the time / benefit ratio didn't seem all that great.
- The PROGRAM and TX-99 are actually real headers. The PROGRAM is a male pin header, and the TX-99 is female.
- If you look at the PCB, you should note that the Ming TX-99 transmitter plugs in so that it is over the top of the
HT-12E. So, you need to make sure that your header is tall enough.
- If you do not have a Win95/98 machine to program the BS1, you might want to consider integrating a serial
converter. Parallax
has a schematic for building one.
Receiver:
- SW1 is for power 5-12V. I use a 9v battery.
- SW2 is a jumper. If you put the jumper on, then the four top LEDs will light showing the binary data code. Good for
debugging. Taking off the jumper keeps them off, and might save a tiny bit of power. :-P
- VT is the "valid transmission" LED. It lights momentarily when the HT-12D receives a valid transmission. I used a
3mm green LED. It's too small to light up the sky, so you don't notice. Basically just for debugging.
- The BS2 header is a 20-pin female header. It is designed for the OEM version of the BS2. The non-OEM version comes
in (I think) a 28-pin DIP package. So, if you're using the non-OEM version of the BS2, you'll have to tweak the
schematic and the board layout. Of course, depending on what type of end device you build, you may have to
tweak the board layout significantly for size/shape/etc.
06-23-2005:
I've decided to go with the BS2, because it will support all 8 tasks easily, and I can add more complex handling
in the future (like slow fading from one task to the next, instead of abrupt blinking). I got the BS2 oem kit
that Parallax currently has on sale for $30. A pretty decent deal even if you just want a BS2 to play around with.
It's quite a bit larger than the "normal" BS2, but it will work for my needs.
The transmitter came out nicely. It is about 2" x 2". The Ming TX-99 plugs in on top, but the whole deal isn't
over an inch tall. I wish I had some real headers though. I had to hack apart an ic socket.
Anyway, the Receiver
board caused me a couple more headaches, because I made some errors on it that I didn't catch until I'd already
soldered almost all the components on. First, I forgot a power switch. Duh. I blame it on getting started with
electronics by building BEAM robots, in which power switches are generally frowned upon. Second, power went to VDD
instead of Vin on the BS2. The BS2 has a 5v regulator on it. I intended to plug a 9v battery into Vin on the BS2,
which then puts 5v on VDD, and use VDD to power the rest of the receiver circuit. So I blew a LED on 9v, but that
was the only casualty. The only thing left to do on the receiver is mount the output LEDs.
Here's some pics of the completed transmitter board and a very nearly complete receiver.
06-16-2005:
Well, time to step back for a minute. For my own personal needs, a BS1 on the receiver end would probably be
enough. The BS2 would be cooler, but I'm not sure the cost difference justifies it. However, parallax does
currently have an OEM BS2 kit on sale for $30 ($1 more than BS1 module). Then again, you can build an OEM
BS1 for cheaper yet, if you happen to have a local electronics store that sells the stuff other than the
PBASIC chip (digikey works too, but the shipping and handling costs nearly eliminate the savings on component costs,
unless you're buying enough stuff to make several stamps).
Anyway, to step back again... Which stamp, or whether you even need a stamp, depends heavily on what the final
end device is supposed to do, and how it is supposed to look. You could, for example, have a bouquet of
eight glass flowers, each with an LED or light tube in/behind it. A simple 4-to-1 binary decoder would work to
turn on each individual flower. Since each flower is it's own separate indicator, there's really no need to
cycle through the tasks. You might need some flip-flops or something to "latch" the tasks that are "on." But anyway,
the point is that with this type of artwork, you don't need a stamp at all (well, you still need one for the
transmitter, but that can be a BS1, which isn't too expensive. Eliminating the stamp from the receiver side would
save probably $20 - $60 on the cost of the electronics.)
The reason I propose to use a stamp
in my own project is because my artwork has a single indicator: the color of the sky. Therefore, I need a way of:
(1) figuring out which task(s) are "on"
(2) indicate the correct color for each "on" task
(3) turn off the LED (but remember that the task is still on), and turn on the LED for the next task
(4) figure out when a task gets turned off, and remember that it is off.
06-15-2005:
Hrmm. Well, it looks like the BS1 may not be enough for the end device. My end device design is simple: read the
four output pins of the HT-12D, figure out the data code, and turn on some LEDs accordingly. Part of the problem is
the four pins - that uses up half the BS1's pins, just on input. I need to do some more reading, but it seems like
somehow I may be able to use another decoder (or encoder) to read the four datapins, and transmit the datacode
serially. That would free up 3 pins on the BS1. I tried reading serial output directly from the Ming RE-99, but
it appears to be raw output, and the BS1 is certainly not going to be able to sort that out AND run the information
LEDs. The HT-12D cleans that up conveniently. I have another HT-12E encoder in the drawer. Perhaps it can be used
to send the cleaned-up binary value to the BS1.
If so, then the BS1 may work out fine. As it is currently, I waste a lot of programming space by checking the states
of the input pins. There isn't enough EEPROM space to hold a program to handle more than 4 tasks (half of what the
system is otherwise capable of). The task handling is very simple as well. It basically just lights a LED to
correspond with the task. If more than one task is "on," then it flashes between the tasks. This eats alot of
EEPROM space... the code to handle each task is identical except for the pin assignment. I wish you could pass
arguments on the BS1. *sigh* It does work, and if the BS1 had twice the memory it does, it would handle all the tasks.
However, I don't want to move up to a BS2 just for this reason alone. I'm trying to keep this cheap.
On the other hand, I could do some more fancy-schmancy things with the BS2, like make it slowly fade from one
color to another, etc (just because it can handle bigger programs). Also the BS2 would have more than enough pins
to give each task its own pin.
06-09-2005:
Here is a pic of the breadboarded OEM stamp.
I've got it hooked up to the serial port and working. The transmitter code barely fits on the BS1. I could probably
make it a little more compact if I fiddled with it more. But it does fit, and it works, so maybe I shouldn't try to
fix things that aren't broken. I will post the PBASIC code soon. It basically just uses SERIN to get the data codes
from the serial port, and then, depending on what code it receives, it sets four output pins to the binary number
of the code. Then it pulls a fifth pin low for 250ms. Wash, rinse, repeat.
The fifth pin of the stamp is connected to the /TE (transmit enable) of the
HT-12E encoder, which in turn encodes the data which is sent by the stamp's four output pins (the binary value), and
sends it via the Ming TX-99.
06-07-2005:
Here are a couple pics of the transmitter and receiver setup. Very basic.
The transmitter. It is (for now) hooked up to a "GrowBot", which
is an early version of Parallax's Boe-Bot. It
has a Basic Stamp 2. The final version will use an OEM Basic Stamp I. I just happened to have the GrowBot sitting
around idly. The small PCB is the Ming TX-99.
The receiver. It is the Ming RE-99 and the HT-12D. The HT-12D runs
five LEDs: one red "receiving" LED, and four yellow LEDs that display the binary value of the data code received.
This too will be hooked into a Basic Stamp 1 that will then change the color of an RGB LED according to which
data codes are received.
The OEM BS1 modules are breadboarded and working.
A note on the BS1s: they are programmed through the parallel
port using DOS. Real DOS. The old stamp.exe program will execute on a Windows 2000 or XP machine, and
seem to run normally. However, it won't program the BS1. You will get "hardware not found" errors. For a long time
I didn't know this, and I thought I had shocked or fried or done something horrible to my poor little BS1. All I had
done is upgrade from Win98 to Win2K. I got out an old laptop I had in the closet, and installed Win98 on it
(which is barely runs). Everything worked beautifully. And here I had considered throwing out both the laptop and the
stamp. Being a packrat has its benefits.
If you don't happen to have a dusty rusty old machine, Parallax
sells serial adapter, and
also has a schematic
to build your own. I tried building one of these with 2n2222 transistors (didn't have any 3904s, as they are all in
BEAM robots), and could not get it working. I will have to give it another go, since most people these days
run Win2k or XP.
05-31-2005:
The hardware is basically made up of three parts: the transmitter, the receiver, and the end device. The
transmitter sends a 4-bit data code to the receiver. The receiver is attached to the end device, which
performs some action based on which data code it has received.
Transmitter: The actual transmitter is a
300Mhz Ming TX-99 RF transmitter. A Holtek HT-12E encoder
(datasheet) and a
Basic Stamp II interface
the transmitter to the serial port. Rentron has a project and product,
TX-4-PC, which is a serial interface for the RF
transmitter. It is basically the same thing that I am doing with the Stamp. You can buy their kit or product, or
build your own if you have the programmer for the microchip. I don't have a programmer, which is why I'm using the
Stamp instead.
The Stamp is basically being used for testing right now. Once things are all sorted out, I plan to use an "OEM
Stamp," that is, build the stamp circuit onto a single board with the rest of the interface / transmitter. Although
the PBASIC chip still costs about $10, it is way cheaper than using a BSII.
Pics, schematic, and PBASIC code coming soon.
Receiver: The receiver is a Ming RE-99 receiver. I got mine from
WZ Micro. It was the only place I could find
that actually sells the receiver. There are other AM RF TX/RXs out there that are also rather cheap, but more
available. You might want to give them a google.
The receiver is attached to a Holtek HT-12D decoder. The decoder displays Transmit, and the four-bit data code.
End Device: So far, I haven't built any type of end device. When everything is basically working, tested, and
at least somewhat debugged, then I will build a device. The concept of the device is another OEM stamp, to decide
what to do with the incoming datacodes, and some sort of output circuitry. Probably, this will be an RGB LED, which
changes colors, like the Ambient Orb. Perhaps I'll get more adventurous after the first one.
Aesthetically, I'm envisioning a hang-on-the-wall picture that is basically a shiny metal or mirror back plate, overlaid with a copper cut-out sillouette of
trees and a moose. The electronics are hidden behind the solid parts of the copper. The RGB LED changes the color of the sky in the picture according to
the status of the tasks.
|