Power saving with a transistor?

Hi,

I've got a little 'magic eightball' project that features an Attiny85, a MCP23017 I/O expander and 2 DL2416 LED display modules. I've got everything working the way I want. Most of the time the Attiny is in Power Down sleep, but the display and the MCP23017 I/O expander continue to draw power. When I push a button, there is a pin-change Interrupt that wakes the processor, and the fortune is retrieved from PROGMEM and displayed on the DL2416 displays.

At this point I'm just wanting to reduce the draw from the batteries. What I'd like to do is turn off the power to the LED displays, and the I/O expander until they are needed (when the Attiny wakes up).

Is this a case where I could use a transistor to control power to the display and the I/O expander? Would I need NPN or PNP? I don't have any experience in applying transistors.

Thanks for any comments.

Jimmy

I'd go with a Logic Level, Low Rds, P-channel MOSFET between the battery + and the devices +supply pins.
When the processor wakes up, it pulls the Gate low to power up the devices.
Before going back to sleep, bring all the interface lines low so they are not higher than their supply pin when the power is turned off, which could cause excessive current flow thru the device's I/O clamp diodes and damage something.

The MCP23017 only draws 1uA max in standby mode, so that shouldn't be a consideration. Unfortunately, the DL2416 doesn't appear to have a standby mode, the best it has is a Blank mode that draws 1.5mA typical. So you do need to switch its power. I agree with the solution proposed by Crossroads. If you are happy to use SMD devices, then this http://www.farnell.com/datasheets/1675693.pdf would be a suitable mosfet.

dc42:
Unfortunately, the DL2416 doesn't appear to have a standby mode, the best it has is a Blank mode that draws 1.5mA typical.

That would seem to be a gross design fault - it claims to be CMOS logic!

Clearly that is due to the multiplexer (oscillator) continuing to operate. The datasheet states that you can dim it by modulating the blanking input faster than the multiplexer. If you did so near or below the multiplex frequency, it would of course flicker.

Thanks for the info! I will research these P-channel MOSFETs and see if I can make it work.

Jimmy

http://forum.arduino.cc/index.php?topic=155166.0

I have a p-channel mosfet labelled P2P50E. Would this be an appropriate mosfet for switching my display off and on?

Here is the data sheet:
http://www.mouser.com/ds/2/308/MTP2P50E-D-111039.pdf

I hooked it up and my current draw actually went up. I can get it as low as 1.29 mA without the MOSFET in the circuit, but it’s about 3.0 mA when I use the MOSFET.

I probably hooked it up wrong. I have 5v going to S, and D goes to the 5+ on my display board. I am using a digital pin (PB4) to directly assert HIGH or LOW on G(ate). Is this the correct way to connect the MOSFET?

I’ll go watch those videos that were posted in the other thread. Thanks!

Thanks.

That sounds like its wired up correctly. Odd.

CrossRoads you were right. It looks like I missed that one of my BLANK lines was actually still HIGH. So the display was getting power there instead of from Vin. As I was troubleshooting I noticed that the display started giving a few different chars than I expected. Further investigation revealed what you mentioned in your first post,

Before going back to sleep, bring all the interface lines low so they are not higher than their supply pin when the power is turned off

Now I’m down in the uA range in sleep mode! Thanks to everyone for your comments and assistance.

Jimmy

Have a look at this:

Still working on my magic eightball project, and I think the MOSFET shuts down the display (sometimes), but I’m pulling out my hair on debugging this thing. Right now I can’t get it to enter sleep mode. I had it sleeping, but then I had trouble debouncing the button to wake up. Now I’ve made changes and it only wakes once, but it never shuts down. The interrupts work, and it will do a fortune every time I push the button, but it always draws 3 mA now.

The sketch was too big to include inline, so I attached it.

Can anyone help me get it to sleep, and also to wake up .

The idea is that is should be in Power Down, it should wake on the PinChange on pin 3, Do a fortune, then it should shut off the display through the MOSFET, and then sleep (Power Down mode).

Thanks!

Jimmy

eight_ball_tiny85_2416_fet_1.ino (8.6 KB)

OK. I made the same mistake twice in one thread!

Once again I started powering my display board through an output pin instead of Vin.

Thanks for everyone who looked!

Jimmy

Well, on the bright side, it didn't take 3 times 8)

At least! Well, we know you got it in one!

Thanks!