Go Down

Topic: How do i use a MAXIM DS1804? (Read 3327 times) previous topic - next topic



i am a newbie in arduino and want to use a D1804 digital potentiometer on a digital out. as in the arduino samples Analog=>AnalogInOutSerial i connected a potentiometer and LED and it worked fine. but instead of the LED i want to connect the DS1804 which acts then as a potentiometer.
i want to make a little synth like this here:

but replace R1 with this digital potentiometer. anyone could please help me a bit? i have no idea how to use the DS1804, how to wire it?

here is the datasheet:


i would use the example code as base for this test. but i might need to add other things like giving an impulse for the direction of the wiper and to activate the DS1804?

thank you very much


That digital pot only comes in 10K, 50K and 100K versions so you will not be able to replace the whole 1M range of the original circuit. It looks like you are making an oscillator so note that this pot only has 100 steps from one end of it's range to another so considering those two points it is not a very good replacement.
The other thing is that it is a 5V maximum signal only.

If you still want to use it then it is quite simple to use. Wire it up to three arduino outputs along with power and ground. Put the chip select output low, then put the up / down output to the required direction and pulse the inc line.
The problem here is that it will only increment / decrement the current value you will not be able to set a specific value.


Also, an oscillator in that range 1M*100n can easily be simulated by software alone.. If would be different beyond 10kHz...


yes that is correct, i want to make a little oscilator BUT with a step sequencer. 8 steps, 9 potentiometer. 1 poti for the speed and the other 8 to set the frequency of each step. like here


i know the duemillanove has not enough analog outs for this but maybe the mega? but i want to do it with 4 steps first in the duemillanove just to learn.



This  all sounds a little bit weird to me...

- Analog vs. digital outputs: The Arduino is not good in signal shaping, but it can (easily) generate 6 PWM signals with a resolution of 255. You could consider to use VCOs rather than resistor controlled oscillators.
- Multiplexing: As it looks as if the frequency need not to be changed fast, you could consider to multiplex the control for the digital pots
- Input Multiplexing: To connect 8 pots to 8 Arduino ports also looks funny to me. Why not use just one pot and a digital selection switch?


You won't run out of pins with this pot because you simply have a common direction and increment and then have separate chip enables. You can even put them through a decoder so for N lines you get to control 2N pots.
But as I said it is not a very good control. Also that relaxation oscillator circuit is not very good / stable.
Think more about a PWM output filtered and fed to a VCO. That would give you a bit more control.

Go Up