Show Posts
Pages: 1 ... 80 81 [82] 83 84 ... 86
1216  Forum 2005-2010 (read only) / Interfacing / Re: Need a lot of power in a little space! on: March 12, 2010, 11:03:32 am
So I've looke dup Zener diodes, and I found this page dewcribing their use:

I also found these 5v Zener diodes:

But they can only handle 500mA max, and since I need 500mA, to be safe I think I should get ones which can handle more.  So I found these:|0

4.7 and 5.1v zener diodes which can handle 1000mA.  I think the 5.1v ones are the ones I want.  I think the Arduino spec sheet indicates up to 5.5 volts is okay, with 6 being the absolute maximum.  5.1 is pretty darn close to 5v, so I think it should be safe and I probably don't want to feed the Arduino less than 5v if I can help it.

Still working on doing the calculations on that page though to see if this will work out or not.
1217  Forum 2005-2010 (read only) / Interfacing / Re: Need a lot of power in a little space! on: March 12, 2010, 10:59:28 am
Yes, I am using a transistor to feed the leds 500mA.  But I don't think I can feed the leds directly off the battery, precisely because I'm uisng a transistor.  

With the transistor I've got a loop from battery through arduino, through transistor, and back to the battery via the leds.  Also from battery through transistor, then back to battery via leds.  I don't think one of those loops can have a different voltage than the other.  And if they can, I have no idea how to make that work properly.
1218  Forum 2005-2010 (read only) / Interfacing / Re: Need a lot of power in a little space! on: March 12, 2010, 10:33:36 am
I think connecting 4 AA's directly to Vcc is probably a bad idea.

First of all, I'm pretty sure you don't want to run the device at it's absolute maximum ratings for any length of time.  

Second, even though the batteries say 1.5v, I'm guessing it's possible they may put out a little more or a little less than that.  Which means you might exceed 6v.

Perhaps if one connected a diode in series to drop the voltage a bit though, one could safely run off 4 AA's?

A silicon diode has a forward voltage drop of 0.7 and can handle 100mA of current.  That would be sufficient to run the Arduino, but insufficient to power my circuit which will need to draw much more than that.

Hm.. but then there's that zener diode at the end there.  I'm not sure why you are supposed to run them in reverse, but they seem to be designed for just this sort of situation.  I guess I should research those somme more.  

Thing is, even if I can use the zener diode to drop my votlage from 6v to 5v, and it can handle over 500mA, I won't know what my run time will be like, because a batteries voltage drops as it is used up, and that means if I start out at 5v, by the time I've used the batteries half up maybe it's down to 4.5v and it's no longer enough to power the Arduino.  On the other hand, maybe I'm not understanding the Zener diode right, and it will maintain 5v for me so long as the batteries can out put at least 5v, which means they could drop a whole volt before they stop being able to provide a full 5v.
1219  Forum 2005-2010 (read only) / Interfacing / Re: Need a lot of power in a little space! on: March 11, 2010, 07:34:03 pm
Handle is a piece of PVC pipe, and the 9v won't fit in it.  There's no real good way to put a battery in there anyway.  It's bolted onto the body and the bottom isn't removable.

As for using a couple 9v, Wikipedia says they've only got around 625mAh each, and the circuit will be using around 500mA.  So that comes out to around 2 1/2 hours of run time, which isn't a whole lot.

I just thought of something though.  I'd been doing my calculations for run time based on adding the mAh.  So for 6 AAA I calculated that I'd get 7500mAh.

But that's wrong, isn't it.  You only add the mAh if you connect them in parallel.  If you connect them in series, as I would be doing here to get 9v, then the mAh stays the same.

That means connecting two 9v in parralel might be the best solution after all.  Two 9v in parallel would give me 1250mAh, which is the same as six AAA in series.


I guess that leaves me with three choices:

1) Use 2 9v or 6 AAA's and accept a 2.5 hour run time, which might just be sufficient for a day's use.

2) Switch over to the 3v Arduino Pro Mini, which would give me more options, like running two sets of 3 aaa's in parralel.

