10S custom skate ESC: testers wanted!

I just pushed the first implementation of analog throttle support:
app_adc.png
 
Considering we are discussing controlling methods, any idea what these thumb throttle for bike/scooter use? It has three wires, +, -, & Signal

Vedder, Is it possible to make this device work with the VESC?

thumb-throttle.jpg
 
GUESS WHAT?... VESC arrived...

So today i am packing orders!

hopefully get them all out today/tomorrow.

20150505-123052.jpg

20150505-131949.jpg
 
vedder said:
Just a short question: how to connect a dual motor setup to (two) VESC's? Is that done through the CAN Bus and if so, what connectors/cables would be required? Or is there another solution I've overlooked?
I have updated the VESC post with some information about that:
http://vedder.se/2015/01/vesc-open-source-esc/
Have a look under "Application Configuration"

So when using dual motor with dual VESC's, what are the benefits of using CAN bus exactly? Is it mainly traction control? Or would CAN bus allow the dual VESC's to achieve improved startup behavior for example? I am currently using dual hub motor, each connected to a VESC with its own power. There are some startup issues, possibly the torque required for a hub motor is very high, and smooth startup is difficult to achieve without gear ratio (in combination with sensorless). I haven't played with the 'startup boost' yet, because I didn't find the option in the BLDC tool. Where is it?

By the way, the 'safe mode' for PPM servo signal is very useful, thanks for implementing this new feature!
Some optional on-board PPM calibration at startup would be useful: some ESCs allow you to press a button to set the center, min and max servo signal easily. This would alleviate the incorrect pulsewidth computation (due to scaling by voltage level).


One last thing: I tried connecting the sensors of the Yuneec Ego motor, but the motor stopped working: no motion at all, until you disconnect the sensor. I guess the sensors are not compatible at the moment. Would that be easily fixed by a software change? Is the motor temperature sensor (white cable) used at all? Are there some off-the-shelf BLDC motors with sensors that are known to work with VESC? If so, which one?
(I want to try out the sensor option, because with hub-motors the startup is not smooth at all, compared to the boosted board).
 
onloop said:
Considering we are discussing controlling methods, any idea what these thumb throttle for bike/scooter use? It has three wires, +, -, & Signal

Vedder, Is it possible to make this device work with the VESC?

Yes, this is the type of throttle I was making the app for. You can use the I2C/UART/ADC connector:
PCB_Front-1024x683.png


Connect + to 3.3V, - to GND and signal to ADC. You can also connect a button between the servo signal and ground wire. If you hold that button, you can use the throttle as a variable brake. I will update my post with what the control modes and configuration options are doing.

So when using dual motor with dual VESC's, what are the benefits of using CAN bus exactly? Is it mainly traction control? Or would CAN bus allow the dual VESC's to achieve improved startup behavior for example?
The main benefit is that you avoid ground loops which can kill the VESC if you are unlucky. For example, if both VESCs are connected to the same battery and one of them gets a current spike that moves the ground potential because of power wire resistance and inductance, that potential difference will cause a current in the signal ground between them if both servo connectors are tied together. That is not a good thing. The CAN transceiver is differential and can take some difference in ground level if only CANH and CANL are connected.

Another benefit is traction control of course. Also, if you connect a nunchuk to one VESC, you can control both VESCs from the same nunchuk. Running cruise control from the nunchuk requires some communication between the escs as well.

Yet another benefit is that you can connect the USB cable to just one VESC and read parameters from and configure both VESCs over CAN-bus without plugging the USB cable to the other VESC. This will also be true when I implement the bootloader later.

One more benefit is that you can connect a bluetooth module to one VESC and control/access both of them.

I am currently using dual hub motor, each connected to a VESC with its own power. There are some startup issues, possibly the torque required for a hub motor is very high, and smooth startup is difficult to achieve without gear ratio (in combination with sensorless). I haven't played with the 'startup boost' yet, because I didn't find the option in the BLDC tool. Where is it?

Startup boost is in the misc tab under motor configuration. For hub motors, you might need to change some other settings like the min ERPM, but I cannot test that since I don't have a setup with hub motors (having one would help me a lot). Also, as you mentioned, hub motors without gearing need to deliver a lot more torque than geared setups. What kv do your hubmotors have? Do you have good torque once you get away? Can you go up steep hills? If you have good torque while running, the startup can also be fixed for sure. If your motors are weak in general without gearing, getting good startup is much more difficult.

