Let's Make Robots!

Hacking a Pot

Hi All, it's time again for Calculon's noob question of the day!!!

For today's question, I'm hacking a sound recorder that has a "tweak" feautre on it. This tweak is a potentiometer that determines the pitch of the playback. What I would like to do is replace the physical turn-the-knob with PIC outputs, so my robot can do the tweeking itself. Is that possible?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
if it was just a simple tone generator, you could replace the pot with a couple buttons, which control how fast you output PWM (square wave) to the speaker.

- It DOES change the pitch while it's playing. It actually controls the SPEED, and (thus the pitch).

- It's not a cassette player, it's a chip.

- It looks like this:


(The user end is on the other side)

So if I understand right, a pot varies the resitance? Would that mean that I'm varying the amount of current being fed to the chip, and that's what speeds it up or down?  

Correct, POT = variable resistor

variable resistor means you can vary voltage

Voltage, Current and Resistance are like the Holy Trinity of Electronics - they are all inter-related and always affect one another, Amen

If your sound do'hicky is solid state (ie. no moving parts completely electronic) then some part of it relies on the varying voltage to determine speed.  I'm gonna guess its probably some tank circuit , which in turn is aplified to a speaker.   Or if its more sophisticated its a clock which (still based on a tank circuit) which outputs recorded data to a simple digital to analogue converter.

So at this point I imagine you saying .. geeeeze, I just want to have my bot change the pitch ... what is this guy on about.

Alright, to the meat then.

Git Her Done Instructions
Measure the voltage coming from the pot as you turn the knob.  One side will change the other will not.  Find out what the Max and Min voltage is.  See if your PIC does an analogue output, what are its Min and Max.  If they match your basically done.  Connect them, although you might want to start by putting a resistor between for safety purposes.

If your PIC has the wrong values, you can use resistors or transistors to amplify or limit the range to what your sound device expects. 

If your PIC does not have analogue only digital outputs then you can make your simple DAC .. I did, its not hard.

Good luck, and sorry for the brain dump :P

No that's all awesome info. I'll have to find out about my PIC's analog output ability. I don't think it has any ...
Can  you change the pitch while it is playing? That would make for some interesting sounds!
servos turn knobs, kinda
yeah, I thought of using a servo, but if i can cut down on the volume and weight of a servo by doing it electronically ....
A Pot basicially just changes resistance as it turns. Isn't it possible to mimic it using the PIC and have it send out a stronger or weaker signal? I wonder if the servo command would mimic this to some extent? I would need to play around, but I'm sure it can be done.

*rumbles around in a deep drawer with leftover links*

got it

And that's why I let someone else answer this one! ;-)


hi :) 

it should be possible if the pic has an analog output, or if you use a digital to analog chip.

also you should determine what kind of potentiometer it is .. if it has any label or writing, try to google it.