3) Find some way to cram six AA's in there.  
1220  Forum 2005-2010 (read only) / Interfacing / Re: Need a lot of power in a little space! on: March 11, 2010, 05:27:14 pm
Can't use the Nano or LiPoly batteries for this.  I sell these, so I need to keep my costs down, and I can't make people buy expensive chargers just to power their toy.

I took a look at that reg104-5, but that's SMT.  

Would one of these do instead?|0

I tried to narrow the search down.  I think my output current is gonna be around 500mA.  So I think I want something that can handle 1A maybe to have some breathing room?  Or do I want more?  I'm not sure if those are maximums or not.

And will heat be an issue with these at all when I'm stepping the voltage up, rather than down?
1221  Forum 2005-2010 (read only) / Interfacing / Need a lot of power in a little space! on: March 11, 2010, 11:14:52 am
Hi guys,

I'm building a prop, and I've got a problem.  

What you see here is an older model, which used a 555 timer and a 4096 chip to power a 7 led display.  The 9v battery, which barely fit inside with all the wires once the top was down, was able to power that for a good 15 hours.

I am now building a new model which has 84 leds in it that will draw around 500mA of power.  A 9v ain't gonna cut it.  So, I've been looking at the possiblity of powering the thing with 6 AAA batteries, which would provide enough juice to get 15 hours out of it.  

Problem is, those take up a lot of space.  And as you can see, I don't have a lot of space.

The box you see there is around 4.5x3x1.25".  Just tall enough to fit a 3x2 configuration of AAA batteries, but probably too narrow to fit 6 side by side, unless I orient them along the length of the thing.

I think one of those configurations will be okay, because the Pro Mini is a lot smaller than my original circuit board, and the wiring this time around should be a bit neater since I will be using ribbon cable to bridge between 10 segment led displays, but I want to be prepared for the worst case scenario where I have to reduce the number of batteries I have in there.

I'm thinking I have one of two options here.  Either I can find a way to power the 5v Pro Mini off 6v, or I have to buy a 3v basic breakout board and a 3v Pro Mini, and run it off of that instead.  (You do need a 3v basic breakout board to program the 3v Pro Mini, correct?)