Some optional on-board PPM calibration at startup would be useful: some ESCs allow you to press a button to set the center, min and max servo signal easily. This would alleviate the incorrect pulsewidth computation (due to scaling by voltage level).
Maybe I can implement that later, but since it can be done with BLDC Tool and you need bldc tool anyway to configure the vesc, this does not have high priority. Also, I find it strange that you get scaling. I need a ppm signal where I can reproduce that issue in order to fix it.

One last thing: I tried connecting the sensors of the Yuneec Ego motor, but the motor stopped working: no motion at all, until you disconnect the sensor. I guess the sensors are not compatible at the moment. Would that be easily fixed by a software change? Is the motor temperature sensor (white cable) used at all? Are there some off-the-shelf BLDC motors with sensors that are known to work with VESC? If so, which one?
(I want to try out the sensor option, because with hub-motors the startup is not smooth at all, compared to the boosted board).

How did you connect the sensor? If you aren't careful when connecting things, you can kill the vesc and/or the sensors. Sensors with 120 degree spacing (tested on rc car motors and two hub motors) are working, but you have to configure the VESC for using sensors and for which order the sensors are connected in. I will write a tutorial for that some time. I don't have a setup with sensors (and I prefer sensorless when possible for reliability), so I haven't spent so much time on the sensored implementation. I would like to implement a hybrid between sensored and sensorless so that the sensors are used when starting and then sensorless is used because sensorless is more accurate while the motor is running. It should be quite easy to implement, but I need a sensored setup first.
 
vedder said:
I have just implemented a "Safe Start" feature for the PPM app. After boot, when changing configuration and when the ppm signal has been gone for longer than the timeout period, neutral must be sensed for at least 50 ppm cycles before output is allowed. I tested it a bit, and it is really useful. I should have implemented this a long time ago.

Thanks for implementing that feature so fast.

I think the initial (after power-up) neutral check is great, but I am not sure if it's a good idea to wait for 50ppm cycles of "neutral" if the signal has been gone during running. With most RC receivers this means an additional 0.5-1 seconds of no control. And that is only if you stay cool enough to let off the throttle, I'd probably keep the brake pressed in sheer panic resulting in the ESC never coming out of the error-condition mode :oops:


Oh and maybe you could add another sanity-check: Check periodically if the throttle signal received has changed, if it didn't change for a configurable amount of time, go into failsafe mode. This should help against the vehicle running "forever" in case there are mechanical or electronical throttle problems like a stuck throttle-lever or wrongly set failsafe values in the receiver etc.
 
vedder said:
So when using dual motor with dual VESC's, what are the benefits of using CAN bus exactly? Is it mainly traction control? Or would CAN bus allow the dual VESC's to achieve improved startup behavior for example?
The main benefit is that you avoid ground loops which can kill the VESC if you are unlucky. For example, if both VESCs are connected to the same battery and one of them gets a current spike that moves the ground potential because of power wire resistance and inductance, that potential difference will cause a current in the signal ground between them if both servo connectors are tied together. That is not a good thing. The CAN transceiver is differential and can take some difference in ground level if only CANH and CANL are connected.

Another benefit is traction control of course. Also, if you connect a nunchuk to one VESC, you can control both VESCs from the same nunchuk. Running cruise control from the nunchuk requires some communication between the escs as well.

Yet another benefit is that you can connect the USB cable to just one VESC and read parameters from and configure both VESCs over CAN-bus without plugging the USB cable to the other VESC. This will also be true when I implement the bootloader later.

One more benefit is that you can connect a bluetooth module to one VESC and control/access both of them.
That is very useful information, I didn't find that on your blog, perhaps you copy/paste it there too for others?
Would the PPM servo signal also be send to the other VESC over CAN bus, or just the Nunchuck/Bluetooth.

I'd like to add bluetooth support, is there a module for ChibiOS that can communicate with a PlayStation Move controller?

Oh, an I'll see if we can send you some dual hub motor...
Cheers,
Erwin
 
hi im interested in dual rear drive mountain board. do you have another ESC batch planned? where do I send money?
 
