VESC Analog throttle control

General topics and discussions about the VESC and its development.
wrenthereaper
Posts: 3
Joined: 06 Apr 2017, 02:37
Location: California

VESC Analog throttle control

Postby wrenthereaper » 06 Apr 2017, 03:03

Hey everyone, I'm new to the hobby and I'm building an electric bike. I've purchased this VESC BLDC Speed Controller http://diyelectricskateboard.com/diy-electric-skateboard-kits-parts/vesc-the-best-electric-skateboard-esc/

And I'll be using a classic electric scooter handlebar throttle which I'm pretty sure is just a potentiometer. I've downloaded the BLDC tool too.

Would someone be so kind as to help lead me in the right direction here? I'm not sure how to go about setting up the VESC so that it will control my motor using just an analog signal. I've tried searching various forums and reading lots of posts but I couldn't find any relevant info.

Quezacotl
Posts: 24
Joined: 05 Apr 2017, 11:06
Location: Finland

Re: VESC Analog throttle control

Postby Quezacotl » 06 Apr 2017, 10:46

I asked that just yesterday: viewtopic.php?f=6&t=648
And i got an answer;
-Hall-sensor or potentiometer, doesn't matter as long as you get voltage out. But if you have the most common throttle, it is hall sensor. You can hook it up to 3V3.
-connect the output of the throttle to ADC pin(the middle of the 7pin)
-in the BLDC tool application, choose to use ADC as plugin(in application" tab)
-and in ADC column, choose "duty cycle", and set voltage range as 0,60V - 2,60V

That's what worked for me.

wrenthereaper
Posts: 3
Joined: 06 Apr 2017, 02:37
Location: California

Re: VESC Analog throttle control

Postby wrenthereaper » 06 Apr 2017, 17:50

Thanks for the response! Although I'm still confused.

This is the throttle I purchased. http://www.banggood.com/Motorcycle-Black-Electric-Scooter-Bike-Throttle-Grip-p-947953.html
I assumed it was a potentiometer but I wouldn't know how to identify a hall-sensor. I also don't know what you mean by 3V3. The throttle has three wires and I'm not entirely sure where to solder them too. I believe they're the positive, negative, and signal wires, correct?

I'm also not sure which pin you're referring to when you say the middle pin of 7. Is it this one?
Image Would that be where the signal wire attaches to? What about the power cables for the throttle?

I'm also very unfamiliar with the BLDC tool. I'm pretty sure I found all the right ADC settings you're talking about although I'm curious as to why you'd set the max voltage to 2.6V instead of closer to 5V. Would that reduce the usable range of motion for my throttle?

Quezacotl
Posts: 24
Joined: 05 Apr 2017, 11:06
Location: Finland

Re: VESC Analog throttle control

Postby Quezacotl » 06 Apr 2017, 21:11

I use 3V3 as 3,3 Volts. It's more clear, just like "100nF" instead of ",1uF" and so on.

That throttle is indeed hall sensor. Red as positive(3V3), black as negative(GND) and the remaining as output. (Usually)
Don't use that handle on the winter, it shatters to thousand of pieces when cold enough :lol:

Middle pin of the only 7-pin connector on the board. And yep, that one on the picture. And when you flip it over, there are markings on the board. What you need is ADC, GND and 3V3.

Those settings i told about are for similar chinese throttle handle that you have. Those are the best i tested so that whole throttle area gets used. I don't know why those settings behave like that. You are free to experiment yourself ;)

wrenthereaper
Posts: 3
Joined: 06 Apr 2017, 02:37
Location: California

Re: VESC Analog throttle control

Postby wrenthereaper » 06 Apr 2017, 23:14

Your advice is greatly appreciated, thank you!

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: VESC Analog throttle control

Postby rew » 07 Apr 2017, 08:50

Quezacotl wrote:I use 3V3 as 3,3 Volts. It's more clear, just like "100nF" instead of ",1uF" and so on.
Just yesterday we came across a resistor container with 4.7k on the label. The label was a bit faded so we wanted to replace it. We almost replaced it with "47k" because we missed the "." in 4.7k. The new label reads 4k7.

I had one of those throttles as well. I mounted it about week before I got my ESC working on my bike. It worked for like two days before it broke... :-( I'm not impressed with the quality.

Quezacotl
Posts: 24
Joined: 05 Apr 2017, 11:06
Location: Finland

Re: VESC Analog throttle control

Postby Quezacotl » 07 Apr 2017, 20:25

I have had same as this for a less than year and it even survived the winter :)
http://www.banggood.com/3-Wires-78inch- ... mds=search

User avatar
Ecyclist
Posts: 30
Joined: 24 Jun 2017, 01:26
Location: San Diego, CA

Re: VESC Analog throttle control

Postby Ecyclist » 24 Jun 2017, 01:39

Quezacotl wrote:I use 3V3 as 3,3 Volts. It's more clear, just like "100nF" instead of ",1uF" and so on.

That throttle is indeed hall sensor. Red as positive(3V3), black as negative(GND) and the remaining as output. (Usually)
Don't use that handle on the winter, it shatters to thousand of pieces when cold enough :lol:

Middle pin of the only 7-pin connector on the board. And yep, that one on the picture. And when you flip it over, there are markings on the board. What you need is ADC, GND and 3V3.

Those settings i told about are for similar chinese throttle handle that you have. Those are the best i tested so that whole throttle area gets used. I don't know why those settings behave like that. You are free to experiment yourself ;)

Thank you for your post. I was looking for it all over internet.


Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests