Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: LEDs and PC controller

  1. #11
    Low Bitrate widower's Avatar
    Join Date
    Jun 2005
    Posts
    85
    BTW: To calculate the resistor value:

    lpt datapins are usually 0-5V
    A = LED on Voltage
    I = LED on current

    resistorInOhms = (5-A)/I

    so if A=3Volts and I=15ma

    resistor = (5-3)/.015

    which is 133Ohms. You can always start with a larger resistor if you aren't sure of the led specs. Say 512ohms and then reduce it until the brightness looks good. Don't exceed the LED forward biased current.

  2. #12
    Maximum Bitrate mushin's Avatar
    Join Date
    Aug 2004
    Location
    SE Michigan
    Posts
    750
    Quote Originally Posted by widower
    So if you are using a 2wire tri-colour led, connect one data bit to a resistor, then the resistor to the led, then the other led pin to another data bit. If the first databit (D1) is 0V and D2 is 0V, the led is off. If D1 is high and D2 is low, the led is red, if D1 is low and D2 is high the led is green and if you constantly change the led from red to green, you will see yellow (depending on how fast you switch).
    I would recommend against powering the LED directly from the data pins. IIRC, the LPT data pins can source/sink somewhere on the order of 10ma; LEDs are usually rated around 20ma (constant), not to mention if more than one LED is desired for increased luminosity.

    Also, what you describe there is a bi-color LED (I guess you're counting the derivative yellow as a 3rd color?) Tri-color (RGB) LEDs, at least the one's I've seen, are all 4-pin common cathode.

  3. #13
    Newbie
    Join Date
    Sep 2005
    Posts
    7
    There will be a quite a bit of LEDs involved, Iím lighting my entire PC case + possible ground FX. I initially thought I could do it the way widower suggested but then I would not have enough power.

    This is my general idea of whatís going down.

    Parallel port(sends data) --> PWM(sets the on/off timing) --> transistor(giving LEDs enough power) --> resistor(setting the exact power required) --> LEDs(light up my soon to be drop dead sexy computer)
    Do that 3 times, one for each color.

    Is that about correct?

    Mushin, thank you SO much, I probably appreciate much more later (not that I don't now). You have been a great help.

  4. #14
    lez
    lez is offline
    FLAC lez's Avatar
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,334
    above the last post.

    Not only that but you cant 'program' the lpt port to do pwm and just leave it running, no such commands exist.

    You can leave a pin high or low, but not pulsing.

    You would need to write a program to run in the background doing the pwm (at cost of cpu) and a program to set the levels for the background driver.

    hardware. Pic chip. job done.

  5. #15
    Maximum Bitrate mushin's Avatar
    Join Date
    Aug 2004
    Location
    SE Michigan
    Posts
    750
    lez, I wasn't pushing him towards a PIC because that's another can of worms for a complete beginner.

    lez is right though, the software needs to be constantly refreshing the LEDs to maintain colors. Ultimately, it is more elegant to have a uC (or hell, a display controller IC) handle this duty, but I'm sure 2n193r can tackle that step if and when he feels ready.

  6. #16
    Low Bitrate widower's Avatar
    Join Date
    Jun 2005
    Posts
    85
    There are multiple circuits you could build that would help offload the PC. For simplicity sake, you may want to for LED pwm controller ICs. Maxim often have funky chips like this. You could then hook the chip to the parallel port in order to control it from the PC.

  7. #17
    Newbie
    Join Date
    Sep 2005
    Posts
    7
    PWM question, how would you change the duty cycle on a chip like this one?
    http://www.allelectronics.com/cgi-bi...M-2&type=store

    I thought that you would some how set the duty cycle and it would stay at that particular rate. (I could be miss understanding you guys)

    Quote Originally Posted by mushin
    lez is right though, the software needs to be constantly refreshing the LEDs to maintain colors. Ultimately, it is more elegant to have a uC (or hell, a display controller IC) handle this duty, but I'm sure 2n193r can tackle that step if and when he feels ready.
    First I want to build it the way with the PWM then I can do it with PIC(I just read a little bit about them but they sound cool).
    Well I will do that after I do this idea that is kind of pointless. Have the front door of my pc open automatically by some sort of sensor with 3 LEDs that are red that fade from dim to bright red. Then activate that sensor any have it close.

  8. #18
    FLAC -zip-'s Avatar
    Join Date
    Sep 2004
    Location
    Ontario/Canada
    Posts
    1,293
    wtf are you guys talking about? LOL

    *much respect for the engineer peeps on this board.
    2008 350z GT Installed since April 22nd 2011 - Worklog
    2000 Protege Installed Since April 2, 2005 - Intel D201GLY|Fusion Brain|ODBPros ODBII|Engenius|GPS Rikaline|Powermate|Motorized Lilli
    Sound Stage
    Eclipse|MTX|Infinity

  9. #19
    Low Bitrate slantman's Avatar
    Join Date
    Apr 2005
    Location
    north augusta SC
    Posts
    73
    you may find something on this site
    http://store.qkits.com/category.cfm/PC

  10. #20
    Low Bitrate widower's Avatar
    Join Date
    Jun 2005
    Posts
    85
    Quote Originally Posted by 2n193r
    PWM question, how would you change the duty cycle on a chip like this one?
    http://www.allelectronics.com/cgi-bi...M-2&type=store
    You're better to find a led pwm. The device you are pointing to is a current mode pwm. It's used for designing power supplies.

    Take a look at http://pdfserv.maxim-ic.com/en/ds/MAX6966-MAX6967.pdf

    It has a spi interface which is basically a synchronous serial interface so it should be easy to control from the parallel port.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. New product - PC Power switch with wired remote
    By hd54321 in forum General Hardware Discussion
    Replies: 5
    Last Post: 03-08-2006, 10:48 PM
  2. PC boot problems
    By Dave One in forum General Hardware Discussion
    Replies: 7
    Last Post: 07-17-2005, 05:24 PM
  3. Ultimate control over interior lighting
    By impulsenine in forum Hardware Development
    Replies: 39
    Last Post: 06-23-2005, 10:42 PM
  4. Remote PC Power Switch
    By Terran in forum General Hardware Discussion
    Replies: 6
    Last Post: 01-06-2005, 08:13 PM
  5. Custom Dash with car pc status leds
    By M^ck^y in forum General MP3Car Discussion
    Replies: 2
    Last Post: 09-08-2004, 12:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •