I built home made ebike using rc brushless motor, rc esc and arduino UNO with potentiometer to control it.
Potentiometer is connected to aduino alanog port0, v5 and gnd
ESC was connected to digital port 7 and gnd, i didn't connect red wire because esc has bec.
I was controlling it with my hobbyking rc car esc for past year without problem.
However recently it died due to abuse, wire pulling and age, So I decided to go for HV opto esc this time because i wanted to increase power, (my old esc could only support 6s lipo but motor is capable of 12s)
And here my problem starts:
New opto esc:(Aerostar Advance OPTO ESC 120A) doesn't work with my setup anymore, so I took my old rc radio with receiver to test and calibrate esc - calibration was success and motor was running fine with rc radio.
That's where I made my discovery. when I plugged only yellow and black cable to rc receiver, esc wouldn't recoginse it same as arduino, however when I plugged red wire into reveiver it worked straight away.
I guess for some reason opto esc need 5v input. After that i tried to supply 5v to esc from arduino, still doesn't work.
Also I also used arduino to read serial data from rc receiver, I recorded it in miliseconds and provided same value to my sketch.
I'm running out of ideas? is it possible that adruino can't support opto esc without bec?
This sketch was running fine on old esc but maybe need modification? I'm not very good at programing.
ebike_control_esc_potentiometer.ino (648 Bytes)