Inc/dec binary sequence using a potentiometer

jpanhalt

Joined Jan 18, 2008
11,087
Sixty posts, and what has been accomplished? When will you start soldering?

So far, you have not said a word about how you plan to interface your "binary value" with midi. Do you know what protocol is required? Do you know how to change settings in midi with a binary number?
 

Thread Starter

mikerodi

Joined Jul 6, 2009
56
Sixty posts, and what has been accomplished? When will you start soldering?

So far, you have not said a word about how you plan to interface your "binary value" with midi. Do you know what protocol is required? Do you know how to change settings in midi with a binary number?
Why does nobody read other posts?
Strangely, ericgibbs seems to be the only one to understand me...
 

MrChips

Joined Oct 2, 2009
34,812
Based on your initial post that eventually has been clarified, yes there is a single chip that satisfies your request. It is called a 7-bit A/D converter.

There are many 8-bit ADC chips available that will do the job.
 

AnalogKid

Joined Aug 1, 2013
12,130
This is what I got *** from post #1: ***

1. Input: A pot. Type, value, degrees of rotation, single/multi-turn, etc. = don't care, don't care, don't care, don't care, etc.

2. Output: 7-bit binary serial or parallel word that continuously represents the percentage rotation of the pot. 0% = 0 decimal. 100% = 127 decimal. If the pot is moving, the number changes; if the pot is stationary at any position, the number sits at the value for that position.

3. What happens to the 7-bit word? MIDI, USB, SPI, blah blah blah - Not today's problem. Front end now, back end later.

Does that sum up the question?

If yes, then yes. In concept, this can be done with a differentiator, comparators, a clock, and two, 4-bit up/down counters. But in practice it will be a bear to calibrate, and you will need high-precision / high-stability parts plus temperature compensation to keep the output from drifting with time and temperature. All analog components and passives (resistors, capacitors, etc.) would have to be 0.1% tolerance or better; easy for resistors, very hard for capacitors. Sounds like a great analog computer training exercise from the 1950's.

I agree with Wally - an A/D circuit that is clocked autonomously and continuously will do what you want. In software analogy terms, the pot is being pinged by a polling routing.

Bad news: there is no standard 4000-series chip that will do this. Good news: almost every analog IC company on the planet offers an 8-bit A/D chip of some flavor.

ak
 
Last edited:

Thread Starter

mikerodi

Joined Jul 6, 2009
56
This is what I got from post #1:

1. Input: A pot. Type, value, degrees of rotation, single/multi-turn, etc. = don't care, don't care, don't care, don't care, etc.

2. Output: 7-bit binary serial or parallel word that continuously represents the percentage rotation of the pot. 0% = 0 decimal. 100% = 127 decimal. If the pot is moving, the number changes; if the pot is stationary at any position, the number sits at the value for that position.

3. What happens to the 7-bit word? MIDI, USP, SPI, blah blah blah - Not today's problem.

In concept, this can be done with a differentiator, comparators, and two, 4-bit up/down counters. But in practice it will be a bear to calibrate, and you will need high-stability parts plus temperature compensation to keep the output from drifting with time and temperature. Sounds like a great analog computer training exercise from the 1950's.

Wally is right - an A/D circuit that is clocked autonomously and continuously will do what you want. In software analogy terms, the pot is being pinged by a polling routing.

Bad news: there is no standard 4000-series chip that will do this. Good news: every analog IC company on the planet offers an 8-bit A/D chip of some flavor.

Does that sum up things?

ak
Yes! Thank you
 

Thread Starter

mikerodi

Joined Jul 6, 2009
56
I realize it’s an ambitious circuit, I will be back with a circuit or part of a circuit... meanwhile, I would like to thank everyone for their support...
 

Thread Starter

mikerodi

Joined Jul 6, 2009
56
This is what I got *** from post #1: ***

1. Input: A pot. Type, value, degrees of rotation, single/multi-turn, etc. = don't care, don't care, don't care, don't care, etc.

2. Output: 7-bit binary serial or parallel word that continuously represents the percentage rotation of the pot. 0% = 0 decimal. 100% = 127 decimal. If the pot is moving, the number changes; if the pot is stationary at any position, the number sits at the value for that position.

3. What happens to the 7-bit word? MIDI, USB, SPI, blah blah blah - Not today's problem. Front end now, back end later.

Does that sum up the question?

If yes, then yes. In concept, this can be done with a differentiator, comparators, a clock, and two, 4-bit up/down counters. But in practice it will be a bear to calibrate, and you will need high-precision / high-stability parts plus temperature compensation to keep the output from drifting with time and temperature. All analog components and passives (resistors, capacitors, etc.) would have to be 0.1% tolerance or better; easy for resistors, very hard for capacitors. Sounds like a great analog computer training exercise from the 1950's.

I agree with Wally - an A/D circuit that is clocked autonomously and continuously will do what you want. In software analogy terms, the pot is being pinged by a polling routing.

Bad news: there is no standard 4000-series chip that will do this. Good news: almost every analog IC company on the planet offers an 8-bit A/D chip of some flavor.

ak
Taking this moment to reply to your message in more detail. My idea was precisely this one as I couldn’t find a chip (A/D converter) that would do this, though the name of the chip itself is quite self explanatory! I’m going to try this “clumsy” 1950s alternative anyway because, as you said, it’s great training! Doubt I’ll be able to obtain all 128 pulses, but it would be exciting to see pulses continuously generated by turning a pot. As for the actual project, the A/D converter will definitely simplify things....
 

jpanhalt

Joined Jan 18, 2008
11,087
I think you are missing the difference between starting with a bare metal ADC as a hobbyist, creating code to drive a display showing actual voltage, and control a MIDI compared to the ease of using a single chip device like the ICL7106/7107 and other voltmeter chips. Those chips all give a digital output, as they all drive some sort of display. Those specific chips drive 7-segment displays, but there are others.. They all output code that is binary, but not the ordinary binary with which you are probably familiar. That is, not all binary sees b'00000100' as the next increment from b'00000011'. See: https://www.electronicshub.org/binary-codes/

Conversion from the code outputted by those chips to BCD is extremely easy. Going from BCD to something your MIDI may want is not difficult either. In my experience and in the experience of others I know who are professionals in the field, getting the guts of a program to work often takes a lot less time than getting the human interface to work. You have at your local distributor a single-chip, off-the-shelf solution to the human interface.

Good luck, but I have a strong suspicion that getting your "pot" and bare metal ADC to get the display you want is going to take a long time.
 
Top