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.

calculating current requirement

Status
Not open for further replies.

qtommer

Member
Hi,

i am now calculating the current requirement of my project which consists of a GSM Module (SE T630), a PIC16F877A, a MAX232 IC and 3 relays.

Using an ammeter, I got the current consumption of each component:

  • PIC16F877A - 25mA
  • Relay - 79mA per relay (237mA for all 3 relays)
  • MAX232 - 25mA (without GSM Module attached) If GSM Module is attached-65mA)

From that, I deduced that the current consumption of GSM Module is,
  • GSM Module - 40mA

(I cannot directly measure the power consumption of the GSM module as it is embedded in the handphone)


For the current required for the PIC16F877A, what I did was I connected the power pins (Vdd and Vss) of the PIC to an ammeter in series to a power supply and measured the current consumed. Would this be the correct method of measuring the current required for the PIC?
The datasheet states that each PIC pin consumes current of 25mA but im getting an overall consumption of 25mA.

Would my method of calculating the current requirement of the components in my circuit be correct?

and would it be good practice to always use a 7805 regulator to the circuit or can i directly power up the board through a dc 5V adaptor.


Thank You :)
 
Last edited:
Hi,

For the current required for the PIC16F877A, what I did was I connected the power pins (Vdd and Vss) of the PIC to an ammeter in series to a power supply and measured the current consumed. Would this be the correct method of measuring the current required for the PIC?
The datasheet states that each PIC pin consumes current of 25mA but im getting an overall consumption of 25mA.

Would my method of calculating the current requirement of the components in my circuit be correct?

and would it be good practice to always use a 7805 regulator to the circuit or can i directly power up the board through a dc 5V adaptor.


Thank You :)

hi,
If the PIC pin is rated at approx 25mA, that means that it can source or sink up to 25mA.

The actual current will depend upon the actual load.

ie: a pin set as an output with no load connected would draw no current.
a pin with a 200R to 0V would draw 25mA from the pin

A 7805 is recommended, many adaptors are poorly regulated.
 
Last edited:
thank you for your reply :)

If the PIC pin is rated at approx 25mA, that means that it can source or sink up to 25mA.

The actual current will depend upon the actual load.

ie: a pin set as an output with no load connected would draw no current.
a pin with a 200R to 0V would draw 25mA from the pin

would this include the oscillator pins and mclr pins as well?

thanks!
 
would this include the oscillator pins and mclr pins as well?
Have you programmed the oscillator and mclr pins as outputs?

A correction...
If the PIC pin is rated at approx 25mA, that means that it can source or sink up to 25mA.

The actual current will depend upon the actual load.

ie: a pin set as an output with no load connected would draw no current.
a pin with a 200R to 0V would draw 25mA from the pin
The pins are rated at 25mA before they can be damaged. An incorrect circuit (such as a direct connection to 0V) will draw much more than 25mA. It is your responsibility to design circuits that do not ask for more current than the rating.
 
Have you programmed the oscillator and mclr pins as outputs?

A correction...The pins are rated at 25mA before they can be damaged. An incorrect circuit (such as a direct connection to 0V) will draw much more than 25mA. It is your responsibility to design circuits that do not ask for more current than the rating.

hi
I said:
If the PIC pin is rated at approx 25mA, that means that it can source or sink up to 25mA.

So I dont see why a correction is required on my post.

If over 25mA it will most likely damage the PIC

PICpin1..gif
 
Bad of me to call it a 'correction'.

I was working on the assumption that the OP didn't understand some of the terms in the data sheet and might think the uC took care of the current limiting.
 
According to the datasheet, the whole MCU can sink 300mA or source 250mA but the maximum per pin is 25mA.

You can buy regulated 5V adaptors which eliminate the need for an LM7805.

If you're going to use the LM7805, you need a 9V adaptor and it's probably a good idea to connect a large filter capacitor across the supply to the LM7805 because the filter capacitor inside the adaptor will probably be too small, I'd go for at least 1000µF.

Are all of the devices going to be powered simultaneously?

If so for how long?

Most wall warts will withstand surges pretty well so you could use a 200mA wall wart if all of the relays aren't going to be activated simultaneously for long periods of time.

I'd be tempted to just go with a 250mA or 300mA adaptor and be done with it.
 
According to the datasheet, the whole MCU can sink 300mA or source 250mA but the maximum per pin is 25mA.

