By chatrac - Tue Nov 17, 2020 7:36 pm
- Tue Nov 17, 2020 7:36 pm
#43554
Hi All,
I am a complete newbie to the Arduino Uno so forgive me if I come across as a numbty
I have built a golf trolley using repurposed hoverboard motors using two bldc motor controllers and a manual dual 10k pot. This is working well and now I want to attach an RC to this using the Dual Digital Potentiometer (100K) DFR0520 via an Arduino Uno.
The RC I am using is a cheapo unit (only because it was the smallest I could find) that is a 4-channel unit as follows:
Channel 1 (forward) - Left and right output - +3v to +5v output (I will control speed with button presses i.e. full speed press, unpressed cuts the power so speed will not be incrementally controlled i.e. it is either on or off at a fixed top speed)
Channel 2 (reverse) - Left and right output -3v to -5v output (I will probably not use this as Arduino cannot accept -ve voltages)
Channel 3 (Left) - Left output +3v to _5v and right output -3v to -5v (I will use diodes to filter the -ve voltage to protect the Arduino Uno)
Channel 4 (Right) - Right output +3v to _5v and left output -3v to -5v (I will use diodes to filter the -ve voltage to protect the Arduino Uno)
I will be using the default code for the digital pot I am using i.e. Dual Digital Potentiometer (100K) DFR0520 controlled through the Arduino Uno analog ports. Code is viewable here: https://wiki.dfrobot.com/Dual_Digital_P ... U__DFR0520 under the second article -- "Template Code for MCP42100"
Now this is where I am struggling as a complete novice newbie and need some assistance. I have been through the various options and tutorials and to be honest I am more confused than when I started on what code to insert where to enable the the Arduino analog ports to accept the RC inputs above.
The sample code I am able to sort through and can control the DFR0520 pot without an issue via my PC, so all I need help with is the analog port coding to cut the cord
Any help with this will be appreciated.
Many thanks,
Chatrac
I am a complete newbie to the Arduino Uno so forgive me if I come across as a numbty

I have built a golf trolley using repurposed hoverboard motors using two bldc motor controllers and a manual dual 10k pot. This is working well and now I want to attach an RC to this using the Dual Digital Potentiometer (100K) DFR0520 via an Arduino Uno.
The RC I am using is a cheapo unit (only because it was the smallest I could find) that is a 4-channel unit as follows:
Channel 1 (forward) - Left and right output - +3v to +5v output (I will control speed with button presses i.e. full speed press, unpressed cuts the power so speed will not be incrementally controlled i.e. it is either on or off at a fixed top speed)
Channel 2 (reverse) - Left and right output -3v to -5v output (I will probably not use this as Arduino cannot accept -ve voltages)
Channel 3 (Left) - Left output +3v to _5v and right output -3v to -5v (I will use diodes to filter the -ve voltage to protect the Arduino Uno)
Channel 4 (Right) - Right output +3v to _5v and left output -3v to -5v (I will use diodes to filter the -ve voltage to protect the Arduino Uno)
I will be using the default code for the digital pot I am using i.e. Dual Digital Potentiometer (100K) DFR0520 controlled through the Arduino Uno analog ports. Code is viewable here: https://wiki.dfrobot.com/Dual_Digital_P ... U__DFR0520 under the second article -- "Template Code for MCP42100"
Now this is where I am struggling as a complete novice newbie and need some assistance. I have been through the various options and tutorials and to be honest I am more confused than when I started on what code to insert where to enable the the Arduino analog ports to accept the RC inputs above.
The sample code I am able to sort through and can control the DFR0520 pot without an issue via my PC, so all I need help with is the analog port coding to cut the cord

Any help with this will be appreciated.
Many thanks,
Chatrac