10S custom skate ESC: testers wanted!

Some updates:

* Not so important for electric skateboards, but I have been working on quadrature encoder support, dc motor support and position control:
[youtube]qqNOx57f2OU[/youtube]

* I have implemented so that multiple ESCs connected over CAN-bus can be configured and monitored from BLDC tool by plugging in the USB cable to any of them. This is useful if you have setup with many VESCs connected over CAN and you want to change the configuration and/or test them without plugging the usb cable to all of them.

* Since it has been nice weather here for a while now, I have spent many hours on testing my single-motor 8s longboard and my dual-motor 12s longboard with VESCs with my friends. I haven't had any issues at all with the ESCs.

* My custom nunchuk PCB has also been working well for all my tests. I still have to implement some power saving code so that I can leave it with the batteries plugged in.
 
Since it has been nice weather here for a while now, I have spent many hours on testing my single-motor 8s longboard and my dual-motor 12s longboard with VESCs with my friends. I haven't had any issues at all with the ESCs.

I love that !!!
 
vedder said:
There is a hardware filter on the ppm input, so the edges will be a bit affected by that. 2.4V sounds a bit low, so I don't know how reliable that will be. You can also adjust the timing in bldc tool for the ppm signal.
Is there a way to change this in the firmware/ChibiOS? The other car ESCs are not influenced by voltage level. My concern is that as the battery voltage decreases, the servo signal will change too, which can be dangerous on a skateboard.
vedder said:
Some updates:

* Not so important for electric skateboards, but I have been working on quadrature encoder support, dc motor support and position control:
[youtube]qqNOx57f2OU[/youtube]

* I have implemented so that multiple ESCs connected over CAN-bus can be configured and monitored from BLDC tool by plugging in the USB cable to any of them. This is useful if you have setup with many VESCs connected over CAN and you want to change the configuration and/or test them without plugging the usb cable to all of them.

This is very exciting too, does this work with an unmodified VESC, just updating to the latest firmware? It would be great if you can describe how to reproduce your example in that Youtube video with one motor following the position of the other motor (perhaps a new blog entry about it?).

Anyhow, thanks for sharing your inspiring work!
 
Is there a way to change this in the firmware/ChibiOS? The other car ESCs are not influenced by voltage level. My concern is that as the battery voltage decreases, the servo signal will change too, which can be dangerous on a skateboard.
The signal should never go down to that voltage (if it goes too low, no other ESC will work either). A digital pin must have a voltage with some margin above the threshold to read as one. The hardware filter that I have now is a bit slow, so it could be changed a bit (just need to replace a resistor and/or a capacitor). However, I find the behaviour you describe quite strange. Even if the hardware filter slows down the edges a bit, it shouldn't affect the readings that much. I think you are likely to have some other problem. Have you checked with an oscilloscope? Also, as the battery voltage decreases, the PPM signal voltage should remain unaffected. The 5V output of VESC will remain stable since it is regulated and it you have an external BEC it should also remain stable unless it has problems.

This is very exciting too, does this work with an unmodified VESC, just updating to the latest firmware? It would be great if you can describe how to reproduce your example in that Youtube video with one motor following the position of the other motor (perhaps a new blog entry about it?).
The small thing is an encoder, not a motor. Also, the motor has a built-in encoder. I pushed the code yesterday, but I need to polish the implementation a bit before I write a post about it. If you have the same or similar motor and encoders I had, it is quite easy to reproduce the example.
 
Thanks for your answers, vedder. Really appreciate it.

Maybe this adds to the receiver compatibily discussion:
According to Castle owner Patrick del Castillo, most RC receivers have 3.3V Logic level. But there are some receivers (Futaba) that only have 1.8V. Mamba Monster ESCs support down to 2.0V (https://www.rc-monster.com/forum/showthread.php?t=23663)

Do you also support higher framerates than the "standard" 50Hz? Many RC receivers support 100Hz, some even go up to 333Hz.

Oh, and maybe another feature request: http://www.tech-aero.net/throttle-tech
It's an addon device that compensates for battery voltage drop over time, basically giving the same throttle feel and motor RPM over the full discharge cycle. That would be much better and easier to directly implement into the ESC software I guess.
 
Do you also support higher framerates than the "standard" 50Hz? Many RC receivers support 100Hz, some even go up to 333Hz.
You can send the pulses as densely as they fit, so that would be up to about 500 Hz with the standard timing.

Oh, and maybe another feature request: http://www.tech-aero.net/throttle-tech
It's an addon device that compensates for battery voltage drop over time, basically giving the same throttle feel and motor RPM over the full discharge cycle. That would be much better and easier to directly implement into the ESC software I guess.
When running in current control mode (which you should do), the battery voltage will not affect the feel of the throttle since it is a closed loop system. So this feature is already implemented.
 
I have some updates on my order of assembled VESCs in the beginning of my post:
http://vedder.se/2015/01/vesc-open-source-esc/

They should arrive this or next week. Price is 115€ + shipping.

Again, notice that these ESCs are not plug-and-play. You have to read the tutorial in my post carefully and you need a computer with some linux distro such as ubuntu to run BLDC Tool. I can upload the latest firmware before I ship them and keep a version of BLDC tool that is compatible with that firmware in case you don't want to build and upload it, but you still have to do the configuration. You also have to solder battery and motor wires to the ESC, and a capacitor to the battery wires quite close to the ESC.
 
@vedder: thanks for developing this amazing piece of technology! It's gonna be incredibly useful for so many people.

I have a couple of questions with regard to running these controllers, and I am hoping it's already described somewhere. Is there any documentation that explains how to communicate with these controllers through I2C/UART/CANBUS?

Anyway, this is what I'd be interested in:

1)How can I control motor torque through UART? Control braking through UART? What logic levels does VESC UART operate on?

