I have a "pedal" that controlls the speed of a gocart. If i push it the motor goes faster if i release it the motor goes to 0 rpm.
I figured out that if i put a analog potentiometer on the "green wire" coming from the pedal going to the speed controller i can adjust how much total speed the gocart needs to have. The voltage of it is 0.5 V when the pedal is not pressed and 2.5 v when fully pressed.
So now I wanted to controll the potentiometer digitally with the ds3502 on a raspberry pi. So i wired it up like this https://cdn-learn.adafruit.com/assets/assets/000/078/833/original/adafruit_products_rpi_fritz.png
- Pi 3V3 to sensor VIN
- Pi GND to sensor GND
- Pi SCL to sensor SCL
- Pi SDA to sensor SDA
I followed the tutorial and all works fine, the software works, and the wiper changes the voltage just fine.
But now i want to connect the green pedal wire to it. I tried all combinations of it between RL/RH/RW and the only that kinda works is connecting it to RL and RW. But then i realized even then the ds3502.wiper is set to 127 the motor only goes like 60% of its total power. I don't understand why?
Here is a video of the setup: Dropbox - WhatsApp Video 2020-10-20 at 17.47.42.mp4 - Simplify your life
I assume that the problem is that the ground from the gocart pedal needs to connect to the ground of the raspberry too? But why does it matter? It works just fine with the analogue potentiometer. I am puzzled and need your help. I tried googling all sorts of things but I don't know what to look for.