Electronics > Beginners
Normally Open Rotary Encoder? [SOLVED]
(1/4) > >>
jtsylve:
I'm working on a project that uses a rotary encoder with an ATTiny85.  I'm using the internal pull up resistors on the MCU to keep things simple.

My issue is that the rotary encoder I'm using seems to default to closed, so the pins are being pulled down to ground.  This leaves me with around a 280 µA current draw when everything is shut down.  I can reduce that to about 265 µA if I put a 1K resistor between the encoder and ground (see below).



If I leave the encoder's ground pin floating the MCU only pulls around 76 µA when sleeping.  Are there rotary encoders that are normally open?  I know that means my output waveforms would be inverted, but that's easily dealt with.  It would be nice to have the idle power savings.

JS:
Do the pwm work with pin set as input? In arduino setting a pullup is the same as digitalWrite High to an input. You cpuld use a low value input and only have the timer on and the rotary encoder draining less current.

I've seen some pretty common encoders wich are normally open in the detents.

You could pottentially use an stepper motor as encoder, it doesn't need any pullup as it generates it's own voltage while apinning, the problem with it is the voltage depends on the speed so you need to do something about it and wouldn't work too slow. You could use a comparator to sense it with lower levels but at least you need to limit the voltage going to the micro in some way. So much for the simplicity of the internal pullups.

An easier half solution would be to leave only one pullup while sleeping, as it senses a movement the other comes on, you miss the first movement but the idle current will be about half.

JS

Peabody:
The PEC11L and PEC11R  encoders are open at detents provided the pulses per revolution equal the detents per revolution.  In fact I think the great majority of encoders are open at detents.

Here are the Bourns mechanical encoders:

https://www.bourns.com/products/encoders/contacting-encoders

In the datasheets, look for a diagram called Quadrature Output Table.  It will show you where the detents are for pulse=detents encoders.

jtsylve:

--- Quote from: Peabody on August 06, 2018, 02:52:26 am ---The PEC11L and PEC11R  encoders are open at detents provided the pulses per revolution equal the detents per revolution.  In fact I think the great majority of encoders are open at detents.

--- End quote ---

Right, that's my problem.  Ideally I'd want the opposite, where most of the time the circuit is open, except for at the detents (pulses when the encoder is being turned).
KL27x:
Can you set the pins as output low (or turn the pullups off) before going to sleep, and wake the micro some other way? I mean, if you already had to press a power button, anyway, that would be eezy peezy.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod