After failing to fund the OpenRover prototype a couple of years ago, I decided to take a more incremental approach. OpenBLDC is a shield and eventually an integrated arduino with a ros interface.
BLDC shield for arduino and stand alone controller
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
After failing to fund the OpenRover prototype a couple of years ago, I decided to take a more incremental approach. OpenBLDC is a shield and eventually an integrated arduino with a ros interface.
I have built up a couple of the new boards. I figured out a flaw with the voltage regulator circuit and swapped out that part.
This makes the whole board a lot more stable.
Using a power supply, I was able to get the hub motor spinning both in forward and reverse.
So in the 2+ years since the last update a lot has happened.
My family expanded by additional boy this year and I am 2 years into my Master's of CS at Georgia Tech.
Children and school has drained almost all of my free time so OpenBLDC has been a tertiary goal. At the end of 2014 I purchased a hub motor off of alibaba and about a year later I purchased a second motor as well as two batteries and a battery charger. This motor will be a fundamental building block of OpenRover.
With the impending arrival of boy #2 this spring(2017), I took a semester off of school. The goal was to get the hub motors spinning so that I could submit an elective to build OpenRover over the summer. I was able to get two off the shelf motor controllers eval kits(Monolithic Power Systems EV6532). I spent January and February attempting to get the eval boards working with Hub motor. I hit one roadblock after another and was only able to get the wheels to move an inch before the controller would fault out. There was an ridiculous amount of noise on the circuit feeding back from the motor. I build isolation circuits and separate power regulators but gave up on these controllers.
My second attempt at off the shelf motor controllers were scooter controllers off of Alibaba. These were pretty low cost and I was able to get them in two weeks. I ordered three controllers so I could take one apart and evaluate the design. When I got the controllers they had about 7 pig tails on them, I could figured out power, motor and hall connectors but the company would not give me any documentation on the controllers.
So I took one of them apart and I was astounded my how simple the controller is. This design gave me some ideas on how to relayout my shield to handle the higher current(I pop traces on the original shield). Up late at night with my newborn, I was able to layout the new shield and submit them to dirtypcbs.
I have built one of the new shields and I hope to test it in the coming days. Additional Georgia Tech approve my elective and I was be building and modeling my rover over the summer with a Professor from France :) My hope is that I would be able to turn this project into a Master's thesis. I think I would be the first online student to do this.
This is a hub motor I found on Alibaba and finally got it in just recently. I build a test fixture for it and I just need to wire up the connector. It is 36V 250 Watts but is supposed to have a low free spinning current. It came with hall effect sensors so I am going to trying to get it working with them first and then might go back and work on the back-emf routine. It was fairly cheap but shipping was killer for just one sample. Hopefully get the cost down with higher volume.
Thanks for the post on Hackaday and I promise that I have not abandoned the project. Been a little distracted recently,
I promise that is a Hackaday shirt that I got from the Hackaday prize. I have made a really basic current limiting circuit but have not tried it out yet. I hope to get to it once things settle down shortly.
So I hooked the new motor up the controller and ran it with a 10 ms and 1 ms delays. Since there are 6 commutation states, I think this correlates to 1000 and 10000 rpm respectively. If any load is applied, the motor will stop spinning because the states are blinding running. One issue came up, the motor is rated 24V @ 30 watts but it is pulling 6.5 amps. I also noticed that the 24V rail was sagging to 12-19V. With this much current, the motor was getting very warm so I didn't run it very long.
Here is a video of the new motor running at the above speeds.
So I waited a week to get the new motor only to find out that the old one had toasted some of the FETs and some really odd behavior was occurring. I decided to build a new shield up from scratch but I had to order some additional FETs.
So today I got the current board to run through all commutation stages with the LED test fixture.
Here is the horribly simple architecture diagram. The pic makes the assumption that the Arduino io will drive the FET drivers. Hopefully this week I can get the new motor hooked up and running.
So I hooked the 3 phase motor I have up to the controller today. It spins then the power supply over current protection kicks in and the motors stops this process continues. I need to find a larger current power supply to see if Open loop control work. Here is some video
Progess is being made. I kind of dead bugged a LM317T onto the side of the shield. It creates a regulated 13V rail that will power all of the drivers. I also switched out all of the drivers for new chips that I had just got from digikey. At first 4 of the 6 commutation stages were working, but then I discovered one of the resistors was not soldered to the board and that solved the issue. Currently I am cycling through the 6 commutation stages with 100 millisecond delay between each stage. Here is a short video.
So I continue to troubleshoot the PCB. I hooked up the motor with a variable power supply and got to see the motor jitter a little bit but it caused the power supply to over current and something is just not right with the commutation stages. One of my coworkers suggested that I make a motor situlation with 3 resistors and 3 bi-color LEDS. So I hooked this up and I got 1 green, 1 red and a very weak red on the third one. The drivers seems to be getting too hot or something and shutdown after a while of running so maybe having direct access to the power supply is dangerous for these ICs. I am going to look into maybe putting a 15V regulator in between them and the 24V rail. The need 10-25volts to run but I am unsure about how much current they will try to pull especially when driving the fets.
So I hauled a bunch of my stuff to my parents for the holiday, much to my wife's dismay. My goal was to see if I could get the motor spinning open loop control. I brought a wall wart that output 14V@0.5A and I used three 1k resistors as the load. I cycled through the commutation phases and could see some voltage on each resistor. I changed the delay to 1 sec from 100msec and I could see 14V jumping from phase to phase. I changed the wall wart for the massive 24v@20A supply and I verified that the 24V was moving correctly.
I changed the timing back to 100msec and attached the motor. The motor did not move so I measured the voltage between two of the leads. As I did this one of the drivers popped, thus ending my testing. I really wish I had a scope to verify the faster timing voltages. I might try to see if I can use one at work, after I swap out the toasted chip. I am at a bit of a loss by the driver fried, I wouldn't think that the gate of the FET is pulling very much current. I am also wondering if there is a problem with the motor. I got it for free and I am thinking of purchasing a small motor just to test and develop the code. One of the secondary goals is to create a motor profile that can be loaded based on the type of motor being used.
Create an account to leave a comment. Already have an account? Log In.
It is really just for debugging the library. Just add the bldc library to your Arduino. I use softlinks so as I am working on the library it will automatically update.
...Arduino\libraries\BLDC\softlinks to .h and .c files in the repo
i am getting following error on compiling:
C:\Program Files (x86)\Arduino\libraries\BLDC\bldc.cpp:306:6: error: prototype for 'void BLDC::SetCommutationState(unsigned char)' does not match any in class 'BLDC'
void BLDC::SetCommutationState(unsigned char state)
^
In file included from C:\Program Files (x86)\Arduino\libraries\BLDC\bldc.cpp:24:0:
C:\Program Files (x86)\Arduino\libraries\BLDC\bldc.h:36:7: error: candidate is: void BLDC::SetCommutationState(char)
void SetCommutationState(char state);
^
Error compiling.
Just removed the unsigned from the prototype. I update the code as well. You might have to add the SoftPWM library to the project file.
Thanks , i am able to compile and load code to Arduino. I am trying to test this code with IRAMS power stage. Do i need to connect Hall sensors or it can work based in backEMF? as in code i do not see much reference to backEMF. Please elaborate.
yeah, I got a motor that has hall effect sensors so I started working on that. There is some code in there from Atmel that can do back emf but you would have to design the filters and voltage dividers for the specific motor. If you have Hall Effects I would work with that. Because the algorithm is just a look up table then.
It looks like you made a mistake in your latest schematic,
the middle of the voltage divider should go to your microcontrollers analog input,
and the high side should go to the motor connector pins.
My guess is that you most likely burned out the analog port already, unless you are running
the motor at a very low voltage
I have another question. Your schematics indicate that you run the ir2101 at 5v vcc. Does this work? I read elsewhere on the internet that it works at a minimum of 10v.
No, I had to added 12V regulator. I cleaned up the schematic about a month ago but for got to push it. I removed the pull down resistors and added the regulator.
Have fun.
https://github.com/Neuromancer2701/BLDC_ros_controller/blob/master/schematic/bldcshield_0_2.pdf
So does the back emf circuit work? It seems to measure up to 18 volt isnt this a bit low for a 24 volt motor?
Yeah, I haven't got that far yet. I started with a reference design and figured I would have to changed the voltage divider in the back-emf circuit before it was over. I got a new motor with hall effect sensors and just got a new processor to test would with the new motor. Once I get that working, I will work on the back-emf circuit and code. Thanks for the input.
Thanks for sharing this. I'd like to build one, and it would really help a lot if the schematic was annotated with component values. I'm sure you have a print-out of the schematic lying somewhere with the final values scribbled on ;) Thanks, and congrats on the "new project" ;)
Right now, the schematic is kind of rough. All the pull down resistors are not needed and you need to dead bug a 12V regulator to power the drivers. You can download the free version of Eagle and get the values there. But I have not verified the back-emf circuit yet, either I the voltage divider might not be high enough. Thanks for the response. I hope to make some progress over the holidays.
Become a member to follow this project and never miss any updates
hi can you help me please?
I need to replace ir2101 with ir2113 for prototyping... but I need help...