Adafruit is open, safely ... and shipping all orders at this time! Read more!
0

LED blinks now what? ( not a technical question)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: LED blinks now what? ( not a technical question)

by jbisjim on Fri Nov 12, 2010 8:22 am

FANCIER blinking lights! Multiplexing, charlieplexing, PWM, multi-color, multisegment, light sensing, touch sensing, beeping, hissing, spinning, IR-communicating, Power, EL, Xenon, AC, incandescent....


ooo interesting, hmm might have to make a Christmas item

I just received shipping notice on parts to make a Larson scanner with a 4017, I ordered 2 sets to to see if i can link them. As Stinkbutt suggested i do with "other" parts. Got a Breadboard on the way too so i can experiment a bit better.

Now i need to look up westfws things

No the 555 (or some other oscillator) drives them all, though at any given time it's really driving a pair of AND gates that may or may not be on.
ok thanks,
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by jbisjim on Fri Nov 12, 2010 5:34 pm

Multiplexing, charlieplexing,


wow
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by westfw on Fri Nov 12, 2010 8:31 pm

Multiplexing, charlieplexing, PWM, multi-color, multisegment, light sensing, touch sensing, beeping, hissing, spinning, IR-communicating, Power, EL, Xenon, AC, incandescent

So perhaps a bit more detail would be useful:

    Multiplexing: Connect LEDs in a matrix, with each row connected together by the anodes and each column connected by the cathodes. With N rows and M columns controlled by N+M microcontroller pins, you can drive N*M LEDs, one column (or row) at a time, requiring more complex software. Most dot matix and multi-digit segmented displays are designed to be driven in a multiplexed arrangement. Also, there are a lot of external controllers you can use to ease the burden on the microcontroller. I was especially pleased (from an open source perspective) on how this "group effort" to connect a 16x24 LED matrix to arduino worked out: http://www.arduino.cc/cgi-bin/yabb2/YaB ... 25239439/0

    Charlieplexing: Somewhat like multiplexing, but makes use of the three-state capabilities of microcontroller pins, allowing you to control N*(N-1) LEDs with N pins.

    PWM: controlling brightness of the LEDs in addition to their on/off state. Might be done with hardware, software, or external controllers. Do simple fading, anti-aliasing (smoothing) of patterns, pseudo-random brightness to simulate "fire", etc.

    Multicolor: Since you can control brightness with PWM, you can now create arbitrary colors by mixing Red, Green, and Blue LED chips in various brightness ratios.

    Multisegment: do things with numeric or alphanumeric digit displays instead of discreet leds.

    Light sensing: an LED can be used as a light sensor as well as a light emitter. There are some neat hacks out there that allow the same dot matrix display to detect a handwave and change the display based on that detection. (a relatively advanced project.)

    Touch sensing: not actually light-based, but most AVRs are capable of doing touch sensing (Atmel has a library.) Or use a clear touch-panel over an LED matrix to implement monume-like devices without physical switches.

    Beeping, hissing, spinning: Sounds and motor control use basic principles and code similar to blinking LEDs, but at a higher frequency.

    IR-communicating: blinkie light hacks that talk to each other, like: http://www.2dkits.com

    Power, EL, Xenon, AC, incandescent: going beyond plain LEDs, various other light-producing technologies introduce their own interesting capabilities and challenges at both hardware and software levels. Control a high-voltage H-bridge to implement an EL wire sequencer with multiple brightness capabilities. Drive a triac to make make an AC lamp-dimmer. Put several "disposable" Xenon flashes under microcontroller control for really bright flashers, or photographic multi-flash uses.

westfw
 
Posts: 1633
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: LED blinks now what? ( not a technical question)

by jbisjim on Fri Nov 12, 2010 10:30 pm

Thanks for the descriptions that helps a lot. Been doing a lot of google work and learning about each thing.

Mulitplexing can I drive that with a 2313? using a 3x3 scenario? I ask because i happen to have a few lying around.

Does each led have to have a resitor or does each row and each colomn have one? The way i think it goes is pin-resistor-transistor- row / colomn.
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by stinkbutt on Sat Nov 13, 2010 12:28 am

jbisjim wrote:Thanks for the descriptions that helps a lot. Been doing a lot of google work and learning about each thing.

Mulitplexing can I drive that with a 2313? using a 3x3 scenario? I ask because i happen to have a few lying around.

Does each led have to have a resitor or does each row and each colomn have one? The way i think it goes is pin-resistor-transistor- row / colomn.


Because you have 16-18 pins available on a 2313 after hooking up VCC and GND, you could multiplex up to 8x8=64 LEDs. So yeah, a 3x3 grid of 9 LED's would be easy. In fact multiplexing is a bit of overkill since you could just use 9 output pins, not that much more than the 6 pins you need for a multiplex.

Regarding the resistor, it can go either way, it's up to you. Since you only light up exactly one LED at a time when you're multiplexing, it doesn't matter if it's hooked up to the anode or the cathode. You'll be pulling one pin, (say, in a row) high to source the current that flows into the one pin that's pulled low (in a column in this case) so it's a single LED circuit in that case. So it doesn't really matter if the resistor's in front or back of the LED.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: LED blinks now what? ( not a technical question)