Thing is, I'm not sure what the best way to go about dropping the voltage would be.  I've looked into switching regulators but those are pretty expensive.  I've also considered the possibility of using a diode to drop the voltage to a little over 5v and connect my power source directly to Vcc, but I'm not sure if that would dramatically reduce the amount of time I can run it off the batteries.  I may be no better off than using the 9v if I do that.  On the other hand, I'm concerned about the 8mhz Pro Mini's ability to drive my array, though since I'll be switching between only 8 columns of LEDs at 60hz, it'll probably be fast enough.  (Really didn't want to have to spend money on another breakout board though.)

Anyway, I'm interested to know what you think would be the best way to proceed here.
1222  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 09, 2010, 07:00:53 am
Hm...  I think I'm starting to undertsand now.

I've just drawn up a schematic.  I was thinking I'd just set the rows and columns to be high to turn on their respective transistors.  But that's not how I would have wired the circuit if I didn't have the transistors there, is it?  I'd pull those columns low.

And looking at my shchematic, that means that on my columns, the negative terminal of my leds needs to go to ground.

Now I could stick an NPN transistor there, but that would mean connecting the collector to the led.  And since the led has caused a voltage drop, that means the voltage at the collector is going to be less than 5v.

And... still having trouble wrapping my brain around this...  I think that would affect the ratio between the voltages on the collector and base.  

But if I use a PNP there, then instead of setting the base high, I pull it low.  And the emitter is connected to the negative side of the led.  So the base to collector ratio...  

Mmm... I'm lost again.  I need to read up more on these.

Thank goodness I bought those driver and darlington IC's, I think those are gonna make my life a lot easier.  I gotta get this thing up and running and shipped to people by the end of this month.  I thought using the Arduino was gonna make my life easier, and it would, but then I had to go and offer something way more sophisticated than what I originally planned. :-)
1223  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 08, 2010, 06:39:29 pm
In that last drawing the LED in the emitter is receiving sourced current BUT the voltage you can achieve for the source is only 0.7V less than the voltage on the base.

I'm still completely lost.

Let's say LED2 wasn't there.  That it was just replaced with a wire.  In that case, when I set the pin attached to the base high, won't that LED light, with 15mA, assuming V+ is 5v and the forward voltage of the led is 2.1?

That is how an NPN transistor is supposed to be wired to be a switch, isn't it?

Now add LED2 back into the equation.  What's different?  Why will LED1 get 15mA and 5v, but LED2 will only get...


BUT the voltage you can achieve for the source is only 0.7V less than the voltage on the base.

What does that mean?  Achieve less voltage?  Ugh.  I've seen negative voltage in some IC data sheets, which I believe was how they implied that a pin was sourcing current... but that doesn't seem to be what you're saying here.  Why would I WANT more than a drop of 0.7v?  And what source exactly are you referring to?  The emitter?

There is no voltage gain in this configuration

I'm not trying to increase voltage.   I want to increase the current... don't I?  

My problem is the Arduino can only put out 200mA at most.  And each pin can only source or sink 40mA at most.  I have eight arrays of 10 leds.  So I have 10 rows, and 8 columns.  If I connect one pin to each row, I have plenty of voltage, but I can only put out maybe 15mA per pin if I want to try to keep the Arduino's total around 150mA.  Then I have to divide that 15mA by eight since I'm multiplexing the columns.  That leaves me with less than 2mA on average per led.  So the solution is to use one transisor per row to source more than 15mA to each of those leds, to bring that average up.  Problem is, even if I only had that 15mA per led, that would still put me over, because the pins on the columns can only sink 40mA.  So, I need transistors on both the rows and the columns so that I can source 40mA or more to each led 1/8th of the time, and sink 400mA or more in each column 1/8th of the time.  (And if I recall correctly, the chips I bought can only handle 500mA, so it was perhaps a wise decision to buy those bar graphs which are twice as bright as the original ones I was using along with them today.)  At no point that I know of does a need for a voltage gain here, since it's all running in parralel.

But maybe you're referring to something else I don't understand.
1224  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 08, 2010, 02:35:45 pm
Okay maybe this will clear things up a bit.

This is my current understanding of how a transistor works:

I forgot to indicate it, but I would set the pin with the 1K resistor high  to turn the transistor on.

Now, is this right or wrong?  I don't see why both leds shouldn't light, assuming V+ is 5v and that pin is set high.


Oh, and pretend I put that 220 ohm resistor on the branch with Led1, not where it would affect the current going into the Arduino.  
1225  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 08, 2010, 02:10:20 pm
Yes it does. A PNP is an upside down NPN transistor. Emitters go to +ve not ground and collectors go to ground not +ve.
To turn it on you need a difference in voltage between the emitter (now at +) and the base. So you turn it on with a logic low and off with a logic high. Exactly the opposite of an NPN.

Okay, but why did Ran say I needed to use PNP transistors to source the current?  I don't get that.

I do see that on this page:

For the NPN circuit, they show the load on the positive side:

And for the PNP they show the load on the negative side:

But does that matter?  And why?  I was under the impression that you could generally stick a resistor anywhere in your circuit.  Ie, before or after a LED, and the result would be the same.

And now I'm looking at this page:

And it's got this schematic:

Which seems to indicate an NPN can source or sink, but now I'm even more confused.  Why can it only source OR sink?   And why does the text above the diagram and the schematic seem to indicate that RL isn't the load at all, but rather a pull up or pull down resistor, and that red line is actually coming from the real load?

Hm... the diagrams on this page are clear at least:

That's easy enough to understand.  Too easy.  I am suspicious of it.
1226  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 07, 2010, 10:57:01 am
Hm...  now that I'm starting to understand this source/sink thing, I'm wondering if I could pair a couple of these:

With one of these: multiplex four 20 segment bargraphs.

It looks like the 3914 doesn't do its own multiplexing, so that wou;dn't interfere with things.  But I don't know how fast it would respond to voltage changes as I multiplex the four displays.  Hm.  Perhaps this is a bad idea.
1227  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 07, 2010, 10:09:20 am
Okay, I think I've found a suitable high side driver chip:

The part number looks similar to the ULN2803 which makes me think it's some kind of standard chip made by multiple manufacturers, but so far I've only been able to find these ones made by Allegro.  That kinda sucks because I was hoping to find something I could order from Mouser, since I'm going to be ordering a bunch of parts from them soon and I generally use them as my supplier.  (Mouser sends me catalogs and calculates shipping for me.  Newark does not!)

The two variations of that chip there have eight inputs and outputs.  I can't figure out what the difference is between the 81 and 82 models are though.  (I see the stats are different, but I don't understand what that difference means.)  I think either will work though.  I hope so.

