Simple BLDC controller

Electric Motors and Controllers

Re: Simple BLDC controller

Postby Njay » Fri Aug 12, 2011 9:11 am

Take a look at arduino too, it's cheap, and although it doesn't have any special hardware to deal with tri-phase motors but it has a simple C/C++ library and you'll find lots and lots of code and community support.
Njay
10 kW
10 kW
 
Posts: 556
Joined: Thu Sep 09, 2010 10:43 am
Location: Portugal

Re: Simple BLDC controller

Postby Arlo1 » Fri Aug 12, 2011 9:33 am

Njay wrote:Take a look at arduino too, it's cheap, and although it doesn't have any special hardware to deal with tri-phase motors but it has a simple C/C++ library and you'll find lots and lots of code and community support.

Whats the chances we could use the arduino programing for the PIC18F2431?
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5223
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Simple BLDC controller

Postby Njay » Fri Aug 12, 2011 9:48 am

Maybe someone built an arduino-like base library for PICs, but you'll find alot more code to deal with other devices that doesn't make part of the base library. arduino is very plug&play, and you can use your code later in a custom-board made with the same AVR chip, there's no special hw support needed to run it.

Anyways, this is just an advice to take a look at it too.
Njay
10 kW
10 kW
 
Posts: 556
Joined: Thu Sep 09, 2010 10:43 am
Location: Portugal

Re: Simple BLDC controller

Postby Arlo1 » Fri Aug 12, 2011 10:36 am

Njay wrote:Maybe someone built an arduino-like base library for PICs, but you'll find alot more code to deal with other devices that doesn't make part of the base library. arduino is very plug&play, and you can use your code later in a custom-board made with the same AVR chip, there's no special hw support needed to run it.

Anyways, this is just an advice to take a look at it too.

Yeh its very interesting. I personaly don't like what Im finding with PIC its all money based. The whole dam webpage is an advertisment for selling their own stuff. But I realy want this to be simple and cheep. I will do more reserch on the arduino because it is more what the electric revalution needs!
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5223
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Simple BLDC controller

Postby Arlo1 » Fri Aug 12, 2011 10:42 am

You can find it here for ~$29 and its a bord ready to go.... I might be able to drive the fet drivers right off this bord! http://www.robotshop.com/ca/arduino-uno ... ler-2.html
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5223
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Simple BLDC controller

Postby Lebowski » Fri Aug 12, 2011 10:56 am

Arlo1 wrote:
Njay wrote:Take a look at arduino too, it's cheap, and although it doesn't have any special hardware to deal with tri-phase motors but it has a simple C/C++ library and you'll find lots and lots of code and community support.

Whats the chances we could use the arduino programing for the PIC18F2431?


Trust me, you don't want to build your own programmer...

I'm a big fan of programming in assembler because it gives you total and utter control of what the processor
is doing, kind of like that old guy in North Korea.

With C you don't really know how it translates this into actual assembler code. With C you'll definately have
a speed disadvantage although things like calculations will be easier to program (but for me this is part of the fun of
assembler). Assembler is closer to the hardware.

