Building the Cavedioboard

Forum dedicated to electrical projects
User avatar
Josh Hess
Site Admin
Posts: 128
Joined: Sun May 24, 2015 6:00 pm
Location: Orlando, FL
Areas of Knowledge: Electronics, Product Design, Manufacturing
School/University: UCF

Re: Building the Cavedioboard

Postby Josh Hess » Thu Jan 19, 2017 12:20 am

Hmm, that is an interesting issue with the BMS. It may have to be "reset" somehow. Perhaps even chargin the batteries to full charge will fix it. Be sure to double check your connections. You can always pull power straight off of the battery, just make sure you don't short it and set a voltage cutoff on the VESC of around 30v.

Yes, so to control the controllers independantly, just tie the PWM pins from each controller to their own digital out pins on the Arduino that are capable of outputting PWM. From that you can have full speed control of each motor independent of one another.

Let me know if you get the BMS board resolved. If not, just work around it as it is not 100% necessary if you are careful with the batteries.

Cheers!
Science may set limits to knowledge, but should not set limits to imagination.

giovisanta
Posts: 3
Joined: Fri Nov 04, 2016 7:33 am

Re: Building the Cavedioboard

Postby giovisanta » Thu Jan 19, 2017 4:31 am

Hi Josh,

now we are trying to better understand which could be the problem on the BMS.

For the Arduino communication.
I don't understand if you mean for PWM ports of VESC the PPM pins? So in BLDC Tool it does mean to use PPM application?
We see a similar application made by Benjamin Vedder on his website (link below here)
http://vedder.se/2015/08/vesc-writing-c ... lications/
where he creates a custom application that simply follow an rpm speed reference set with the pot.
What we want to do is very similar, but instead using the pot directly connected to the ADC of the VESC we send the rpm value reference from Arduino?
If we want to copy this Vedder's application example we would communicate with UART from Arduino to VESC (sending the rpm value) and then in VESC side take that value from the UART reading and with function

Code: Select all

mc_interface_set_pid_speed(float rpm);
give the command to the motor??

Is this feasible? Because I don't get very well the way you suggest to do.

Many thanks for your help.
U&G

User avatar
Josh Hess
Site Admin
Posts: 128
Joined: Sun May 24, 2015 6:00 pm
Location: Orlando, FL
Areas of Knowledge: Electronics, Product Design, Manufacturing
School/University: UCF

Re: Building the Cavedioboard

Postby Josh Hess » Thu Jan 19, 2017 1:13 pm

Yes, sorry. The pins are the VESC are referred to as the PPM pins. Yes, you would use the PPM control mode. If you are planning on using an Arduino anyway and only need to send speed control to the vesc, I would not mess with writing a custom application on the VESC side as you can control the vesc via PWM in PPM mode from the arduino with little setup. The custom application is really for if you are tight on space and want to utilize the processor on the VESC. However, If you need to read the current RPM value from the VESC, use the UART instead of the PPM connection to communicated between the VESC and the Arduino.

Let me know if this makes more sense,
Josh
Science may set limits to knowledge, but should not set limits to imagination.

giovisanta
Posts: 3
Joined: Fri Nov 04, 2016 7:33 am

Re: Building the Cavedioboard

Postby giovisanta » Mon Feb 20, 2017 9:56 am

Hi everybody...

Works on Cavedioboard are going on but still we have some problems.
At first we were communicating from the Arduino to the VESC through the PWM pins using the

Code: Select all

Servo.h
library but then we implemented the communication via UART. The motors change their velocities much more continuously with respect with PWM.

Now we have some problems (maybe) with the parameters to set in BLDC tool of the VESCs.
I reports some screenshots of the actual setup of various parameters in BLDC tool.
The problem is that starting from zero velocity it is very jerky and only if the board is externally pushed the speed reference given by the Arduino seems to work fine.

I have tried to modified the parameters of:
- startup boost: I increase its value but the effect doesn't change
- Int Limit Min ERPM: I have tried to set at 600 as suggested in http://www.electric-skateboard.builders ... ors/212/24
- Min ERPM: I increased it but nothing have changed

Does someone has any hints?

Thank you for your time.
G.S.

Schermata 2017-02-20 alle 15.51.25.png

Schermata 2017-02-20 alle 15.52.01.png

Schermata 2017-02-20 alle 15.52.09.png

User avatar
Josh Hess
Site Admin
Posts: 128
Joined: Sun May 24, 2015 6:00 pm
Location: Orlando, FL
Areas of Knowledge: Electronics, Product Design, Manufacturing
School/University: UCF

Re: Building the Cavedioboard

Postby Josh Hess » Fri Feb 24, 2017 12:23 pm

Great Updates! Sorry I missed them, I've been rather busy recently.

Regarding the jerky startup, this is normal with non-sensored motors. The VESC looks at the voltage from the magnets going past the coils for position data and without movement, it has no reference. The jerkiness you feel is the VESC guessing algorithmically where to apply power to try and start the motor. This is a problem even with belt drives, but it is even more noticeable with hub motors since it is direct. The only way to fix this problem is to add hall sensors to the motor or some kind of encoder. I would recommend just using it as is, for now, just keep in mind a small push will be necessary. If you want to add sensors, it should be doable, but you will have to look inside the motor to see how much room you have. If there is enough clearance, APS has some nice internal hall boards that would make installation easy. See here: http://alienpowersystem.com/shop/brushless-motors/50mm/internal-pcb-with-hall-effect-sensors-120-degree/

Regarding the battery issues, it seems like your BMS unit is in protection mode. This is most likely due to a bad FET so it unlikely you will be able to fix it. I would recommend just bypassing it and using a fuse. Just make sure you keep an eye on the voltage when you charge and discharge to make sure your batteries stay in their spec range.

Looking forward to the next update!
Josh
Science may set limits to knowledge, but should not set limits to imagination.


Return to “Electrical”

Who is online

Users browsing this forum: No registered users and 5 guests