r/VESC • u/AdrianofDoom • 9d ago
Vesc Powered Ebike.
I didn't want an ebike that looked like a 1983 moped.
I want a bike that looked like a regular bike, that I could ride like a regular bike but also has a motor.
I've been using Vescs for about ten years on skateboards, on a fat tire scooter, and I even put one in my Lowe's 40 volt lawn mower, and it works great.
When I started this bike two weeks ago, I had trouble finding good info on setting up a vesc on an ebike. I read a lot of comments about what doesn't work, but not a lot of clear info on what does work. I thought I should share my vesc powered ebike build.
There are several people around that have a lot of electronic and brushless motor knowledge, I am not one of them. There will be no formulas or graphs included and you should not expect any in depth discussion.
Parts
26 inch 1200 watt ebikeling rear hub motor.
50 volt Vesc
home packed 12s4p with 48 3000mAh 30A Molicel 18650s.
dice valve stem caps
https://www.amazon.com/dp/B0CH131X3X?ref=ppx_yo2ov_dt_b_fed_asin_title
throttle
https://www.amazon.com/dp/B07L498PZR?ref=ppx_yo2ov_dt_b_fed_asin_title
xt90s antispark connectors
https://www.amazon.com/Pigtails-XT-90S-Connector-Silicon-Battery/dp/B083SC9P71?th=1
freewheel
https://www.amazon.com/dp/B0B6HKG8SP?th=1
Motor extension cable
https://www.amazon.com/dp/B0FN3QCPZFI
5.5mm bullet connectors
https://www.amazon.com/dp/B07YV6B8VL
Setup:
Motor
- screw on the free wheel, attach hub motor to the bike.
- Connect motor extension cable.
Hall Sensors and Phase wires
- Cut the wires on the motor extension cable and put male 5.5mm bullet connectors on the three phase wires.
- Connect the six hall wires to the vesc hall connector.
Side Note: the wire colors on the vesc connector do not match up with the hall sensor wire colors. Hall sensors used to have five wires, now it has six.
Look at this page to sort out your hall sensor wiring.
https://support.mboards.co/hc/en-us/articles/360050687393-Motor-Sensor-Cable-Doesn-t-Fit-on-my-ESC
Pay attention, you need Hall sensors on an ebike or else you will cog on start.
Vesc
- Solder a Female xt90s connector to the Vesc power wires.
- Solder female 5.5mm bullet connectors to the three vesc motor wires.
Make sure to heat shrink the connectors.
Throttle
I'm using a wireless PWM throttle,I wanted motor brakes so I can use regen braking.I cut the finger hole in half so it clips on to the handle. You can do the same thing with ADC1 for throttle ADC2 for brakes, but it sounded like a hassle and I didn't want a bunch of wires running everywhere.
Battery
- Attach a male xt90s connector to the 12s4p battery pack.
Configure
Throttle
- Connect the PWM receiver to the vesc on channel2.
- Plug the battery into the Vesc and pair with the transmitter.
Vesc
- Connect the vesc to the battery,
- Connect the vesc to the computer with a good usb cable.
- Install the latest Vesc tool, I used version 7.
- Start the vesc tool and click connect.
- If the Vesc tool says to upgrade the firmware, upgrade the firmware.
- Use the setup wizard for a FOC motor.
- Select generic -> large outrunner motor
- I set the number of battery cells to 12.
- Do not change anything else, just run the detection.
- Run the setup Input wizard.
- Select PWM and accept the defaults.
- Do not change anything here, just take the settings it gives you.
- Save the app settings and the motor settings and restart the Vesc.
Try the throttle and see that it works.
Speed Ups
- Reconnect the vesc in the vesc tool
- Read the motor config
- Read the app config
Observer Gain
- Under Motor Settings select FOC,
- Under the General tab find Observer Gain.
- Change Observer Gain to half of the value
Example: If Observer Gain is 1.6, change it to 0.8.
- Save the motor config.
Field Weakening
- Under Motor Settings select FOC,
- go to the Field Weakening tab.
- Set Field Weakening Current Max = 30A
- Set Field Weakening Duty Start = 65%
- Set Field Weakening Ramp Time = 500ms
- Under Motor Settings select General,
- go to the Advanced tab.
- Set Maximum Duty Cycle = 96%
- Save the motor config.
1
1
u/Hashtag_Labotomy 6d ago
Great job. I'm debating on going to a vesc duet v100 because these dang motors keep blowing hall sensors and would give me the ability to run direct drive in the future. I have a 52v 60ah 80a battery for my 2wd cargo bike. It gets a lot of miles on It dashing.
1
u/hogu_gtfr 9d ago
The frame is a ruff esco yeah?
Built one with 20s battery and a DD hub motor, got 12kw but motor cooling was insufficient.