1
\$\begingroup\$

First, I'm very inexperienced in designing circuits like this, so I apologize if this seems trivial. I'm basically trying to create a startup sequence effect, where LEDs turn on in a delayed order. Here's the effect I'd like to create.

  • Push momentary switch once
  • Wait ~2 seconds, then turn on a few LEDs (latched on)
  • Wait another ~2 seconds, then turn on a few more LEDs (latched on)
  • 2-4 additional on events to turn on LEDS in sequence
  • Push momentary switch again to turn off all of the LEDs

I'll be running either 9v or 12v. I'd prefer to have n-delayed switches (well, at least 5 or 6) chained together with delays between each event (0.5 sec and 5 sec) to create the power up sequence effect I'm looking for. The delay between two events is constant, but it'd be optimal to have some control over the delays individually. For instance, the delay between 1 and 2 may be 2 secs, but the delay between 2 and 3 may be 1.2 secs. The specific timing will take a bit of experimentation. Each of the on events will have about 4-6 LEDs, so not much power is needed on any individual output.

Seems like a few 555 timers should manage it, but I've gotten a bit lost trying to solve this. Any help is greatly appreciated.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This would be trivial to do with a small 8-bit microcontroller like a PIC16. Is there any reason you can't take this route? \$\endgroup\$
    – tcrosley
    Apr 28, 2014 at 2:13
  • \$\begingroup\$ An excellent idea... Although I've never used a PIC16. Any recommendations on learning more about using them? Or, can you point me in the right direction on using it for something like this? \$\endgroup\$
    – josh
    Apr 28, 2014 at 3:50
  • \$\begingroup\$ I'm not exactly sure how to give the momentary push switch the conditional ability to start or reset the system, but if you google around you may find what you're looking for in building a custom binary counter. You just have to write out the truth table, solve it and implement it in flip flops. Note that this is probably going to have a fairly big footprint; you should probably go with other recommendations involving microcontroller designs. +1 for pic16 and arduino. \$\endgroup\$
    – user39962
    Apr 28, 2014 at 5:06
  • \$\begingroup\$ @josh I expanded my PIC16 suggestion into an answer. \$\endgroup\$
    – tcrosley
    Apr 28, 2014 at 6:11

2 Answers 2

1
\$\begingroup\$

To keep parts count to a minimum, I suggest using a small 8-bit microcontroller like the PIC16, in one of the newer variants, particular the PIC16F1788. Some of its specs are:

28 KB flash memory, 2 KB RAM (much larger than earlier PIC16s)
runs on 2.3v to 5v
comes in a 28 pin DIP for prototyping, and surface mount for PCB's
can source or sink up to 25mA on each output pin (max, keep well below that)
internal oscillator, so you don't need to wire in a crustal
costs $2.66 in single quantities

Because of the internal oscillator, and the ability to drive the LEDs directly (no drive transistors), all you will need is a power supply, bypass cap, micro, and LEDs plus resistors for each.

I'd run the micro at 5v, and use that same rail for my LEDs. If you run your LEDs at (for example) 15 mA, you can connect the anode end to 5v through a resistor, and the cathode end directly to one of the PIC I/O pins; you will then configure the pin as "open-drain" and set it to 0 to turn on the LED.

enter image description here

You will also see a lot of schematics where the LEDs are wired just the opposite; the cathode end connected to ground, and the anode end is connected through a resistor to an I/O pin. In this case, the I/O pin is configured as push-pull, and sources current (I/O pin set to 1 to turn on the LED). Either configuration will work just as well.

Here are some links for download etc.:

PIC16F1788 features

PIC16F1788 datasheet

PIC16F1788 Digi-Key page

MPLAB X IDE download

MPLAB XC8 free C compiler download

You will need to buy PicKit III programmer in order to download code to the micro and prgoram the flash. You can get one from Digi-Key.

Here's a tutorial on setting up the MPLAB X IDE and XC8 compiler. And here's another tutorial on using the PicKit3 and MPLABx programming. It's for a PIC18 instead of a PIC16, but most of it should be applicable.

Finally, here is a nice example of blinking LEDs with the XC8 compiler.

Here is one that controls some LEDs,

\$\endgroup\$
0
\$\begingroup\$

Your best bet is probably to get an arduino. Depending on your total LEDs (current draw) you can either hook them up directly with resistors or use an external power supply with transistors. Good luck.

\$\endgroup\$
2
  • \$\begingroup\$ I considered something like an Arduino or Raspberry Pi, but that's a lot of overhead for something this trivial. And, I want to keep the footprint minimal, because space is a premium in this instance. \$\endgroup\$
    – josh
    Apr 28, 2014 at 3:52
  • 1
    \$\begingroup\$ @josh An arduino nano compatible board might be an option, at 1.85cm x 4.3cm, and $5-$10 on ebay? They don't require a separate programmer, which can be a big cost saving if you are only making one device. \$\endgroup\$ Apr 28, 2014 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.