Shop OBEX P1 Docs P2 Docs Learn Events
Flasher Dasher — Parallax Forums

Flasher Dasher

doggiedocdoggiedoc Posts: 2,241
edited 2011-03-30 20:56 in Robotics
This is a project I did in my truck. I posted it in Savage.circuits v1.0 so I think I'll repost it here. It uses a BS1 and some really bright blue LEDs.

FlasherDasher01.jpg

This is the panel from the dash that I modified. The row of LEDs across the top and a potentiometer in the middle. It's a multi-turn, if that's the right word, pot - perhaps too many turns to change the rate of flash. You almost have to spin it, but it allows for fine tuning of the flash rate.
A toggle switch for power control. Neat little face plate I salvaged from something, I don't recall.

Comments

  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:39
    FlasherDasher02.jpg

    Another view of the front. I'm not sure the LEDs are perfectly strait. :tongue:
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:39
    FlasherDasher03.jpg

    A view of the back. The BS1 is shown here on the small perf-board. The BS1 uController directly drives the LEDs and inputs for the potentiometer. Power is through a fuse box that is hot when ignition is on.
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:40
    FlasherDasher04.jpg

    Better angle on the board. The black, round component behind the red wires is the Pot. I love the giant ceramic capacitor I dug out of my junk box!
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:40
    FlasherDasher05.jpg

    This is supposed to show the heat shrink around the LED leads. It also shows the hot-glue I used on the LEDs and circuit board. That was fun (messy). :innocent:
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:40
    FlasherDasher06.jpg

    From the right side.
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:41
    FlasherDasher07.jpg

    From the bottom view. Minimal soldering here. :D
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:41
    FlasherDasher08.jpg

    And the top view. See the common cathode connections below the heat shrink covered anodes?
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:41
    Of course video is a must to fully enjoy!
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 11:42
    Here's the code that controls the LEDs:
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}
    
    'sequence 7 LEDs from center out and back
    
    
    
    SYMBOL  thePin  = B2         '
    SYMBOL  flashRate = B3       'variable for delay
    SYMBOL  theCount = B4        'varible for loop counters
    SYMBOL  CenterLED = 4        'pin for center LED
    SYMBOL  POTPIN = 0           'input pin for Potentiometer reading
    
    GOTO GetRate
    GOTO Main
    
    
    Main:
     GOSUB GetRate
     HIGH CenterLED
     PAUSE flashRate
     LOW CenterLED
     PAUSE flashRate
     FOR theCount = 1 TO 3
      GOSUB GetRate
      thePin = CenterLED - theCount
      HIGH thePin
      thePin = CenterLED + theCount
      HIGH thePin
      PAUSE flashRate
      thePin = CenterLED - theCount
      LOW thePin
      thePin = CenterLED + theCount
      LOW thePin
      PAUSE flashRate
      NEXT
     FOR theCount = 2 TO 1 STEP -1   ' use 3 instead of 2 to get double flash at ends
      GOSUB GetRate
      thePin = CenterLED - theCount
      HIGH thePin
      thePin = CenterLED + theCount
      HIGH thePin
      PAUSE flashRate
      thePin = CenterLED - theCount
      LOW thePin
      thePin = CenterLED + theCount
      LOW thePin
      PAUSE flashRate
      NEXT
    ' GOSUB GetRate    'uncomment these lines to get double flash in center
    ' HIGH CenterLED
    ' PAUSE flashRate
    ' LOW CenterLED
    ' PAUSE flashRate
     GOTO Main
    
    GetRate:
      POT POTPIN, 255, flashRate
      RETURN
    
    END
    
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 18:40
    Maybe I should whip up a schematic too. Anybody?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-30 20:14
    A little something to distract from your driving?
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-03-30 20:56
    PJ Allen wrote: »
    A little something to distract from your driving?
    I need something to keep the other hand busy while I text. :D
Sign In or Register to comment.