Let's Make Robots!

Duplicate potentiometer with sonar

 

Hi everyone,

I am quite of a newbie in electronic but I learn quickly, here is my project:

I have a small amplifier wich is commended by a potentiometer. For some reason I would like to duplicate this potentiometer with a sonar (such as this). The potentiometer is a B50K (as this one apparently) so that if you turn it completly counterclockwise it switches the amplifier off. It's a logarithmic potentiometer I think.

    -First, the idea is that I could use the sonar or the normal potentiometer equivalently (parallel assembly?)

    -Secondly, I think I'd set a small switch (wich one?) that makes the sonar inactive so that the device is commanded with the normal potentiometer only.

    -Finally, the way I would like the sonar to work is as follow: if you pass your hand just above it (at around 5cm) it acts as a switch (on/off), but if you putt your hand higher (from 20 to 60cm) you can adjust the volume by moving your hand verticaly.

 

The main question is what PLC (picaxe I guess) do I need? I'll upload a diagram of how I plan to make it soon, if anyone want to drop an eye on it... :)

Thank you in advance.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I would not promise any of my concepts will work.

That said, the 08m has serial tx/dx, which could talk to the digital pot. The 08m also has 3 more pins that can be analog or digital inputs or digitial outputs. And, finally, it has another pin that can be a digital input. Counting those up, the serial for the pot, single I/O for the sonar, single analog input for the pot (for a typical pot, you tie one side high, the other side low, and the center to the analog input). The 2 source pins confuse me. I don't know what you mean for sure.

And, for the 'stupid' question, my answer is a noncommital, "I don't know." :) I would guess, that as ultrasonics work in the 40kHz range that audio should not affect the functioning of the sonar.

Re: the controller board
The board you linked to is really meant for powering servos at 6v, Rather than install an actual voltage regulator they just pull the 6v to the servo connectors and then use a diode to step down the 6v to about 5.3v for the PICAXE. You don't really need a prefabbed board for this, if it works as I think it should. You would need a 5v regulator and the ability to make your connections to your external parts. In my opinion you would be better learning a bit of the electronic concepts and then constructing a board for yourself, even if it is just a point to point wired mess on teh back side of some perfboard. Although as simple as I am guessing the circuit is you might be able to get some help with the circuit layout and maybe find someone willing to fab a board for you. A hackerspace might be a good place to look if you have any near you.

 

you should be able to easily do what you want with a 08M PICAXE. You should/could also add a digital pot. From there connect both the pot and the sonar to 08M inputs and the digital pot to an output. As you would be using the digital pot for actual control, its specific resistance would be less important. If you require a switch to select one or the other just make sure that it will let you select one of 3 positions and disable the power to the option you don't want to use.

After looking at the sonar you selected, you may want to consider something more in line with the typical 5v digital logic supply. I would suggest something from here.

These are just my suggestions as I see your project.