Make a wired potentiometer on a PWM, wireless

I wasn't sure if this would be best to post here or in the Motors category.

I have this PWM:
https://www.amazon.com/gp/product/B01HEXJUX8/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1

I've been working on trying to make the pot on it wireless. The purpose of this PWM is to control the speed of a trolling motor. The amperage draw can reach 40 or 50 amps.

I've made it through reading values from the pot with a digispark (attiny85 based board), and transmitting the digitally converted value through a pair of NRF24L01s and receiving the value on an arduino board. I had originally hoped I could just do an analogWrite of that value to the sensor pin where the pot originally plugged in, but that does not work.

I suspect it is because the Arduino's analogWrite is just a PWM itself, not actually outputting an analog value. So this is where I'm stuck atm.

Not sure what I would need to duplicate this value in a way that the controller on the PWM will read it properly and adjust the motor speed accordingly.

Thanks for any advice.

So, I think I did come up with one thing that I could do, but not sure if it's a good or even safe idea. I was reading about digital potentiometers and how they work. Read that lot of them work with resistor step ladders, so I got the idea to try that.

The pot is a 100k pot, and I determined that it's voltage reference on the PWM is 5 volts so that works nicely with a standard arduino voltage. So, what I'm doing is taking 10 x 10k resistors, and dividing the voltage among them to replicate the resistance within 5k.

If I put them all connected to their own pins on the arduino, and initially have them as HIGH, and set however many to LOW that it takes to match the pot's resistance within 5k ohms, the resulting voltage is roughly the same as it would be from the 100k pot.

So, to those out there more knowledgeable than me. Does this seem like a good idea? Is it a safe idea?

Hi,

Its not clear how you are connecting the 10k's to get your desired output voltage. However you should Google "R - 2R ladder network". It will show how a Digital to analog converter (DAC) works.

Now a couple of thoughts:

  1. Do you know how the original 100k pot is connected? i.e as a potentiometer or as a variable resistor.
    The former is a 3 wire device the latter uses only 2 of the 3 wires.

  2. If it works as a potentiometer (aka pot), it may respond to a simple input voltage on the center connection of the existing pot. If so you might be able to simply RC filter the PWM output (I believe the default frequency is in the high 200's but could be different.

  3. If you wanted to get real fancy you could simply add a serial DAC.

Goodluck

Can you measure the voltage across the pot with the power on?
I would feed the PWM from the Arduino output pin to the input of an optocoupler, then low-pass filter the opto's output and feed to pot input on the drive, but without knowing voltage levels involved,...?

steven6282:
So, I think I did come up with one thing that I could do, but not sure if it’s a good or even safe idea. I was reading about digital potentiometers and how they work. Read that lot of them work with resistor step ladders, so I got the idea to try that.

The pot is a 100k pot, and I determined that it’s voltage reference on the PWM is 5 volts so that works nicely with a standard arduino voltage. So, what I’m doing is taking 10 x 10k resistors, and dividing the voltage among them to replicate the resistance within 5k.

If I put them all connected to their own pins on the arduino, and initially have them as HIGH, and set however many to LOW that it takes to match the pot’s resistance within 5k ohms, the resulting voltage is roughly the same as it would be from the 100k pot.

So, to those out there more knowledgeable than me. Does this seem like a good idea? Is it a safe idea?

That’s not how digital pots work. The signal path is switched, so the switching elements are not switching
to GND and Vcc like Arduino pins do. You are making a crude DAC, not a digital pot. But that’s
probably going to work for this application.

Have you tried RC-filtering a PWM output from the Arduino to control this board?

The picture has 5 wires going to this 'pot'. It looks like it is more than a simple potentiometer

That pot has an ON/OFF switch (2 wires) at the CCW end of rotation, like an "old timey" radio. :slight_smile:

like an "old timey" radio. :slight_smile:

Careful there!! To many of us they are "easy to use" radios. You didn't need to read an instruction manual on how to use it.

I have one for my elderly mother, and if I could find a rotary cell phone, I'd get it too.

Thanks everyone. I honestly did not know about an RC Filter as I have not had the need of something like that before. I'll give that a shot. It looks far simpler than my crude digital to analogue converter (which btw, I did figure out that is what I inadvertently created after reading about digital pots lol).

Yep, I've got a "digital" clock radio, all you do is push a button to turn it ON/OFF, only problem is it weighs about 20 grams and when you try to push the button, it slides across the table, you have to hold it with one hand & push the button with the other, wish I had my old vacuum tube (valve) Zenith from the 1950s back.

Just got done playing with an RC Filter set up, that worked!

I used a 1.6k resistor with a .1uF cap. Seems to balance the power fairly well without noticeable delay. Did it on arduino pin 5 which if I looked up correctly is a 1khz frequency pwm.

Now I just got to transition this over to a circuit board from my breadboard hehe.

One thing I don't understand fully "why", I had to tie the ground from the PWM board into the arduino ground at the capacitor in the RC filter to get it to work correctly. Granted this won't be an issue in the end product because they will be sharing a ground anyway, but can someone explain to me why I had to do that so that I can take it into account on future things?

I'm attaching a picture of my breadboards if you can follow my mess of wires :slight_smile: On the right is the sender getting power from my pc psu converted to a bench power supply, it's a digispark (attiny85) running at 3.3 volts. On the left I'm sure you all recognize is the arduino uno, it's plugged into my raspberry pi that I use as a workbench PC. Like I said, in the end this arduino (or rather an atmega chip that I put on my circuit board, will get power from the PWM board directly (it's a 5 volt power supply on the ground / power pins at the pot plugin).

Oh and you can ignore the two wires going from the pot to the PWM board, I was just using the power switch portion on the PWM board side so that I wasn;t constantly draining my 12v battery that the trolling motor and PWM board is connected to off picture.

Hi Steven6282,
I’ve found this thread as I have almost exactly the same pwm board, with a pot, powering high amp draw motors.

Sounds like you’ve been through quite a few options and have been thorough!

The images you posted don’t show on the thread, are you able to re-post?

Also, did you managed to transition your bread board over? I’d love to see the finished product!

I’d like to see if it’s possible to hook up an RC receiver and transmitter to control motor speed remotely.

I fear that while steven6282 was very active on the forum here from August 2011 to September 2017, the post to which you replied was - just over 2½ years ago - the last he was seen. :roll_eyes: