Go Down

Topic: Turing off power to GPRS Shield via digital pins of Arduino (Read 4516 times) previous topic - next topic

waqasmir8125

Hi,

I have been building up a system which is to be fed power via solar charged system. I want to keep the GPRS unit shut off while the device sleeps. I am using a GPRS shield which required a Positive and a ground input from a battery or from the 5V and ground Arduino pins.

I want to switch off the voltage or in other words the current being provided to the GPRS unit while the system sleeps. I have been thinking about solutions in which I could use a MOSFET or a BJT to cutt off power by using one of the digital pins of the micro controllers. But I need to keep two things in check

1. I need to use high voltage to turn on the switch and low voltage to turn off in order conserve power in sleep mode.
2. I need a circuit functionality in which I operate with an arduino(which i have built on breadboard now) and the GPRS shield and I can be able to turn off and on the power being provided to the GPRS shield via the pins of the controller.

Any suggestion about the possible solutions for this design.

BR,
Muhammad

MarkT

An npn transistor pulling down the gate of a p-channel MOSFET might be a way to go - what voltage are you feeding the GPRS shield?  It might need be a logic-level p-channel MOSFET.

GSM shields will take a lot of peak current so you should assume 2A or thereabouts in calculations (the average current is much less than the peak).  A low on-resistance for the p-channel is important, perhaps 0.03 ohms or less would be wise.

If the npn transistor is switched off (base low or floating) then a pull-resistor (about 1k?) should pull the p-channel gate up to the source (GPRS supply).  The drain goes to the GPRS shield power.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

waqasmir8125

Hi,

Can you explain a bit more in terms of connections. I mean regarding the Emitter, Collector, Base of the NPN and the source, drain and gate of the P mosfet.

I mean to know where to put which connection. The voltage being applied from the digital pin should go where ? Secondly where should be the emitter and collector be connected to. And same for the connections of the p mosfet.

On Scenario:

Can you explain the on Scenario. Suppose I am using digital pin 9. I apply 5 voltage on the that pin. Next what would be the scenario of connections and current flow. And I need to provide ground connection to the GPRS shield as well.

The shield works with 5V and I guess the peak current which I am able to see is around 300 mAmp. Can you help me explain a bit more about the connections and placement of shield and microcontroller

MarkT

[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

waqasmir8125

The link was very useful. Can any body suggest the type of diode I should use in this circuit ?

BR,
Muhammad

waqasmir8125

any body with a quick reply. I need to order today to get on with my demo :)

graynomad

I think pretty much any diode will do, in lieu of an expert opinion how about a 1N4004.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

waqasmir8125

Hi,

I have tried the solution with P - Mosfet as a trial run and I am not finding much success. I used a trial version just to be perfect with my design so that I do not burn my device. Here is a bit of the circuit design I made.

I cut off the cable of the mobile charger to supply me around 5V. Now I placed the postive and negative in the two holes of the breadboard. From this positive and ground, I am feeding the power to my Arduino UNO. For the load, I am using a 10K resistor. Therefore the 10 K resistor is in parallel with the diode. ( For the diode, I have connected it in a position where the white dash line in the diode corresponds with the horizontal line found on the diode shape in the circuit). The ground provided by the charger is connected to the other end of the resistor and the with the other end of the diode. I apply the high and low voltage by giving a high voltage on the Arduino pin 13 for seven seconds and then low for seven seconds. I take out a wire from the pin 13 and plug it in to the gate of the mosfet.

However nothing changes and the voltage on the resistor remains 5V irrespective of whatever voltage I am applying on the gate of the mosfet. When a high voltage is applied voltage between gate and drain is around -0.91 and there is 0.0 voltage difference between drain and source and this remains the case for the lower voltage. And because of this the voltage on the resistor remains the same for entire process.

Please guide me where am I going wrong. Why the drain and source seem to be at the same voltage and why my system is not working.

BR,
Muhammad

waqasmir8125

Any help guys ? ? I want to get on with my project and time is running out

fungus

It's impossible to help from that description. How about a circuit diagram (or at least a photo of the setup with labels/arrows draw on it)?

Advanced Arduino

dhenry

Quote
Please guide me where am I going wrong.


It is not really clear how your  circuit is wired up.


cyclegadget


http://digital-diy.com/general-electronics/67-tip-logic-level-fets-p-channel.html

In the above link, they use a diode across the load because they are controlling a motor. You do not need it for controlling a GPRS power circuit.

Your measurement of .9 volts makes me think you are powering through the diode which is not what you want.

waqasmir8125

Hi,

I was finally able to achieve some sort of results. I wrote a simple program of setting a digital bit high for 10 seconds and then setting it low for ten seconds. Then I supplied the 5V from the Arduino to the source of the Mosftet and put the digital pin on the gate. I got the desired 5V on the drain when the bit was low and O when the bit was high.

However, when I tried to use the same logic in my main code it did not work. In my main program, I make the controller sleep and in this scenario the bit is set. However, when the arduino wakes up again, with the bit set to low to provide the voltage at the drain, the voltage at the drain is around 3.24 volts instead of 5 volts and therefore I am unable to on my device.

Is this has to do with the power down sleep mode I am using. Do I need to do something more after the processor comes back from sleep. Is there any way of flushing out any voltage remains on the digital pin and make it absolutely zero to provide exact 5 Volts on drain ?

I hope I am not sounding confusing ?

BR,
Vik


fungus


Is this has to do with the power down sleep mode I am using. Do I need to do something more after the processor comes back from sleep. Is there any way of flushing out any voltage remains on the digital pin and make it absolutely zero to provide exact 5 Volts on drain ?

I hope I am not sounding confusing ?


The really important voltage is the voltage at the gate....


Advanced Arduino

Go Up