-1
\$\begingroup\$

I’ve got an Arduino MKR1000 that I’m trying to connect to a 4-AA battery pack, a RFP30N06LE 30A 60V N-Channel Power Mosfet and a push button. My goal is to have the MCU program run once at each push and then turn off the board until the next push, for the sake of low power consumption. The program is a simple and straightforward test: it sets the pin mode to output for the control pin and writes a HIGH. Then it makes the built-in led blink a few times and finally it writes LOW as the control pin output.

Here's the Fritzing diagram: enter image description here

I’ve tried most of the solutions I've found online:

  • A 10K pulldown resistor between digital output pin and gate to make sure voltage stays low when pin 10 = LOW
  • A 100K resistor between gate and source to avoid gate floating

I've read that I should connect the Arduino and the battery pack to a common GND, I'm not sure how to do this while keeping the mosfet into the closed circuit (and therefore creating an open circuit when no voltage is applied to its gate). (==> probably a super-giga n00b question, but hey, I gotta learn the hard way I guess).

One thing I do notice: after running one loop, the "on" built-in led of the Arduino dims down a little. I guess the voltage decreases in the circuit once the output Arduino pin gets a LOW value. But shouldn't the circuit be totally open between drain & source when the gate gets "LOW"?

Also, some measures I've taken:

  • between gate and source goes from 3.1V to 2.1V after one program loop (when built-in LED dims down)
  • V between drain and source goes from 3.1V to 2.1V after one program loop
  • V at pulldown resistor goes from 0.3V to 0.2V after one program loop
  • V at gate-source resistor goes from 3.1V to 2.1V after one program loop

I don’t know whether I’m doing the wiring right. I've run a diode test on the mosfet, and it's working fine. I guess my main issue is that the source-drain doesn't close because there's a voltage differential between the gate and the source, hence the gate staying "open".

I hope I've included enough details. Let me know if you need more info. I hope you guys can help me solve that thing!

Have a nice day

\$\endgroup\$
  • \$\begingroup\$ Down voting for not providing a real design schematic, \$\endgroup\$ – Michael Karas Feb 27 at 3:53
2
\$\begingroup\$

If you expect help on this forum, learn to draw a schematic. Having folks toil over a Fritzing diagram is liable to get you lots of negative comments.

I understand what you are trying to do with your Uno, and you have at least tried to be creative in coming up with a solution. However it does not and cannot work in the form you have it.

First let's see something more like a schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

I've guessed where you put the turn on pushbutton, but I think this shows your intent.

If we assume that you can turn the Arduino off (you can't, but it's what you intended), when the push button is pressed the Arduino powers up and your software sets Pin11 high. This turns on the FET and so keeps the Arduino powered.

So far so good.

When you set Pin11 low M1 WILL turn off initially. The voltage on the Arduino will slowly fall (due to capacitance in the circuit).

But as the Gnd terminal rises toward +5V, Pin11 will slowly rise ….this will turn on the FET. Eventually the Arduino may reset, but I doubt it, it'll just sit looping with nothing to do ...and your software assumes that the Arduino will reset and stop operation.
Note that the ATMega328 will happily run down to about 2V so, so trying to turn it off in this way is problematic at best.

However (big RED flag) there is more wrong with your implementation. The ATMega328 is rated at an ABSOLUTE maximum of 6V operation, it's recommended that you don't go above 5.5V. YOU HAVE A 6V BATTERY.

Assuming you are using something like an Alkaline 1.5V AA new batteries will not be above 6V. But I'd still suggest you need to address this problem. 6V is on the low threshold of the Vin rating so I understand why you used that to feed the 5V ….but it says 5V for a reason!!

Now let's try to fix your problems:

  1. Put a diode (1N4007) in series with the battery positive, this will reduce the voltage on the Arduino to less than 5.5V.
  2. Add a 74HC74 flip-flop to turn the FET ON/OFF

So the new schematic would look like this:

schematic

simulate this circuit

U1 is a Little Logic D-Type Flip flop. When the Arduino is ON then Pin11 can turn the Q output low ...which turns off M1.
When you touch the switch (even though it will bounce, the Q output is set high.
The 74LVC1G175 is powered all the time, but draws only a few uA.

You should look up more data on the ATMega328 and the various boards it is used in. The processor is capable of being put to sleep so you don't have to pull tricks like the above. However, the Uno has more components on it, so I understand using this methodology.

\$\endgroup\$
  • \$\begingroup\$ Thanks a lot for the time you took to help, Jack. The circuit I was trying to reproduce was the one I found here. I tried it as is and then tweaked it as shown in my original post, but nothing worked. I didn't know about flip-flops, nor circuitlab.com so thanks a lot for those tips! I think I got your schematics, I just need to get the components and I'll try it. True, the Arduino has a sleepMode function, but it still draws current, so I'd rather go with an actual hardware shut down. Thanks a lot! \$\endgroup\$ – garys Feb 23 at 14:12
  • \$\begingroup\$ The Arduino processor alone has very low current sleep modes (< 1 uA) and this is more than adequate. I suggest you start reading here: gammon.com.au/power Nick lays out some great learning on the sketches to show power consumption. \$\endgroup\$ – Jack Creasey Feb 23 at 16:09
0
\$\begingroup\$

Your Arduino isn't connected to ground. Move the wire to the right one socket on the breadboard.

Also, you don't need the 10K resistor. MOSFETs aren't like BJTs. The only current draw through the gate is to charge the gate capacitance. Once that's charged, practically zero current is drawn. Try it without it. 10K is really high for a gate resistor. Even 100ohms is extremely high when you have a gate resistor to control switching times or prevent ringing).

\$\endgroup\$
  • \$\begingroup\$ thanks, I tried that as well, but it didn't work. The mosfet wouldn't close the source-drain. \$\endgroup\$ – garys Feb 23 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.