Have a look at the (only 400 pages, http://ww1.microchip.com/downloads/en/D ... 39616C.pdf) datasheet of
the 18F2431, section 23 to see the cool commands available when programming assembler.
I know it seems daunting but it's not a book, more like an encyclopedia where you only read the few tables and
comments of the things you want to use.

What do you want out of your project ? Programming in C on the arduino will be easy and get you results relatively
quick, but you're not going to learn anything. If you spend some time learning about this PIC processer and
assembly language, you'll have learned a real skill. Also, most PIC's are alike so it'll be easy to switch
to different chips while with the arduino you're much more dependent on the service and designs they provide...
Plus, once you get into assembler and PIC's botching together a quick testcircuit and testprogram
gets really easy, I think with my still limited PIC knowledge I can design stuff just as fast as someone with C
and an arduino. But I'll have full control like the dictator that I am :twisted: while the arduino guy is hoping
for the best.

What do you mean expensive ? You need to buy a programmer only once and after that the PIC's are $3 each.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Simple BLDC controller

Postby Arlo1 » Fri Aug 12, 2011 11:09 am

As for the money Im just thinking the 50$ for a programer is not for everyone on this forum. I would gladly flash everyones chips for them but I don't want to be resposible for a code problem causeing them to blow up.

As for me I want full control. I will study the compititons chips as well incase I can get any usefull knoladge out of it and make sure I have the best.
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5223
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Simple BLDC controller

Postby Lebowski » Fri Aug 12, 2011 11:17 am

if you really want to program PIC's on the cheap, google for parallel port PIC programmer.

Most of this stuff is old though (for one I don't have a parallel port anymore) and probably won't support your 18F2431
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Simple BLDC controller

Postby Njay » Fri Aug 12, 2011 11:29 am

If you're going to program in assembly, choose AVR (arduino uses AVR) and save yourself a few headaches. The assembly on AVR is much more developer friendly.

If you're going to program in assembly in a PIC, then pick an AVR and program in C; your C AVR code will easily be faster than your optimized PIC assembly code. AVR's are very fast and have a decent machine-level instruction set, compared to PICs.

I used to be an assembly hardcore guy (and I've programmed assembly on Z80, x86, PICs and AVRs), but I don't find it justifiable anymore, given the speed available on modern microcontrollers; I prefer to have code I can easily read and maintain many months later. The GCC compiler for AVR does a wonderful job at optimization (the arduino environment uses it), and you can look at the assembly code it generates and give it a hand to make it do an even better job, if necessary. Really, just skip assembly and do it in C (through the arduino lib or directly in C; the lib is not very fast, but you can program in C without the lib using the same arduino development environment); later on you can improve your knowledge and skills by starting to dig deeper. The focus of your project is not on learning the machine insideout but to control your bridges.

You can program any AVR with a parallel port too (2 caps and 4 or 5 resistors), and that's what I still do today since my PC still has one (USB -> LPT won't work as a programmer).
Njay
10 kW
10 kW
 
Posts: 556
Joined: Thu Sep 09, 2010 10:43 am
Location: Portugal

Re: Simple BLDC controller

Postby Arlo1 » Fri Aug 12, 2011 11:30 am

Lebowski wrote:if you really want to program PIC's on the cheap, google for parallel port PIC programmer.

Most of this stuff is old though (for one I don't have a parallel port anymore) and probably won't support your 18F2431

Ok its time to move this discustion to a proper location go here for the new controller build, viewtopic.php?f=2&t=30851
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5223
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Simple BLDC controller

Postby tomson » Mon Aug 15, 2011 5:09 am

PCB drawn in Altium Designer

dimensions 6900mil X 3900mil
Attachments
3F_BLDC.jpg
tomson
1 µW
1 µW
 
Posts: 3
Joined: Sun Jul 27, 2008 3:02 am

Re: Simple BLDC controller

Postby evdesigner » Thu Sep 15, 2011 9:02 am

I'm new to the list and found this thread via a google search. Is there a link to files created for this project?
I've been designing BLDC controls for the past 10 years and have several low voltage designs that are in production
using the MC33035, TI DSP TMS320LF2402 and Microchip dsPIC30F2010 and dsPIC33FJ32MC204.
Some of those designs are here,
https://picasaweb.google.com/1021246811 ... tekDesigns
Thanks,
Rod
User avatar
evdesigner
1 µW
1 µW
 
Posts: 1
Joined: Thu Sep 15, 2011 8:55 am
Location: Portage Lakes, Ohio

Re: Simple BLDC controller

Postby Danny Mayes » Sun Sep 18, 2011 9:10 pm

Hi Rod,

All the files are in the previous pages of this thread.

Regards,

Danny
Unlike puppets we have the possibility of stopping in our movements,
looking up and perceiving the machinery by which we have been moved. In this
act lies the first steps towards freedom.
- PETER BERGER Sociologist
User avatar
Danny Mayes
100 W
100 W
 
Posts: 208
Joined: Wed Feb 16, 2011 10:17 pm
Location: Perth, Australia

Re: Simple BLDC controller

Postby HacknMod » Thu May 24, 2012 6:44 pm

I've modified Jeremy's original schematic and taken into account the work done by HardyM previously in this thread. I'm nearly done with the PCB and I'm going to have it fabbed next week.

Discussion and eagle files can be viewed here.
HacknMod
10 W
10 W
 
Posts: 77
Joined: Thu Oct 13, 2011 11:23 pm

Re: Simple BLDC controller

Postby HacknMod » Fri Jun 08, 2012 5:53 pm

I would be greatly appreciated if someone could answer my BLDC Brawn Board questions.

Thanks!

Joe
HacknMod
10 W
10 W
 
Posts: 77
Joined: Thu Oct 13, 2011 11:23 pm

Re: Simple BLDC controller

Postby Ruudi » Tue Aug 07, 2012 5:41 am

Very interesting and promising 26 pages of posts but what are the results? Has anyone been driving with this mc33033 simple controller and powerful outrunner on bike?
I had similar but low power controller done a few years ago and tested it with small motor from printer. Thanks to this theme I know now why it didn't start the motor itself.
Ruudi
10 mW
10 mW
 
Posts: 28
Joined: Tue Apr 10, 2012 3:26 am
Location: Estonia

Re: Simple BLDC controller

Postby Jeremy Harris » Tue Aug 07, 2012 6:01 am

Ruudi wrote:Very interesting and promising 26 pages of posts but what are the results? Has anyone been driving with this mc33033 simple controller and powerful outrunner on bike?
I had similar but low power controller done a few years ago and tested it with small motor from printer. Thanks to this theme I know now why it didn't start the motor itself.


Mine's been running an electric boat for a while, it's ideal for this because it has the ability to go from forward to reverse almost instantly, something the ebike controllers won't do without shutting the throttle and pausing slightly. I've not tried it on a bike, for no other reason than my bikes are already running with small, much modified, Chinese controllers OK.
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.
User avatar
Jeremy Harris
10 GW
10 GW
 
Posts: 4635
Joined: Tue Oct 23, 2007 4:15 pm
Location: Salisbury, UK

Re: Simple BLDC controller

Postby salty9 » Sat Sep 15, 2012 10:13 am

Jeremy,
I scanned the thread and could find no data on power output of your controller. Could you provide the power levels your are using on your controller? I am planning something around 5kw. Thanks for any info.
salty9
1 kW
1 kW
 
Posts: 480
Joined: Fri Aug 14, 2009 10:14 pm
Location: 42.6°N 122.71°W

Re: Simple BLDC controller

Postby Jeremy Harris » Sat Sep 15, 2012 10:37 am

salty9 wrote:Jeremy,
I scanned the thread and could find no data on power output of your controller. Could you provide the power levels your are using on your controller? I am planning something around 5kw. Thanks for any info.


It's buried in here somewhere!

The FETs I used were 75 V IRFP4368s, that are probably OK for around 100 A at up to around 60 to 65 V. Using the 100 V IRFP4468 FETs would allow operation at the same current at maybe 85 to 90 V.
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.
User avatar
Jeremy Harris
10 GW
10 GW
 
Posts: 4635
Joined: Tue Oct 23, 2007 4:15 pm
Location: Salisbury, UK

Re: Simple BLDC controller

Postby yellowfever13 » Mon Oct 01, 2012 2:41 pm

Hello,

Interested in selling your controller?? :)

If you are great, but I doubt you are prepared to do that. You mentioned "cheap chinese controllers". I have been searching for a good board for my project and all I have come up with are RC controllers. Which I have working, but it's a pain to configure them each time upon start. Do you or anyone else know a good source for some BLDC controllers? Thank you!
yellowfever13
1 µW
1 µW
 
Posts: 1
Joined: Mon Oct 01, 2012 2:33 pm

Re: Simple BLDC controller

Postby amberwolf » Mon Oct 01, 2012 3:34 pm

Lots and lots of them. But it depends on your "project" and what it requires.


First place to check is the Online Market section. Then there are threads in the Motor Technology section and some of the Technical sections describing mods to such controllers, that often have links for where to get them.


But the first place I would go is http://ebikes.ca.
House Fire Updates Thread


Got a question that isn't personal or private? Post it in the forums, don't PM it. ;)

Wiki your techy info so it doesn't get old, lost and icky:
http://endless-sphere.com/w


Full-Suspension Semi Recumbent Cargo Bike - NuVinci MidDrive
Semi-Recumbent Recycled-Parts Cargo eBike: "CrazyBike2"
DayGlo Avenger, MkII
User avatar
amberwolf
100 GW
100 GW
 
Posts: 13701
Joined: Mon Aug 17, 2009 6:43 am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group

Re: Simple BLDC controller

Postby casainho » Mon Oct 22, 2012 6:47 am

Hello Jeremy Harris.

Thank you for sharing all this information and knowledge. I am trying to build the "EBike Smart Controller (OpenSource)" but is programmed and with cheap Bluetooth module so we can configure the controller on the fly and also get information with SmartPhones about voltage, current and power usage. Here the project page: viewtopic.php?f=3&t=38337

I also use cheap chinese controller KUxxx series and I am using them to make the "EBike Smart Controller (OpenSource)" :-)

I linked this project on my project. Thanks!
Smart EBike (OpenSource): Dashboard/color display with touchscreen + Motor controller + Battery pack BMS:
  1. hackable/configurable options for advanced users
  2. Bluetooth communications with SmartPhones
  3. wireless communications between each three systems
Project page with documentation and source files: www.smartebike.likesyou.org
casainho
100 W
100 W
 
Posts: 254
Joined: Mon Feb 14, 2011 2:43 pm

Re: Simple BLDC controller

Postby TheMechatronicCreative » Wed Oct 31, 2012 10:44 pm

I am sorry if this has already been adressed. I am new to the Forum and still learning how to use it.

The MOSFETS that were used in this controller are IRFP4368 . From the Data sheet i see that the thermal Pad is also labelled as the Drain node. I have seen this on most of the IXYS FETs that i am interested in too.

I want to know how you isolated and facilitated thermal transfer. Is the thermal pad electrically isolated or an short to the drain pin?

I can see what looks like some thermal tape in the pictures of the heat sink mounted the the FETs. How much of a potential could thermal tape provide if the thermal pad is in fact connected to the drain? I am looking at Fets that are rated Vds = 200 Volts and would not want to have my heat sink with any chance of having a 200 volt potential across it.

any info helps

Thanks for your time. This design is a serious contribution to the DIY community.
Last edited by TheMechatronicCreative on Wed Oct 31, 2012 10:47 pm, edited 1 time in total. View post history.
TheMechatronicCreative
100 µW
100 µW
 
