Basically the throttle connection has 3 wires (5v+, ground, and signal). I'm assuming I just need to intercept the signal wire with the arduino and vary that signal to the motor controller.
My question is, can the Arduino interface with this type of motor controller (in the link above), and manipulate throttle position?
Thank you for taking the time to read, and I truly appreciate any feedback (whether positive or negative).
Do you have a manual or or more detailed specification? From your link I can't see any information about what control signals are needed so it's impossible to say what would be required to run it from an Arduino.
Plus I have no real idea what "a game engine such as Unity 3D" is or how it might control the Arduino.
hmmm... I'm not seeing any info there regarding using arduino to control throttle position (which is essentially what I want to achieve.
Basically the throttle connection has 3 wires (5v+, ground, and signal). I'm assuming I just need to intercept the signal wire with the arduino and vary that signal to the motor controller.
I have very little arduino experience; basically the biggest thing I ever did was control speed of a treadmill motor by sending PWM signals to the control board.
I have some programming experience in Unity (C# and Javascript), Java, and HTML/PHP.
Very little electronics experience But a potentially big project which I hope to learn a lot from!
From this website, and looking at the throttle wiring, it appears that the 5v wire is constant and the signal wire varies between 1 and 4 volts, which I believe is the wire which I will need to intercept with the Arduino.
The link in Reply #7 does not give a complete wiring diagram and without that I certainly cannot interpret the instructions.
I'm not going to watch 10 minutes of YouTube on your behalf - sorry. But from looking at the first few seconds it does not seem to be about electric motors for scooters. I could see a throttle valve which suggests it is about control of a petrol engine.
Unfortunately there is very limited wiring information for this 48v brushless motor on the Internet, so I'm just trying to pull from multiple sources to get an understanding of the system before I purchase it.
From my limited research so far, it would appear that the signal wire from the throttle pedal is what I will use to manipulate the motor's speed using Arduino, since this wire is 1 to 4v. The other wires which control the speed of the motor are the Hall wires, which are all 48v.
You need to connect ground to a ground pin on your arduino and the signal to one of the digital pins with pwm (should have ~ sign next to it). Then import the servo.h library and control it like a servo.
The code lines you need to include are:
#include <Servo.h>
Servo ESC;
void setup()
{
ESC.attach(2);
}
void loop()
{
ESC.writeMicroseconds(1000);
}
Change the micro seconds to between 1000 (0% throttle) and 2000 (100% throttle) and the "2" to whichever pin you attach the signal pin to
hey, do you think it's possible to use the arduino as a switch to essentially stop throttle from manipulating motor controller, for a specified time (say 3 seconds), then re-enable that function?
I'm thinking to have the arduino connected between the throttle and the motor controller, to essentially work as a switch that opens and closes the connection between throttle and motor controller.
Since the signal is only +1 to +4 volts, I believe it should work fine?
paulsamaroo:
hey, do you think it's possible to use the arduino as a switch to essentially stop throttle from manipulating motor controller, for a specified time (say 3 seconds), then re-enable that function?
I'm thinking to have the arduino connected between the throttle and the motor controller, to essentially work as a switch that opens and closes the connection between throttle and motor controller.
Since the signal is only +1 to +4 volts, I believe it should work fine?
What are your thoughts?
I'm a little confused as to what you want to achieve, however I'll take a stab that you want to feed the 1-4 vdc signal from the throttle to an analogue input of the Arduino rather than directly to the motor speed controller.
It follows that you can now modify the output signal (from one of the PWM outputs of the Arduino) as you wish and drive the motor according to your program, examples of such modification may be:-
Run output linearly following the input
Output follows input but 1-4vdc in gives 1-2vdc out - half speed.
Disable output, motor stops.
Ignore input and drive output regardless of it.
Increasing input produces decreasing output (invert the input).
...plus many, many other input to output relationships.
So if I were building a go-kart to let a young child use I might use option 2, and if I had several karts ready to start a race I'd introduce option 3 until the race started.
Is this what you're trying to achieve?
All are possible.
Does anyone know if it's possible to do my testing without the batteries, but rather with a 110V outlet? I've seen a 110/220V AC to 48V DC converter on amazon, but it's only rated at 10 Amps. However, the motor is rated at 28 Amps with a Maximum current of 40 Amps.
I am using Kelly controller. When I tried PWM to feed throttle input to Kelly, voltage rises steadily upto 1 V but beyond that it is unstable jumps from 5 v to 0 v and motor doesn't function. Without motor connected things are fine. So sure it's something with Kelly or motor connection.
Using servo microseconds, I am getting constant 5 v on pin. Tried reducing 2000 to 100 also. Current ratings seems consistent between Arduino and Kelly. As per Kelly manual even a potentiometer can be used for throttle.
Anybody can guide me?