googling gives me too many options, but I don't know what I should choose. I am looking for a 1k digital potentiometer to drive with the PWM signal from the arduino. 1k is a must as I am replacing a mechanical potentiometer and trailfitting some higher value messed up the item. I found some 100-step ones, 256 step versions only for higher resistance values. I would really like more steps, low tollerance on the value and the 1k is as I said a must.
HugoW:
I am looking for a 1k digital potentiometer to drive with the PWM signal from the arduino.
Sounds very xyproblem to me.
What are you trying to achieve? Its rare that the correct solution to a problem is a digital
pot - unless you are dealing with an analog audio signal. Often the simple solution
involves a DAC, not a digipot.
Thanks for the input. Maybe I am looking in the wrong direction, let me explain what I am trying to achieve. I have a very simple 2,4GHz car transmitter and receiver, 2-channel. It has no expo settings, no EPA, mechanical trims, it’s a very simple item. The inputs, steering and throttle, are two potentiometers. Since the PCB is very small and SMD with a processor on it which is tiny, I do not feel comfortable hacking into the board. I tried putting a resistor in place of the pot and steering the tracer of the pot with a voltage, but that does not work. Obviously there is more going on inside the Tx PCB than I understand. So, I would like to replace the mechanical pots with digital ones, controlling them with the Arduino. I then hook up more pots to the Arduino:
Steering, with centre trim, EPA for left and right separate and expo.
Throttle, with centre trim, EPA for brake and throttle separate and expo on both separate.
I might put in dual rates with an additional switch. Who knows. I don’t really need this as I also have a Sanwa M12 Tx/Rx which has all the above and more, but I am learning about Arduino and this seems like a fun project. I also am thinking about fail safes, etc, maybe a multiple model memory, the possibilities are endless and should be educational (and frustrating until I get them to work).
Steering, with centre trim, EPA for left and right separate and expo.
Throttle, with centre trim, EPA for brake and throttle separate and expo on both separate.
Okay what is meant by EPA, separate and expo?
I understand centre trim, you have an extra pot to trim the main pot to centralize the steering.
You have to remember the we are not all RC enthusiasts or potentiometer experts.
Can you post a picture of your tx unit.
EPA is end point adjustment, separate means left and right can have their own endpoints. Expo(-nential) is adding a curve to the steering, for instance, resulting in a less sensitive steering near the centre / neutral point, and more agressive towards maximum throw. Dual rates mean a switch to change for instance endpionts. With that I can set a small amount of steering throw when racing, flipping the switch will enlarge the throw after I spun and need to make a U-turn on the narrow track. But you don't have to worry about that bit, it is just the output of the arduino I need to hook up to the transmitter PCB.
I tried putting a resistor in place of the pot and steering the tracer of the pot with a voltage, but that does not work.
Did you use the right value resistor? It may be sensing the current to detect fault modes.
Did you use the correct voltages to send in place of the pot wiper? i.e. did you measure what
it was using at mid-point and extremes of the pot travel? How did you generate your
injected voltage, was it definitely analog and referenced correctly to ground?
Obviously there is more going on inside the Tx PCB than I understand.
Entirely possible - it might multiplex the input pots for one thing - some details of it, photos even
might be useful.
So, I would like to replace the mechanical pots with digital ones, controlling them with the Arduino
You still need to know the voltages involved - digipots can only handle signals within their supply voltage
range.
There is 3.3V across the pots, they are both 1k. Steering straight I measure 1.65V at the runner, steering full left 3.3V, steering full right 0V. Throttle is similar but does not return all the way to zero, less brake stroke then throttle stroke on the trigger.
So I put a 1k resistor over the pad to which the pot was soldered. Next I used a variable voltage power supply connected to comon ground with the - and the + connected to the pad the runner of the Original pot was soldered to. Then I powered up the lot and made the runner pad measure 1.65V. But the steering of the car went haywire (English??) and so I feel this is not the way to go. Varying the runner pad voltage did alter the nervous steering movements of the car so something is happening, but not what I want. Hence, looking for the digital potentiometer.
Your supply might not have been isolated, or could have been a noisy switch-mode supply. Also
you have no protection for the board.
Try the same thing with a 10k resistor on the output of the supply to the wiper pad, and use a 1.5V
alkaline battery.
If that's still haywire, it could be several things, such as the board supply being very noisy,
or they have a strange way to probe the pot. In either case you will need the digi-pot approach.
I replaced the 1k pot with a 1k resistor, so over the whole 3.3V there should not be a noticable difference for the Tx. Desoldering some wiring the pads came off so I have to do some repairs to make it all function normal again before I can proceed. Although it is a high quality Kyosho item, the PCB quality is crap...
When I get the lot working again I would like to generate the wiper voltage using the PWM out of the Arduino combined with a simple circuit changing PWM into voltage. I hope that signal will be clean enough. This is the converter I will use and have used before:
The feeding voltage would be 5V coming from the Arduino, but that does not change much. I used this from 3.3V to 12 V succesfully in other projects. Whether the ripple would be small enough to be useful in this project we will have to wait and see. Or can anyone predict it from experience? I could also use an LTC2644 instead, but those things are so freaking small I have a hard time soldering them. I do have two, if anyone can advise on how to easily mount them to for instance a DIP socket, please let me know! I have ordered adapter boards from MSOP to DIP, but I am scared to solder such a small item.
surface mount soldering is easiest with solder paste (very sparingly applied) and a hot air solder-rework
station (must be temperature controlled!), or a reflow oven.
Using fine rosin-cored solder and a soldering iron can be done, but its a bit of an art and easy to
foul up. In general more flux, less solder is good advice.
Should I join any religion so I can pray before I start? Just kidding. I did SMD before by hand, but nothing this small yet.
What do you think about the idea of letting the Arduino create the wiper voltage? Do you think it is clean enough with the simple set-up, or should I use the LTC2644?
OK, I fixed the broken pcb and reset the transmitter and it is working again. I measured something weird, though. On the steering pot, the total resistance is 1k ohm. But with the steering in neutral, the resistance between the wiper and either end of the total resistor is 1.7-something ohm. That means the total resistance of the pot would be 3.5k or thereabout, and there is something with a similar resistance parallel to the pot. So, next I will desolder the pots, and measure them off-board.
Today I hooked up a 1k pot to an analog input, made a simple map sketch to a PWM output. Then I ran the output through the schematic of post #10 and put the outcome back into an analog input. Last but not least I had the value of the outocome printed to the screen. Bummer, the signal is not stable. The signal coming from the pot is, as long as I keep my hands of it, it does not change. But I set the pwm range from 0 to 169 in order to get a voltage output of 0 to 3.310V. But feeding the outcome back, without touching anything, varied at max input from 634 (= 3.044V) to 704 (= 3.421V). That is way too unstable. I hope to get the LTC2644 break out boards, soon, and I hope they will give me a more stable signal. Or if anyone has a better, more stable, yet simple PWM - analog converter schematic for me, please share.
So raising capacity should reduce ripple? I have some more 100nF ones, I'll put them parrallel to try. Besides that, I think I could cut the signal voltage in half over two resistors, would that help?
I just read an Uno board has two different PWM frequencies. Is that true, and how can I check it? I think it would make sense to use the pin 5 or 6 at 980Hz rather then the others at 490Hz to reduce the ripple. Does that make sense?
googling gives me too many options, but I don't know what I should choose. I am looking for a 1k digital potentiometer to drive with the PWM signal from the arduino. 1k is a must as I am replacing a mechanical potentiometer and trailfitting some higher value messed up the item. I found some 100-step ones, 256 step versions only for higher resistance values. I would really like more steps, low tollerance on the value and the 1k is as I said a must.
Please advise!
Cheers,
Hugo
First of all, digital pots are not controlled with PWM, but rather with data communications (i.e. TWI, SPI or even parallel).
Also, digital pots are not like mechanical pots in that you cannot have the element and wiper at any arbitrary voltage relative to ground. Usually all 3 pins of the "pot" must remain within Vdd and Vss.
If, as I'm guessing, you are trying to build a digitally controlled power supply, all I can say is "been there, done that" and I've got many more gray hairs to prove it.
I tried digital pots, I tried 10 turn ANALOG pots rotated by a stepper motor, I tried PWM and DAC's (trying to control an LM-317 with a big pass transistor current booster).
Nothing but grief.
I finally got myself a 3 to 24 volt remote adjustable switcher supply that takes a 0 to 5 volt signal to control the output from 3 to 24 volts at 10 amperes, controlled with a 328P (think UNO) and two 8 bit R-2R networks wired up as a single 16 bit DAC.
Now it's perfect. Simple, stable, reliable.
If you're NOT building a power supply, then....... nevermind...