Shop OBEX P1 Docs P2 Docs Learn Events
Cylon LEDs — Parallax Forums

Cylon LEDs

Robert25Robert25 Posts: 53
edited 2005-10-18 04:50 in Robotics
Hi again...roll.gif

Does anyone have an idea or schematic for stringing together several red leds that would blink in sequence, similar to the cylons on the old battle star galactica.· The plan is to mount the led array on the front of the robot and have it synced with the ping sensor moving from side to side.·
(that is, of course, if I can get the ping to work.... see other posting.)

·

Comments

  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-27 17:20
    I often do BGS silon LEDs in projects. It depends on how you want to control it- One of the easiest ways is to shift a one back and forth -

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Robert25Robert25 Posts: 53
    edited 2005-09-27 17:26
    Ryan,

    Do you mean mechanically move one??? I suppose I could dedicate a servo to do that, but electronically would be better...

    Bob
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-27 17:40
    No, not mechanically. Shift registers.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Robert25Robert25 Posts: 53
    edited 2005-09-27 20:53
    OK, I understand... but truly, I don't

    can you give me an example to follow????
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-27 21:00
    Robert,

    What is your design? What are you using to power your device? What control are you using?

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Robert25Robert25 Posts: 53
    edited 2005-09-27 21:54
    Ryan,,,



    Lot's of questions... let's see if I can get us started.· This is only for esthetics.· The plan was to string several red leds along the front of the robot to look like the cylon scan.· I was thinking it can all be electronic and run (and powered) by itself.· The "nice to have" piece would be to have it synced with the servo running the Ping sensor from side to side.·

    I don't know enough electronics yet to put this circuit together and that's why I asked for the help.

    Bob

    PS> reading several of the posts on all the various topics in these forums, I am surprised someone didn't ask or come up with this before....
  • Bill KennyBill Kenny Posts: 15
    edited 2005-09-27 22:08
    This might help, I have had this for a while trying to figure out what to use it on before I recently started this stuff. It’s for the Knight Rider show but I think it’s that same as you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    Bill
    576 x 432 - 153K
  • LarryLarry Posts: 212
    edited 2005-09-28 00:41
    I can't help you with the schematic, but you may be able to score the real thing. There was a local surplus store in Portland OR that had an actual board from "Battlestar" ·running up at the front register for years. It not only panned back and foth (several lights were on at once) but the group was brightest at the center.

    I tried to score the thing a couple of times to no avail, but the place changed hands a couple of months ago.

    All you would need to do is pan the ping sensor at the same rate. Try

    www.wackywillies .com

    On second thought, I may try to get it again.

    Larry

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • doggiedocdoggiedoc Posts: 2,245
    edited 2005-09-28 01:14
    Here is a schematic I have breadboarded before. It is similar to what you want. You could use 1/2 of this to acheive your Cylon Effect.
    Bill Bowden said...
    16 Stage Bi-Directional LED Sequencer

    The bi-directional sequencer uses a 4 bit binary up/down counter (CD4516) and two "1 of 8 line decoders" (74HC138 or 74HCT138) to generate the popular "Night Rider" display. A Schmitt Trigger oscillator provides the clock signal for the counter and the rate can be adjusted with the 500K pot. Two additional Schmitt Trigger inverters are used as a SET/RESET latch to control the counting direction (up or down). Be sure to use the 74HC14 and not the 74HCT14, the 74HCT14 may not work due to the low TTL input trigger level. When the highest count is reached (1111) the low output at pin 7 sets the latch so that the UP/DOWN input to the counter goes low and causes the counter to begin decrementing. When the lowest count is reached (0000) the latch is reset (high) so that the counter will begin incrementing on the next rising clock edge. The three lowest counter bits (Q0, Q1, Q2) are connected to both decoders in parallel and the highest bit Q3 is used to select the appropriate decoder. The circuit can be used to drive 12 volt/25 watt lamps with the addition of two transistors per lamp as shown below in the section below titled "Interfacing 5 volt CMOS to 12 volt loads"
    night_r.gif

    There are a lot of good LED circuits on Bill Bowden's site. I have put a few of them together and I am using one in a project now (more on that when it's done).

    Hope that helps!
    Doc

    Post Edited (doggiedoc) : 9/28/2005 1:17:25 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-28 01:17
    Man, that's doing things the hard way ... StampWorks shows how to do that in just a few lines of code and all you have to do is connec the LEDs. And if you want ot add some additional effects, you can program it in -- not something you can accomplish [noparse][[/noparse]easily] with counters and gates.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • doggiedocdoggiedoc Posts: 2,245
    edited 2005-09-28 02:10
    [noparse][[/noparse]hi-jacked_thread] Say Jon, speaking of StampWorks, when do we get to preview the new edition? [noparse][[/noparse]/hi-jacked_thread]
  • Tom WalkerTom Walker Posts: 509
    edited 2005-09-28 13:50
    Depending on how many pins you want to use, my personal choice would be to run your servo pulse value through some math (cue the Dr. Tracy Allen theme music) to get a value to feed out to your "LED driver", whether it be several pins directly driving the LEDs or a serial-to-parallel converter. that way, if you ever decide to modify your ping-servo code to follow or track or whatever, your LEDs will track the same way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Robert25Robert25 Posts: 53
    edited 2005-09-28 15:43
    Jon,

    Thanks for looking in. I gathered that you can program this activity, but I didn't want to use I/O pins for this simple decoration.

    I would appreciate your looking into my other post dealing with the Ping sensor not working.... This is becoming a real problem and I would really like your input.

    Bob
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-28 17:14
    If you want to do a cool Cyclon LED display without a lot of pins then connect as many 74HC595s as you need -- BAM! (I love Emeril's how) and you're done; three pins and lots 'o LEDs.· See SHIFTOUT in the manual or help file for '595 connections.

    The Ping is a no-brainer. If it's not working, it could simply be dead. I have used several, and every single one of them worked the first time. If you have a 'scope you can always look watch the trigger/echo pin for activity.· I've attached a graphic that I did for another customer that shows the Ping Trigger and Echo pulses.· Note that for this demo the Trigger pulse was stretched quite a bit so that it could be seen on the display.· This is not a problem for the Ping because it actually waits for the falling edge of the trigger pulses.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 9/28/2005 5:13:30 PM GMT
    798 x 597 - 128K
  • Robert25Robert25 Posts: 53
    edited 2005-09-28 17:33
    Jon,

    Thanks for that led note... When I get to that point I will try it.

    The Ping is a different story. I don't have a scope and I really don't know how to determine if the Ping is receiving or for that matter, sending back the echo times. Do you have any suggestions for testing this???

    quick question... When you use the Ping, does the ACK green led on the board blink with each pulse or is it on continuously as in mine?

    If it indeed "dead" do I return it to Parralax for replacement and how do I do that???

    Bob
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-28 17:39
    Sure, use our demo code -- if that doesn't work you either have a connection problem of a duff sensor. The LED shows activity, so when you put the sensor reading in a loop (like in our demo) you will notice that it blinks more rapidly as you're closer to a targe (this is because the return echo didn't take so long and another cycle can be fired).

    I think you should probably call Tech Support at 888-512-1024 and let them walk you through it and set-up a return if you're in warranty. The other thing you could do is post your code. All of these things are code driven and you may very well be making a mistake. I know code mistakes are a rarity <wink>, but in the off chance that's the cause none of us can help you without actually seeing your code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • SN96SN96 Posts: 318
    edited 2005-09-28 18:30
    I have to say this is a great project idea. I have been inspired to take this project on my self. I want to build this as a circuit without using the stamp since I am trying to learn board design using EAGLE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    --
    Formally RoboROOKIE.
    ·
  • RDL2004RDL2004 Posts: 2,554
    edited 2005-09-28 18:36
    Do a Google search on knight rider led circuit. You should find several simple and cheap ways to do this.



    Take a look at this:



    http://www.bit-tech.net/modding/2002/06/22/knight_rider/1.html



    I didn't look close enough to see how hard synching to the ping sensor movement would be though.
  • Robert25Robert25 Posts: 53
    edited 2005-09-28 20:17
    Jon

    I will give them a call as the module is only a week old. To answer you question though, the code I am using is the direct download from the web site. The only modification I made, other than trying to trouble shoot, was changing the pin designation from 15 (in the program) to 0, 1, 3 etc.

    Thanks again for your help with this one....
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-28 21:28
    I just looked at the ARobot schematic and see that all of the IO pins are pulled up to Vdd ... I wonder if this is bothering the Ping))) sensor (providing what looks like a false echo when PULSIN makes the pin an input and the Ping has not started driving the IO line back). Hmmm.... see if you can remove the pull-up from P15 and try again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Robert25Robert25 Posts: 53
    edited 2005-09-29 00:02
    OK I will try that... how do I do it??? Is this a programming function?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 00:15
    No, it's a hardware thing.· Call Roger (Arrick -- I know him and he's a very nice guy) and ask him how to disable/remove the pull-up connected to P15. I don't have an ARobot so all I can tell you is that I think that pull-up is adversely affecting the Ping.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 9/29/2005 12:15:41 AM GMT
  • Robert25Robert25 Posts: 53
    edited 2005-09-29 14:57
    Did that.... waiting to hear from Roger...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 18:09
    Since Roger and I live in Texas, and we do know each other, I picked up the phone and called him. Good news: All you have to do is pull SIP #2 out of its socket and clip off pin #2 (this connects to P15). Please, please, please, consult the ARobot schematic and user's guide before you do this, and understand that neither I nor Parallax are responsible for any damage you do to your ARobot. If you have doubts, call the folks at Arrick and let them walk you through it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Robert25Robert25 Posts: 53
    edited 2005-09-29 22:51
    Jon

    Thanks for getting in touch with Roger on my behalf. After your last comments, I too was looking at the ARobot schematic and realized the +5V connection at each of the stamp pins. In fact I was thinking about pulling the resistor SIP and insulating the specific pin just to try it out. I decided to wait until I heard from you or Roger. Hearing this, I might want to do that anyway, since clipping the pin would dedicate that I/O pin to Ping.

    When I get home tonight I will give it a try and let everyone know.

    I want to add that I am very grateful for your help in this.
  • Robert25Robert25 Posts: 53
    edited 2005-09-30 00:11
    OK folks... If anyone is really interested in the outcome of this problem...

    It works....

    I pulled the SIP and clipped the pin as suggested above (I have worked with some of these types of components previously). Plugged it back in. Turned it on and loaded the program.

    I blinks and returns to the debug screen all the proper data. I even tried some calibration measurements to see how accurate it was. Got my wife to hold the tape measure and it is definitely accurate to the inch. Very impressive.

    I have to make sure that my plans now indicate that PIN 15 does not have the pull up voltage. Will this modification harm anything else/??

    My thanks to everyone who helped out. It's too bad these threads got trapped in the LED topic and not in the sonar one. I am sure many folks would like to hear the outcome.
  • idleupidleup Posts: 46
    edited 2005-10-18 04:50
    In order for it to truly be a cylon eye it would not only need to be brightest in the center LED's but also fade the LED's as it moves side to side.

    - Matt
Sign In or Register to comment.