Skip to main content

Reply to "Recommendation for a Potentiometer with Stops (Detents)"

If I understand your idea, when turning knob 1 click CW you increment the 7-segment display by sending 1 pulse to the CD4026.  When going 1 click CCW you decrement the display by sending 9 pulses.  My comments:

The CD4026 has limited output current drive capability on the 7 segment pins..maybe only 1 mA or so when operating at 5V.  This may actually be enough if you have an efficient display but maybe not in which case you'd need, say, 7 transistors or buffer gates to boost the current drive to, say, 5 or 10 mA per segment for a generic 7-segment display. YMMV.

You need to set the starting count of the CD4026 upon startup.  This can be as simple as a power-on reset pulse from an Res-Cap, or an unused Arduino output pin.  

The display will momentarily flicker when decrementing as the 9 clock pulses advance the count through all the digits rolling over the decade.  Of course the flicker will be faster than the eye can see and over in less than a millisec.

I assume you settled on this approach because it only requires 1 output pin...sort of mirroring the use of only 1 input pin to detect the rotary switch position.

So far so good; it will work.  However, as you're all in for discussing alternative:

Suppose you use an 8-bit serial-in, parallel-out shift register like the 74AC164.  You could use 7 of the 8 outputs to directly drive the 7-segment display since the 74ACxxx digital chip family can drive 5-10x more current at 5V than a CD4xxx chip.  In this case, rather than sending some number of clock pulses to change the display, you send the actual 7-segment pattern serially.  Usually one thinks of serial output data as having a clock pin and a data pin thereby requiring 2 Arduino pins.  But using a Res-Cap "filter" you only need 1 output pin.  That is, to change the pattern of the display, you send a burst of 8 pulses Morse code style (long and short).  You always send 8 pulses to change the display with each pulse corresponding to the on or off state of 1 segment of the display.  The filter decodes the long and short pulses to become the data pin to the shift register.  As with your method, there is a flicker when the shift register is updated but this is so short that the eye will never perceive it.  You will need to store the 7-segment patterns to send out but that's just a table of 11 bytes in your case of 11 states.  But note that rather than just 0...9, you have complete control over each segment so you can generate 0..9,A,b,C,d,E,F or the full hexadecimal range on a 7-segment display.  The 8th output bit can even drive the decimal point which might have some use to indicate status or whatever. So if only needing 11 states, you can choose to send the range 1..9,A,b corresponding to 1..11.  You can completely blank the display whereas the CD4026 is always displaying something (unless you wire up another display disable input which of course requires another Arduino output).

If the 1-wire shift register method is new to anyone following along, there have been zillions of articles and application notes written on it.  I found this one that is pretty comprehensive.

 

 

 

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×