Jump to content

Firmware


jayjay23

Recommended Posts

I used a board we bought from Microworks to this project, to try control a generic EUC I bought some time ago. That generic have lower speed and lower torque that was dangerous to ride because I could fall on small holes.

Now, the Microworks board, first it seems to be to much quick even dangerous to accelerate but also the motor is rotating backwards! Anyone have an idea how to put it rotating on the right direction? -- please see the video:

It's so important to have our own OpenSource firmware...

Please note that I am being using also this motor for the firmware development and it works as expected and the same as the other motor I also use.

 

Link to comment
Share on other sites

3 hours ago, electric_vehicle_lover said:

I used a board we bought from Microworks to this project, to try control a generic EUC I bought some time ago. That generic have lower speed and lower torque that was dangerous to ride because I could fall on small holes.

Now, the Microworks board, first it seems to be to much quick even dangerous to accelerate but also the motor is rotating backwards! Anyone have an idea how to put it rotating on the right direction? -- please see the video:

It's so important to have our own OpenSource firmware...

Please note that I am being using also this motor for the firmware development and it works as expected and the same as the other motor I also use.

 

Calibration?

  • Upvote 1
Link to comment
Share on other sites

7 hours ago, electric_vehicle_lover said:

Now, the Microworks board, first it seems to be to much quick even dangerous to accelerate but also the motor is rotating backwards! Anyone have an idea how to put it rotating on the right direction?

hmm, either put the board on the other side of the wheel (well, cable's probably too short), find a way to put the board upside-down (flip on the vertical axis - components towards the shell), ask microworks if there's a way to recalibrate directions, or swap two corresponding to each other pairs of motor and hall sensor cables?

  • Upvote 2
Link to comment
Share on other sites

I made the calibration process a few times and it works well. Also I found that seems to be possible in this firmware, to calibrate the board horizontal.

Now I exchanged the motor phase wires in all options but didn't worked - made me remember my tests during development to find the right sequence of hall sensors. On this board, if the motor ask to much current the board will detect and beep. Other times, the current is so high that the BMS cut so quickly that the boards don't even beep.

I didn't exchanged yet the hall sensors wires as it take to much time.

On the OpenSource firmware, for inverting the motor direction is needed to exchange the sequence of hall sensors... I don't know if will be possible only with wires, on this board.

Link to comment
Share on other sites

So I rotated the board 180 degres and now the motor runs on the right direction, however, with to much speed that is not ridable and is dangerous. I wonder if that firmware were developed for a motor that outputs much higher frequency of hall sensors signal.

On current OpenSource firmware, I tried to ride a bit with EUC with constant speed and is not possible :-) -- I think I will move again to test the balance code. Last time I were feeding the output of balance controller to the duty-cycle PWM of the motor but now I will instead output to the speed controller that will then output command to duty-cycle PWM.

The idea is to have zero speed when is balanced and increase speed as the angle go higher, for on direction or the other.

Edited by electric_vehicle_lover
  • Upvote 2
Link to comment
Share on other sites

I don't know if this helps any, but I deal with this same problem on the repairs of two wheel self balancing scooters all the time. The Chinese never use the same color wires from one day to the next and I have to open up the motors and make sure the hall wires and the 3 phase power wires are going to board in correct order. Too fast speed and uncontrollable is almost always order of 3 phase power wires and or hall wires. 

  • Upvote 1
Link to comment
Share on other sites

About the OpenSource firmware, I plan to do:

(ANGLE) ---> (balance controller) ---> (speed controller) ---> (torque controller) ---> (MOTOR PWM)

ANGLE is the angle output from the IMU;
balance controller will output a speed value;
speed controller will output a PWM duty-cycle value (PI controller for now);
torque controller control the duty-cycle PWM value and the motor max current.

  • Upvote 1
Link to comment
Share on other sites

I found something interesting the other day while working on my controller design. Toshiba make an inexpensive MCU that has a dedicated BLDC FOC controller on chip. It has an open source configuration utility to configure the BLDC hardware, people run it on PCs and android. You would only need to put one on a BLDC board and add the gyro to turn it into an EUC controller. If produced in moderate quantities I think it would cost maybe $50 usd to build them with not too expensive mosfets.

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

@Almaz

We bought the boards on Microworks: http://microworks.en.alibaba.com/

You can find more information on our wiki here: https://github.com/generic-electric-unicycle/documentation/wiki/MicroWorks-18km-h-controller-board

Please tell me if you need more information for the development tools, etc. Please tell me your user ID on Github so I can add you.

Link to comment
Share on other sites

On 4/4/2016 at 7:56 PM, Call-Tech said:

I don't know if this helps any, but I deal with this same problem on the repairs of two wheel self balancing scooters all the time. The Chinese never use the same color wires from one day to the next and I have to open up the motors and make sure the hall wires and the 3 phase power wires are going to board in correct order. Too fast speed and uncontrollable is almost always order of 3 phase power wires and or hall wires. 

I tried to exchange the order of the hall sensors but I got kind of short circuit on the other options:

GND Hall sensor 1 Hall sensor 2 Hall sensor 3 VCC Notes
Black Blue Yellow Green Red Original
Black Blue Green Yellow Red Kind of short circuit
Black Yellow Blue Green Red Kind of short circuit
Black Yellow Green Blue Red Kind of short circuit
Black Green Yellow Blue Red Kind of short circuit
Black Green Blue Yellow Red Kind of short circuit

I think I will forget to use this board...

Link to comment
Share on other sites

About the firmware, now I have more knowledge and I think it should be more simple... and I need to go back. I were looking to OpenSource firwmare with FOC and VESC is currently maintained firmware: http://vedder.se/2015/01/vesc-open-source-esc/

I asked on VESC forum for suggestions to control the Unicycle and I got this help: 

Hey I'm building an self balancing electric skateboard like the OneWheel (http://onewheel.com)
I connected a MPU-6050 to an arduino nano. Then the arduino is calculating from the angle of the board the right amount of current with an PID-controll loop for self balancing.
The arduino is connected with UART to my VESC.
I'm using FOC because it gives me the best startup torque.
I'm currently testing the board and fine tuning.

So from the MPU I get the angle and the tilt rate. For calculation, I used an control like this: (https://frobotme.wordpress.com/2014/04/29/algorithm-for-self-balancing-robot/)

The arduino give the calculation over UART to the VESC (current value from -50 to 50). I used this library for this:https://github.com/erwincoumans/ArduinoServoTxRx/tree/master/VescUart
I'm using current control to control the torque.

http://vedder.se/forums/viewtopic.php?f=8&t=177&p=1008#p1002

Video showing the one wheel skate in action:

 

 

  • Upvote 3
Link to comment
Share on other sites

26 minutes ago, electric_vehicle_lover said:

No VESC as that would be another barrier for the users, as we can't buy easily VESC working boards.

 

I don't get it, there are a lot of VESC manufacturers following the vedder design. Lot of people use it for diy e-skate.

  • Upvote 1
Link to comment
Share on other sites

At the moment, it appears to be cheaper from Australia (!), didn't make a complete check http://www.enertionboards.com/electric-skateboard-parts/vesc-motor-controller/

You may want to check on the e-skate forum. (http://www.electric-skateboard.builders, http://diyelectricskateboard.com)

But vedder also say (http://vedder.se/2015/01/vesc-open-source-esc/) : "From enertion I got a space cell once and ollin gives me a percentage for each board he sells. The best soldering and assembly quality I have seen is from ollin boards. He does a very good job with the assembly."

http://www.ollinboardcompany.com/product/vedder-s-speed-controller

Made in Germany : http://esk8.de/  ;  http://www.hellray.de/shop/#!/VESC-V4-11-12-made-in-Germany/p/56097898/category=15255004

 

Edited by jbwheel
  • Upvote 1
Link to comment
Share on other sites

22 minutes ago, electric_vehicle_lover said:

60v is not enough for generic unicycles... :-(

 

35 minutes ago, jbwheel said:

@Tomek and @electric_vehicle_lover : VESC current is insane (50 to 240A) but it seems a bit short for voltage max is 60V, I dont know if it would be ok, especially during braking...

I didn't dive into the topic but my assumption is that switching the mosfets to higher-voltage rated ones and/or adding a good heatsink would make it suitable for 67.5V+ that EUCs are using, but maybe there are other voltage-sensitive components I'm forgetting.

Link to comment
Share on other sites

56 minutes ago, Tomek said:

I didn't dive into the topic but my assumption is that switching the mosfets to higher-voltage rated ones and/or adding a good heatsink would make it suitable for 67.5V+ that EUCs are using, but maybe there are other voltage-sensitive components I'm forgetting.

Changing IRFS7530 MOEFETs would be easy, for this one DRV8302 MOSFET you would need solder habilities unless you ask directly to the makers... What about lowering the max operating voltage of the motor ?

@electric_vehicle_lover 

Also for the same motor, more volt means more speed, more amp means more torque and VESC allow a very fine control of it... But increasing the wheel size allow to increase speed, just look at the MSuper2 where the wheel diameter is bigger but not the motor diameter.

Edited by jbwheel
  • Upvote 1
Link to comment
Share on other sites

3 hours ago, electric_vehicle_lover said:

By the way, I Just received a package from Microworks with the boards that have Bluetooth :-)

I really miss for development a serial port and now I will have it :-)

 

But this controller, in theory, is for unicycle 500w motor- 30km/h, not classic generic unicycle .

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...