Building Your Own Glowing Cyber-Balls?
krezel asks: "So I've been drooling over the Ambient Orb, a cool little gadget 'glowing ball' that you changes colors based the 'health' of things you specify. It can do stuff like fade from red to yellow to green as your stock portfolio improves. However, being a poor college student I can't afford its $200 price tag. I've found lots of sources for super bright multi-color LED's. Cast a couple of them in some translucent resin, hook them up to a power source, and you've got yourself a cheap glowing ball. But I've yet to find any good information on how to build hardware that will let me control relays for devices like this through my serial or parallel port. Basically I'm looking for a cheap way to build a board that will let me control 4-8 relays (for each color) over my serial port, and some info on how to write the software for it. This could be a very cool project, and I plan on making the plans available, and the code Open Source, when I'm done with it. Any ideas?"
I would use the parallel. You get 8 pins out instead of just the one. Sure, you can play games with the serial, but... parallel would be easier.
Depending on how many LED's per color and whether you are using transistors or relays to drive the circuit, you may want to use an external power source and use op amps to convert your parallel control to a stronger signal for the LEDs.
Anyway, just my idea.
Sure, I could probably design the circuit now (Since I am learning so I can build my own 160-6m SSB/CW rig), but I don't want to. Sorry.
A relay is a mechanical switch. The constant clacking would drive you nuts (though, that would also be a good indication of the activity of your stocks...)
Google knows all. Click on the first link. Or any of the others.
If you read the post, you'll see the whole point of this was to avoid spending the $200.
Instead he wants to spend a few dollars on LEDs and a few more on resin and cables. I'd imagine this costing somewhere less than $30.
Now if you were offering to be a hummer for $29.99, that would be a different story . . .
Of course controlling 8 relays or LEDs with the parallel port is much simpler.
Since the parallel port output is basically just TTL levels, just buffer it through a 74LS244 or something similar and use that to drive the LEDs directly. You can directly control each of the 8 data pins on a parallel port by writing directly to the base I/O port (i.e. port 0x378 is the default for LPT1). It's easiest to use inverting output with TTL driving LEDs.
Something like the following circuit:
D0 ---|>---/\/\/\---| D0 = parallel port data pin 0
/\/\/\ is resistor
|> is a buffer (i.e. 74LS244)
| (+5) is a 5 volt power source separate from the parallel port.
Make sure that the ground pin of the parallel port is connected to the ground of your circuit. For the 5 volts, a 7805 is a simple solution when using a separate DC power supply.
All of the above listed parts should be available at your local Radio Crap.
When D0 is 0 (low) current will flow from the 5 volt supply, through the LED and resistor and from the buffer to ground. When D0 is 1 (high), no current will flow.
When choosing a resistor, take into account the voltage drop across the LED. Blue LED's typically have a higher voltage drop than red or green. Red LEDs are typically around 0.7 volts whereas blue can be upwards of 3v.
Also make sure that whatever buffer you use can sink the appropriate amount of current. Most LEDs typically will take up to 15-20ma of current. It might also make sense to use an inverter instead of a buffer since the above circuit will cause a LED to light when the data bit is 0. a 74LS04 is a cheap easy-to-use inverter chip that is readily available.
With 20ma of current, choose a resistor based on the voltage.
Use the basic equation, V = I*R, where V is voltage in volts, I is current (in amps) and R is resistance in Ohms.
For example, for a red LED with 20 ma with a 5 volt source use:
R = (5 - 0.7) / 0.020 = 215 ohms. Since resistors come in standard values, choose the next highest value, i.e. 220 Ohms.
For blue, with a 3.6 volt drop you would use
R = (5 - 3.6) / 0.020 = 70 ohms. The closest match is 68 ohms, but it's usually best to error on the side of caution so choose the next larger value.
One thing you do not want to do is use the parallel port to drive LEDs or relays directly as you could possibly damage it. TTL outputs typically are not designed to output much current and are typically better at sinking current than sourcing it.
Note that I'm no expert on this and I'm sure you'll see better solutions listed here.
-Aaron
This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
Quick answer: combine RJ45 web server with serial relay driver and presto!
... google for it. They have all sorts of nice features (current limit, fault detection, cascadability and are controlable through the parallel port (you have to bitbang the data and clock bits). The webserver above has 3 general purpose I/Os - enough to control a relay driver.
There are lots of these serial relay drivers
But, you probablly want an actual A/D converter (preferably with a current output) or a digital potentiometer. There are lots of mfgs of these products, but Maxim is pretty liberal with samples (plus they have some neat innovative products!)
HIV Crosses Species Barrier... into Muppets
- two LEDs and a switch
- TTY control: 7 buttons and 3 leds.
I built a simpler version of #2 last week, and it was a lot of fun and very easy!How about designing a portable version? I would gladly pony up a pile on cash for an orb that fits in my pocket, allowing me to track money, family, friends, and the health of my networks just by looking at the colors!
This thing this where cool tech should be going. Make it small and wireless and you have a killer app.
Take one of these balls in a smaller form and place it within your computer. Have it's color be entirely temperature based.
As the heat rises, it shifts from an electric blue to a horrifying shade of red.
There are a ton of uses for it.
Note that people happily pay $30-50 for a little blinking light that tells them when they have voicemail. They'll pay a lot more than that for extra gauges on a car dash. And companies have paid millions for fancy "war room" conference rooms that continuously display important business data.
The basic prinicple is that people have to deal with a lot of invisible data, and if you can make it visible, it's easier for people to manage. Take a look, for example, at the many designs for in-house power meters. The idea is that if people have a better idea of how much electricity they're using, they'll waste less of it.
Personally, I would be tempted to hook it up so that it went slowly from green to red whenever I got behind on my email, a visible reminder of the people I'm ignoring when I get absorbed in a project. Or since I'm a freelancer, it'd be interesting to hook it up to a moving average of billable hours, so that I have a quick objective reference to check when I wonder whether a sunny day is better spent biking than coding.
Or at a company, I'd love to set it up so that it got redder and redder when people put in too much overtime on a project. Or you could hook it up so that it responded to an anonymous web poll on morale. And then perhaps another one tied to the number of open bugs. Or perhaps percentage of code covered by test suites.
I'd agree that $200 is too steep. But for $50, I could find a lot of uses for these!
That's missing a key point... the Ambient Orb runs off a wireless network... no computer needed, and you can control it from anywhere in the world (theoretically). To manage that, you'd have to build an 802.11b -> relay interface, at least - if not a cellular one.
If you already have a computer, the wireless network aspect of this seems completely pointless. The damn thing already needs to be plugged into the wall, so is it really that big a deal if it also has to be plugged into the ethernet/serial/parallel port about a foot away from the electrical socket? It's not like it's a battery operated cloak hooked into the signal from the Atomic Clock or some sort of little wireless communication device like a Hiptop. It's already anchored, so adding another anchor isn't going to make it any less mobile.
Color Kinetics (aka CK Sauce) makes a line of color-changing LED balls, wands, lights, etc.. They have several "modes", and presumably could be hacked to do whatever you wanted. Some of them run on batteries, some run on AC current, and all are cool. Chiasso carries their stuff. Fun.
-Mark
It sounds like a cool project but companies like Color Kinetics and others have patents in the color changing LED arena that you should be aware of before you go too far down this road.
$5 or less plus a handful of components vs. $50-$70 for something slower and not as flexible....
I'd like to stay on the cheaper side.
...
A solid state relay (S101S05v) is not a mechanical switch.
Who brings up solid state relays when talking about hooking to a parallel port? You've never done this, have you? Solid state relays are too expensive, have high hold currents and forward voltage drops, burn quiescent power, and are very large in comparison. In other words, they are simply wrong for this application.
But, you're right, they are not mechanical switches.
When working with a +-5V logic signal like the parport, just put some 1K input resistors on some 2N2222 or BC547's, and hook the LED with a 220 ohm resistor into the collector path.
If the LED's require more current (like a blue LED does) recalculate the 220 ohm by using ohms law of (5V - 0.7V [transistor drop] - (whatever the LED forward voltage is listed at)) / (LED typical forward current). Simple really. For something more robust, you could even use a current-source circuit, but these can be a little tricky for a beginner.
Hardware, software, and blinking lights!