Maker Pro
Maker Pro

A question for the hobby builders here

L

Larry Green

Jan 1, 1970
0
Hi Folks,

I wonder if any of the hobby project designers on here can help me with a
hobby project headache I have created for myself ;-)

I have been away from designing hobby circuits for a number of years and I
am obviously very rusty. I have been asked to come up with a design for a
hobby related circuit and while the majority of the circuit is fine (after
some help from the guys here) the power supply side remains unfinished. I
have spent over 70 hours researching power supply options and I am now
suffering from major information overload to the point where I can no longer
see the woods for the trees (I am also disabled and the brain fogs
associated with that are not helping either!)

Basically I have a battery powered device that uses a PIC microcontroller
with a few switches and a piezo buzzer (plus a few diodes, caps, resistors
etc.). I am sure there must be other people out there designing simple
battery powered PIC projects but what are you guys using for a regulated
supply for the PIC? The options I have looked at are below with comments as
to my findings. I will be building on 'Vero' type protoboard BTW as I do not
have the equipment to make my own boards and it is an extra cost which I
cannot justify with this project.

Linear Regulator
Pros - Cheap, readily available, the old faithful regulator.
Cons - Supply voltage is not high enough at 6V to give a regulated 5V
output.

LDO Regulator
Pros - Fairly cheap, readily available.
Cons - I am not sure if my supply voltage is enough to give a regulated 5V
output.

Charge Pumps
Pros - Ideal for the job, readily available.
Cons - Only available as tiny SMT components (MSOP), 'surf boards' are
expensive, parts are too small for my aging eyes and hands to hand solder,
increased expense.

DC-DC Converters
Pros - Ideal for the job, readily available in DIP packages.
Cons - Difficult to source inductors, Schottky diodes and low ESR 'through
hole' capacitors, increased expense.

'Roman Black' Regulator
Pros - Simple, effective, uses discrete components, cheap.
Cons - Supply voltage is not high enough at 6V to give a regulated 5V
output.

So there are my findings! I have put a circuit diagram on the web so that
you can see what I am trying to do and have an idea of load in the circuit
etc. It can be found at the address below......

http://www3.sympatico.ca/larry.green/circuit_diagram_v4.gif

Do any of you guys have any suggestions/ideas/comments regarding a suitable
power supply for this project.

Any comments/help will be gratefully received as I am now at the point where
I am starting to tear my hair out.....lol.

Larry Green VE3YET
 
A

Arch-lab

Jan 1, 1970
0
If you are going to have that range on your battery then you will have to go
with some type of boost circuit.
As you have already said, you ruled out the other regulators due to your 4.5V
input and wanting 5V output... you just have to put up with what you called
cons on your charge pump and DC/DC and pick which has the least cons now.

How many of these are you going to build?

As far as inductors go, they aren't that hard to find online etc.
I also have found most datasheets will tell you what company and model number
they used for the inductor.

Low ESR parts etc. if this is just a circuit for yourself etc. you might want
to test with the cheaper parts. I have had no problems when I didn't use ESR
parts, so I would say weight what the mfg. says you gain vs. what the circuit
actually does, and what you need it to do.

SMT problem... hmmmmm... other family member who could do it? Or maybe I should
sell you some pre-build ones ;)

Or just make it a 6V battery...
 
R

Robert Monsen

Jan 1, 1970
0
Larry Green said:
Hi Folks,

I wonder if any of the hobby project designers on here can help me with a
hobby project headache I have created for myself ;-)

I have been away from designing hobby circuits for a number of years and I
am obviously very rusty. I have been asked to come up with a design for a
hobby related circuit and while the majority of the circuit is fine (after
some help from the guys here) the power supply side remains unfinished. I
have spent over 70 hours researching power supply options and I am now
suffering from major information overload to the point where I can no longer
see the woods for the trees (I am also disabled and the brain fogs
associated with that are not helping either!)

Basically I have a battery powered device that uses a PIC microcontroller
with a few switches and a piezo buzzer (plus a few diodes, caps, resistors
etc.). I am sure there must be other people out there designing simple
battery powered PIC projects but what are you guys using for a regulated
supply for the PIC? The options I have looked at are below with comments as
to my findings. I will be building on 'Vero' type protoboard BTW as I do not
have the equipment to make my own boards and it is an extra cost which I
cannot justify with this project.

Linear Regulator
Pros - Cheap, readily available, the old faithful regulator.
Cons - Supply voltage is not high enough at 6V to give a regulated 5V
output.

LDO Regulator
Pros - Fairly cheap, readily available.
Cons - I am not sure if my supply voltage is enough to give a regulated 5V
output.