How did you connect the sensor? If you aren't careful when connecting things, you can kill the vesc and/or the sensors. Sensors with 120 degree spacing (tested on rc car motors and two hub motors) are working, but you have to configure the VESC for using sensors and for which order the sensors are connected in. I will write a tutorial for that some time. I don't have a setup with sensors (and I prefer sensorless when possible for reliability), so I haven't spent so much time on the sensored implementation. I would like to implement a hybrid between sensored and sensorless so that the sensors are used when starting and then sensorless is used because sensorless is more accurate while the motor is running. It should be quite easy to implement, but I need a sensored setup first.

That would be awesome to get this ‘hybrid’ sensored / sensorless implemented! That way you get the full torque from stand still in sensored commutation then the accurate commutation at high speed with sensorless.

That’s something Ive been looking for in an ESC for many years for my dual hub motor longboard. The ESCs I’ve been using can run in sensored or sensorless mode and there is a very noticeable difference in how much noise the motors make. In sensorless mode then run quieter and they don’t heat up as fast so they’re running more efficiently.

Small offsets in hall sensor positions makes sensored commutation not as accurate. However you can’t beat the torque and smoothness of sensored startup so why not take the best from both worlds!?

Startup boost is in the misc tab under motor configuration. For hub motors, you might need to change some other settings like the min ERPM, but I cannot test that since I don't have a setup with hub motors (having one would help me a lot). Also, as you mentioned, hub motors without gearing need to deliver a lot more torque than geared setups. What kv do your hubmotors have? Do you have good torque once you get away? Can you go up steep hills? If you have good torque while running, the startup can also be fixed for sure. If your motors are weak in general without gearing, getting good startup is much more difficult.

Also I think the Hub motor skateboards are becoming increasingly popular now since form member Pediglide started selling a copy of my dual SK3 - 6374 149kv hub motor. This setup can produce plenty of torque, enough to through you off the back if you’re not leaning way forward. It just needs about 80A for each motor during acceleration.
 
I come from the RC side of things. Usually we call this input PWM, which is 1000-2000us pulse. PPM stream is different. RX and flight controllers support PPM/SBUS but 99% of the esc out there communicate via PWM. a recent development was to shrink the pulse width from 1000-2000 to 125-250us, effectively 8x the response between a dlight controller and ESC. only select few high end esc communicate via I2C.

Can I just send the Gerber files and BOM to my pick & place factory? I really want to try some of them out
 
chatch said:
hi im interested in dual rear drive mountain board. do you have another ESC batch planned? where do I send money?

Ben has instructions on his site: http://vedder.se/2015/01/vesc-open-source-esc/

Post updated 2015-04-28

Update: I have ordered assembled VESCs, some of them are for sale

I have ordered 100 assembled VESCs and they will arrive this or next week. I don’t need all of them, so I will sell some of them for 115€ + shipping. Worldwide shipping with tracking is 20€ per order (which can contain more than one VESC). Shipping within Sweden is less expensive and I will update this post as soon as I know the price. You can contact me by email if you are interested (benjamin at vedder.se). Tell me how many VESCs you’d like and your address, and I will reply with an email that confirms that I have put you in my list. Later, when I have figured out how to accept payments, I will send another email with information about how to do that. As soon as I receive your payment, I will ship the VESC(s) to you and send an email with tracking information

I will update this information in the coming days, so make sure to check if there are updates.

his contact info is there and he responded quickly when i emailed him and if he has any left you can get on the list.

Good luck!
 
lizard said:
Thanks for implementing that feature so fast.

I think the initial (after power-up) neutral check is great, but I am not sure if it's a good idea to wait for 50ppm cycles of "neutral" if the signal has been gone during running. With most RC receivers this means an additional 0.5-1 seconds of no control. And that is only if you stay cool enough to let off the throttle, I'd probably keep the brake pressed in sheer panic resulting in the ESC never coming out of the error-condition mode :oops:


Oh and maybe you could add another sanity-check: Check periodically if the throttle signal received has changed, if it didn't change for a configurable amount of time, go into failsafe mode. This should help against the vehicle running "forever" in case there are mechanical or electronical throttle problems like a stuck throttle-lever or wrongly set failsafe values in the receiver etc.

It should say neutral or brake, so even if you brake you will get out of the timeout. Most modern rc systems will continue transmitting ppm pulses even if the signal is gone, so the timeout won't be entered. I added it mostly in case the servo cable gets disconnected. When connecting the cable again, it is nice of the motor doesn't start at full speed.

