Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Is the PIC16F628A Chip Power Hungry ?

Status
Not open for further replies.

Bracer

New Member

I’ve completed my One Chip Tricorder Project.
However, I’ve noticed some odd behaviors that might render this “solution” worthless.

I notice that the lights stop flashing after about 21 minutes.
This could be fixed “temporarily” by reversing the 0.1 microfarad capacitor pins which will kick the circuit back on for about 8 minutes.
I have done this experiment a couple of times and the time range to failure is rather consistent [is this a good thing ?]
The only way to get the circuit working again is to recharge the batteries.

I bought new rechargeable batteries to make sure they are not the problem.

I’ve replace the microcontroller three times to see if the problem is with the 16F628A chip only to find this similar behavior in all of them.

It cannot be the batteries because after the flashing circuit failed, the LEDs that are directly connected to the power supply via a resistor are still up and running. [Could this be the problem ?]

I am left with no choice but to believe that the problem is with the PIC-Chip.

There is nothing in my codes that contain a “stop working after 21 minutes” instruction.

I started out this project with the idea that a single chip driving all the LEDs will be less power consuming then a couple of 555 and 4017 chips, but having witnessed the circuit’s failure to continue after just 21 minutes [it doesn’t fade out slowly…it just “in your face” stop working] only to be back in action upon a full charge I am left with these disappointing questions that maybe some of the friends I have made here could help.

1:
Could it be that my power supply somehow damaged the chip ?
The voltage operating range of 16F628A is 2 to 5.5V…
I also notice something interesting, if one uses a particular 16F628A chip that is “accustomed” to working on a said voltage, it will no longer desire a lower voltage, a.k.a stops working.
This is very weird; it’s almost behaving like a spoilt brad, ha ha ha

2:
Is the 16F628A chip naturally power hungry ?

3:
Am I getting inferior 16F628A Chips ?
I mean…is some company duplicating it ?
Like 555 chips in the sense that they have more than one manufacture ?

Thanks.
 
Last edited by a moderator:
My guess is that there is a problem with your design.

Clone or inferior PICs have been known, but I think it highly unlikely that you have one, especially if you bought from a reputable source.

PIC16F628A is not a low power PIC, but its consumption is trivial compared to the power that all of those LEDs will be using.
PIC16 is pretty robust, within reason. Nothing in your post would lead me to think you have damaged the PIC.

The voltage operating range of 16F628A is 2 to 5.5V…
Read the data sheet again. The range is 3 to 5.5V and only then if your oscillator runs at 10MHz or less.

Might you have exceeded the 25mA per pin and 200mA total current maximum through the PIC ports? You seem to have a lot of LEDs running quite bright.

It is hard to guess what else you might have done wrong without seeing your schematic.

EDIT: afterthought...... Have you disabled Brown-Out Reset in your code?
 
Last edited:
OMG you have so many LEDs in you circuit.

most likely its the LEDs in your circuit that are drawing all the power, the PICs are quite energy efficient devices, mostly likely its your hardware..

Put an ammeter and check how much current is being drawn by the entire circuit. Check the current drawn by the PIC (only the PIC), then check the current drawn by the LEDS, these should add up to the total current drawn by the circuit.
 
Last edited:
There are 3 batteries ie.. 4.5v From memory the BOR on that chip is set to 4.2v and is on by default!! BOREN is in the config register. BUT!! I honestly think that this chip will only work down to 4.5v you need the LF variety to go to 2 volts..


Ian
 
What's your total maximum current draw? The PIC16F628A can sink/source 25mA per pin, but only up to 200mA for the entire chip.
 
hexreader said:
The range is 3 to 5.5V and only then if your oscillator runs at 10MHz or less.

Might you have exceeded the 25mA per pin and 200mA total current maximum through the PIC ports? You seem to have a lot of LEDs running quite bright.
I don't know..worth checking.

EDIT: afterthought...... Have you disabled Brown-Out Reset in your code?
OK, This is new...what is that ? awesome, this might be it ;p


Nigel Goodwin said:
Yes, post your circuit - the 16F628 is a pretty low power chip, it only consumes a couple of mA at 4MHz on a 5V supply.
I haven't draw it out yet, looks like this is something I will have to get back to.

arunb said:
OMG you have so many LEDs in you circuit.

most likely its the LEDs in your circuit that are drawing all the power, the PICs are quite energy efficient devices, mostly likely its your hardware..

Put an ammeter and check how much current is being drawn by the entire circuit. Check the current drawn by the PIC (only the PIC), then check the current drawn by the LEDS, these should add up to the total current drawn by the circuit.
Thanks, I will have to do that.


Ian Rogers said:
There are 3 batteries ie.. 4.5v From memory the BOR on that chip is set to 4.2v and is on by default!! BOREN is in the config register. BUT!! I honestly think that this chip will only work down to 4.5v you need the LF variety to go to 2 volts..
BOR ? BOREN ? Config Register ?
LF Variety ?
I appreciate your help, but I am just a hobbies...:(
Still learning :(

cowana said:
What's your total maximum current draw? The PIC16F628A can sink/source 25mA per pin, but only up to 200mA for the entire chip.
Arh...a limit to the current that can come out of the chip, this is interesting.
However, I do not see how a few mere LEDs could draw so much current.
The maximum amount of LED at a pin is 4...hmm..they are all connected to the pin via a 470ohms resistor.
 
Last edited:
There are 3 batteries ie.. 4.5v From memory the BOR on that chip is set to 4.2v and is on by default!! BOREN is in the config register. BUT!! I honestly think that this chip will only work down to 4.5v you need the LF variety to go to 2 volts..


Ian
It works down to 3V: PIC16F628

Ken
 
BOR ? BOREN ? Config Register ?
LF Variety ?
I appreciate your help, but I am just a hobbies...:(
Still learning :(
The brownout reset circuit holds the chip in reset if the supply is too low. You can turn it off by clearing the BOREN bit in the configuration bits - description of config bits attached (excerpt from datasheet).

You can set the value for the config bits at the top of your source file or sometimes through the programmer software - it depends on the software you are using.

Arh...a limit to the current that can come out of the chip, this is interesting.
However, I do not see how a few mere LEDs could draw so much current.
The maximum amount of LED at a pin is 4...hmm..they are all connected to the pin via a 470ohms resistor.
So the current per LED is around (4.5-2)/470 ~= 5mA when batteries are full; current decreases as batteries drain.
 

Attachments

  • pic16f628 configuration bits.pdf
    75.3 KB · Views: 130
Thank dougy83!!!
With the file that you sent me and your clear explanation, I have fixed the problem!
Once I set the Brown out to disabled, everything works...now I will have the luxury to see the LED die slowly!

Ian Rogers, I really appreciate your assistance, though you did not directly helped me because I don't understand what you say, you lay the path for clarification by following members that lead to the fixing of my problem.

Thank you all :)
 
Thats ok Bracer.. Some times I think everyone "should" know everything, but as I'm finding out I need to drop a few levels and explain a bit more.

By the way as KMoffett said the chip will work at 3v also the pic16f628a will go down to 2v as you so rightly said, sorry about the confusion.

Ian
 
You know...this got me thinking....if only I can use lithium batteries...but...they explodes...I guess it's the fear of holding an explosive power source in my hand more then anything else....
 
.if only I can use lithium batteries...but...they explodes...
Generally not if you treat them nicely (but yes, it has been known to happen).

I hope you're not worrying about your head being blown off every time you use your mobile phone.
 
heh dougy83.
Well, those cell phones have advance "Don't Explode" circuits in it.
I have no idea how they do that.

Some say it's built right in the battery itself but who know which ? heh
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top