Charge Pumps
Pros - Ideal for the job, readily available.
Cons - Only available as tiny SMT components (MSOP), 'surf boards' are
expensive, parts are too small for my aging eyes and hands to hand solder,
increased expense.

DC-DC Converters
Pros - Ideal for the job, readily available in DIP packages.
Cons - Difficult to source inductors, Schottky diodes and low ESR 'through
hole' capacitors, increased expense.

'Roman Black' Regulator
Pros - Simple, effective, uses discrete components, cheap.
Cons - Supply voltage is not high enough at 6V to give a regulated 5V
output.

So there are my findings! I have put a circuit diagram on the web so that
you can see what I am trying to do and have an idea of load in the circuit
etc. It can be found at the address below......

http://www3.sympatico.ca/larry.green/circuit_diagram_v4.gif

Do any of you guys have any suggestions/ideas/comments regarding a suitable
power supply for this project.

Any comments/help will be gratefully received as I am now at the point where
I am starting to tear my hair out.....lol.

Larry Green VE3YET

PICs can run at lower voltages than 5V, in particular, 4.5 volts is
appropriate. They can go down to around 2V. So, I'd try it without any
regulator. Just use a capacitor across the power/ground of the PIC to smooth
out any spikes. The max for the PIC is 5.5V, so don't run it from 6V.

Also, you can get 3.3V LDO regulators if you find that the PIC is not
running properly. Run it from 4.5V, and you have it made. Try a Seiko S817
series regulator. They have them for lots of voltages between 6 and 1.1V,
and they have a very low dropout voltage (like 160mV at 5V using 10mA)

you can get them at mouser, etc.

Regards
Bob Monsen
 
F

Frank Bemelman

Jan 1, 1970
0
"Larry Green" <[email protected]> schreef in bericht

[snip]
So there are my findings! I have put a circuit diagram on the web so that
you can see what I am trying to do and have an idea of load in the circuit
etc. It can be found at the address below......

http://www3.sympatico.ca/larry.green/circuit_diagram_v4.gif

Do any of you guys have any suggestions/ideas/comments regarding a suitable
power supply for this project.

Since you are still throwing away power with those leds and their 330
ohm resistors, I assume you don't need to get the last drop out of
the battery. A ldo regulator will work fine. If the device runs on
4 batteries of 1.5V, I bet two diodes in series work fine too. The
PIC won't mind. If you run it on 3 batteries, you don't need anything
at all.

For the leds, I'd use high-efficiency leds, with a 1K or 1K5 resistor.
 
R

Richard Henry

Jan 1, 1970
0
Larry Green said:
Hi Folks,

I wonder if any of the hobby project designers on here can help me with a
hobby project headache I have created for myself ;-)

http://www3.sympatico.ca/larry.green/circuit_diagram_v4.gif

Do any of you guys have any suggestions/ideas/comments regarding a suitable
power supply for this project.

Any comments/help will be gratefully received as I am now at the point where
I am starting to tear my hair out.....lol.

Are you sure your circuit won't run straight off the battery, no regulator
required? Check the VCC specs for the PIC.
 
F

Frithiof Andreas Jensen

Jan 1, 1970
0
Do any of you guys have any suggestions/ideas/comments regarding a suitable
power supply for this project.

Why regulate? If the PIC can function over the discharge curve of the
batteries, it's not neccesary. Instead, you would will need an undervoltage
lockout so that the PIC does not hang when the voltage becomes too low.
 
C

Check It Out

Jan 1, 1970
0
I would say use no regulator. If you use 6V, just put a diode in series with
the pic VCC and strap a cap there, too.

High efficiency led's with higher res. or pwming them would save power. I
assume red led goes with buzzer sounding, could use that pwm for both.
Efficcient use of SLEEP modes will save more, too.

REALLY want a reg, use a LDO at like 3v for just the pic, change outputs on
pic so they sink (active low) for the led and buzzer.
 
W

Watson A.Name \Watt Sun - the Dark Remover\

Jan 1, 1970
0
Larry said:
Hi Folks,

I wonder if any of the hobby project designers on here can help me with a
hobby project headache I have created for myself ;-)

First off, replace the 1N4002 with a 1N5817 for a half volt less drop.
Or if you want to get zero drop, put the 1N4002 across the battery
cathode to positive, and put a 1/10A fuse between it and the battery.
If the battery is reversed, the fuse blows. But you get zero drop.

Then the Q is why do you need a regulator to begin with? Why not run it
straight from the battery?


[snip]
 
L

Larry Green

Jan 1, 1970
0
Hi Folks,

Thanks for all the very helpful replies to my original question. A number of
you raised questions so if you don't mind I will try to answer them all in
one post as some questions cover the same areas.

"Arch-lab" asked/wrote:
"How many of these are you going to build?"