by westfw on Sat Nov 13, 2010 3:12 am

Since you only light up exactly one LED at a time when you're multiplexing

You can light a whole row when multiplexing. If you have things set up that a whole row of LEDs is not too much current for whatever is driving them. It's common to see multiplexed arrays with the rows driven direct from microcontroller pins through resistors, and columns sunk to ground with transistors:
Image

(one reason for driving only one led at a time is so that both rows can columns can be attached (with possible resistors) to microcontroller pins. One interesting possibility is to drive more than one, but less than a full row of LEDs, just to stay with current limits...)

westfw
 
Posts: 1633
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: LED blinks now what? ( not a technical question)

by jbisjim on Mon Nov 15, 2010 2:00 pm

ok Got my parts to make a gated cylon display and am attempting to bread board it.

Normally I can read schematics but this one for some reason i cant

Image

Im just confused as to how to hook it together
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by zener on Mon Nov 15, 2010 3:04 pm

That's fairly straightforward, except for the big cap across the be junction. That, combined with the base resistor is making a big RC filter, which will slow down the switching speed a lot. I would get rid of that cap. And your current is a little high if this is a red LED ((9V - 2V)/330) = 21mA.

Anyway, which part are you having trouble with? The CPU pin is connected to the 47K on the left side of the schmatic.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: LED blinks now what? ( not a technical question)

by stinkbutt on Mon Nov 15, 2010 3:05 pm

jbisjim wrote:ok Got my parts to make a gated cylon display and am attempting to bread board it.

Normally I can read schematics but this one for some reason i cant

Image

Im just confused as to how to hook it together


Yeah, that's not a terrific diagram. Erase the bits with the 9V voltage source. Just connect the top of the circuit to Vcc and the bottom to ground.

The purpose of that circuit you're posting is to do two things:

1. They don't want to drive the LED with the IC directly, so they control it with an NPN transistor. Normally off, when the "For LED X" pin is high it conducts.

2. They throw a 47 uF capacitor in there for fading. It'll take a second or two for the voltage at the transistor's base to rise to full saturation because the capacitor is filling up, and after the IC pin turns off, it'll take a second or two for the voltage to drop to zero. That gives you the fading effect.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: LED blinks now what? ( not a technical question)

by stinkbutt on Mon Nov 15, 2010 3:07 pm

Zener wrote:That's fairly straightforward, except for the big cap across the be junction. That, combined with the base resistor is making a big RC filter, which will slow down the switching speed a lot. I would get rid of that cap. And your current is a little high if this is a red LED ((9V - 2V)/330) = 21mA.

Anyway, which part are you having trouble with? The CPU pin is connected to the 47K on the left side of the schmatic.


The capacitor's in there by design. It adds a fading effect to the on/off of the LED.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: LED blinks now what? ( not a technical question)

by jbisjim on Mon Nov 15, 2010 4:59 pm

I have light

Well first i had a really dim led and realized i had the wrong resistor, once i spun the color wheel i got a nice bright led 330 ohm (or, or, br) which i assume is because i have only 1 led hook up.
So far it stands there lit. Does not seem to be going on and off it just stays on. Something is not hooked up right somewhere.

I have 9v @ 555 on pin2 and on pin 16 of the 4017
progress is slow
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by zener on Mon Nov 15, 2010 5:17 pm

jbisjim wrote:I have 9v @ 555 on pin2

555 what?

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: LED blinks now what? ( not a technical question)

by jbisjim on Mon Nov 15, 2010 5:36 pm

555 what?

ne555
jbisjim
 
Posts: 26
Joined: Sun Oct 17, 2010 7:33 am

Re: LED blinks now what? ( not a technical question)

by stinkbutt on Mon Nov 15, 2010 10:08 pm

It appears he's hooking up a 555 to drive a 74HC4017. Which is pretty much what I suggested earlier, so it's not like I'm psychic or anything. Let's worry about the 555 first:

How have you got the 555 hooked up? And are you sure you've got it wired properly? It should look like this:

Image

You're going to need all those components wired up that way to get the square wave coming out of the 555. Just plugging Vcc into pin 2 doesn't do enough. In fact, it appears that pin 2 is the trigger pin, so I'm not even sure what that'd do at all. You might've just bricked the 555. (Here's a tip - If it's hot as hell, you've bricked it.)

Once you've got the 555 wired up put a 330 ohm resistor & an LED in series with the output pin (and then leading to ground, of course.) This'll let you determine if the 555's operating properly.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: LED blinks now what? ( not a technical question)

by stinkbutt on Mon Nov 15, 2010 10:12 pm

Also keep in mind if the values for your resistors and capacitor are very large, it may take quite a while for the thing to oscillate at all, and if they're very small the frequency will be too high to perceive with the naked eye. Three good values to start out with would be 10K, 10K, and 47 uF. That'll give you an output frequency of about 1 Hz. If you don't have those exact values lying around no big deal, these numbers were just for an order of magnitude. Anything within 0.1 Hz to 7 Hz ought to be easy to perceive.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Please be positive and constructive with your questions and comments.