IRF4905 AnalogWrite LOW wont pull to ground for some reason [Scheme]

Hello!

A while ago I scoured through the forums and I found out I can use IRF4905 to provide power supply on demand to some elements for extra power savings. Then I also read that I can use analog pins to control them.

I've attached the scheme.

Pulling the analogs to LOW while using them as OUTPUT doesn't always switch the MOSFET.
In most cases the MOSFET remains blocked and no electricity goes to the elements.
What gives?
Will it work if I use Digital pins instead?

I found out that they don't pull to ground by simply shorting the pin out while its low with the G pin. Then the MOSFET would provide electricity to the connected elements.

chrome_2017-07-20_23-07-50.png

An IRF4905 is not a logic level mosfet.
Can't see where the sources of the p-channel mosfets are connected to.
It should be Arduino VCC. Anything higher than 5volt, and the mosfets won't turn off.
Can't see what the drains are switching either.
Leo..

Thanks for your input.

I understand they are logic level, and I'm using them with a 5V source.

You can observe the whole scheme here -> EasyEDA(Standard) - A Simple and Powerful Electronic Circuit Design Tool

I will attach a .pdf of it too.

Note that I didn't notice such behaviour with Q5 that powers the stepper motor. It's working rather well, it's just elements with low power draw that are unable to work properly.

On the left, elements Q3 works properly and always powers on. I attribute this to the fact that the node provides a digital pin, which, maybe, possibly, provides better ground than analog pins when put to LOW.
That's my current understanding of it.

Main-Schematic.pdf (56.1 KB)

Pins A6 & A7 can not be used as digital outputs.
Also they are not logic level FETs.

Grumpy_Mike:
Pins A6 & A7 can not be used as digital outputs.
Also they are not logic level FETs.

I've went through so much documentation and never seen anything about that, but now that i google specifically those pins it instantly comes up.

So they don't have internal pull-up resistors, taken from Arduino Nano - A6/A7 internal pull-up resistors - Microcontrollers - Arduino Forum .

I've lost so much time trying different solutions, thank you for helping me out!

No. With a V(gt) of 2-4volt they are not classed as logic level.

Why do you switch power to the HX711.
They enter sleep mode when the clock is HIGH for >60usec.

Might be easier to use a boost converter with enable pin for your stepper motor.
Two boost converters in series (3.7>5>12) drops efficiency.
Better to go directly from 3.7 to 12volt.
Leo..

The scheme I've posted is obsolete, I was simply wondering about the situation with the analog pins.

I've remade the scheme recently:

I decided there's no need to put power down these elements, as power savings would be minimal and unnoticed.

Honestly, a boost converter with an enable pin never came to mind. It would be easier, maybe even cheaper too.

If I use a step-up to 12V, that would need to go into VIN of NodeMCU and Arduino. I'm not sure what their ratings are, but it would have to get stepped down internally. Wouldn't that result in greater losses?

P.S.
This scheme is part of my diploma, today was my defense.
I was forced to fake the inputs from the distance sensor and the load cells as I didn't have enough time to resolder them.
Everything was working nicely, but for some reason the Arduino seemingly lost all its software overnight, just before the defense.
It was not responding to the serial requests from the NodeMCU and I couldn't get anything running.
Murphy's law. I didn't bring a cable with me to reprogram it, too.
Happily I had my back covered with a demonstrational video of the project in a working state.
It turned out quite nicely and I got a maximum grade.

I have no idea what would make the Arduino lose its memory like that, when I got home and reloaded the software on it, it sprang back to life.
About the analog pins.. I wish I had turned to this forum earlier, would've saved me tons of time.