2) Is it possible to read the motor RPM from VESC somehow? Through UART/I2C?

3) Can VESC put a brake on motor at 0 RPM and actively resist rotation in any direction?

Peter
 
vedder said:
When running in current control mode (which you should do), the battery voltage will not affect the feel of the throttle since it is a closed loop system. So this feature is already implemented.

That's really great.
So as I understand it, the torque will stay the same, because torque is proportional to current, and the current is controlled anyway.
To achieve the same RPM over the whole runtime, I just set the max RPM to a value that the motor can spin to with almost empty batteries?



I have another question (and maybe a feature request?)
What will happen, if the input voltage drops below the minimum voltage? Will it disable the motor completely or go into some kind of "cutoff mode"? Like RC-ESCs have, where power is reduced to 25% or so, to make sure the batteries don't get damaged, but also to allow the car to be brought back to the pit slowly.

Is there some kind of time delay? There are RC ESCs who will only go into cutoff mode if the voltage is too low for over a second (or so). This is to make sure that short voltage drops caused by high current spikes don't trigger the cutoff mode. Or is that not needed on the VESC because it controls the current so tightly, that there are no current spikes possible at all, even when doing stuff like jumping and landing the car on-throttle?

Maybe it would be possible to implement a "battery-saver" feature, so that one could define two voltage values:
1. The "empty cutoff mode": To cutoff (reduce power to 25%) when the lipos are empty. This would be measured when not under load (to be set to something around 3.5V-3.7V for lipos)

2. The "battery-saver" current reduction voltage: When the battery voltage becomes lower even for some milliseconds, the torque/current is instantly reduced until the voltage is above the set value again. This would be measured only when under load (to be set to a voltage around 3.2V, the lowest voltage a lipo can handle under load without suffering too much)
 
1)How can I control motor torque through UART? Control braking through UART? What logic levels does VESC UART operate on?
The UART operates on 3.3v, but the pins are 5V tolerant. You can control and configure everything over UART that BLDC tool can do. When I have time, I will write some documentation about that. Before that, you can look at the packetinterface class in BLDC Tool and implement something similar.

2) Is it possible to read the motor RPM from VESC somehow? Through UART/I2C?
Yes, you can do that and everything else that BLDC Tool can do over UART, CAN or USB. I haven't implemented i2c yet since i2c has been unreliable in my experience and I recommend using something else if possible.

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?

To achieve the same RPM over the whole runtime, I just set the max RPM to a value that the motor can spin to with almost empty batteries?
You should not change the maximum RPM unless you have a good reason to do so. The RPM limit is not very smooth and only intended to be a safety feature in case something takes damage at too high speeds. With current control, the feeling will stay the same, but the top speed will become lower as the battery voltage decreases. I guess you run much slower than the top speed most of the time anyway, so you shouldn't notice. If you really want to limit the maximum RPM and make it feel like you have the same battery voltage in all aspects, there is a soft RPM limit feature in the PPM tab where you set two different RPMs to get a smooth transition.

I have another question (and maybe a feature request?)
What will happen, if the input voltage drops below the minimum voltage? Will it disable the motor completely or go into some kind of "cutoff mode"? Like RC-ESCs have, where power is reduced to 25% or so, to make sure the batteries don't get damaged, but also to allow the car to be brought back to the pit slowly.

Is there some kind of time delay? There are RC ESCs who will only go into cutoff mode if the voltage is too low for over a second (or so). This is to make sure that short voltage drops caused by high current spikes don't trigger the cutoff mode. Or is that not needed on the VESC because it controls the current so tightly, that there are no current spikes possible at all, even when doing stuff like jumping and landing the car on-throttle?