Posts: 7
Joined: Tue Oct 30, 2012 12:46 pm

Re: Simple BLDC controller

Postby Jeremy Harris » Thu Nov 01, 2012 3:06 am

Hi and welcome.

The majority of FETs have the drain connected to the tab, as it's a function of the way the silicon die is internally bonded to the copper inside the device. This does mean that they always need insulating from the heatsink. There are several ways to do this.

Probably the most efficient, in terms of good thermal conductivity, is hard anodising on the heatsink to provide and insulating, but thermally conductive, layer. This requires good surface preparation, though, and isn't really an option for DIY construction.

Either thin mica pads or Kapton tape provide pretty good heat transfer and adequate insulation for a couple of hundred volts. Kapton tape is easier to use, but mica washers are possibly slightly more reliable at high voltage.

Finally there is the cheap and nasty option, silicone rubber pads. These are almost universally used on cheap controllers from the Far East, but the thermal performance of these pads is pretty poor, so I wouldn't recommend them.

At 200V I think I'd just use standard mica insulators. These are available from pretty much any component supplier. Here's a link to a data sheet: http://www.keyelco.com/pdfs/p91.pdf

[Edited to add:

I should have mentioned that all of these insulators need a thin smear of thermal compound in order to perform well]
Last edited by Jeremy Harris on Thu Nov 01, 2012 3:07 am, edited 1 time in total. View post history.
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.
User avatar
Jeremy Harris
10 GW
10 GW
 
Posts: 4635
Joined: Tue Oct 23, 2007 4:15 pm
Location: Salisbury, UK

Re: Simple BLDC controller

Postby TheMechatronicCreative » Thu Nov 01, 2012 1:48 pm

Thanks for the update,

I normally mount my FETS for driving LEDs and such on the same heat sink.That is fine cause i dont really care about 24 volts DC, all my fets Drain voltages are the same.... and it is in a relatively controlled and isolated instalation. For this i use thermal grease. However if i get that stuff on my LEDs , instead of a short i see a few Mega Ohms of a few kili Ohms.

Do you apply the thermal grease to both sides of the Mica? so a layer is in-between the FET and the mica and the mica and the heat sink? i asume so but no harm in asking.

Also i have seen that there are little insulators for the mounting screw. plastic through holes if you will.

I am looking at BIG IXYS fets.... i think they mount with M3 screws. ANyways do you have a web store for the mica, and the M3 mounting screw insulators?

Regards,
TheMechatronicCreative
100 µW
100 µW
 
Posts: 7
Joined: Tue Oct 30, 2012 12:46 pm

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 4 guests