SMD MOSFET to power down my SMD H-Bridge

As I tried to make clear in my previous reply, I think you should omit C3. Otherwise, every time you turn on the P-channel mosfet, there will be a large surge of current through the mosfet as C1 charges. If you do decide to keep C3, then you can omit C1 but I think you should also deliberately slow down the turn-on speed of the P-channel mosfet by connecting a capacitor of about 10nF in parallel with R2.

You will need to make sure that the 2 input signals to the 9986 are low before you turn off the P-channel mosfet, and remain low until after you have turned it on.

I will just omit C3. I didn't realize it was a problem. I added C1 thinking that was what you meant to do. C3 is just what I put next to all chips I use as a decoupling cap. I didn't know it was interfering with the P channel MOSFET. Thanks for explaining that. I kinda understand it now.
I'll be sure to turn the h bridge signals off before turning off the P channel.
Thanks!

On the same project, I need to turn off the Vcc to the DS3234 RTC chip. If I should start a new thread for that let me know.
The 3 chips in my project are:
Atmega328P-AU (first time to boot load the SMD variant)
si9986 H-Bridge
DS3234 RTC

Vcc for the Atmega328 & DS3234 is 4.5v (3 C cells)
...trying to last a year on batteries, I will power down the Atmega328P, and have the alarm from the DS3234 interrupt wake it up. But if the DS3234 has Vcc it uses a lot of current. If I turn Vcc off, it uses only 1-2 uA from Vbatt (a coin cell battery).
So I need to "disconnect" Vcc from the DS3234. Would this same technique I used on the si9986 work?

SouthernAtHeart:
I will just omit C3. I didn't realize it was a problem. I added C1 thinking that was what you meant to do. C3 is just what I put next to all chips I use as a decoupling cap. I didn't know it was interfering with the P channel MOSFET. Thanks for explaining that. I kinda understand it now.
I'll be sure to turn the h bridge signals off before turning off the P channel.
Thanks!

Just bear in mind that C1 is effectively the decoupling cap for the H-bridge, so it should be close to the chip and the traces between it, the chip and the P-channel mosfet should be kept short. If you are making a PCB, then I suggest you make a space for C1 anyway (and a capacitor in parallel with R2), just in case there are any problems with noise pickup when the mosfet is off.

SouthernAtHeart:
On the same project, I need to turn off the Vcc to the DS3234 RTC chip. If I should start a new thread for that let me know.
The 3 chips in my project are:
Atmega328P-AU (first time to boot load the SMD variant)
si9986 H-Bridge
DS3234 RTC

Vcc for the Atmega328 & DS3234 is 4.5v (3 C cells)
...trying to last a year on batteries, I will power down the Atmega328P, and have the alarm from the DS3234 interrupt wake it up. But if the DS3234 has Vcc it uses a lot of current. If I turn Vcc off, it uses only 1-2 uA from Vbatt (a coin cell battery).
So I need to "disconnect" Vcc from the DS3234. Would this same technique I used on the si9986 work?

The DS3234 takes less than 1mA. Power it from an Arduino output pin (possibly the same one that is controlling the power to the H-bridge), through a 150 ohm resistor, and put a decoupling capacitor between its Vcc and ground. Make sure you drive the 3 SPI control signals to it LOW before you power it off.

Thanks! I should've known that. In all the details of powering down the H bridge. I forgot.
I'll post my complete schematic here in a few days.
Trying to check anything that might draw current I thought about the 10K pull-up resistor on pin 1 of the Arduino. 5v through a 10K resistor = 500 uA. But maybe there's a lot more resistance in the Arduino chip when I put it to sleep?

The pullup on the reset pin won't draw any current, unless something else pulls the pin low.

Ok, thanks.

Adding a 16x2 LCD in low quiescent mode

I got the RTC DS3234 added into my schematic. One more thing I'm going to need is an LCD screen to enable the user to set the date/time.
For all the more it'll be used (probably once in 10 years if the coin cell last as long as they say they do), I won't even bother with the back light. And data sheets I've looked at are showing Vcc for LCDs to only be 1-2 mA, so I can power that from a digital pin, too. Would a 150 ohm resistor be good between the I/O pin and the Vcc on the LCD?

What about the 6 I/O pins controlling the LCD? I know they're a kind of communication lines, but I just use a liquid crystal library to control them. I'll likely be losing some current through them? After the user is done setting the time, I could disconnect the LCD, only I don't see a LCD.end() function only the LCD.begin(). Will the be any power consumption from this connection?
thanks.
PS. I've read some threads about powering off the backlight, but what I need to do is power off the whole LCD.

SouthernAtHeart:
One more thing I'm going to need is an LCD screen to enable the user to set the date/time.
For all the more it'll be used (probably once in 10 years if the coin cell last as long as they say they do), I won't even bother with the back light.

Then get a reflective mode LCD display, otherwise you may find the LCD display very hard to read without the backlight.

SouthernAtHeart:
And data sheets I've looked at are showing Vcc for LCDs to only be 1-2 mA, so I can power that from a digital pin, too. Would a 150 ohm resistor be good between the I/O pin and the Vcc on the LCD?

Yes, that's what I do.

SouthernAtHeart:
What about the 6 I/O pins controlling the LCD? I know they're a kind of communication lines, but I just use a liquid crystal library to control them. I'll likely be losing some current through them? After the user is done setting the time, I could disconnect the LCD, only I don't see a LCD.end() function only the LCD.begin(). Will the be any power consumption from this connection?

