Replace Potentiometer in PWM Motorcontroller with Arduino Uno

Hi:grin:
I wanted to build a motorized beer barrel, so I can walk around with friends and don´t have to carry beer all the time.
To accomplish that, I bought two motor-controllers (pictures are attached below). One for driving forwards and backwards and the other one for steering.

I replaced the switch on both motor controllers with 4 relais, so I can controll the direction of both motors but I don´t know how to replace the potentiometer. It´s a normal potentiometer, with one pin with 5V, one pin with GND and one Signal Pin. Also there are two extra pins because the potentiometer has a switch to turn off the motor controller completely but I don´t need them so I connected them directly, so the motor controller is always on if it has power.

To "simulate" the 3pin potentiometer i tried to connect the 5V from the potentiometer to the GND from the Arduino, the GND from the potentiometer to 5V from the arduino and the signal input from the potentiometer to a normal PWM pin on the Arduino because the motor controller can also work with PWM (There is a picture of the circut below). This worked really well and I could controll one motor, so I did the same thing with the other motor controller and connected it to the arduino but suddenly it didn´t work anymore because the 5V, that are coming from the motor controller are somehow going in another pin but not in GND on the Arduino where it should go to. Instead it probably goes to the 5V pin on the arduino and powers it, which has the consequence, that my arduino cannot work correctly.

So i wanted to ask, if there is a way to simulate the potentiometer and keep apart the circuts of the arduino and the motor controller.

A digital potentiometer is not possible, because I only have digital pins 0,1,2,5,6 (5 and 6 being the PWM Signal for the potentiometer), because i also have a NRF24 built in, so I can controll the Motors wirelessly. I think, that a MOSFET could be a right thing for my problem but I don´t know how that works. Also I havent´t been working that much with Arduinos (just so you know) :slight_smile:

Schaltplan Alt.png

Schaltplan Alt.png

Unless you can split your posting into cognizant paragraphs, I am not going to bother reading it.
Paul

Paul_KD7HB:
Unless you can split your posting into cognizant paragraphs, I am not going to bother reading it.
Paul

Sorry i hope its better now :smiley:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.