At the moment I have been asked to build two prototypes for 'field testing'.
If they are successful then there could a need for 40-50 more.
"SMT problem... hmmmmm... other family member who could do it? Or maybe I
should
sell you some pre-build ones ;)"

LOL......nobody else in the family builds circuits but there could be a huge
market out there for ready built PS units using SMT parts that could then be
plugged into through hole proto boards. If I had the finances to set myself
up making circuit boards and the ability to use reflow techniques I might
even consider it myself...lol. Trying to hand solder 8 legs on a 3mm x 3mm
chip was beyond my capabilities though!


Robert Monsen said:
"Also, you can get 3.3V LDO regulators if you find that the PIC is not
running properly. Run it from 4.5V, and you have it made. Try a Seiko S817
series regulator. They have them for lots of voltages between 6 and 1.1V,
and they have a very low dropout voltage (like 160mV at 5V using 10mA)"

Frank Bemelman said:
"A ldo regulator will work fine. If the device runs on
4 batteries of 1.5V, I bet two diodes in series work fine too. The
PIC won't mind. If you run it on 3 batteries, you don't need anything
at all."

Check It Out said:
"REALLY want a reg, use a LDO at like 3v for just the pic, change outputs
on
pic so they sink (active low) for the led and buzzer.

I am definitely begininning to think this is the direction I should head in
as they are readily available, cheap and 'through hole'. The idea of running
at 3.3V makes sense too as I can still use 4 'AA' cells. Finding a 3 cell
holder is proving difficult (I am trying to source all the parts through as
few suppliers as possible to save shipping costs/min. order charges etc. and
there aren't that many online suppliers here in Canada (trying to avoid
customs charges too!)) plus most rechargeable battery chargers only charge
in 2 cell units so having 3 rechargeable cells could turn out to be a royal
PITA!


"Richard Henry" asked/wrote:
"Are you sure your circuit won't run straight off the battery, no
regulator
required? Check the VCC specs for the PIC."

Arch-lab said:
"Or just make it a 6V battery..."

"Frithiof Andreas Jensen" asked/wrote:
"Why regulate? If the PIC can function over the discharge curve of the
batteries, it's not neccesary. Instead, you would will need an undervoltage
lockout so that the PIC does not hang when the voltage becomes too low."

Check It Out said:
"I would say use no regulator. If you use 6V, just put a diode in series
with
the pic VCC and strap a cap there, too."

"Watson A.Name" asked/wrote:
Then the Q is why do you need a regulator to begin with? Why not run it
straight from the battery?

I originally considered this and posed the same question to Microchip's Tech
Support group. This is part of the reply I got back.........

"The PIC16LF818 can operate with Vdd from 2.0 to 5.5vdc, so operating
with 2 or 3 batteries directly should work. 4 cells fully charged is a
little
high at 6vdc. 3 cells should provide 4.5v max(1.5v/cell) and 2.25v
min(0.75v/cell).
You have to understand some of the limitations of the PIC16LF818 under these
variable
VDD conditions. For example, the part is rated at 10MHz at 5vdc and is
derated
for lower VDD. This means that if you are expecting to run full speed, you
may
not be able to achieve this at 2.0vdc. If you limit your max speed at 4MHz
then
you are fine across the entire Vdd range when providing an external clock,
using a crystal or external RC mode. If you decide to take advantage of the
internal
oscillator block, you can expect some variation in clock frequency over
temperature
and Vdd."

This was one of the main reasons I wanted a regulated 5V supply. I did
intend to use the internal oscillator block (to save costs......why add
extra parts if it is already built in) and I will be using a pseudo random
time delay generated by the PIC. Variations in the clock speed may have
unpredictable results when generating the time delay. I want it pseudo
random but it must fall between an upper and lower limit (1-60 seconds). I
am now thinking that if I went with a regulated 3.3V supply and the chip
does run slower then I can at least compensate for the error in the code.


Frank Bemelman said:
"Since you are still throwing away power with those leds and their 330
ohm resistors, I assume you don't need to get the last drop out of
the battery.......For the leds, I'd use high-efficiency leds, with a 1K or
1K5 resistor."

Check It Out said:
"High efficiency led's with higher res. or pwming them would save power. I
assume red led goes with buzzer sounding, could use that pwm for both.
Efficcient use of SLEEP modes will save more, too."

The circuit I sent you to is actually one revision lower than the 'latest
and greatest' version.........but it had the missing PS block which is where
I directed the initial question. My latest design uses a single bi-colour
LED to replace the two single ones. Both colours will now be controlled by
the PIC and will flash to conserve power. My idea is this.......

The flashing green LED is used to indicate power on. When the device goes
into its pseudo random delay mode it will switch from a flashing green to a
flashing red to indicate that it is 'thinking' (the operator needs to know
that his button push actually started the timer).

Once the delay time is over the red LED will go out and one of two tones
will come out of the buzzer (a continuous tone or a series of beeps). After
5 seconds of tone(s) the device will reset to the start condition and flash
the green LED again to indicate that the power is still on. The operator
should power down at this point until the device is required again in order
to conserve battery power.

Hmmmmmm.......I suppose I could even make it beep once every 30 seconds or
so to remind people to turn it off!

My original circuit was built around a 9V battery (PP3 type) with a 7805
regulator but I was told in a previous post to this group that it was being
very wasteful of resources. That was why I started looking at 3 or 4 'AA'
cells and then hit the wall with regard to finding a suitable method of
regulating the supply to 5V. If the batteries lasted for a full weekends use
that would be fine. The device would NOT be on continously for that time but
could be required dozens of times for up to 2 minutes per use.

Once again thanks for all the help and at least I am beginning to see a way
forward again ;-)

Larry Green VE3YET
 
F

Frithiof Andreas Jensen

Jan 1, 1970
0
This was one of the main reasons I wanted a regulated 5V supply. I did
intend to use the internal oscillator block (to save costs......

Consider to use a colour-tv colourburst crystal for - it's 3.(sumething)
MHz - for the oscillator or maybe a 33 kHz watch crystal instead. Depends on
your speed requirements - the PIC can run down to DC.

The colourburst xtal frequency is spec'ed to a great number of decimals,
Five! (it think), and quite cheap for such a tightly-spec'ed xtal (just
compare some of the other frequencies); the watch crystal is even cheaper
*BUT* may vary a bit with temperature as it is designed for a constant 36'C.

Nevertheless, it will be more accurate than the internal oscillator block!
 
N

N. Thornton

Jan 1, 1970
0
Larry Green said:
Hmmmmmm.......I suppose I could even make it beep once every 30 seconds or
so to remind people to turn it off!

no, extremely annoying. It will result in damaged units being returned
and disgruntled customers. Not smart.

If you decide to take advantage of the internal
oscillator block, you can expect some variation in clock frequency over
temperature and Vdd."
This was one of the main reasons I wanted a regulated 5V supply. I did
intend to use the internal oscillator block (to save costs......why add
extra parts if it is already built in) and I will be using a pseudo random
time delay generated by the PIC. Variations in the clock speed may have
unpredictable results when generating the time delay. I want it pseudo
random but it must fall between an upper and lower limit (1-60 seconds). I
am now thinking that if I went with a regulated 3.3V supply and the chip
does run slower then I can at least compensate for the error in the code.


Re your PS choice, how much does the internal osc frequency vary over
2v to 3v? Variation may be small enough to be not a problem.

Also you're doing random times: how would a limited shift in clock
freq be a problem there? You should be able to make the times still
fall in range.

Thirdly, I dont know the int osc design, but in some cases you may be
able to stabilise it to some extent with an external component like a
varicap diode, or a zener, etc. Maybe, anyway.


Regards, NT
 
N

N. Thornton

Jan 1, 1970
0
Just a thought...

Or put diodes/resistor onto a couple of input pins so the PIC can
distinguish 2 or 3 batt voltage ranges, and compensate in software.

Using the R drop on the LEd feed would give you an already trimmed V.

Regards, NT
 
F

Frank Bemelman

Jan 1, 1970
0
Larry Green said:
[snip]

This was one of the main reasons I wanted a regulated 5V supply. I did
intend to use the internal oscillator block (to save costs......why add
extra parts if it is already built in) and I will be using a pseudo random
time delay generated by the PIC. Variations in the clock speed may have
unpredictable results when generating the time delay. I want it pseudo
random but it must fall between an upper and lower limit (1-60 seconds). I
am now thinking that if I went with a regulated 3.3V supply and the chip
does run slower then I can at least compensate for the error in the code.

You won't notice the difference. Run it off the 6V battery, one diode
in series.
My original circuit was built around a 9V battery (PP3 type) with a 7805
regulator but I was told in a previous post to this group that it was being
very wasteful of resources. That was why I started looking at 3 or 4 'AA'
cells and then hit the wall with regard to finding a suitable method of
regulating the supply to 5V. If the batteries lasted for a full weekends use
that would be fine. The device would NOT be on continously for that time but
could be required dozens of times for up to 2 minutes per use.

Use a PNP in series with the plus. Put a momentary switch over the PNP, to
turn on the circuit. The PIC's first job is to set an output low, to
keep the PNP turned on - you can now release the 'start' button. Once
the thing has timed out, it sets that output high, and turns off it's
own powersupply. The battery will work for years.
 
Top