Connected Device Powerdown Suggestions

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
JimTal001
Posts: 176
Joined: Thu Jul 30, 2015 4:59 pm

Connected Device Powerdown Suggestions

Post by JimTal001 » Thu Jul 30, 2015 7:53 pm

I plan to connect numerous 3.3V device/sensor to the pyboard. These device communicate with the pyboard using digital I/O. My plan is to go into low power mode (98% of time) then wake and read from the external device, log data, then go back to sleep. Battery life for this application will be critical. My question is: what would be the best way to power down these external device when the pyboard is sleeping? Does the pyboard has a 3.3V output that can be controlled via code?

Thank you
Jim

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Connected Device Powerdown Suggestions

Post by dhylands » Thu Jul 30, 2015 8:03 pm

The pyboard doesn't have a 3.3v output that can be controlled by the pyboard, so you'll need to create one.

You should be able to use a MOSFET, or find a voltage regulator that has an enable line.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Connected Device Powerdown Suggestions

Post by pythoncoder » Thu Aug 06, 2015 9:08 am

Bear in mind that, according to my own tests, if you issue pyb.standby() any Pyboard pins configured as outputs go high impedance, even if you enable internal pull up or pull down resistors. The solution I intend to use is to have a P-channel MOSFET switching the 3.3V supply, with a resistor between gate and 3.3V to ensure the device remains off when the pin goes high-z. I'm awaiting the delivery of a MOSFET with suitably low threshold voltage so I haven't actually tested this.
Peter Hinch
Index to my micropython libraries.

JimTal001
Posts: 176
Joined: Thu Jul 30, 2015 4:59 pm

Re: Connected Device Powerdown Suggestions

Post by JimTal001 » Thu Aug 06, 2015 1:09 pm

Hello pythoncoder,

Here is what I ordered: FDN337N . Based on your post I may have ordered the wrong chip.

JimTal001
Posts: 176
Joined: Thu Jul 30, 2015 4:59 pm

Re: Connected Device Powerdown Suggestions

Post by JimTal001 » Thu Aug 06, 2015 1:48 pm

pythoncoder,

What do you think about the FDN338P for this application?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Connected Device Powerdown Suggestions

Post by pythoncoder » Thu Aug 06, 2015 7:33 pm

I'd have thought the FDN338P would be ideal.
EDIT
When I implemented this a thought occurred. To keep power consumption low when the peripheral power is on, the pullup resistor needs to be a fairly high value. I used 470K, consuming 7uA. To quickly discharge the capacitances of the FET (g-s and Miller capacitance) it's best to configure the pin driving it as push-pull. To turn the FET off I drive the pin high, then delay 10uS before issuing the standby. This gives the capacitances time to discharge through the pin, with the resistor maintaining the FET in the off state when standby drives the pin high impedance.

It works fine, by the way ;)
Peter Hinch
Index to my micropython libraries.

JimTal001
Posts: 176
Joined: Thu Jul 30, 2015 4:59 pm

Re: Connected Device Powerdown Suggestions

Post by JimTal001 » Fri Aug 07, 2015 8:29 pm

Could you verify my understanding of the circuit in the image below?
Image

I've never used a p-Channel before and it confuses me with the voltages in the datasheet listed as negative, e.g.
Vgs = -2.5

Thanks

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Connected Device Powerdown Suggestions

Post by dhylands » Fri Aug 07, 2015 8:46 pm

Vgs = -2.5 is just saying that the gate is 2.5v below the source.

JimTal001
Posts: 176
Joined: Thu Jul 30, 2015 4:59 pm

Re: Connected Device Powerdown Suggestions

Post by JimTal001 » Fri Aug 07, 2015 8:50 pm

Understood, Thanks.

Post Reply