Exact match. Not showing close matches.
PICList
Thread
'[PIC] Connect4 last minute advice please'
2008\06\26@185122
by
Tomás Ó hÉilidhe
|
I have the schematic for my Connect4 project very nearly finished.
I'm going to use two AA batteries in series as my power supply, thus
giving me 3 V. I'm going to use a voltage regulator called the LT1173-5
to give me 5 V to power the PIC16F887.
I'll use the 5 V to power the microcontroller and also as a voltage
reference for any pull-up resistors, but everywhere else I'm going to
use the 3 V directly from the batteries for the driver chips which drive
the LED's and also the piezo speaker.
My board will have a switch for turning the game on and off. This switch
will make or break the connection to the output of the 5 V voltage
regulator. This switch will have *no* effect on the 3 V supply that
comes directly from the batteries to the driver chips. So long as
there's batteries in the device, there'll always be a 3 V supply going
to the driver chips regardless of whether the power switch is on or off.
My board will have a 6-pin header for hooking the Pickit2 up to it to
program and debug it. Before the Pickit2 is hooked up, the power switch
should be turned off. When the power switch is turned off, there'll be
no 5 V supply for the microcontroller, nor will there be a 5 V reference
for the pull-up resistors. There *will* however always be 3 V going to
the driver chips.
When you hook the Pickit2 up to it, the Pickit2 will detect that there's
no 5 V supply and so it will supply 5 V itself. That's the idea in anyway.
Here's my current schematic:
http://freepdfhosting.com/uploads/6640a7ea8a.pdf
The PDF file is high resolution so you can zoom in.
Here's my first question:
1) Do I need the RC circuit on the Vpp pin of the 887? I heard something
about being able to use an internal pull-up?
2) I remember someone saying something about putting capacitors across
the power supply as well... so if you could please give me pointers on that.
Please feel free to offer whatever *constructive* criticism you can.
Also, you'll notice that I have 3 pins to spare on the microcontroller.
If you can think of something frivolous to do with them then please let
me know!
Also, can anyone suggest a good 3-pin LED for me to use? The forward
voltage must be less than 3 V and also I'd rather if the colour
combination wasn't Red and Green because most colour-blind people have
difficulty distinguishing these colours. Also, I want the LED's to be
nice and bright to that they can be seen lit outside in daylight. (My
last project board looked crap because the LED's were very dim in daylight).
Comments, questions, suggestions welcomed :-)
2008\06\26@190903
by
Maarten Hofman
Redwood Shores, 26 juni 2008.
1) I'm not sure if your driver chips will be able to handle a 5V input if
their Vdd is 3V. They might have protective diodes that might get too hot
under these circumstances.
2) Your batteries will deplete rather quickly: you seem to be powering both
the driver chips AND the regulator continuously. I assume there is a reason
why you don't want to switch the batteries directly?
3) Yes, near each chip you will need to put a 0.1uF capacitor between Vdd
and Vss. This will ensure that the voltage doesn't drop if there is sudden
current use elsewhere. I use ceramic 0.1uF capacitors, and they have never
failed me. However, tantalum is recommended according to some books. You
might also want to put a large capacitor (10uF or higher) after the switch.
4) If your PIC16F887 indeed allows the reset pin to be internal, you won't
need the pull up network on your Vpp line.
I might have misinterpreted parts of the system, so please correct me if
some of the issues I brought up are wrong.
Greetings,
Maarten Hofman.
2008/6/26, Tomás Ó hÉilidhe <spam_OUTtoeTakeThisOuT
lavabit.com>:
{Quote hidden}>
>
> I have the schematic for my Connect4 project very nearly finished.
>
> I'm going to use two AA batteries in series as my power supply, thus
> giving me 3 V. I'm going to use a voltage regulator called the LT1173-5
> to give me 5 V to power the PIC16F887.
>
> I'll use the 5 V to power the microcontroller and also as a voltage
> reference for any pull-up resistors, but everywhere else I'm going to
> use the 3 V directly from the batteries for the driver chips which drive
> the LED's and also the piezo speaker.
>
> My board will have a switch for turning the game on and off. This switch
> will make or break the connection to the output of the 5 V voltage
> regulator. This switch will have *no* effect on the 3 V supply that
> comes directly from the batteries to the driver chips. So long as
> there's batteries in the device, there'll always be a 3 V supply going
> to the driver chips regardless of whether the power switch is on or off.
>
> My board will have a 6-pin header for hooking the Pickit2 up to it to
> program and debug it. Before the Pickit2 is hooked up, the power switch
> should be turned off. When the power switch is turned off, there'll be
> no 5 V supply for the microcontroller, nor will there be a 5 V reference
> for the pull-up resistors. There *will* however always be 3 V going to
> the driver chips.
>
> When you hook the Pickit2 up to it, the Pickit2 will detect that there's
> no 5 V supply and so it will supply 5 V itself. That's the idea in anyway.
>
> Here's my current schematic:
>
>
http://freepdfhosting.com/uploads/6640a7ea8a.pdf
>
> The PDF file is high resolution so you can zoom in.
>
> Here's my first question:
> 1) Do I need the RC circuit on the Vpp pin of the 887? I heard something
> about being able to use an internal pull-up?
> 2) I remember someone saying something about putting capacitors across
> the power supply as well... so if you could please give me pointers on
> that.
>
> Please feel free to offer whatever *constructive* criticism you can.
> Also, you'll notice that I have 3 pins to spare on the microcontroller.
> If you can think of something frivolous to do with them then please let
> me know!
>
> Also, can anyone suggest a good 3-pin LED for me to use? The forward
> voltage must be less than 3 V and also I'd rather if the colour
> combination wasn't Red and Green because most colour-blind people have
> difficulty distinguishing these colours. Also, I want the LED's to be
> nice and bright to that they can be seen lit outside in daylight. (My
> last project board looked crap because the LED's were very dim in
> daylight).
>
> Comments, questions, suggestions welcomed :-)
>
>
2008\06\26@191109
by
Mark Rages
On Thu, Jun 26, 2008 at 5:50 PM, Tomás Ó hÉilidhe <.....toeKILLspam
@spam@lavabit.com> wrote:
>
> I have the schematic for my Connect4 project very nearly finished.
>
> I'm going to use two AA batteries in series as my power supply, thus
> giving me 3 V. I'm going to use a voltage regulator called the LT1173-5
> to give me 5 V to power the PIC16F887.
>
> I'll use the 5 V to power the microcontroller and also as a voltage
> reference for any pull-up resistors, but everywhere else I'm going to
> use the 3 V directly from the batteries for the driver chips which drive
> the LED's and also the piezo speaker.
Why do you need 5V? The 16F887 is happy at 3V. It's important to
read the "electrical characteristics" part of the datasheet when
you're doing the circuit design.
Here's the datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/41291E.pdf
See figure 17-1.
I don't know how to say this any clearer.
Regards,
Mark
markrages@gmail
--
Mark Rages, Engineer
Midwest Telecine LLC
markrages
KILLspammidwesttelecine.com
2008\06\26@192255
by
Tomás Ó hÉilidhe
Mark Rages wrote:
> Why do you need 5V? The 16F887 is happy at 3V. It's important to
> read the "electrical characteristics" part of the datasheet when
> you're doing the circuit design.
Will the 887 be happy with two AA batteries in series? As the batteries
begin to deplete will the voltage drop cause the 887 begin to fail?
2008\06\26@193228
by
Robert Young
|
> > Here's my current schematic:> > http://freepdfhosting.com/uploads/6640a7ea8a.pdf> > The PDF file is high resolution so you can zoom in.> > Here's my first question:> 1) Do I need the RC circuit on the Vpp pin of the 887? I heard something > about being able to use an internal pull-up?> 2) I remember someone saying something about putting capacitors across > the power supply as well... so if you could please give me pointers on that.>
Your switcher won't work, in fact it will probably die pretty quick.
The Feedback pin needs to be held around 1.24V.
That isn't an inductor between Vin and SW1. What it is I don't know but it isn't an inductor. Look up the symbol and update schematic.
You show a standard diode for the output, it might work but the average diode is too slow. You should use a Schottkey diode. 1N5818 maybe, jellybean cheap and easy to get. I think that is the standard recomendation in the LT datasheets.
Value for current limit resistor?
Value for input cap? Value for output cap? In fact, you may need more than one output cap, a large and a small both designed to deal with a particular part of the output transients from the switcher. Not only the capacitance value, but the material type (ceramic, tant. etc), voltage rating, ESR and "quality" rating (NP0, COG, etc) are importatnt with switchers.
Not doing any analog work in this one so you can live with some ripple so long as it is less than 500mV and faster than any scanning frequency in your LEDs. That said, you might be able to monitor your own battery voltage by re-arranging some pins to free up RA0. You could watch for a dying battery pack (say trip at 2.5V). But if you do this, you might need to learn more about supply bypassing and also add a little averaging and hysteresis to the ADC results so you don't get fasle positives.
You don't need the RC circuit shown on the Vpp line. A single pull up resistor is sufficient for non-commercial designs. Size it such that when Vpp is present, you aren't going to try and push lots of current into the Vdd node. For a commercial design, a reset/voltage monitor chip might be a better idea.
Still don't have comonent values various places.
No connect on pin 32? No connect on pin 31? Data sheet not handy to me but that doesn't seem right.
No bypass caps. Again, I think wikipedia has some information. And a rule-of-thumb for PICs is one 0.1uF per Vdd connection and one bulk capacitor, say 10uF. Keep in mind these could also be part of the output network from your switcher too.
MOSFET/FET not labled.
Tying the LEDs to the 3V means as the batteries fade, the LEDs will dim. If you tie them to the +5V the step-up switcher (assuming sufficient output current, that is still open for debate) will keep you at a constant current with your resistor per LED setup. You can keep your total current quite low if you multiplex the LED drives fast enough for persistance of vision to take over and make it all look steady state.
Off the cuff remark about your LED connections, if you have both the matrix and 7seg on at the same time you will see various LEDs dim a bit and brighen a bit as more or fewer are turned on. Might not be particularly noticable, or it might be very distracting.
PROTEL (I think that is what you said you were using) is letting you draw your schematic in a wierd way. If you want a nifty, and free schematic and layout package, Eagle is nice. But its interface will be just as bonkers and non-standard as you may already find PROTEL. Such is the way of the world.
Still, you are making some progress.
Rob
2008\06\26@213834
by
David Meiklejohn
|
Tomás Ó hÉilidhe wrote:>
>
> Mark Rages wrote:
>> Why do you need 5V? The 16F887 is happy at 3V. It's important to
>> read the "electrical characteristics" part of the datasheet when
>> you're doing the circuit design.
>
> Will the 887 be happy with two AA batteries in series? As the batteries
> begin to deplete will the voltage drop cause the 887 begin to fail?
As Mark wrote, this information is in the datasheet, and as Mark pointed
out, it's important that you take the time to read and understand it.
No, it's not necessarily easy, but you're trying develop a real product
that you intend to sell. You have to take what you are doing seriously,
and put in the effort you need to master the areas you need to learn, to
design a successful product. That's not me being nasty and refusing to
answer simple questions or whatever, or saying it was hard for me so it
should be equally hard for you - I'm simply pointing out that, although
help is available, there are no real shortcuts. At some point, you have
to understand the data sheets yourself.
In this case, you would see that the '887 can run ok right down to 2V, at
8MHz. And the battery data would tell you that at 1V output, an alkaline
AA battery is finished anyway. So the answer is that, by the time the
voltage drop causes the 887 to fail, your batteries will be effectively
drained.
I'd be more worried, if I were you, about whether 3V is enough to drive
your LEDs and the impact as voltage falls on LED brightness. Personally
I'd use 3 x AA to get more headroom - your device is too small to fit
them, but then you could look at AAAs (lower capacity of course, but one
thing you find in engineering is that there is no such thing as magic -
everything is a trade-off).
But please - read those data sheets.
David Meiklejohn
2008\06\27@041309
by
Alan B. Pearce
> Will the 887 be happy with two AA batteries in series? As the batteries
> begin to deplete will the voltage drop cause the 887 begin to fail?
As your device is essentially a toy, will this matter? It is up to the user
to put new batteries in when it starts to fail.
2008\06\27@045810
by
Harry NL
Simple question, two AA bateries producing approx 3volt power a device
working on 3.3 volts.
At what voltage does the game ends working, i know that that is dependend on
the baterie quality.
Why not using three AA bateries as this will matter when changing every day
two bateries or every 4 days three.
Harry
-----Oorspronkelijk bericht-----
Van: .....piclist-bouncesKILLspam
.....mit.edu [EraseMEpiclist-bouncesspam_OUT
TakeThisOuTmit.edu] Namens Alan B.
Pearce
Verzonden: vrijdag 27 juni 2008 10:13
Aan: Microcontroller discussion list - Public.
Onderwerp: Re: [PIC] Connect4 last minute advice please
> Will the 887 be happy with two AA batteries in series? As the
> batteries begin to deplete will the voltage drop cause the 887 begin to
fail?
As your device is essentially a toy, will this matter? It is up to the user
to put new batteries in when it starts to fail.
2008\06\27@065245
by
olin piclist
Tomás Ó hÉilidhe wrote:
> I'm going to use a voltage regulator called the
> LT1173-5
> to give me 5 V to power the PIC16F887.
Why can't the PIC run from the 3V supply too? It will work to 2V, which is
below where your LEDs will still work. If anything you may need a slight
boost to provide reliable LED voltage even when the battery level gets down
to 2V. The PIC can be constantly on, in sleep mode when the game is off,
and enable the LED boost converter only when the display is in use.
> Here's my current schematic:
>
> http://freepdfhosting.com/uploads/6640a7ea8a.pdf
Yikes, what a mess! Make your schematics look "normal" if you expect others
to spend time looking at them for free. And of course neatness counts.
This means making sure labels don't collide with other labels, parts,
connections, etc. Every part should have a value, else it's not much of a
schematic. It can make a huge difference whether you intend a resistor to
be 100 ohms or 100Kohms. Make the text readable. Yours is too small even
when viewing the schematic full screen on my 19 inch 1600 x 1200 monitor.
You have to hook up all power and ground pins to the PIC. You need bypass
caps on the PIC and any other chip. And I really don't understand the logic
of putting resistors in series per LED on the top anode multiplex line of
the bi-color LEDs.
Any real critique of the circuit is pointless until these basic things are
fixed.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\27@070547
by
olin piclist
Tomás Ó hÉilidhe wrote:
> Will the 887 be happy with two AA batteries in series? As the
> batteries begin to deplete will the voltage drop cause the 887 begin
> to fail?
This is getting rediculous. Several people including me have already told
you several times what voltage the 16F887 will run down to and roughly what
the main tradeoff is. But in any case you need to look up the details
yourself. The operating voltage is clearly given in the data sheet right
where you'd expect to find it. I even remember telling you the page to look
at. Why should we continue to help you if you won't do simple and necessary
things yourself like looking in the data sheet?
If you don't understand what it says, then ask about that, but don't just
ask people to look up the answer for you in the data sheet. I remember you
did have some confusion about absolute maximum specs. You got several
explainations when you asked about that, including where to find the
operational voltage limits you were seeking. So I guess you ignored the
answers and never read the data sheet anyway?
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\27@083327
by
Jinx
> Why can't the PIC run from the 3V supply too ?
IMHO 3V is just too low for that circuit. If the high- and low-side
drivers each drop a volt (the 2003 at least has Darlington outputs),
after the current-limiting resistor that leaves crumbs for the LEDs.
And the LEDs are an important part of this project
At such a low voltage for a row-column switching arrangement I'd
be experimenting with more suitable components. N-ch FETs or
transistors with low saturation, such as Zetex NPN, on the low-side
and P-ch FETs or Zetex PNP on the high-side
Either that or bump up Vcc to at least 5V. The PIC Vcc can be
limited within that
Cost is a consideration of course, but if it doesn't work properly
it doesn't matter how cheap it is
I would not be happy with this as a "last minute" circuit. There are
so many things that need to be worked out IMHO it's nowhere near
ready
2008\06\27@085416
by
Jinx
> LT1173-5 to give me 5 V to power the PIC16F887
Is that the best choice ?
www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1033,P
1468,D1808
The introduction in the pdf says
"The device can deliver 5V at 80mA from a 3V input in step-up mode"
although ambiguously in Table 1 further down says 90mA (min) with
a 47uH inductor. Perhaps I've become cynical of mftr's claims. They
may be stating the maximums, I don't know. Seems a long way from
the 160mA you were aiming at though
2008\06\27@090258
by
olin piclist
Jinx wrote:
>> Why can't the PIC run from the 3V supply too ?
>
> IMHO 3V is just too low for that circuit. If the high- and low-side
> drivers each drop a volt (the 2003 at least has Darlington outputs),
> after the current-limiting resistor that leaves crumbs for the LEDs.
> And the LEDs are an important part of this project
I agree the LEDs need a reliable higher voltage, which is why I suggested to
use a step up converter for the LED supply.
Since most of the battery power will go into LEDs, I also think the LED
drive circuit should be designed for efficiency. Dropping a volt in either
high or low side drivers is way too much, and totally unnecessary. Off the
shelf darlington drivers are definitely not the way to go in this case.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\27@091948
by
olin piclist
Olin Lathrop wrote:
> I agree the LEDs need a reliable higher voltage, which is why I
> suggested to use a step up converter for the LED supply.
I meant to this add but hit SEND too quickly: If I was doing this I'd look
into having the PIC control the boost switcher directly. There are various
PICs available with built in comparators, and some of them even have
absolute voltage references too. Tomas never said what the computing
requirements of his game are, but all might be doable using a single PIC for
the game logic and the power supply controller.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\27@092249
by
Rolf
Olin Lathrop wrote:
{Quote hidden}> Jinx wrote:
>
>>> Why can't the PIC run from the 3V supply too ?
>>>
>> IMHO 3V is just too low for that circuit. If the high- and low-side
>> drivers each drop a volt (the 2003 at least has Darlington outputs),
>> after the current-limiting resistor that leaves crumbs for the LEDs.
>> And the LEDs are an important part of this project
>>
>
> I agree the LEDs need a reliable higher voltage, which is why I suggested to
> use a step up converter for the LED supply.
>
> Since most of the battery power will go into LEDs, I also think the LED
> drive circuit should be designed for efficiency. Dropping a volt in either
> high or low side drivers is way too much, and totally unnecessary. Off the
> shelf darlington drivers are definitely not the way to go in this case.
>
>
> ********************************************************************
> Embed Inc, Littleton Massachusetts,
http://www.embedinc.com/products
> (978) 742-9014. Gold level PIC consultants since 2000.
>
Please correct me id I am wrong, but, with a 5v supply for the LED's,
won't most of the battery power be going to the current limiting
resistors rather than the LED's (with 3.3V drop over the resistor, but
1.7 of the (red) LED. OK, there's also the 1V drop in the drivers or
something too.... but, the point is that with only 1.7V drop on the LED,
the other 3.3V drop is the bulk of where your battery power goes... (2/3
of your battery power goes to everything other than the LED's).
My 'novice' instinct is to boost the power to as low a value as possible
to drive the LED's thus keeping the device more efficient....
Rolf
2008\06\27@093028
by
Rolf
Jinx wrote:
>> LT1173-5 to give me 5 V to power the PIC16F887
>>
>
> Is that the best choice ?
>
> www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1033,P
> 1468,D1808
>
> The introduction in the pdf says
>
> "The device can deliver 5V at 80mA from a 3V input in step-up mode"
>
> although ambiguously in Table 1 further down says 90mA (min) with
> a 47uH inductor. Perhaps I've become cynical of mftr's claims. They
> may be stating the maximums, I don't know. Seems a long way from
> the 160mA you were aiming at though
>
>
He only intends to run the PIC of the 5V, the LED's go straight off the
battery (at whatever V that may be). Of course, this is also inefficient
for power conservation because his current-limiting resistors will not
produce the desired light output for most of the battery life-cycle
(either too much or too little depending on the cell voltage....). If he
uses 260Ohm to get 5mA through the 1.7Vf Red LED at 3V (when the cells
are fresh), then, when the cells are half-depleted, at 1.2V each, the
LED current will be only 2.7mA, and when the cells are dead (at say
1.0V), the current will be only 1.15mA
I see that as being a major design issue with his 'prototype'. The LED's
need a constant supply voltage for the life of the cells.
Of course, he could use Lithium AA cells, and get much more consistent
output....
Rolf
2008\06\27@094319
by
Jinx
>... but, the point is that with only 1.7V drop on the LED, the other
> 3.3V drop is the bulk of where your battery power goes
True. I did suggest either no resistor, perhaps not advisable with
hindsight, or a low value resistor and PWM so that more power
is available as light. And way back when, a separate adjustable
duty cycle oscillator ANDed with the logic signals. That would
also protect the LEDs if code locked up
2008\06\27@101611
by
olin piclist
Rolf wrote:
> Please correct me id I am wrong, but, with a 5v supply for the LED's,
> won't most of the battery power be going to the current limiting
> resistors rather than the LED's
Right, which is why 5V is a bad choice for the LED supply. It should be
possible to arrange for switches that don't drop more than 100mV. You want
some voltage accross a resistor to keep the current somewhat predictable and
consistent. 500mV is probably a good tradeoff between efficiency and
predictable and repeatable current. Let's say the LEDs drop about 2.5V when
pulsed at high current, so you want the LED supply to be about 3V or a
little more.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\27@101936
by
Adam Field
I built a switch mode power supply for high voltage, with a PIC PWM
controlled MOSFET. When the circuit started the inductor was a "short"
to ground from a +12DC grounded through the MOSFET. This led to faulty
starts as it would pull my power supply down low enough where the PIC
wouldn't start sometimes. I added a pullup resistor to the gate of the
MOSFET. Why would an ANDed oscillator be better than a simple
pull-up/down?
> And way back when, a separate adjustable
> duty cycle oscillator ANDed with the logic signals. That would
> also protect the LEDs if code locked up
>
2008\06\27@102218
by
Jinx
> He only intends to run the PIC off the 5V, the LED's go straight
> off the battery (at whatever V that may be)
TBH, and this is not a good day for paying attention to what other
people are doing, I've lost track of exactly where this project is at
What I'd start with -
4 x AA (or even C cells) and a 5V LDO for the PIC
A DC jack so that any convenient power-pack can be used
High-efficiency individual LEDs run off Vbatt
PWM driving
Vbatt and ambient light monitoring to auto-adjust PWM
Re-design cross-point switching arrangement to reduce PIC size
and eliminate either high-side or low-side drivers
Maybe using low drop-out switches, such as the DG411 (30mA
per input, suitably power-rated, but circuit can be arranged so that
switches within each IC do not control combinations of LEDs that
would exceed IC wattage rating)
Maybe shift registers to low-side control any combination of LEDs
Maybe something like Maxim's port expanders as a matrix driver
Maybe I shoulda been in bed an hour ago. Maybe I am. Maybe this
is all a dream. Had better
2008\06\27@160516
by
William \Chops\ Westfield
>> Here's my current schematic:
You will have trouble operating at 3V as "LED power" with
UL200x style (darlington) drivers. Darlingtons have about
1V voltage drop across each driver. By the time you have
one volt on the high side, and one volt on the low side, you
have one volt left for your LEDs, and it's probably not enough.
BillW
2008\06\27@182459
by
Jinx
> Why would an ANDed oscillator be better than a simple pull-
> up/down?
The thinking being that if LED power is safely limited by an external
PWM signal, it doesn't matter if a logical drive signal gets stuck high.
Like the backplane on an LCD. Ideally you'd have a safety time-out,
for instance having to periodically pass through a particular section of
code to stop the PIC resetting via WDT or similar
2008\06\27@184440
by
Jinx
> He only intends to run the PIC off the 5V
Here's a thought - how efficient would it be for a PIC to be booted
up on 3V and then boost its own Vcc with a doubler monitored by
its comparator or ADC ? Say for example you have a battery-powered
PIC device that needs TTL-level outputs on occassion. Seems to me
a higher Vcc could be maintained without too much wastage
Just idle musings
2008\06\28@001918
by
David Meiklejohn
Jinx wrote:
>
> IMHO 3V is just too low for that circuit. If the high- and low-side
> drivers each drop a volt (the 2003 at least has Darlington outputs),
> after the current-limiting resistor that leaves crumbs for the LEDs.
> And the LEDs are an important part of this project
Something I'm not clear on, though, is why high-side drivers are needed at
all.
Only one column is "on" at any one time, right? They're being multiplexed?
So each PIC output pin on the "high side" is only driving a single LED at
any one time, right?
It's obvious why each column needs a high-current sink, but there's
something I'm missing here...
David Meiklejohn
http://www.gooligum.com.au
2008\06\28@011859
by
Jinx
2008\06\28@062901
by
Jinx
> It's obvious why each column needs a high-current sink, but there's
> something I'm missing here...
The display is also 3-dimensional. At each intersection of row and
column is a choice of two colours
2008\06\28@072427
by
David Meiklejohn
|
Jinx wrote:
> > It's obvious why each column needs a high-current sink, but there's
> > something I'm missing here...
>
> The display is also 3-dimensional. At each intersection of row and
> column is a choice of two colours
Yep, I understand that, but all that means is that, for each column of 6
bi-colour LEDs, there are actually 12 LEDs, and in the diagram at
http://freepdfhosting.com/uploads/6640a7ea8a.pdf it shows them being driven
by 12 independent outputs.
So - imagine there was no driver there. Each of the 887's "high-side"
outputs, labeled D0-7 and A0-3, is connected to a single row of 7 LEDs.
Current will only be sunk from one of these at a time, as each column on
PORTC is pulled low, so each of the high-side outputs is only ever driving
as single LED at a time.
The only reason I can see for doing this through darlingtons would be if he
needs more than 25mA for a single LED - and as I write this, I remember that
being given as the reason, because of the LEDs being low efficiency and
having to be visible in broad daylight or whatever. So in retrospect I
understand, but still think it's misguided - pumping >25mA through each LED
goes against all the discussion about battery life. Better off with a pair
of higher-efficiency SMDs than the red/green LEDs.
David Meiklejohn
http://www.gooligum.com.au
2008\06\28@072820
by
David Meiklejohn
Jinx wrote:
>
> > Only one column is "on" at any one time, right ?
>
> http://en.wikipedia.org/wiki/Connect_Four
Yeah, I know that it should look as though all the LEDs are lit at once, I
just assumed that the LEDs would be multiplexed, with only one column
actually lit at any one time (in microcontroller time, not human POV). Or
it would be possible to multiplex rows instead of columns, but same
difference.
David Meiklejohn
http://www.gooligum.com.au
2008\06\28@081951
by
Tomás Ó hÉilidhe
|
William "Chops" Westfield wrote:
> You will have trouble operating at 3V as "LED power" with
> UL200x style (darlington) drivers. Darlingtons have about
> 1V voltage drop across each driver. By the time you have
> one volt on the high side, and one volt on the low side, you
> have one volt left for your LEDs, and it's probably not enough.
There's something I misunderstand here. Now feel free to correct me, but
here's my current understanding:
The ULN2003 lowside drivers work as follows:
* You have a darlington transistor
* The emitter goes straight to ground
* The collector goes straight to the output
* The base goes to a resistor that goes to the input
Now as I understand it:
* You put 5 V on the input
* Current flows into the base resistor, into the base, across the B-E
junction dropping 700 mV in the process, and then straight to ground
* Because there's a base current flowing, this causes a collector
current to flow (where Ic = Ib * Hfe)
If we connect the cathode of an LED to an output of the ULN2003, then
current flows from the LED's cathode, into the collector, across the C-E
function dropping maybe 100 mV in the process, and then straight to ground.
So therefore I don't see why you think I'll lose an entire volt in the
lowside driver. I'm thinking 100 mV tops. But please enlighten me.
2008\06\28@082509
by
Jinx
> because of the LEDs being low efficiency and having to be visible
> in broad daylight or whatever
You've hit the snail on the head
If LEDs are chosen that are bright enough with current that can be
sourced safely from PIC pins, that eliminates the high-side driver.
Then all you need on the low-side are simple column switches
It's the typical way 7 segment displays are driven. Anodes to PIC
pins via current-limiting resistors, commoned and strobed cathodes
A perfect example
http://www.mikroe.com/en/books/8051book/ch7/images/21.gif
The 64 x 7 LED message board of mine I linked to uses HP LEDs
(HLMP-1385, had them for over 10 years so don't know if you'd
find data on those now) that are well bright enough at only 2mA.
The description on the packet with the remaining few says 10mcd
@10mA, but I've not noticed any appreciable increase in brightness
at 10mA
2008\06\28@082648
by
Tomás Ó hÉilidhe
David Meiklejohn wrote:
> Jinx wrote:
>
>> IMHO 3V is just too low for that circuit. If the high- and low-side
>> drivers each drop a volt (the 2003 at least has Darlington outputs),
>> after the current-limiting resistor that leaves crumbs for the LEDs.
>> And the LEDs are an important part of this project
>>
>
> Something I'm not clear on, though, is why high-side drivers are needed at
> all.
A single PIC pin can give 20 mA without a problem, but it can't give 20
mA on seven pins at the same time. Hence the highside drivers.
However I'm thinking of getting rid of the highside drivers and instead
multiplexing the display so only half a column is on at a time...
2008\06\28@083159
by
Dave Tweed
<toe
spam_OUTlavabit.com> wrote:
> So therefore I don't see why you think I'll lose an entire volt in the
> lowside driver. I'm thinking 100 mV tops. But please enlighten me.
The Darlington connection prevents the second transistor in the pair
from saturating.
The combined collector connection must always be at a voltage high enough
to supply current through the first transistor to the base of the second
transistor, which is Vce(sat) of the first + Vbe of the second, which
usually works out to about a volt.
-- Dave Tweed
2008\06\28@083550
by
William Bross
|
Tomás Ó hÉilidhe wrote:
{Quote hidden}>William "Chops" Westfield wrote:
>
>
>>You will have trouble operating at 3V as "LED power" with
>>UL200x style (darlington) drivers. Darlingtons have about
>>1V voltage drop across each driver. By the time you have
>>one volt on the high side, and one volt on the low side, you
>>have one volt left for your LEDs, and it's probably not enough.
>>
>>
>
>There's something I misunderstand here. Now feel free to correct me, but
>here's my current understanding:
>
>The ULN2003 lowside drivers work as follows:
>
>* You have a darlington transistor
>* The emitter goes straight to ground
>* The collector goes straight to the output
>* The base goes to a resistor that goes to the input
>
>Now as I understand it:
>* You put 5 V on the input
>* Current flows into the base resistor, into the base, across the B-E
>junction dropping 700 mV in the process, and then straight to ground
>* Because there's a base current flowing, this causes a collector
>current to flow (where Ic = Ib * Hfe)
>
>If we connect the cathode of an LED to an output of the ULN2003, then
>current flows from the LED's cathode, into the collector, across the C-E
>function dropping maybe 100 mV in the process, and then straight to ground.
>
>So therefore I don't see why you think I'll lose an entire volt in the
>lowside driver. I'm thinking 100 mV tops. But please enlighten me.
>
>
>
Tomas,
Everything you say WOULD be true IF the ULN2003 only had one
base-emitter drop. But check the schematic in the datasheet. That
double transistor is called a Darlington pair. Ideal B-E drops are
taught to be about 700mV. Look in the datasheet for Vce(sat) or Voltage
between the collector to emitter when fully on. Also notice that this
parameter changes with current.
To find out exactly how much, you have to set up a little breadboard
experiment.
Bill
2008\06\28@083716
by
Dario Greggio
Tomás Ó hÉilidhe wrote:
> A single PIC pin can give 20 mA without a problem, but it can't give 20
> mA on seven pins at the same time. Hence the highside drivers.
hmmm, didn't they say "20mA each, and 200mA in total" ?
--
Ciao, Dario -- ADPM Synthesis sas -- http://www.adpm.tk
2008\06\28@085413
by
Tomás Ó hÉilidhe
Dario Greggio wrote:
>> A single PIC pin can give 20 mA without a problem, but it can't give 20
>> mA on seven pins at the same time. Hence the highside drivers.
>>
>
> hmmm, didn't they say "20mA each, and 200mA in total" ?
Here's a copy-paste:
Maximum output current sunk by any I/O
pin....................................................................................................
25 mA
Maximum output current sourced by any I/O pin
.............................................................................................
25 mA
Maximum current sunk by all ports (combined)
...........................................................................................
90 mA
Maximum current sourced by all ports (combined)
......................................................................................
90 mA
2008\06\28@091906
by
Rolf
Tomás Ó hÉilidhe wrote:
{Quote hidden}> Dario Greggio wrote:
>
>>> A single PIC pin can give 20 mA without a problem, but it can't give 20
>>> mA on seven pins at the same time. Hence the highside drivers.
>>>
>>>
>> hmmm, didn't they say "20mA each, and 200mA in total" ?
>>
>
> Here's a copy-paste:
>
> Maximum output current sunk by any I/O
> pin....................................................................................................
> 25 mA
> Maximum output current sourced by any I/O pin
> .............................................................................................
> 25 mA
> Maximum current sunk by all ports (combined)
> ...........................................................................................
> 90 mA
> Maximum current sourced by all ports (combined)
> ......................................................................................
> 90 mA
>
>
OMG, you found the datasheet!
Just kidding.
The 887 is different to many of the other chips. But, for the record, 16
FET's (and 16 resistors) of the right type will fix that in a hurry.....
Rolf
2008\06\28@093125
by
Dario Greggio
Rolf wrote:
> The 887 is different to many of the other chips. But, for the record, 16
> FET's (and 16 resistors) of the right type will fix that in a hurry.....
Really is it?? :)
Well, I learnt something new. Still, IMO, 90/7 might be enough...
--
Ciao, Dario -- ADPM Synthesis sas -- http://www.adpm.tk
2008\06\28@094242
by
olin piclist
David Meiklejohn wrote:
> So - imagine there was no driver there. Each of the 887's "high-side"
> outputs, labeled D0-7 and A0-3, is connected to a single row of 7
> LEDs. Current will only be sunk from one of these at a time, as each
> column on PORTC is pulled low, so each of the high-side outputs is
> only ever driving as single LED at a time.
Right, but look at the current. Even ignoring that the OP wanted 25mA thru
the LEDs instead of 10mA or less, consider the time each LED is on. To get
a average current of 10mA requires about 10x that during the brief on time.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\28@094609
by
olin piclist
Tomás Ó hÉilidhe wrote:
> * You put 5 V on the input
> * Current flows into the base resistor, into the base, across the B-E
> junction dropping 700 mV in the process,
No. Look up "darlington" transistor configuration and you will see it is
really two transistors.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\28@113539
by
Dennis Crawley
On Saturday, June 28, 2008 9:19 AM [GMT-3=CET],
Tomás Ó hÉilidhe wrote:
> * You have a darlington transistor
> * Because there's a base current flowing, this causes a collector
> current to flow (where Ic = Ib * Hfe)
Nah!. Hfe^2
2008\06\28@135007
by
William \Chops\ Westfield
On Jun 28, 2008, at 5:19 AM, Tomás Ó hÉilidhe wrote:
> therefore I don't see why you think I'll lose an entire volt in the
> lowside driver.
We analyzed darlingtons in EE class. The second transistor never
gets into saturation and has Vce much higher than Vce(sat); I forget
the exact reasons, and I remember being rather ... stunned.
Also, I read the ULN2803 spec sheet...
BillW
2008\06\28@165042
by
peter green
|
> We analyzed darlingtons in EE class. The second transistor never
> gets into saturation and has Vce much higher than Vce(sat); I forget
> the exact reasons,
note: for the purposes of this discription I will call the transistor
that handles most of the current the power transistor and the transistor
that connects to the input the signal transistor.
The problem is that the signal transistor acts as an emmitter follower.
but it can only do that if it's collector is at a higher voltage than
it's base.
Once the voltage accross the collector and emmitter of the output drops
below the base-emmitter voltage of the power transistor the signal
transistor starts acting like a diode and the only current gain is that
of the power transistor. Of course there is a transistion region between
good follower action and diode action.
If you drive enough current into the base you can bring the output
voltage right down but if you do that then there was no point using a
darlington in the first place.
In general given the relatively high current drive of pic outputs
darlingtons really aren't needed.
2008\06\28@172519
by
olin piclist
William Chops" Westfield" wrote:
> We analyzed darlingtons in EE class. The second transistor never
> gets into saturation and has Vce much higher than Vce(sat); I forget
> the exact reasons, and I remember being rather ... stunned.
Just look at it as two independent transistors and it should all make sense.
Look where the base current of the second transistor comes from. It all
comes from the emitter of the first transistor. And where does that come
from? Mostly from the collector of the first transistor, which is also tied
to the collector of the second transistor.
Now add up the voltages required to keep the second transistor on. The base
will need about 700mV. Even with the first transistor saturated, figure it
will drop 200mV. So that means the output (the common collectors) needs to
be at least 900mV to keep the whole darlington "on".
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\28@173018
by
olin piclist
peter green wrote:
> note: for the purposes of this discription I will call the transistor
> that handles most of the current the power transistor and the
> transistor that connects to the input the signal transistor.
>
> The problem is that the signal transistor acts as an emmitter
> follower. but it can only do that if it's collector is at a higher
> voltage than it's base.
This is wrong, at least assuming NPN darlington. In fact, the collector of
the first transistor of a fully on darlington will be a few 100mV lower than
its base.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
2008\06\28@173045
by
Spehro Pefhany
|
At 04:50 PM 6/28/2008, you wrote:
{Quote hidden}> > We analyzed darlingtons in EE class. The second transistor never
> > gets into saturation and has Vce much higher than Vce(sat); I forget
> > the exact reasons,
>note: for the purposes of this discription I will call the transistor
>that handles most of the current the power transistor and the transistor
>that connects to the input the signal transistor.
>
>The problem is that the signal transistor acts as an emmitter follower.
>but it can only do that if it's collector is at a higher voltage than
>it's base.
>
>Once the voltage accross the collector and emmitter of the output drops
>below the base-emmitter voltage of the power transistor the signal
>transistor starts acting like a diode and the only current gain is that
>of the power transistor. Of course there is a transistion region between
>good follower action and diode action.
>
>If you drive enough current into the base you can bring the output
>voltage right down but if you do that then there was no point using a
>darlington in the first place.
Not really correct. As the base current of the "signal" transistor
increases, it will begin to flow into the collector of the
"power transistor" and you'll never get the latter to have a low Vce.
The collector current of the "signal" transistor *reverses* for high
base current.
Roughly speaking, the minimum output voltage of a darlington
with a pullup on the collector (or with more than tiny base current)
will never be less than a Vbe (diode) drop.
>In general given the relatively high current drive of pic outputs
>darlingtons really aren't needed.
An ordinary BJT can be counted on for but 10:1 or 20:1 of current gain,
if low Vce is a requirement, so darlingtons have their uses, as do
MOSFETs.
>Best regards,
Spehro Pefhany --"it's the network..." "The Journey is the reward"
@spam@speffKILLspam
interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
2008\06\28@175349
by
peter green
> This is wrong, at least assuming NPN darlington. In fact, the collector of
> the first transistor of a fully on darlington will be a few 100mV lower than
> its base.
>
Yes sorry that should have said if it's collector is at a higher voltage
than it's emmitter.
2008\06\28@191408
by
Spehro Pefhany
|
At 05:34 PM 6/28/2008, you wrote:
{Quote hidden}>At 04:50 PM 6/28/2008, you wrote:
>
> > > We analyzed darlingtons in EE class. The second transistor never
> > > gets into saturation and has Vce much higher than Vce(sat); I forget
> > > the exact reasons,
> >note: for the purposes of this discription I will call the transistor
> >that handles most of the current the power transistor and the transistor
> >that connects to the input the signal transistor.
> >
> >The problem is that the signal transistor acts as an emmitter follower.
> >but it can only do that if it's collector is at a higher voltage than
> >it's base.
> >
> >Once the voltage accross the collector and emmitter of the output drops
> >below the base-emmitter voltage of the power transistor the signal
> >transistor starts acting like a diode and the only current gain is that
> >of the power transistor. Of course there is a transistion region between
> >good follower action and diode action.
> >
> >If you drive enough current into the base you can bring the output
> >voltage right down but if you do that then there was no point using a
> >darlington in the first place.
>
>Not really correct. As the base current of the "signal" transistor
>increases, it will begin to flow into the collector of the
>"power transistor" and you'll never get the latter to have a low Vce.
>The collector current of the "signal" transistor *reverses* for high
>base current.
I did a little sim of the relevant ULN2003A schematic using generic
discrete BJT Spice models, and resistor values from the TI datasheet,
to illustrate the collector current reversal:
http://server2.hostingplex.com/~zstoretr/darlington.pdf
The three curves are for different temperatures- -20°C, +70°C and
room temperature (0°C). ;-) A lot of variation with temperature, but
with a 5V PIC drive it would always be operating with negative collector
current. Y axis is collector current, X axis is input voltage to the
driver.
The driver has a 50R load to fixed 5.00 VDC.
>Best regards,
Spehro Pefhany --"it's the network..." "The Journey is the reward"
KILLspamspeffKILLspam
interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
More... (looser matching)
- Last day of these posts
- In 2008
, 2009 only
- Today
- New search...