If anyone knows of a similar chip that I can get from Mouser, please let me know.  It'll save me like $12 on shipping.


Ah, I think it is some kind of standard chip.  Here's another manufacturer who makes a 2981:
1228  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 07, 2010, 05:54:08 am
Okay, so I've done some more research and it looks like the ULN803 can only sink current.

For some reason, just to confuse me, the datasheet labels one set of pins the inputs, and the other the outputs, even though ultimately both sides will have current flowing into them with the ground pin being the only output:

But regardless, now that I understand that, looking at the schematic, I can see why the chip cannot source current... there's only one output.

If I was using individual NPN transistors, I could either attach their outputs (emitters) to the anodes, or their inputs (collectors) to the cathodes, depending on whether I was trying to source or sink the rows and columns.

But with this chip, there's only one common emitter, and a bunch of collectors (and bases).  So there's no way to connect the emitters from each of the individual transsitors in the chip up to the anodes of my leds.


So where does that leave me?  Well, I guess like Ran said, I either need some kind of "high side drvier" chip, or I need to use individual transistors to source current to the anodes of my leds.

Only problem is, I don't know what sort of high side driver chip I could use.  I guess I should look at the specs of that shift register, but Ran has indicated it won't source enough current.

The other thing I'm confused about is why Ran said I need PNP transistors to source the current.  I wasn't aware there was any difference between PNP and NPN besides the chemistry of the inner workings of the thing.  Does it really make a difference, and why?
1229  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 05, 2010, 11:00:30 pm
Again, I'm lost.

Mark says using all NPN's is fine.  Rant says I need PNPs to source current.  (Isn't the ULN2803 supposed to source current?)

Which is correct?  And why?

And can I use ULN2803s to both source and sink current? (<- This is what I really need to know!)

As for the pulsed current rating on the LED's, here's the datasheet for the arrays I'll be using:

It seems to indicate that I can pulse them with a maximum of 140mA of current if I am multiplexing 10 leds and pulsing each one for only 100 microseconds, which is like updating the display at 1000hz.

Hm.  I wonder if that 0.1ms is a typo.  I wish these data sheets had more data.  I mean how am I supposed to figure out what other values are safe to pulse at?  I mean if I extrapolate linearly, I might assume I can pulse 70mA for only 0.2ms, or 35 for only 0.4ms and that can't be right.  And is linear extrapolation even the correct way to go about it?  I wish there was a graph!  Though 35 for 0.4s would kind of make sense which lends credence to 0.1ms being a typo.

Hm... Maybe I should look at some of theoir other bargraph datasheets to see if those state something different...  

...well crap.  All their datasheets for the bargraphs use the same template, and say the same thing.  I'd hoped there might be an older one sitting around.
1230  Forum 2005-2010 (read only) / Interfacing / Re: Pulling my hair out trying to drive this led array on: March 05, 2010, 03:11:40 pm
What about a decoder?  I saw those while researching various chips as well.  Is there some kind of 8-bit decoder I could use to sink large amounts of current?

Wait, you said I need different kinds of transistors on the positive side...

Could you explain why I need different kinds of transistors?  My understanding is that voltage goes in one side, and comes out the other if you apply voltage to the base pin.  In that way the transistor acts like a switch.  

So why can't I just connect the rows and colums to one side or the other of that transistor?  Ie, conect the output of one group of transistors to the rows, with the input going to Vcc, and the input of another group of identical transitors to the columns, to pull them down, with the output going to ground?

What am I missing here?
Pages: 1 ... 80 81 [82] 83 84 ... 86