Knight Rider/Cylon Scanner
BernieBB
Posts: 1
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
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
·· 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
What do you mean when you want it to fade and scroll?
That what those displays (Cylons and K.I.T.T.) used anyhow.
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???
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-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
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
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
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
·· 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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 Savage
Parallax Tech Support
csavage@parallax.com
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 Savage
Parallax Tech Support
csavage@parallax.com
mdz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support