You can buy regulated 5V adaptors which eliminate the need for an LM7805.

If you're going to use the LM7805, you need a 9V adaptor and it's probably a good idea to connect a large filter capacitor across the supply to the LM7805 because the filter capacitor inside the adaptor will probably be too small, I'd go for at least 1000µF.

Are all of the devices going to be powered simultaneously?

If so for how long?

Most wall warts will withstand surges pretty well so you could use a 200mA wall wart if all of the relays aren't going to be activated simultaneously for long periods of time.

I'd be tempted to just go with a 250mA or 300mA adaptor and be done with it.

hi hero.

OT, but knowing about your PAT venture, thought this link would be helpful.

**broken link removed**
 
hi hero.

OT, but knowing about your PAT venture, thought this link would be helpful.

**broken link removed**

I'm not surprised.

The company obviously hires the tools to people who invariably abuse them but doesn't bother to do a safety test before the let another customer have them.

I wonder how long it'll be before they start advertising for PAT testers? :D
 
thank you all so much for your replies,

i understand the PIC source and sinking characteristic much clearer now.

my circuit will actually operate in two separate modes set by a toggle switch which is in AUTOMATIC mode and MANUAL mode.

The current consumption in the respective modes are as follows
AUTO-462mA (max)
MANUAL-360mA (max)

when i read the 7805 datasheet, it said that max of 1A can be sourced. However, when I used the 7805 to power my circuit, the regulator could not source enough current to power my circuit.

So i got a 5V/3A adaptor (that's the only adaptor with the current rating above 460mA i could find) and used it to power my circuit without the 7805. However as the maximum possible current requirement of my circuit would be 462mA, will the adaptor supply the whole 3A to my circuit or will the current drawn from the adaptor be dependent on the current required by the circuit?

i can't come to a conclusion on this cuz there are times my circuit gets overheated (LED's ,PIC) and there are times where the circuit just works fine without any overheating

Some insight on how i should approach the matter would be appreciated.=)

Thanks
 
when i read the 7805 datasheet, it said that max of 1A can be sourced. However, when I used the 7805 to power my circuit, the regulator could not source enough current to power my circuit.
The regulator needs to be on a good heatsink otherwise it will overheat and shut down.



So i got a 5V/3A adaptor (that's the only adaptor with the current rating above 460mA i could find) and used it to power my circuit without the 7805. However as the maximum possible current requirement of my circuit would be 462mA, will the adaptor supply the whole 3A to my circuit or will the current drawn from the adaptor be dependent on the current required by the circuit?

i can't come to a conclusion on this cuz there are times my circuit gets overheated (LED's ,PIC) and there are times where the circuit just works fine without any overheating
Why would it?

The supply puts out a constant voltage and the resistance of the circuit you've connected to it will change to draw the required current.
 
Quote Originally Posted by qtommer View Post
when i read the 7805 datasheet, it said that max of 1A can be sourced. However, when I used the 7805 to power my circuit, the regulator could not source enough current to power my circuit.
The regulator needs to be on a good heatsink otherwise it will overheat and shut down.

thanks!=)


So i got a 5V/3A adaptor (that's the only adaptor with the current rating above 460mA i could find) and used it to power my circuit without the 7805. However as the maximum possible current requirement of my circuit would be 462mA, will the adaptor supply the whole 3A to my circuit or will the current drawn from the adaptor be dependent on the current required by the circuit?

i can't come to a conclusion on this cuz there are times my circuit gets overheated (LED's ,PIC) and there are times where the circuit just works fine without any overheating
Why would it?

The supply puts out a constant voltage and the resistance of the circuit you've connected to it will change to draw the required current.

i see ...so regardless of the value current supplied by the adaptor, the current drawn will only depend on the resistance of the circuit..so that means that the circuit will not burn out no matter how high the current supplied by the adaptor as long as there is a resistance and no short between Vcc and ground?
 
The current stamped on the regulator is just a maximum rating, don't let it confuse you.

A short circuit will either damage the adaptor or cause it to current limit, if it's short circuit proof. High currents can also cause insulation to melt, PCB traces to burn and fire but it's only a problem if the resistance connected is too low, causing too higher current to flow. If you're powering the device from a very high current source such as a car battery, it's a good idea to add a fuse or PTC resistor (the correct name for a polyfuse/switchand is just a resettable fuse) so a short circuit won't pose a fire hazard.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top