Go Down

Topic: Arduino as a digital pot/matrix mixer etc (Read 485 times) previous topic - next topic

the19thbear

Ok.
Warning!
I have no experince with code, and I only have basic electronics knowledge, but have built DIY kits in the past and can follow signal flow in a schematic, and can tell a resistor from a pot/transistor etc.

So I have been toying with an idea.
I have an analog device, that does not have memory, but I would love it to have memory:)

Could I use an arduino+whatever shield i may need?

I want something like this:

Analog device control pot (pot/switch etc) send to arduino, and then to analog device circuit board.
The arduino would be in between.

My idea would be to take a specific pot on the device, and note its ohm value, and note if the pot was linear etc and then emulate that on the pi.
I would then desolder the pot and in its place, would place a pot that is not connected to the device, but goes directly a arduino in port. Then the arduino would control a transistor (or whatever) that is connected to the solder points where the original pot was soldered in.

So basically I want the pi3 to function as a digital pot. (many pots and switches actually, about 53 total).
I *DONT* want to digitize any of the devices analog signals. I only want to control them/amplify them, in accordance with what the original analog pot did (linear/log etc).
What specific shield could be used?
What about the transistor thing?
Could you point me in the right direction post some links etc, pretty please:)

Thanks!

the19thbear



This seems like a very clean solution.


I found a pot that is a quad pot and has 1024 values. As for resolution, i think that is fine, and will produce no stepping. https://uk.rs-online.com/web/p/digital-potentiometers/1610584/


I am worried by the clicking (make break behaviour). Do I avoid that by selecting the right digital pots?


Is anything else needed pr pot? (im thinking about the total cost here), other than a computer and wires?

Something that is very important for this project, is lag (the pot should react very fast, under 3ms or so), and it should have no stepping.



I only need 100k lin pots for this projects, and then some switches, but I assume the switch could be programmed to tell the digital pot to just fully open and close, and thereby act as a switch, digitally.



And on a side note: It would be amazing if all the pots could send/recieve midi as well, but that will be done in code by the computer, and I have no idea of how hard that actually is to do:)

Thanks!

Grumpy_Mike

#2
Oct 21, 2018, 07:08 am Last Edit: Oct 21, 2018, 07:10 am by Grumpy_Mike
Quote
and it should have no stepping.
All digital pots have stepping, that is how they work. Whether that is audible is dependant on the circuit surrounding it.

Pots do not send or receive MIDI. They are just pots.

One problem with digital pots that beginners often miss is that they can not handle voltages that are not referenced to the ground of the computer and the maximum voltage is often constrained to the voltage of their power supply.

Now is it an Arduino you want to use or a Raspberry Pi, you talk of both in your posts?

As regards that specific pot are you comfortable with soldering those surface mount packages? Many a beginner would not be.

the19thbear

Thanks for taking the time.

I understand that digital pots have stepping, but the more steps the better.
I dont know if you can filter out the steps in code, or if you need to apply a hi-pass, in hardware,  afterwards to filter out the steps.

I understand that they dont output midi out of the box. My logic is, that once you digitize a value, you should be able to convert that to midi with code - but thats my basic logic! I have no coding experience:)

I am looking into using either the Pi or the arduino. I already have a pi3 lying around, but apparently didnt think straight, when I wrote my original message, and by mistake wrote pi. My bad!

I have soldered quite a bit, but never anything that small. I'm more thinking about the principle of using digital pots, if that's the way to go, or maybe there is some other technique that is better.

After i posted abou the digital pots, I saw the voltage thing. I found other pots that operate from 1.8 to 36v.

https://www.mouser.dk/ProductDetail/Microchip-Technology/MCP45HV51T-104E-ST?qs=sGAEpiMZZMsX%252bY3VKDPZyCU7AZzp3iUEYCFgI9JIJlXNbsckjo4zUg%3D%3D

It seems like the maximum voltage at the pot points, in my device, is +15v there are also other points that are -5 v.
I can use the same pot for both scenarios, right? the -5/+15 is just polarity, and when the pot specifies that it goes from 1.8 to 36, that also means -1.8 to -36 right? Or maybe im assuming things:)


Thanks again!

Grumpy_Mike

#4
Oct 21, 2018, 10:37 am Last Edit: Oct 21, 2018, 10:38 am by Grumpy_Mike
Quote
I dont know if you can filter out the steps in code,
Sorry you can't.

Quote
or if you need to apply a hi-pass, in hardware,  afterwards to filter out the steps.
That is not always possible, it depends on what circuit the pot is in.

Quote
the -5/+15 is just polarity, and when the pot specifies that it goes from 1.8 to 36, that also means -1.8 to -36 right?
No.

Read the data sheet for that pot. You have three supply voltages. VL is the supply voltage for the I2C logic signals. This must not be higher than the V+ which is a voltage that corresponds to the highest voltage you want any of the three pot terminals to be at. The V- is the lowest voltage you want the pins to be at.
from the data sheet:-
Quote
V+ = 10V to 36V (referenced to V-);
V+ = +5V to +18V and V- = -5.0V to -18V (referenced to DGND -> ±5V to ±18V),
also this note applies:-

Quote
V+ voltage is dependent on V- voltage. The maximum delta voltage between V+ and V- is 36V. The digital
logic DGND potential can be anywhere between V+ and V-, the VL potential must be DGND and V+.
So to power this you need what is called a split supply, one that has three wires and gives positive and negitave voltages, referenced to a third ground voltage.

Quote
My logic is, that once you digitize a value, you should be able to convert that to midi with code
Yes although there is not much to it. You simply have to have the value in the range 0 to 127 and then include that value in the appropriate MIDI message, like note on or Controller, or Program change MIDI message.

the19thbear

#5
Nov 01, 2018, 09:53 am Last Edit: Nov 01, 2018, 10:41 am by the19thbear
ok, so i'm thinking:
Maybe i should use normal multiplexing on the input side with a 74HC4067.

Then use a dac on the output side, via demultiplexing, only for the pure DC voltages, and then use digital pots for the ac voltages? Can i just use the built in one, and then demultiplex it?

 Is this a stupid way to go? Complex? More expensive?

Im aiming for easy and cheap:)


Ideally, i would like high resolution in steps on the in/output side, say 1024.

Anyone could point me to a dac i can use/coding/thoughts etc?

Thanks:)

Grumpy_Mike

Quote
Then use a dac on the output side, via demultiplexing, only for the pure DC voltages,
I can't see where that gets you. The output voltage will only be on the one demultiplexed output at a time, it will not be latched.

You could put a sample and hold circuit on the output but that will decay over time periods of milliseconds.

Quote
and then use digital pots for the ac voltages?
Not sure what you mean by that.

Go Up