Maybe it would be possible to implement a "battery-saver" feature, so that one could define two voltage values:
1. The "empty cutoff mode": To cutoff (reduce power to 25%) when the lipos are empty. This would be measured when not under load (to be set to something around 3.5V-3.7V for lipos)

2. The "battery-saver" current reduction voltage: When the battery voltage becomes lower even for some milliseconds, the torque/current is instantly reduced until the voltage is above the set value again. This would be measured only when under load (to be set to a voltage around 3.2V, the lowest voltage a lipo can handle under load without suffering too much)

The minimum voltage limit is for emergency as well, and will switch everything off and enter a fault code. I can implement a battery saving feature soon that limits the power (while still enabling full braking) when the battery is about to run out.
 
Hi you all,
thanks for all the useful information I already found here.
I am currently modifying a car alternator to run as a motor in an e-bike and I have a few things I am not too sure about and was hoping someone may know here.
The alternator was set up with delta connections and I was wanting to change that to Y, because I can get a lot more torque out of it. Does the ESC care if you have a delta or Y connection on the inside?
And I will probably build some hall sensors into it, to improve the low speed start up, but due to the alternator not having permanent magnets but a claw pole inside using just hall switches could cause a problem, if I change the power I put into it then the hall switches are "on" or "off" all the time. (and I want to keep the claw pole power variable because I can greatly affect the speed/torque of the alternator which could be nice to control depending how much torque is actually needed)
Could I connect analog Hall sensors to the inputs and try writing some code that could decode the analog input, figure out if its "high" or "low" and forward that to the actual part of the program, that drives the motor?

Hope you could somehow understand my ideas. I have a tendency of wording my thoughts quite awful.
In addition to that, I am still a high school student so my knowledge of bldc motor theory is still slim so I imagine I made some mistakes in my though process of modifying an alternator to run relatively "efficient" as a motor. So if you have any improvement ideas or comments I would love to hear them!

Thanks,
Sören
 
Shep_pard said:
Hi you all,
thanks for all the useful information I already found here.
I am currently modifying a car alternator to run as a motor in an e-bike and I have a few things I am not too sure about and was hoping someone may know here.
The alternator was set up with delta connections and I was wanting to change that to Y, because I can get a lot more torque out of it. Does the ESC care if you have a delta or Y connection on the inside?
And I will probably build some hall sensors into it, to improve the low speed start up, but due to the alternator not having permanent magnets but a claw pole inside using just hall switches could cause a problem, if I change the power I put into it then the hall switches are "on" or "off" all the time. (and I want to keep the claw pole power variable because I can greatly affect the speed/torque of the alternator which could be nice to control depending how much torque is actually needed)
Could I connect analog Hall sensors to the inputs and try writing some code that could decode the analog input, figure out if its "high" or "low" and forward that to the actual part of the program, that drives the motor?

Hope you could somehow understand my ideas. I have a tendency of wording my thoughts quite awful.
In addition to that, I am still a high school student so my knowledge of bldc motor theory is still slim so I imagine I made some mistakes in my though process of modifying an alternator to run relatively "efficient" as a motor. So if you have any improvement ideas or comments I would love to hear them!

Thanks,
Sören

The ESC does not care whether it is a delta or star connection. Also, you can use digital hall sensors because you don't have to care about any threshold. The digital sensors just measure if there is a north pole or a south pole, so the strength of the field does not matter. However, you should keep in mind that if you change between a delta and a star connection you have to move the hall sensors.

- Not sure if it already has this, but I'd find some sanity checks during initialization important, like checking if the throttle input signal is set to "neutral" so that the vehicle doesn't take off uncontrolled when something is wrong with the throttle-stick or the transmitter is wrongly setup etc.

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.

Some other updates to the PPM app are that I have changed the interface to configure the pulse timing slightly and added a display that shows the current duration (in ms) of the received ppm pulses. This is useful for measuring and adapting the timing for ppm pulses.

These updates are pushed to github, do feel free to give them a try.
 
hey vedder, with these new firmware update does it also need the BLDC tool to be updated?
 
Beautiful day here in Australia... out and about doing some more VESC testing... tough life I know.

I was compelled to stop riding and write a post.

Anyway the VESC is awesome. There is nothing else that comes close to it.

BRAKES.
ben has perfected the brake. It is progressive, powerful, responsive but most of all it's safe. I can pull it fairly hard without feeling like i will get launched into the air. This was a feature that until now was lacking in eboard ESC's... stopping is fairly important so undoubtedly this feature will be appreciated by all Eboarders

