Shop OBEX P1 Docs P2 Docs Learn Events
Knight Rider/Cylon Scanner — Parallax Forums

Knight Rider/Cylon Scanner

BernieBBBernieBB Posts: 1
edited 2006-10-09 18:54 in BASIC Stamp
Can anyone help with a design to create a PWM Basic Program to build a Scanning (back & forth) LED light string of ten to twelve Led's. I want the scanning to have a fadding effect not just a point of moving light.

I have a PDB with Basic 2 stamp, and texts. I am new to this but hope I might get some pointers

Thanks!

BernieBB

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-09 00:57
    Bernie,

    ·· You don't need PWM to do that...Just put a Capacitor on each LED so that it slowly discharges.· That's how they got that effect in the real thing.· It was a small RC circuit on the driver.· I don't recall off-hand if they used a MOSFET or a Power Transistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • bennettdanbennettdan Posts: 614
    edited 2006-07-10 19:22
    Bernie,
    What do you mean when you want it to fade and scroll?
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2006-07-10 22:05
    Or use incandescent lamps instead of LEDs. They'll fade just fine on their own.
    That what those displays (Cylons and K.I.T.T.) used anyhow. smile.gif
    Alas, a little more is needed to drive the lamps (something like a transistor and
    a resistor or two for each lamp) but... do you want cheap or accurate??? smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • villianvillian Posts: 3
    edited 2006-07-15 17:19
    I built a simple circuit using a 10 LED DIP to construct my CylonEye. I use the following listing as a sub routine in an program I wrote for my PocketWatch module, it activates when the alarm function turns on.

    CylonPauseCount = 16 controls the·duration the LED is on.·This value·'appears' to dim the LED to your eye.

    'Robotics with the Boe-Bot - CylonEye.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    segmentNumber····· VAR······ Nib
    CylonPauseCount = 16
    DO
    ·FOR segmentNumber = 0 TO 9
    ·· HIGH segmentNumber
    ·· PAUSE CylonPauseCount
    ·· LOW segmentNumber
    ·· PAUSE CylonPauseCount
    ·NEXT
    ·FOR segmentNumber = 9 TO 0
    ·· HIGH segmentNumber
    ·· PAUSE CylonPauseCount
    ·· LOW segmentNumber
    ·· PAUSE CylonPauseCount
    ·NEXT
    LOOP
  • aalegadoaalegado Posts: 66
    edited 2006-07-22 03:31
    Here's my version of the Cylon Eye Effect.

    This is easy to hook-up on a PDB...just jumper P0 to LED0, P1 to LED1, etc. The code is designed for 8 LEDs (0 to 7).

    The DelayTm value and persistence of vision disguises the fact that only one LED is on at a time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wouldn't connect that if I were you...

    Vive Le Tour!
    July 1 - July 23
  • Justin SaneJustin Sane Posts: 35
    edited 2006-08-01 22:47
    Chris Savage (Parallax) said...
    Bernie,

    You don't need PWM to do that...Just put a Capacitor on each LED so that it slowly discharges. That's how they got that effect in the real thing. It was a small RC circuit on the driver. I don't recall off-hand if they used a MOSFET or a Power Transistor.

    I am curious how do you pick right capacitor for led? For voltage, its pretty obvious, but what about farads? I am just hoping theres a way to calculate so I can choose right one theorically?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"Imagination is the one weapon in the war against reality."
    -Jules de Gaultier
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-02 15:47
    Justin,

    ·· The value will depend somewhat on how quickly you want the fade, based also on how much current is being drawn.· The guy who now owns the Knight Rider Technology rights used to be a colleague of mine when I was in NY.· His website is (I think) www.copperhead.com although it seems to be down so I cannot verify currently.· Anyway higher power bulbs tend to have somewhat of a fade effect inherently, but it can be adjusted just like with LEDs by a capacitor, in the case of bulbs, on the driver side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • RinksCustomsRinksCustoms Posts: 531
    edited 2006-08-02 16:06
    a typical value of 100uF to 1000uF and a 1K resistor should yield the results your looking for, just experiment with the cap values till you find something you like. Radio shack has a bulk pack of mixed capacitors (electrolitic not ceramic) where you can make a small version (like two or three lights) so you can find out the value you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Definetly a E3 (Electronics Engineer Extrodinare!)
    "I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-02 16:12
    Bear in mind, however, that the way the capacitor is connected will depend on how the "bulb" is driven.· For an LED it will function better to have the capacitor in parallel with the LED, but for bulbs it may be better to have the capacitor on the low-signal side of the driver.· Again, it really depends on the circuit used.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Justin SaneJustin Sane Posts: 35
    edited 2006-08-02 21:00
    Thanks!

    another question, what if you want to do the opposite way, brighten it gradually?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"Imagination is the one weapon in the war against reality."
    -Jules de Gaultier
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-03 00:23
    Again, with a bulb to some degree you will have that.· I don't know your circuit so...Do you have a schematic?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • mike_zmike_z Posts: 4
    edited 2006-08-28 07:35
    would X-10 work here?

    mdz
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-08 19:38
    This thread is being moved from the·Completed Projects·Forum to the BASIC Stamp Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jonwjonw Posts: 67
    edited 2006-10-09 18:54
    I also would like to see the schematic. Is this a circuit that lights one light at a time as it chases down a row of lights?
Sign In or Register to comment.