Slashdot Mirror


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?"

45 of 453 comments (clear)

  1. More than 8 colors? by diegoq · · Score: 5, Informative

    Don't you want more than 8 colors? If you use relays, you can only turn on or off each of the red/green/blue colors. But if you vary the current through each led, or vary the duty cycle by pulsing the leds quickly, then you can get more colors (like 24 bit color!).

    --
    --Tim
    1. Re:More than 8 colors? by adri · · Score: 5, Informative

      how high?

      dot-array LED signs are generally built using some form of scanning setup - you enable a row, then shift-on the bits. Then, next row, shift on the bits, etc. Not all the LEDs are on at any given time.

      So you can get away with pulsing them with higher current than they're rated at. Which is a bit of a bugger - if you hit the 'stop' button or the sign crashed, any on LEDs would burn out. I used to work making LED signs for a little while - we had a set of damaged signs to test code on.

      (Which got real expensive when Blue LEDs came out so I _think_ the guys implemented some 'no clock? no driving power!' circuitry in case the testing code crashed.. :)

      (A cute tidbit: our signs had 4-LED RGB elements - one blue, one green, two red. the red leds weren't as bright to the eye, so we needed two of em..)

    2. Re:More than 8 colors? by panZ · · Score: 2, Informative

      Have you ever seen an apple iBook or Powerbook breathing while its sleeping (LED fading in and out)? That isn't controlled by current limiting, it is pulse width modulation to save battery life (so it can still pluse for a long time even if the main battery is removed). Try moving it around quickly in a dark room and its easy to see.

      --
      --Let's hack root on 127.0.0.1 --panZ
    3. Re:More than 8 colors? by Anonymous Coward · · Score: 1, Informative

      LEDS hold up to fairly high PWM signals. Generally, to save battery power, leds are switched with a 50-50 duty cycle with double the recommended voltage (and therefore more current). This way, you don't loose brightness (double brightness for half of the time is the same as regular brightness all the time)

    4. Re:More than 8 colors? by lithium100 · · Score: 2, Informative

      A LED is just a diode after all and like all diodes it has a capacitance.

      This is the only thing that will truly limit performance at high frequencies. Eventually, as frequency is increased you will get a low pass filter effect and the led will begin to dim.

      As far as I am aware most LED's have a capacitance of only a few pF so depending on the current rating and duty cycle there should be a half power point well above 10kHz.

      Incidentally, the duty cycle will affect the frequency range. A 50/50 duty cycle or square wave input will have a sinusoidal fundamental at the pulse frequency and a series of harmonics which may be above the half power cutoff of the led. Hence you are effectively putting a sinusoid accross the LED.

      Other duty cycles will have different harmonic content and hence will behave differently near the frequency cutoff. (Do a fourier analysis!)

  2. I have no good ideas by roystgnr · · Score: 3, Informative

    I just wanted to congratulate you for getting the phrase "glowing cyber-balls" on the front page of Slashdot!

    When I was looking for computer->analog control chips a few years ago, the best methods I could find were:

    Build (or buy) a serial->I2C or parallel->I2C converter; you can get D/A chips with I2C interfaces pretty cheaply.

    Use a PIC microcontroller, which gives you serial and analog I/O built in.

  3. That's missing a key point... by eric434 · · Score: 5, Informative

    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.

    Now, assuming you don't want to muck about with that (and who does), your best bet would be to not use relays in the first place - they're loud, slow, and not gradual. Use a Basic Stamp from Parallax and write some code to output a PWM (Pulse Width Modulated) voltage to three different pins - one for each color. (Chances are you'll be using either one 4-pin, 3 color LED or 3 leds (red, green, blue). Infrared or UV leds could be interesting, but aren't recommended...) Then you can either leave the BASIC stamp connected to your serial port and controlled via DEBUG or SERIN (IIRC) commands from your host computer (and write some corresponding code for the host), or you can leave it standing alone and interface to it using any one of the who-knows-how-many add-on boards Parallax sells. (you might want to check out the Communications page - that modem looks like a good thing to try)

    --
    This .sig temporary until a better .sig can be constructed.
    1. Re:That's missing a key point... by spongman · · Score: 5, Informative
      alternatively, scrounge some simple electronics components (bread board, power supply), build yourself an oscilloscope, get an Atmel AVR microcontroller, connect it to your computer using a parallel port interface, compile code with GCC and upload it to your device.

      Note: some assembly required, batteries not included.

    2. Re:That's missing a key point... by cybermace5 · · Score: 5, Informative

      Don't use a Basic Stamp. They're overpriced and low on performance. The interpreter really takes the zing out of the microcontroller...say, in a similar way that certain OS's can change the operation of your desktop computer....

      Really, you can get a small PIC (since that's where most of the hobbyist development resources are right now) in a 16-or so pin package you can toss on a Rat Shack breadboard. Get one with an onboard UART and life gets even simpler. The next step is to write code to take a string of values, and PWM a few pins according the the values. After that, everything depends on the computer side.

      My room at school had indicator LEDs (one mounted in the door peephole - go figure) for new email, and a robotic webcam running off a 486 webserver.

      If you want to get fancy, use USB.

      I have a PIC board (way overspecced for this application, of course) and two USB boards on my desk right now, that could do the task with an hour of coding and soldering a few LEDs.

      --
      ...
    3. Re:That's missing a key point... by jkrise · · Score: 2, Informative

      I'm reminded of my college days when we had a lab class on 'Traffic Light Simulation' using LEDs connected to the Intel 8255 PPI chip. (Programmable Peripheral Interface, I guess).

      This chip has 3 ports of 8-bit and by writing a combn of bits, you could control the output. I also remember one of the ports supported a bit-set-reset capability. This simple chip (should cost about $5, no more) would be more than enough for the project at hand.

      The chip is a part of Standard Microprocessor kits (about $30 I guess) which could be programmed with assembly lang. There are also interfaces to this chip from the PC's serial port. As for software, DOS is more than adequate, in fact it's recommended for projects like these.

      Good Luck.

      --
      If you keep throwing chairs, one day you'll break windows....
    4. Re:That's missing a key point... by eric434 · · Score: 2, Informative

      Well, BASIC stamps may be overpriced and underperforming, but it's not like we're going to be coding an autonomous robot with target aquisition and image recognition here! BASIC stamps, IMHO, are a lot easier to learn to code for; it's a BASIC variant as opposed to an assembly one... in this case, where the original poster wanted something simple and easy, a BASIC stamp fits the bill quite nicely IMHO, even if it does cost a few bucks...

      --
      This .sig temporary until a better .sig can be constructed.
  4. Re:You don't want relays by markprus · · Score: 4, Informative

    A solid state relay (S101S05v) is not a mechanical switch.

  5. xmms plugins as a start by Space · · Score: 2, Informative

    several plugins for XMMS may get you started. They have plans for the hardware to connect a parallel port to leds, stepper motors, whatever.

    --
    I Don't Work Here
  6. Simple stuff here by Froze · · Score: 3, Informative

    Get ahold of a cmos 4066 this chip has plenty of switching power throughput to handle a few leds. Hook the triggers to your parallel port and code a simple pulse width modulator routine to run the triggers. I don't know if the frequency you can achieve on a parallel port would be high enough to prevent flicker, but some capacitors should go a long way to smoothing that out, if not. You might want some current limitin resistors in there as well, so you don't burn out your leds.

    BTW, this is rudimentary circuit design in almost any college course. If you want to seroiusly get into building cicuits like this check out "The Art of Electronics" by Horowitz and Hill. Might be a little expensive but will give you a solid foundation in circuit design.

    --
    -- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
  7. Casting resin ain't that simple either... by Olmy's+Jart · · Score: 5, Informative

    Having done some large castings in casting resin (clear and with opaque or translucent dyes), I can tell you that it's not all that simple to just cast a ball that size either. The casting material is going to be expensive to begin with. And if you don't get the hardner mix ratio just right, that stuff it going to crack and craze like crazy (split a few "paper-weights" in half). It gives off heat (from the chemical reaction as it "cures") which can damage really thick objects, like a 6 inch ball. I'd be willing to bet that what they have is not "hobbiest grade" casting material. It's more likely commercial grade plexiglass type material with a translucent dye added. It might not even be chemically cured like epoxy resins but may be cure thermally or by UV light (former - likely, later - possible but highly unlikely). Plexiglass resins become soft and pliable as you warm them (within reason - moderately high heat burns them easily) but casting resin does not - it cracks and crazes and shatters. The dye would be similar to the casting dyes you would get at a hobby shop. You MIGHT be able to cast a ball that size, if you are lucky, in casting resin but keep it away from large temperature changes and bright sunlight (which damages through both large temperature gradients and UV breakdown damage). You may find that this isn't a cost-effective "do it yourself project" after all.

  8. Re:Some simple accessible plans by vlchung · · Score: 3, Informative

    I've used something like this as well, except to drive relays that drive reset buttons on a series of machines at uni.

    I agree with hotair's use of the ULN2803 chip; however, I think you need a 74HC373 octal latch. Basically when you send a byte to the printer, you need the latch to "catch" the byte and hold it after the signal goes away. The latch is controlled by 1 of the printer control lines that goes low when the data on the bus is valid (I think it is the STROBE pin).

    If you want more than 8 leds, you could probably use a 74hc138 (3 to 8 demultiplexer) to control a bank of latches, but that would require alot more thinking on my part, so I'm leaving it with you.

  9. Go USB (quick! Easy!) by oaklybonn · · Score: 3, Informative
    I've been using the delcom usb chipset (http://www.delcom-eng.com/) on Mac OS X and Windows for doing various IO control things. Their eval board is very cheap and does the (trivial) amount of work to wire the pre-programmed USB chip to the usb cable, with some breadboard space to boot.

    The engineering staff has been good to work with as well.

    Also, they seem to sell a product almost exactly like what you describe, with bright LEDs in a diffraction grating, based on the same chipset. I don't know if it has quite the diffiusion you're looking for. (But it does have a buzzer!)

    Otherwise, my advice would be to use the parallel port (very easy to program, unless you're a mac user and you don't have one ;-) and don't use relays. In order to drive a relay, you'll need a transistor to switch the coils, and if you've already got the transistor, well, you can see where thats going!

  10. Maxim Onewire tech makes this easy by sprior · · Score: 2, Informative

    No I don't work for them, but http://www.ibutton.com gets you to devices that can be controlled through a serial (or parallel) port and are cheap. The DS2407 is a switch you can use to control the LEDs. Also check out the TINI links on the page for a Java JVM on a SIMM which can be used to control the LEDs and connect to the net. Nice stuff to work with.

  11. Re:parallel vs. serial by buffer-overflowed · · Score: 2, Informative

    Parallel port devices are fairly easy to program and create (I'd have to say THE easiest), most basic linux programming books go into how to do it.

    Considering the simplicity of the circuit to make an LED glow, and the ease of parallel port programming, plus the relative ease of finding information on how to do it I'd have to concur with you.

    Plus the low power consumption would probably mean you could forgo any external power source unless you either wanted it brighter or wanted to light up a bunch of LEDs at once. I'm pretty sure you wouldn't need an external power source at all under most circumstances, but I've been up late and shouldn't be wasting time posting on slashdot.

    I'd think he should start by looking at some of those overclocker parallel port mini-display information, that'll get him started.

    Then just pick up a book on electronics (beginner would do I'd say), the parallel port specification, and some driver knowledge. Boom he's in business. I don't think theres a bit of information you'd need to do this that couldn't be found via google, so let's go for it.

    --
    The key to the enjoyment of pop music is to replace any instance of "love" with "C.H.U.D."
  12. A *great* source of information on this is... by no_such_user · · Score: 3, Informative

    Check out Circuit Cellar Magazine -- they are a steady stream of articles and advertisements covering just the thing you want to do.

    While you're reading it, also pay attention to PIC Chips and Basic Stamps, which would be a great way to control your orbs without needing a PC (especially the cheaper PIC chips from someone like Microchip Technology)

    If you're married to the PC concept, you'll also find advertisements for devices which are controllable via USB. Kinda nice for furure serial-less PCs.

    Lastly, though it's a bit out of date at this point, take a look at "Controlling the World With Yor PC" by Paul Bergsmann (ISBN: 1878707159). Great stuff about parallel port interfacing.

    Good luck!

  13. Re:parallel vs. serial by Uller-RM · · Score: 4, Informative

    One thing to remember though is that you're not allowed access to the ports under Win32 NT-family kernels except through a Ring 0 driver. That can get a little ugly.

    Google for "Beyond Logic" and you'll find a site that lays out more info on the legacy ports and on making peripherals for them (and for USB) than you could read in a day.

    (Mind, it's pretty easy to make a serial one too. There's a UART called the CDP6402 that's specifically designed to run without a master uC; just add an osc to get 4x the desired baud rate and use an octal latch to maintain the output with an RC circuit to generate the rcv ack pulse, and you're set.)

  14. Re:parallel vs. serial by buffer-overflowed · · Score: 3, Informative

    I was assuming he was talking about doing it under Linux. NT is a bit different. I always seem to assume people who do this type of thing run Linux (I must read too much Slashdot).

    That's an amazing site by the way, it's right here since you didn't supply the link.

    --
    The key to the enjoyment of pop music is to replace any instance of "love" with "C.H.U.D."
  15. Use Atmel microcontrollers by Sowbug · · Score: 4, Informative

    Lotsa links here...

    First of all, the 2002 Burning Man project I did that involved a couple hundred RGB LEDs spinning in a persistence-of-vision-based nighttime animated display. Here is the best picture of it. This is the page about the development details.

    The LEDs I used were manufactured by Kingbright. The model I used, the LF819EMBGMBC, is big (10mm) and relatively bright for an RGB LED. I couldn't find any U.S. retailers that actually told the truth about whether they stocked them, so I ended up buying 400 directly from Kingbright for I think a little more than $2.50 each. I still have a few left.

    Atmel AVR microcontrollers are just a few bucks each, easily programmable with the STK-500 programmer, also cheap at around $80. I used the ATMega8, which was more than sufficient for my needs. I imagine the original Slashdotter could use one of the ATTiny MCUs, since it really needs only 3 or 4 I/O lines (fewer depending on how many helper circuits you decide to use).

    The boards were manufactured by PCBExpress and I was very happy with them. The CAD/CAM software was Eagle, which except for some crashing/redrawing bugs was really amazing. The version I used was free. I tried to buy it but CadSoft has (had?) a fairly crazy pricing scheme that actually left you worse off in terms of acceptable usage if you paid them money than if you used the free version.

    The best part of using the Atmel MCU was that GCC can cross-compile for it. So you're basically writing regular old C code but it runs on a little tiny piece of silicon. You'll want to subscribe to the quite active avr-gcc mailing list. Save every message from Marek Michalkiewicz; in my opinion he's the god of GCC-for-AVR development.

  16. Found what you want... by deanzo · · Score: 3, Informative


    1) These are available from Brookstone for $150...

    2) Delcom Engineering has a "USB Visual Signal Indicator". This includes RED, GREEN, and BLUE LEDs, Piezo buzzer, 2 meter USB cable and USB powered circuit. The cost? $69.00 each... All you need to add is a globe...

    If you want to play around with this stuff, Delcom Engineering also makes USB chips, cables, etc. and they make USB development board for $49.00 that you could you could use to build what ever you wish...

  17. Re:parallel vs. serial by pirodude · · Score: 4, Informative

    download a set of drivers called "PortTalk", they work very well for allowing programs to access the parallel port under nt/2k/xp and they include quite a bit of sample code for doing it also.

  18. Amen to the PIC chip! Here's some code... by wirelessbuzzers · · Score: 5, Informative
    Just to get you started. It's mostly left over from my wireless buzzer project. Since PICs don't come with 3 PWM units, you can just:
    do_red: // software PWM for red color
    DECFSZ $redtemp, F //0x41, for instance
    GOTO do_green
    MOVF $red, W //0x51
    MOVWF $redtemp
    XORLW -1
    MOVWF $red
    MOVLW $redbit //bit number of red LEDs on the port, say 0x1
    XORWF PORTA, F

    do_green: s/green/blue/; s/red/green/;
    do_blue: s/blue/red/; s/green/blue/;
    If you want it to pulsate, substitute GOTO do_counter for the last GOTO do_red:
    do_counter:
    DECFSZ $counter_divide_1
    GOTO do_red

    // Check if the interrupt code wants our attention
    BTFSC $interrupt_attn, $attn_bit
    GOTO get_new_params // get new pulsation parameters, you can write this

    DECFSZ $counter_divide_2
    GOTO do_red
    MOVLW 0xF // approximate delay loop for 30 HZ update
    MOVWF $counter_divide_2

    // if you're running at 4MHz, this code will be called about 30 times per second.

    BTFSS $pulsate_control, $pulsate_bit // Are we pulsating?
    GOTO do_red
    MOVLW $redbit || $greenbit || $bluebit
    MOVWF PORTA // reset the LEDS
    DECFSZ $step_counter // check if we should go opposite
    GOTO calccolors

    BTFSS $pulsate_control, $fixed_num // Do we have a fixed number of cycles?
    GOTO invert_deltas

    DECFSZ $num_pulses
    GOTO invert_deltas

    CLRF $pulsate_control // not pulsating anymore
    GOTO do_red

    invert_deltas:
    MOVF $num_steps, W
    MOVWF $step_counter // reload the step counter
    COMF $red_delta, F
    INCF $red_delta, F // invert the delta registers
    COMF $green_delta, F
    INCF $green_delta, F
    COMF $blue_delta, F
    INCF $blue_delta, F

    calccolors: // actual color adjustment
    MOVF $red_delta, W
    ADDWF $red, F
    MOVF $blue_delta, W
    ADDWF $blue, F
    MOVF $green_delta, W
    ADDWF $green, F
    GOTO do_red
    I'm a bit rusty on my PIC, so check the mnemonics and look for typos. Initialize $steps to be the number of "frames" to take to wax or wane in color, $red / $green / $blue to the initial color (in 256ths), and $red_delta, $green_delta, $blue_delta to be the change per step. You can control these from a USB or serial interface without too much pain. Just have your interrupt code set $interrupt_attn bit number $attn_bit. To do only a fixed number of pulses, set the bit $pulsate_control -> $fixed_num, and set $num_pulses to the number of half-pulses you want to do. IE, set it to 1 for a fade, 2 for a pulse, 3 for a pulse then a fade...

    In terms of hardware, you'd need the jack for the port, the power cord, a PIC chip, a transistor for each color, and a bunch of LEDs/resistors of each color. Easy stuff really. Let me know what you come up with. If you use USB, I'd be especially interested, as I have a Mac (no serial port). Good luck!
    --
    I hereby place the above post in the public domain.
  19. Re:parallel vs. serial by Uller-RM · · Score: 1, Informative

    PortTalk and Port95NT are closed source and produced by a commercial company, whereas there are better libraries such as WinIO that are BSD-license.

    And, you'll find that most of the code out there just blindly writes to the data bus at 0x0378. The more complex stuff, such as scanning the BIOS configuration area for addresses and then doing ECP config register writes for each one, and working with the status/control pins, are a bit beyond the average Perl hack.

    And then, there's the actual art of getting the info you need.

  20. Re:parallel vs. serial by Gordonjcp · · Score: 4, Informative

    I've actually done this with eight LEDs (four red, four green) and the parallel port on my firewall machine. I did it mostly because it had a cool smoked perspex cover that slides over the drive bays, and the LEDs shining through it looks pretty cool. Especially when you make them flash and do stuff. Have a look at some pics.

    In this case, the LEDs have their anodes connected together, and brought back to the 5v rail, and their cathodes connected to the parallel port pins through 220 ohm resistors. You then bring the appropriate pin low to turn the LED on. There's a good reason for doing it "backwards" - the gates driving the parallel port can sink more current than they can source. That is to say, the transistor pulling the pin to ground is "stronger" than the one pulling it to +5v, so it's more suitable for turning on an LED. You could use two resistors and a small transistor per pin, too. If you like.

  21. Bluetooth? by sonamchauhan · · Score: 2, Informative

    Or, if range isn't an issue, how about a DIY bluetooth module for the wireless connectivity?

    BTDesigner.com seems to be selling 20m-range modules for about $60.

    Anyone know of cheaper sources? By now, Bluetooth modules were meant to cost around $5/module (in large quantities).

  22. Two birds with one stone by john.r.strohm · · Score: 2, Informative

    Motorola currently has a design contest going with
    their MC68HC908QT4 8-bit microcontroller. This
    puppy is an 8-pin DIP, FLASH EEPROM programmable,
    and the pins appear to be PWR, GND, and 6 I/O
    pins. (One of them may be a clock, or it may be
    set up to accept a clock if you give it one.)

    Start at http://www.circuitcellar.com for details.

  23. LED brightnes control chips. by r2000 · · Score: 2, Informative
    Maxim make a chip designed to control a few 16 segment displays, or overall it can control 128 individual LEDs. each "digit" has brightness control.

    www.maxim-ic.com

    A data sheet

    also check out the related products on that page.

    maxim are helpfull with there sample policy. If you were to connect an array of red, green and blue LEDs inplace of the digits, you can change the brightness of each bank of them with 8 brightnesses,

    In the data sheet they talk about 127 colours with bi-coloured LEDs, if you had tri-coloured then you would get... ooooh.. 16.8 million.

    can be loaded by bit-banging the SPI or I2C interface from a printer port. Im sure someone has made a linux driver for it. Some code to do that was on there site when I looked but I cant find it now..

  24. Fun with microcontrollers by Anonymous Coward · · Score: 2, Informative
    I actually developed a sorta-simlar project (controlling a series of LEDs from PC, no ball though) a few years back, and I had great success using the Motorola 68HC12 microcontroller. Built in serial input (so you can use serial or parrallel interface), you can control the brightness of the LEDs with the PCM functionality (see note below) and, as I recall, the chip was $15 at the time, probably down to $5 now.


    As far as the PC side goes, just a program to output individual bytes to the serial (or parrallel) port as the backend, and you can do all the "detrermine-what-LEDs-to-light" calculations in a heavier portion of code, updating itself every 60 seconds or whatever from whatever data sources.


    As for the microcontroller, it's fairly trivial to write the code to control the lights, unless you want to put in stock-price-fetching/web-page-parsing functionality on the chip. Like I said, i'd recommend doing that on the PC and just have the microcontroller doing the LED-lighting work. If you've done assembly programming on Intel or most Motorola chips before, it's not hard to pick up (very different though from most RISC designs, like MIPS) but if you're not that great with assembly you can build gcc to output code for the HC12.

    Regardless of how you generate the bytecode, you'll have to simulate it, and have access to an EPROM writer, and maybe some RAM. The way I implemented mine was to have the initial "boot program" on EEPROM which made a request to the PC for the actual program. The PC-side caught the request, and sent a copy of the 'real' program bytecode which got loaded into RAM, and the booter jumped to the new code. This let me update the HC12 running-code as I found bugs, and let me add more features without re-writing to the EEPROM


    As promissed a note about PCM. I know a bunch of know-nothing-kiddies are going to reply to this post saying "it's a LED, it's either on or off, stupid" but as anyone whose done 1 year electical/computer engineering there are 2 ways (that i know of) to control the apparent brightness of LEDs. First, controlling the current flowing though said LED (which was not done in my HC12 LED controller implementation, but could have been with creative use of output ports and resistors), and the second is with pulse code modulation. For PCM, if you want a LED on at 80% brightness, you simply output a '1' 80% of the time, and '0' 20% of the time. The cycle repeats fast enough (remember that we're running on a 16MHz clock which (although it seems puny now) it insanely fast compared to the human eye) so that our eye sees that as 80% the brightness of an "on" LED.

  25. Re:parallel vs. serial by nate1138 · · Score: 2, Informative

    easy, just hook 4 of the data pins rrom a parallel port to one of these
    16 line decoders and that will give you control of 16 relays. add a second chip to the next 4 pins, and control 32. Once you have it set up, just write the value you want represented (ie, to turn on the first device, write out a 1, second device 2, third device 4, etc etc) out to the port.

    --
    Where's my lobbyist? Right here.
  26. nothing but hardware by wireb · · Score: 2, Informative

    Ok 2 not so easy ways to do it...

    serial port method.
    Get a pic microcontroler with built in serial port and a DtoA converter. Connect each (1 red, 1 blue, 1 green) to its own individual DtoA output (with a current limit resisor picked so 5V results in full led brightness ((5V-VfLED)/(IledCONT)= R). next hook your serial port to the pic via a RS232 to TTL converter (MAX232 is a good choice). write some simple code to read 3 values from the serial port and dump them to the DtoA reg (too long to post here send me Email for help or look at the ap notes on microchips web sight) and tada you have a serial controled glowing ball....


    10baseT ethernet (UDP/IP) method.
    go to
    http://home.att.net/~wireb/niode/niode/index.html
    build a niode and hook the led to that. I am currently working on new commands to allow the DtoA converter to work for a use similar to this (controling fiber optic lights in celing tiles). A lot more work but you would be able to control it from anywhere in the world that can send UDP trafic to it.

    Later
    Wire

  27. An Animal Book 4 u by Breakerofthings · · Score: 2, Informative

    I picked up Designing Embedded Hardware a couple of weeks ago; being a software geek, with no hardware experience (except for assembling PC's, etc), I found this book to be amazing.

    I highly recommend it.

  28. Robot Builder's Bonanza by NitsujTPU · · Score: 2, Informative

    If you want a quick fix on how to wire stuff for parallel port, I believe that there are plans in the book "The Robot Builder's Bonanza" to do this. It's great, it's only about $30, and one of the professional societies on your campus probably already has a loaner copy. It's available on amazon.com. Get super-saver shipping if you're on a budget, reply to this with an e-mail addy and I'll even write software for it if I think that your design is sound ;-)

  29. AVRs rock by Andy+Dodd · · Score: 2, Informative

    I guess the poster has two options:

    Parallel port - Eats his parallel port, and needs lots of wires to be run.

    AVR - More complex to design, but easier overall.

    I don't see why you reccommended an oscilliscope - For most uC development one isn't needed. (Can be nice to have though!)

    Parallel-port AVR programs are simple and easy to build. Atmel did a good job as far as AVR programmability. You can program most AVRs in C with good results, either using GCC, or one of a few other compilers. (As much as I like GCC for most development, Codevision is an EXCELLENT IDE/compiler that is well-maintained. Cornell uses Codevision + AVRs for their microcontroller class, and Prof. Land has had 1-day turnarounds from bug report to bug fix from the author of Codevision.)

    For those who are lazy and have some extra cash, the STK500 devel board is $89-109 or so depending on where you look and is wonderful for prototyping circtuits. (Has built-in switches and LEDs, TTL-to-RS232 converter for AVRs with a UART, and a serial port based programmer.)

    Some AVRs have built-in internal RC oscillators - Not as stable of a frequency reference, but for many applications (such as this one), it doesn't matter, and it's much easier to use.

    Most AVRs have only one or two PWM outputs, and VERY few if any have three, which isn't as serious of a limitation as it may seem - Since the PWM rate only has to exceed 100 Hz or so, he can easily do 8-bit PWM with a software loop. (Essentially, having 8 or 16 software-driven PWM channels.) 8-bit PWM would probably be overkill for this application, even 4-bit might be more than sufficient.

    AVRs are also excellent for driving parallel LCD displays, although the software is much more difficult. (It's easy with Codevision, except that only the commercial versions of CV can use the LCD library.)

    --
    retrorocket.o not found, launch anyway?
  30. Ambiant orb by TheMerk · · Score: 2, Informative

    Hmm.
    $299 list.
    $199 Thinkgeek
    $150 Brookstone Ships week of 5/15/2003

    Not sure if building your own worth the effort.

    My 2

  31. Re:parallel vs. serial by MadCow42 · · Score: 4, Informative

    Actually you can get 12 "output" channels out of a parallel interface if you really want to... the 8 data channels, plus the "strobe", "autofeed", "init", and "select-in" channels (pins 1, 14, 16, 17, but 1, 14, and 17 are "inverted" watch out).

    I use the parallel port to drive three stepper motors. Pretty easy to do, and your circuit would be just as easy. You could actually use the same circuit, but simply change the +12V input to the correct voltage, and hook the LED's in where the motor phases would be.

    See my crude circuit diagram here:

    www.lenticularshareware.com/downloads/stepper_circ uit.jpg

    FYI, you can also get 4 "input" channels from the parallel port at the same time, I use them for limit switches to set the position of the steppers to "home". (see diagram)

    MadCow.

    --
    I used to have a sig, but I set it free and it never came back.
  32. To make lots of colors, blend using duty cycling by badmonkey · · Score: 3, Informative

    Not sure if anyone covered this yet, but wouldn't you want to duty cycle the various colored LED's so that you can blend lots of different colors. You don't need actual relays to switch this level of power do you?

  33. Give 1-wire network hardware a try . . . by a_timid_mouse · · Score: 3, Informative

    I'm not an electrical engineer, but you might find what you're looking for at AAG Electronica. They have serial port adapters, sensors, switches, etc that work on a 1-wire network. I have a weather station hooked up with their gear. I think you'd need the adapter (~$15) and their switch module (~$30). http://www.aagelectronica.com/aag/index.html

  34. Use for old chips? by HeyLaughingBoy · · Score: 3, Informative

    This is interesting. I have a basement full of old ICs including drivers, microprocessors, digital/analog devices and thousands of LEDS and other things I've bought surplus over the years for various projects. I've thought of packaging them up into little "hobbyist paks" and selling on EBay, but never could think of what kind of project to sell them for. Perhaps a kit with parts like a UDN2987 octal driver, 8 leds, a connector and a schematic showing how to build a parallel port I/O interface along with some Linux C driver code for $15-20 shipping included? I think I even have artwork for a PCB I made to do this years ago!

    Think anyone would be interested?

    Then again, do I really want to deal with the support emails from people who can't hold the right end of a soldering iron...

  35. try a microcontroller... $10 solution by Anonymous Coward · · Score: 2, Informative

    http://www.cygnal.com The C8051F300 is an 11-pin micro with 8 digital/analog peripherals. It can provide serial access and then an additional 6 outputs. Run the leds through a ULN2003 darlington array (7 transistors in a 16 pin package) and hook them up to the micro. Cost $15.

  36. Linux source by Whatever+Fits · · Score: 2, Informative

    I have a project that you can look at to get some Linux source for this and some simple hardware to look at for hooking up 8 LEDs to a parallel port. This is very simple and safe to do. I have it running on my desktop at home giving me the CPU usage in bright blue LEDs across the front bezel of the machine. Looks awesome. Very easy to adapt the code to utilize other values to control it. Just replace the function that gets the CPU usage with whatever you want. Diskspace on a server, network utilization, flowrate in the sewage system, whatever.

    --
    My name fits again.
  37. Re:parallel vs. serial by DigiWood · · Score: 2, Informative

    Actually a PIC microcontroller is VERY easy to program as you can do it in BASIC. Getting started with them is also VERY inexpensive. You can get the PCBs for a parallel programmer for free off the 'Net and the parts for it from any reputable electronics parts supplier. They also can be powered from the serial port if you want to keep it simple. A PIC can power a number of LEDs with nothing other than a current limiting resister on the ground side of the LED. The PIC microcontroller is about $5-$8 from Reynolds Electronics.

    --


    Nothing is impossible. It just hasn't been figured out yet.