RELIABILITY.
this ESC just works. Turn it on and it's ready. Jump onto the board Pull the trigger and you start to move. From Stationary!.. some people have suggested a beep sequence so you know it's ready. If it is possible I don't think it would hurt.

PERFORMANCE.
very powerful acceleration! And smooth As can be. For some reason my motors sound like F1 cars when using the VESC. I don't know why they sound so good!... you can hear the power. It sounds like the motors are actually running cleaner/better i really have no idea why this occurs... if i was to take a guess why? my made up answer would be: because the motors parameters are detected by the esc and saved into the system the motors are therefore perfectly synced to the esc and tuned to operate at their peak performance. because the ESC is setup specifically for each motor it is able to deliver power more accurately and the power that is delivered is magical. Maybe Ben please explain?

10 out of 10.
 
congrats and thanks for the feedback. Can't wait to put them on my dual diagonal 12S formula deck :D

it's raining here - damn, I wanted to film a nose wheeling on my (non electric) longboard deck - quite a challenge as it's like around 80 long... but achievable ! make some photos/videos ... will make my day :D

I hope VESC will allow me to do the same similar take off as this little drone !

[youtube]8p5uDf9i_Yc[/youtube]
 
Sorry nothing to dispatch yet so technically I get a "day off"...... im glad i enjoyed it... because I'll be very busy next week posting stuff... I promise.
 
but I guess I need the programming board to set my motor variables still, is that right?

No, you can just use the BLDC-tool to adjust variables and such. Still, a programmer is nice, so you can keep the VESC firmware up-to-date with new features.

I've been testing several VESCs for a while now, with various boards and motors, it is fun to have the freedom to tweak motor variables and even the firmware/tools.
One of the boards, the E-Go couldn't go in reverse because Yuneec made that decision for us. With VESC it can go in reverse and a lot faster too.

Now the challenge is not speeding too much with the dual-vesc hub-motor:

dual_vesc.jpg
 
onloop said:
hey vedder, with these new firmware update does it also need the BLDC tool to be updated?

You should always update BLDC Tool and the firmware at the same time. For the next update I will try to make something in BLDC tool that detects the firmware to see if it matches and gives a warning otherwise, but for now you have to make sure to check that manually. Hopefully I will be able to make a bootloader so that BLDC Tool can flash the firmware soon without the need for a programmer.

some people have suggested a beep sequence so you know it's ready. If it is possible I don't think it would hurt.
That should be quite easy. I will have a look at it soon.

For some reason my motors sound like F1 cars when using the VESC. I don't know why they sound so good!
The sound that you are hearing probably is caused by the adaptive switching frequency. On low duty cycles, slower switching will give better ADC readings since they have to be done in the ON time which is short then. On higher duty cycles the on time increases, so the switching frequency can also be increased. Sine sampling is done every switching cycle, the frequency has to be increased as the motor is spinning faster to get accurate tracking. So this frequency change is causing the special sound of the VESC.

but I guess I need the programming board to set my motor variables still, is that right?
Motor parameters, variables and which input to use can be configured from BLDC Tool with just a mini-usb cable. The programmer is required to upload the latest firmware, and since I make a lot of updates now it is good to have one.

I will try to make a bootloader so that the firmware can be updated from BLDC Tool as well, but I have not started working on that yet. Hopefully I will be able to finish that before the end of next week, but it depends on how many issues I will have.
 
Hi,
I just saw on IR website that the MOSFET IRFS3006 could be replaced with IRFS7530-7P. Just in case you haven't sourced them yet.
Also available is IRFS7730-7P for a 75V version (which would increase the voltage margin for those, like me, who want to use a 13s battery).
The DRV8302 may not appreciate higher voltages though...
Pierre
 
elkick 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?

You can use 4pin JST 2mm spacing connectors. *The info below is from Ben.

only connect PPM or the nunchuk to the master ESC. You only connect CANH and CANL of the 4 pins. What you also have to do is:

* select "Send status over CAN" in the appconf tab. This has to be done for the slave ESC. but you can also do it for both.

* in the nunchuk or PPM tab of the master ESC, select "Multiple ESCs over CAN".

The slave ESC does not need any app configuration at all.
 
Hi,
I just saw on IR website that the MOSFET IRFS3006 could be replaced with IRFS7530-7P. Just in case you haven't sourced them yet.
Also available is IRFS7730-7P for a 75V version (which would increase the voltage margin for those, like me, who want to use a 13s battery).
The DRV8302 may not appreciate higher voltages though...
Pierre
Pierre, the latest design and BOM already uses the IRFS7530. I just forgot to update the feature list. Using a 75V FET does not make sense since the drv8302 cannot handle more than 60V, and higher voltage FETs have higher ON-resistance for a given gate capacitance in general.

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"
 
Back
Top