Growing and Shrinking Sequencer Design

Thread Starter

CrystalCastles16

Joined Jan 21, 2013
4
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!
 

Audioguru

Joined Dec 20, 2007
11,248
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.
 

MMcLaren

Joined Feb 14, 2010
861
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;

Rich (BB code):
 /*
  *  led example for AAC
  *
  *  using $4.30 TI Launchpad and Energia Development Environment
  *
  */

  int index = 0;                  //
  int ledpattern[] = { 0b11111111, 0b11111110, 0b11111100,
                       0b11111000, 0b11110000, 0b11100000, 
                       0b11000000, 0b11100000, 0b11110000,
                       0b11111000, 0b11111100, 0b11111110 };
  long previousMillis = 0;
  long interval = 1000;

  void setup()
  { P1DIR = 0b11111111;      // port 1 all outputs      
  }

  void loop()
  { unsigned long currentMillis = millis();
    if(currentMillis - previousMillis > interval)
    { previousMillis = currentMillis;   
      P1OUT = ledpattern[index++];
      if(index == 12) index = 0;
    }
  }
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


 

Attachments

Last edited:

Thread Starter

CrystalCastles16

Joined Jan 21, 2013
4
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.
 

MMcLaren

Joined Feb 14, 2010
861
Did you just make all that now?
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.

I just bought the MSP430 launchpad from the TI website.
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:

Thread Starter

CrystalCastles16

Joined Jan 21, 2013
4
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!
 

MMcLaren

Joined Feb 14, 2010
861
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)
Yes, you can use either one of those chips.

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
Did you follow the instructions for installing the USB driver in the "Getting Started" section on the Energia wiki?

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!
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
 
Top