You need to drive all the pins connected to the LCD low before turning off its power, then they won't draw any current.

You need to drive all the pins connected to the LCD low before turning off its power, then they won't draw any current.

They will already be set from the LCD.begin() function. What will I need to do to turn them low, just digitalWrite(pin, LOW)?
Or will I first need to use pinMode(pin, OUTPUT)?
thanks.

SouthernAtHeart:
What will I need to do to turn them low, just digitalWrite(pin, LOW)?

Yes. BTW there is a problem with the LiquidCrystal library: it makes a call to the begin() function in the LiquidCrystal constructor (a very silly thing to do IMO, and completely unnecessary because you should call begin() in setup). So you should preferably patch the LiquidCrystal library source file to remove this call, to avoid feeding power through the I/O connections before you power up the LCD.

dc42:

SouthernAtHeart:
What will I need to do to turn them low, just digitalWrite(pin, LOW)?

Yes. BTW there is a problem with the LiquidCrystal library: it makes a call to the begin() function in the LiquidCrystal constructor (a very silly thing to do IMO, and completely unnecessary because you should call begin() in setup). So you should preferably patch the LiquidCrystal library source file to remove this call, to avoid feeding power through the I/O connections before you power up the LCD.

Is there an updated library that fixes this? I don't know anything about working with or editing libraries.

Edit: ill search around about this. I should've done so before asking more about it.

Yes. BTW there is a problem with the LiquidCrystal library: it makes a call to the begin() function in the LiquidCrystal constructor

Searched for 20 minutes, but couldn't come up with any more info about this. Is this something that I need to address?

avoid feeding power through the I/O connections before you power up the LCD

Will this matter? If so, I assume you mean I should edit one of the text files on my Mac? Under /Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal I found 2 files that look like something you might mean to edit? These came with the Arduino IDE, if something's not right with one of them I'm surprised I couldn't find anything about it around here.
Please advise.

also, here is my completed schematic for the H-bridge shutdown. I tried to tidy it up a bit, and I think I understood where to add/remove the caps, but if you could check it out, I'd sure appreciate it.

You only need C9 if you also have the other 0.1uF capacitor between Vdd of the 9986 and ground.

To fix the LiquidCrystal library to allow for the LCD not being powered up permanently, edit the LiquidCrystal.cpp file, commenting out the call to begin() at the end of the init() function.

Very good! I found the begin() statement and commented it out.

I reckon I should use the backlight for my LCD, then. I searched and found this schematic that turns is on and off. I cuts the NEG side, but I reckon the POS side isn't connected to the LCD's POS, so it won't back feed into it when I power off the LCD's chip. Not sure about the value of R7. Running from 4.5v, I may not need a very high resistor?

One thing I don't know/understand. When I power down this circuit by a LOW arduino pin, there won't be any current left flowing in the BSS1338 mosfet, then will there? See the attached clip from the BSS1338 data sheet. Does that mean there'll be .5 uA current loss all the time? Accord Nick Gammon's arduino power page, I can get the Atmega down to .335nA, so the current in the BSS1338 is considerable. I reckon the one controlling my H-bridge will add another .5uA.

LCD Backlight power.png

SouthernAtHeart:
I reckon I should use the backlight for my LCD, then. I searched and found this schematic that turns is on and off. I cuts the NEG side, but I reckon the POS side isn't connected to the LCD's POS, so it won't back feed into it when I power off the LCD's chip. Not sure about the value of R7. Running from 4.5v, I may not need a very high resistor?

Depending on the LCD display, you may not need any resistor at all, because some displays have the series resistor built-in.

SouthernAtHeart:
One thing I don't know/understand. When I power down this circuit by a LOW arduino pin, there won't be any current left flowing in the BSS1338 mosfet, then will there? See the attached clip from the BSS1338 data sheet. Does that mean there'll be .5 uA current loss all the time?

0.5uA is the maximum, it may typically be much lower. For example, the datasheet for 2N7002 says 0.01uA typical, 1uA maximum @ 25C.

SouthernAtHeart:
I reckon the one controlling my H-bridge will add another .5uA.

Don't forget the P-channel mosfet, that will have some zero gate voltage drain current too.

Thanks for all1. I think that's pretty well it on the hardware end of the project. Will get some actual readings from the motor with its load attached, and see what amperage I'm using. Then will make the final decision on whether to use AA or C cells. Will report back.

dc42:
Running from 9V, you definitely need R1, R2 to be 2 x 1K. However, your schematic is wrong. They need to be in series, not in parallel, and the gate drive to the P-channel mosfet needs to be taken from the junction of the two.

I would connect the 100nF capacitor to the source terminal of the P-channel mosfet instead of the drain terminal, and put a much larger electrolytic capacitor (e.g. 1000uF) in parallel with it. Position the P-channel mosfet and capacitors close to the 9986, and keep the traces connecting these 4 components short.

I'm finishing up my board to send off to the fab house. Everything on this board is very small, except that 1000uF CAP. Is that correct, a 1000uF size? Just checking, thanks.

1000uF was just a suggestion. You can use a lower value, but the ripple current rating should be at least half the maximum motor current. Maybe something like http://uk.farnell.com/rubycon/10tzv470m8x10-5/capacitor-smd-470uf-10v/dp/1281858RL. The purpose of the capacitor is to reduce noise on the power and ground lines when you PWM the motor.