Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Buttons and Power Use

Status
Not open for further replies.

DirtyLude

Well-Known Member
I don't have great electrical theory knowledge and this might be more of a general electronics problem but here's the situation.

I'm making a simple electronic dice roller for a friend. It'll have 4 buttons and a 2 digit 7 segment led display. That's it.

I want to run without a power switch at all. So, the system will display the die roll for a certain amount of time before going to sleep. I'm worried about the pullup resistors on the 4 switches. How much power will these drain while the system is asleep. If I use something high, like 33k will it significantly reduce battery life.

----------
Actually, I think I just came up with a solution to my own problem. If I use a pin from the uC to power the pullup resistors, then there will be no power loss from the resistors when the uC is asleep, since I can just turn them off.
----------
Well, on third thought, that doesn't work, since I need the buttons to get out of sleep mode, so I need the resistors active to register a button push.

Any suggestion, or does it matter at all?
 
DirtyLude said:
I'm worried about the pullup resistors on the 4 switches. How much power will these drain while the system is asleep.
They'll use nothing at all, it is only when you press a button that there will be a loss in the resistors.

Some extra advice, assuming you're using a PIC.
To minimize sleep current for a pic you should:
- Put all inputs in a known state, pull them high or low, or make them outputs before going to sleep.
- disable the brown-out fuse. Brown out circuitry uses 50+ µA wich will drain batteries.
- make sure nothing is drawing power from the pic before going to sleep (all leds off, ... etc)
 
Maybe I'm not following how they work, then.

Shouldn't they be using power is long as the uC pins are reading the input. The pullup is feeding power to the input pin until the button is pressed. When the button is pressed, the power is diverted through the button, causing the input pin to drop low.

Thanks for the other tips, but I'm not using a PIC.
 
DirtyLude said:
Maybe I'm not following how they work, then.

Shouldn't they be using power is long as the uC pins are reading the input. The pullup is feeding power to the input pin until the button is pressed. When the button is pressed, the power is diverted through the button, causing the input pin to drop low.

Thanks for the other tips, but I'm not using a PIC.

Nope, a PIC input draws essentially nothing, like a voltmeter. It does have a little leakage, somewhat unpredictable, but only in the microamp range or possibly much less.

What uC are you using? You will need to take advantage of Sleep features. This depends entirely on what features are built into the hardware.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top