I don't know about the other sanity check because it can be really confusing. I will think about adding it.

Also I think the Hub motor skateboards are becoming increasingly popular now since form member Pediglide started selling a copy of my dual SK3 - 6374 149kv hub motor. This setup can produce plenty of torque, enough to through you off the back if you’re not leaning way forward. It just needs about 80A for each motor during acceleration.
A hub motor board with two 6374 149kv motors should start smoothly sensorless with VESC, but maybe some other settings have to be changed. I would need a setup like that to test it myself.

That is very useful information, I didn't find that on your blog, perhaps you copy/paste it there too for others?
Would the PPM servo signal also be send to the other VESC over CAN bus, or just the Nunchuck/Bluetooth.

I'd like to add bluetooth support, is there a module for ChibiOS that can communicate with a PlayStation Move controller?
PPM can also be sent over CAN. I update my post regularly, so you can check it again now and then.

I don't know how the ps move controller communicates over bt, but with some work it can most likely be implemented.

I come from the RC side of things. Usually we call this input PWM, which is 1000-2000us pulse. PPM stream is different. RX and flight controllers support PPM/SBUS but 99% of the esc out there communicate via PWM. a recent development was to shrink the pulse width from 1000-2000 to 125-250us, effectively 8x the response between a dlight controller and ESC. only select few high end esc communicate via I2C.
Short pulses like that will have more noise and less resolution, but you can configure the pulse length on BLDC tool even to that one if you'd like. If you really need to update that fast, you should use something else than PPM such as UART or CAN-bus.
 
How about a push mode? Essentually it is that the motor drives the load from the friction of the belt and the motor itselfes and the extra weight of an e-board. So when you push the e-board it is as easy as a regular longboard.

This could be achived by having a fixed low current at about 1 A or so. I have drived the motor and wheel on my comersial board (DC-motor) with a bench supply and the current goes from about 0,8 A at slowest speed to 1,6 A at full speed with wheel in the air. So the friction doesn’t change much with speed. The fixed current should be adjustable somewhere, not necessary on the move. You may need some additional button but maybe the nunchuck have that?

The benefit of having a push mode is:
1. If you want to go for longboarding as a workout but don’t want the extra drag from the motor, belt and weight. But with a break.
2. If you find yourself running out of battery before coming home, you can push the rest bit with very low consumtion.
3. If you wantto go for a long trip. You can push most of the way but have the benefit of recharging in down slopes and also driving up the most boring hills.

Since there already is a current regulating mode this may be achived by just give very little fixed throttle wich maybe already is a feauture through the nunchuch?
 
Barndom said:
How about a push mode? Essentually it is that the motor drives the load from the friction of the belt and the motor itselfes and the extra weight of an e-board. So when you push the e-board it is as easy as a regular longboard.

This could be achived by having a fixed low current at about 1 A or so. I have drived the motor and wheel on my comersial board (DC-motor) with a bench supply and the current goes from about 0,8 A at slowest speed to 1,6 A at full speed with wheel in the air. So the friction doesn’t change much with speed. The fixed current should be adjustable somewhere, not necessary on the move. You may need some additional button but maybe the nunchuck have that?

The benefit of having a push mode is:
1. If you want to go for longboarding as a workout but don’t want the extra drag from the motor, belt and weight. But with a break.
2. If you find yourself running out of battery before coming home, you can push the rest bit with very low consumtion.
3. If you wantto go for a long trip. You can push most of the way but have the benefit of recharging in down slopes and also driving up the most boring hills.

Since there already is a current regulating mode this may be achived by just give very little fixed throttle wich maybe already is a feauture through the nunchuch?

Applying a constant current of 1-2A is easy, but I cannot really test it since I don't have the skill to push :) I started with longboards last year when my friend built his electric board with my escs, and after that I built some eboards myself.
 
Update

BLDC_Tool_FW_Upload.png


After working on this late every evening after work this week, I finished the bootloader yesterday and made some successful tests uploading firmware form BLDC Tool. I haven't pushed it to github yet since I want to do some more testing, but I will try to finish it today.

It works by:

1. BLDC Tool tells the running firmware to erase some sections in flash after the running firmware.
2. The new firmware is uploaded to those sections together with a checksum from BLDC Tool. I case there are problems while the firmware parts are uploaded, a couple of retries are made.
3. After the new firmware is uploaded to the flash after the running firmware, the firmware jumps to the bootloader which is in the very last section of flash.
4. The bootloader computes the checksum of the new firmware and checks if it matches with the uploaded one. If it does, the bootloader replacec the old firmware with the new firmware. Up to 4 retries are made in case there are errors. If the checksum doesn't match, the bootloader just exits and the old firmware will be running again.

This works over USB, CAN-bus or UART. BLDC Tool also supports uploading firmware to VESCs that are connected over CAN to the VESC it is connected to over USB, which is nice for multi-motor setups. The same thing should also work over bluetooth, and I will test it as soon as I receive my bluetooth modules.

Another thing I implemented is a check in BLDC Tool if a compatible version of the firmware is running on the connected VESC. If the version is not compatible but has bootloader support, bldc tool will go to a limited communication mode where only the firmware can be updated. This should be really convenient for the assembled VESCs that I'm hopefully going to ship next week.

If you plan to hack the firmware, you should get a programmer anyway (only 5$ on ebay). If you happen to upload firmware with bugs that prevent the communication from working, you cannot replace it without a programmer since the bootloader relies on the firmware to work. This implementation should be quite safe and sufficient if you just plan to replace the firmware with later versions, but for development you should invest in a programmer.
 
vedder said:
The same thing should also work over bluetooth, and I will test it as soon as I receive my bluetooth modules.
Which bluetooth module are you buying exactly, do you have the brand, model number and/or Amazon link?

Right now I use a USB bluetooth dongle attached to a USB host shield for Arduino. It requires some library to connect to the bluetooth PlayStation Move controller.
It would be nice to directly use the VESC, it would become a simpler hardware setup. I wonder if anyone developed this for ChibiOS too, or how much work it is?

Oh, and thanks for the great work on the boot loader!
Erwin
 
Having firmware updates through USB is great!

3) Can VESC put a brake on motor at 0 RPM and actively resist rotation in any direction?
With hall sensors it can, but without sensors only regenerative braking is possible (at 0 RPM all motor phases will be shorted when braking without sensors). However, regenerative braking is strong enough for my longboard down to very low speeds, so I don't really miss active braking. What kind of application do you have in mind?

I think this kind of motor locking at 0 RPM would be useful for motorized roller skates (one roller skate on each foot) - when walking up/down stairs, etc. It can also be done, of course, with some sort of solenoid switch that locks one of the wheels, but if the motor itself could do it, then I'd prefer that because it wouldn't add mechanical complexity. Which leads to my next question,

1) How should the Hall sensors connect to VESC? There are 6 pins on the Hall connector, but 3 sensors would have 5 outputs - high, ground, and three signals. Also, should the sensors be the "latching" type?

2) Is it possible to control the strength of active braking with VESC? Or is it simply on/off? What about controlling the strength of regen braking?

3) Can VESC share its logical ground with other devices? I assume there wouldn't be any problems, but I'd like to make sure so that I don't accidentally burn it.

4) Finally, are there any plans to order additional production runs of the controllers?
 
I would like the VESC PPM control to work more similar to a car, and more similar to a Boosted Board.

Perhaps we need some new hybrid scheme mixing current control and PID speed control?

1) clamped the speed based on the throttle position, just like the gas pedal of a car, or like the Boosted Board/Yuneec E-go. Wheel speed should not depend on the load on the wheels. Add this clamping on top of the current control scheme.

2) No active braking should happen, unless throttle is in 'reverse'. Some 'regenerative braking could be allowed if the throttle position is around zero. I guess 'current control' is mostly fine. In PID speed control mode, the problem is that deceleration/braking happens, even though the throttle position is 'positive'. That is unwanted.

3) We need better, safer separation between brake and reverse. Boosted Board, and also some other car ESCs add some logic that you need to first come to a full stop for a second, then release throttle, and then allow going in reverse.

Perhaps the VESC can already do this? Benjamin Vedder, can you explain how we could mimic a control scheme of a car, or the Boosted Board or E-go, with any of the existing VESC control modes?
 
Here is some video of one of my testing days.

I am running with dual vesc. 10s Enertion UltraCell battery. 250kv motors (this is not optimal..Way too high KV should be about 190kv... but it's what I had.) 90mm wheels.

[youtube]59d9JLXF2TI[/youtube]
 
Back
Top