Growing and Shrinking Sequencer Design

Discussion in 'General Electronics Chat' started by CrystalCastles16, Jan 21, 2013.

  1. CrystalCastles16

    Thread Starter New Member

    Jan 21, 2013
    4
    0
    Hello all, I am new here but I've been using LED circuits in DIY projects for a while now. I have been trying to find a schematic for a "growing and shrinking" sequence circuit. The closest thing I found was one posted on this forum (link below):

    http://forum.allaboutcircuits.com/c...uits.com/picture.php?albumid=45&pictureid=839

    I got this circuit to work as intended and I'm (unsuccessfully) trying to modify it. The circuit I am trying to make would have every LED before it stay on so the whole sequence "grows" and "shrinks".

    I think the sequence chart in the bottom left corner of the above image is a good way to visually see what I'm talking about. This is the sequence I am trying to make:

    0 O X X X X X
    1 O O X X X X
    2 O O O X X X
    3 O O O O X X
    4 O O O O O X
    5 O O O O O O
    6 O O O O O X
    7 O O O O X X
    8 O O O X X X
    9 O O X X X X
    (O's representing ON and X's representing OFF)

    As you can see, instead of one LED bouncing back and forth, the whole sequence grows and then shrinks back down so that it can start at one again.

    I apologize in advance if this type of thing has already been answered on this forum. I couldn't find anything to help me complete this sequence. I've tried rewiring things, adding diodes, different transistor setups - all to no avail. Any help would be greatly appreciated.

    Also, it doesn't necessarily need to be a six-sequence circuit, it could be a few less if that makes it easier. Thanks again!
     
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Most chasers use a CD4017 counter that lights only one LED at a time.
    You can make a chaser that "grows and shrinks" with an LM3914 bar graph driver and a simple triangle wave generator. It can drive up to 10 LEDs.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
  4. SPQR

    Member

    Nov 4, 2011
    379
    48
    Are you talking about a 6x10 matrix of LED's or a single line of 6 LEDs?
     
  5. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Are you trying to do a simple sequence like this;

    LED Sequencer Example Video

    That example was done on a $4.30 TI MSP430 Launchpad board which includes a built-in programmer. The program was written using the Energia (Arduino-like) development environment. Here's the program;

    Code ( (Unknown Language)):
    1.  /*
    2.   *  led example for AAC
    3.   *
    4.   *  using $4.30 TI Launchpad and Energia Development Environment
    5.   *
    6.   */
    7.  
    8.   int index = 0;                  //
    9.   int ledpattern[] = { 0b11111111, 0b11111110, 0b11111100,
    10.                        0b11111000, 0b11110000, 0b11100000,
    11.                        0b11000000, 0b11100000, 0b11110000,
    12.                        0b11111000, 0b11111100, 0b11111110 };
    13.   long previousMillis = 0;
    14.   long interval = 1000;
    15.  
    16.   void setup()
    17.   { P1DIR = 0b11111111;      // port 1 all outputs      
    18.   }
    19.  
    20.   void loop()
    21.   { unsigned long currentMillis = millis();
    22.     if(currentMillis - previousMillis > interval)
    23.     { previousMillis = currentMillis;  
    24.       P1OUT = ledpattern[index++];
    25.       if(index == 12) index = 0;
    26.     }
    27.   }
    28.  
    Once you've programmed the MSP430 microcontroller chip on the Launchpad board you can simply remove it from the socket and place it on your project or prototype board. Your project board would require a 3.3v or a 3.6v regulator.

    Food for thought.

    Cheerful regards, Mike

    [​IMG]
    [​IMG]
     
    Last edited: Jan 21, 2013
  6. CrystalCastles16

    Thread Starter New Member

    Jan 21, 2013
    4
    0
    Wow! Thanks, Mike. Did you just make all that now? That's SUCH a great help, it's exactly what I'm looking to do, except with individual LEDs rather than a bar (I'm sure it will work either way). I just bought the MSP430 launchpad from the TI website.
     
  7. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Yes. I was using a 14-pin MSP430G2231 on the Launchpad board and I just installed several wire jumpers between the Launchpad board and the bar/dot display which was plugged into a solderless breadboard. Power was supplied via the Launchpad USB cable connected to my laptop.

    That's great. It also means you have a bit a work ahead of you. Don't get frustrated and don't be afraid to ask for help from the guys over at 43oh.com. TI is also pretty generous about samples so you might want to order a couple extra 20-pin MSP430G2553 microcontroller chips.

    Cheerful regards, Mike
     
    Last edited: Jan 22, 2013
  8. CrystalCastles16

    Thread Starter New Member

    Jan 21, 2013
    4
    0
    Hmm. I got the M430G2553 and M430G2452 chips with the launch board. Both of these are 20-pin. Is it possible to use these instead? (if not, i can buy another chip) I downloaded Energia and set everything up and I get this message when trying to upload...

    usbutil: unable to find a device matching 0451:f432

    Sorry for being a noob, could you recommend any videos/tutorials on this device?.. I'll also check out the 43oh.com forums for some more info.

    Thanks again!
     
  9. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Yes, you can use either one of those chips.

    Did you follow the instructions for installing the USB driver in the "Getting Started" section on the Energia wiki?

    I don't think I've seen any videos or tutorials for Energia. Sorry. Do check out the Energia Forum on 43oh.com.

    Regards, Mike
     
  10. CrystalCastles16

    Thread Starter New Member

    Jan 21, 2013
    4
    0
    Mission accomplished!! I got it to work. Thank you SOO much. I'll post vids/pics of my project as soon as it's complete
     
  11. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Yippee!

    Yes, please post pictures and let us know how you're getting on...

    Cheerful regards, Mike
     
Loading...