View Full Version : Discussion BLDC controller
Pages :
[
1]
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
KreAture
Feb 17, 2004, 08:40 AM
Well, I wanna be the one to start up the new thread in the DIY forums :)
To iterate, here's the old thread:
http://www.rcgroups.com/forums/showthread.php?threadid=181247
I won't repost any of the old stuff, let's get new stuff in!
I am planning to make a prototype circuit with a programmer buildt in for easy re-flashing now. It will only be the basic module and not have any motor peripherals. I was thinking of using a pinheader and linking it to the FET-board so that I may do changes on the design more quickly.
I will be experimenting with heavy filtering of the EMF signal with rpm-based table-correction of the signal phase. This should make it possible to design a very high commutation-rate controller without the need for fast ADC.
Mr DIY
Feb 18, 2004, 12:41 AM
So Kreature, what have you done so far? Have you managed to breadboard any circuitry yet? I am more than a little curious to see how your idea is going to work.
Brian
KreAture
Feb 18, 2004, 06:35 AM
I have simulated the filter to stry and eliminate as much phase delay as possible. The best I got so far was 3 deg predictable phase shift spread over the last 7-10.000 rpm. (Was targeting 10.000 rpm max on 12 magnet motor. = 6000 commutations / second.)
KreAture
Feb 18, 2004, 06:35 AM
Oh, and I don't breadboard. I etch and smt. Faster and neater.
Mr DIY
Feb 18, 2004, 07:00 AM
Oh, and I don't breadboard. I etch and smt. Faster and neater.
I do the same... however it was meant more as a figure of speech as in ...have you put anything in hardware yet. You answered anyway :)
whanderson
Feb 19, 2004, 04:18 PM
Originally posted by KreAture
Well, I wanna be the one to start up the new thread in the DIY forums :)
To iterate, here's the old thread:
http://www.rcgroups.com/forums/showthread.php?threadid=181247
I won't repost any of the old stuff, let's get new stuff in!
I am planning to make a prototype circuit with a programmer buildt in for easy re-flashing now. It will only be the basic module and not have any motor peripherals. I was thinking of using a pinheader and linking it to the FET-board so that I may do changes on the design more quickly.
I will be experimenting with heavy filtering of the EMF signal with rpm-based table-correction of the signal phase. This should make it possible to design a very high commutation-rate controller without the need for fast ADC.
I have received my BLDC PCBs and will start populating the bord in a few days. I use the Microchip ICD2 for in curcuit programming. This eliminates the need for a programmer on the BLDC and allows debugging in the actual target application. I am starting with AN857 and hope to move to dsPICs when they are available.
KreAture
Feb 19, 2004, 04:32 PM
Cool. I am currently redesigning my regular ESC. Making it more robust. (Removing a bit more noise from the system and getting the LVC working right. It will provide a platform for my brushless version.
Mr DIY
Feb 20, 2004, 12:56 AM
Well seeing we are giving current status reports, :) I am currently adding in/testing all that laborious software that does all the start up checks.. like look for correct PWM sequence from Rx, Battery voltage / FET driver voltage checks, Low voltage cut off, arming sequences/user programming ect.
My latest PCB is almost fully populated .. just needs the FET drivers and FPGA device. Still awaiting the FETs I ordered though.
Mr Takao.
I ran some tests on the ADC module and over-clocked it progressively up to 2MHz while watching the stream of samples sent to my PC. Samples where within 1 bit resolution for an 8-bit sample on a RX PWM generated voltage. Not bad for device that is clocked 10 times faster than the specified spec. I am yet to try the 4MHz clock as you have done, but I am more than happy with the 6 odd uS conversion time I am getting. It has allowed me to totally rethink how I am doing some routines.
Brian
MAVA
Feb 21, 2004, 11:00 AM
Kreature
Here is somthing that may help you with the journey of the DIY Brushless Controller.
Microchip application note AN857
http://www.microchip.com/1010/suppdoc/appnote/all/an857/index.htm
Link to all the Motor application notes.
http://www.microchip.com/1010/suppdoc/design/mtrcntrl/dezsecions/vspdblessdcmtr/ovrviewappntes/index.htm
Martin
jeffs555
Feb 21, 2004, 08:55 PM
I had looked at AN587, and was really curious about the sensorless design they show. Most other designs sense all three phases, but their sensorless design has input from only one phase . If the motor is running at a fairly constant speed, this should be fine and save a few components. I would wonder however, how well it would handle startup or rapid speed changes.
Jeff
whanderson
Feb 21, 2004, 10:11 PM
Originally posted by jeffs555
I had looked at AN587, and was really curious about the sensorless design they show. Most other designs sense all three phases, but their sensorless design has input from only one phase . If the motor is running at a fairly constant speed, this should be fine and save a few components. I would wonder however, how well it would handle startup or rapid speed changes.
Jeff
I am in the process of building AN857. I will let you know how it works.
KreAture
Feb 22, 2004, 10:18 AM
MAVA
I've read all their appnotes before, as well as all ST and Motorola notes. The challenge is not to get it to work. I know a lot of how it should and can be done. I am simply trying to get it done with a more elegant solution.
Mr DIY
Mar 01, 2004, 01:18 AM
Hmm ... all is quiet here. Anybody make progress? :)
I myself, waiting for last 2 of my outstanding components, the low drop regulator and most importantly, FETs. Should have them this week.
KreAture
Mar 01, 2004, 06:34 AM
I had great success with the new regulator I tested. 1.15v drop 1 Amp. Should suffice. Now to make a new prototype with ICSP header...
Mr DIY
Mar 01, 2004, 08:07 AM
Takao write - previous thread
I had found one interesting chip.
http://www.silabs.com/products/micr...xsig_matrix.asp
The development tool is $99!
Ooh! nice 8051 based micros. Very similar to the Analog Devices ADuc812 range. I have a few of the AD devices left, but found them very expensive when compared to the Mega 8. The thing that they have, as do the devices listed above, are the 12 bit DACs. They come in very usefull. Any clues as to cost Takao?
MAVA
Mar 01, 2004, 09:12 PM
KreAture,
Now I understand your position, this after reading previous threads..
Question???
The Code for " Takao"s BL controller does it work?
I know from reading the previous thread you said it did not work.
My question is how did showed his working( I guess this question is more for Takao ) model of his controller on flyable model-plane?
Martin
hadihf
Apr 29, 2004, 09:33 AM
This is Jo's SBL-Micro
underconstruction :D
MAVA
Apr 29, 2004, 09:25 PM
hadihf,
Thankyou for the good picture of the board.
Are you in the USA?
Did you get schematics with his kit?
I have not ordered mine yet.
Martin
hadihf
Apr 30, 2004, 01:37 AM
No Schematic...PCB and Pre-programmed MC from Jo :) ..but software updated are always available..and Jo is very helpfull.
Regards
quax
Jun 07, 2004, 04:41 PM
Hi,
I'm from Germany and about half a year ago I started to build a BLDC controller. It's my passion to develop hardware and software. Searching for DIY solutions I found a lot of material and tried some different experiments. My goal was a cheap and simple contoller.
Now I have a running board with running software - all brushless motors I have, work fine. There's a schematic in eagle format and a assembler source for the AVR AT90S2313. All that I collected for free on my homepage:
http://home.versanet.de/~b-konze/
The only condition is, that it comes as it is, without warranty of any kind.
The site is in German, but the schematic I think is international and the source is commented in English. The document that gave me the best hints was BPRA072.PDF for the TMS320F240 from Texas Instruments.
The voltage and current control is tested but not yet complete implemented.
I have a development board but not a PCB that fits into a slowflyer. Maybe there is someone out there, who's passion it is to make a good PCB.
Sorry for my English !
QUAX
Mr DIY
Jun 08, 2004, 02:00 AM
Nice work there Quax. I also used the BPRA072 for my design work. My main job at work is to lay out boards, but I have already made my own controller ….but I am sure somebody will want to do it.
Some questions though. Seeing your using a single chip to do everything, what is your PWM frequency and max. Controller frequency. Also how many amps can you get with your SI4420 & 25 devices?
My first attempt was something like you have done, but dropped it due to limitations. I could not get a high enough PWM frequency and the accuracy I wanted for very smooth operation. I found the latency time for interrupts became a problem … and opted for a logic device to handle the PWM and other timing issues.
Congrats for getting this far. Not many people have accomplished building a working brushless controller.
quax
Jun 08, 2004, 06:04 PM
Thanks Mr DIY
I have a period of 100µs that makes a frequency of 10kHz. The conroller runs with 8MHz. 100µs makes it all very easy: the rc-puls from 1100µs to 1900µs is evaluated and the range (800) than shifted right 3 times means divided by 8 - makes 100 and is directly used for PWM. Timer0 is set to 1µs and has only to generate the PWM and to evaluate the PWM state.
I designed all my interupt services as short as possible and have not recognized timing problems so far.
The FETs should run near to 8A. But then they should have at least a sheet of alu for cooling. Without I think it's good for 5A continuously.
My destinations are cdrom motors with neodym with the powerrange fo 6 to 7 cells and about 5A max.
QUAX
Mr DIY
Jun 09, 2004, 02:54 AM
Nice going. Thanx for the explanation :cool:
Mine is a little more complex in that it uses only N channel fets with FET drivers and has the PWM frequency configurable from around 4KHz to greater than 30KHz. I do like the simplicity of yours though for smaller motors.
mmormota
Jun 09, 2004, 11:15 AM
Hi,
Now I have a running board with running software - all brushless motors I have, work fine. QUAX
Great news!
As far as I know, your design is the only working open solution on the net.
I like the clean hw design.
Do you have test results?
(What is the maximum rpm ? Is it starting up safely all the time? The efficiency is comparable to a commercial controller? etc.)
danyra
Jun 09, 2004, 04:55 PM
well done QUAX
many ppl ( including myself ) started this project but very few ( 1 ? ) coplited it
congratulations
quax
Jun 09, 2004, 06:54 PM
What is the maximum rpm ?
There is an upper limit, fixed in the software, to detect a deadlock in the commutation control-loop. It is set to 0x40, that means an RPM of 58000, if 6 commutation-changes would make one round.
Is it starting up safely all the time?
I can stop the running motor and it restarts again. I never had a deadlock with this software version.
The efficiency is comparable to a commercial controller?
I think it is. With an excel sheet I made some efficiency calculations. The calculations were satisfying and the controller kept cold.
etc
I hope that this solution is tested not only by me. I'm not a pope for brushless. Therefore I hope for feedback from people who try out my design.
If there are detailed questions concering hardware or software, please let me know. I will do my very best to give a response.
QUAX
MAVA
Jun 10, 2004, 03:44 PM
Quax,
I Thank you for posting your work. I had found your web site from bldc.de website several weeks ago.
You have posted the true DIY brushless controller.
What is the range of Motors your speed controller(I know some speed controllers have problems with LRK outrunner type motors) work with?
(What is the timming range?)
Can you post a viewable JPEG of the Schematic?
What is the maximum number of cells have you used your controller on?
If you use a large(over 40v) amount if cells, do you need to modify the "Sense" resistors in the opamp(I think it is a comparitor) and the same for a very low cell count(3v)?
Thank you,
Martin Vargas
mmormota
Jun 10, 2004, 05:37 PM
I hope that this solution is tested not only by me. I'm not a pope for brushless. Therefore I hope for feedback from people who try out my design.
If there are detailed questions concering hardware or software, please let me know. I will do my very best to give a response.
QUAX
Thank you very much for publishing the design.
I build it - it seems to be great fun. I enjoyed very much building small CDRom motors, and now I can build to controller too... :)
I know how much work is necessary to write and test real-time code like this - thanks again.
If my pcb is working well, I of course publish the pcb plan. I like to use a bit higher current FETs, as they are available in small form too (going up to about 10...15 Amps) Schematics can be the original, as the FET input parameters are similar.
quax
Jun 16, 2004, 04:17 PM
Hi,
someone finished creating the PCB. It looks great! 40mmx21mm and 0.8mm thin. We will test it in about 2 or 3 weeks. If all is ok I will place a link on my homepage to the PCB data. Meanwhile I implemented the voltage control with success and I expect to have the current control also implemented, when the board is ready.
Ciao
QUAX
quax
Jun 16, 2004, 04:36 PM
MAVA,
I think there are some remarks in previous replies with answers. The advantage of open design is that everyone can change parts for his own demands. If you redesign the powersection you can higher the voltage.
3V is very interesting. I think about a single li-poly cell supply. The parts on the bldc should work, but I don't know other components, specfied to work for shure with 3V. Of course some value changes have to be made to the bldc design and the max current will become lower.
A greater schematic can found on my homepage.
Ciao
QUAX
clipclop
Jun 16, 2004, 07:52 PM
QUAX,
Your a champion !!,
There are many so called DIY controllers on the web, Yours is the only fully available FREE DIY . Thanks heaps for all your work .
Stewart
odalaman
Jun 21, 2004, 08:41 AM
Hi QUAX,
I can not be able to locate "SI4420N" mosFETs. Who is producing them. Do you have a link so I can get the data sheet?
odalaman
Massi
Jun 21, 2004, 09:03 AM
Hi QUAX,
I can not be able to locate "SI4420N" mosFETs. Who is producing them. Do you have a link so I can get the data sheet?
odalaman
Try at Vishay site:
http://www.vishay.com/docs/71818/71818.pdf
it's SI4420DY but it seems to be the same.
Massi
voltesep
Jun 21, 2004, 05:10 PM
just starting out playing with these modified cdrom motors,would love to have a go at building one of quax controllers but cant find the link to the software?
anyone help out?
paul
Ron van Sommeren
Jun 21, 2004, 07:31 PM
@voltesep
More do-it-yourself brushless controller designs:
http://www.rcgroups.com/forums/showthread.php?t=140454
Met vriendelijke groeten ;) Ron
• diy outrunner discussion group (http://www.yahoogroups.com/group/lrk-torquemax)
• int. E fly-in & diy outrunner meet (http://home.hetnet.nl/~ronvans/), Nijmegen, the Netherlands -> 2005
mmormota
Jun 22, 2004, 03:36 AM
just starting out playing with these modified cdrom motors,would love to have a go at building one of quax controllers but cant find the link to the software?
anyone help out?
paul
http://home.versanet.de/~b-konze/blmc_bko/blmc.htm
odalaman
Jun 22, 2004, 03:39 AM
just starting out playing with these modified cdrom motors,would love to have a go at building one of quax controllers but cant find the link to the software?
anyone help out?
paul
Hello Paul,
Here is the link :
1- For ".asm" _ http://home.versanet.de/~b-konze/blmc_bko/blmc.asm
2- For ".hex" _ http://home.versanet.de/~b-konze/blmc_bko/blmc.hex
Good luck
odalaman
mmormota
Jun 22, 2004, 05:08 AM
I am about to design a pcb in Eagle for the controller. (publish it if succesful)
I have a few questions:
- what is the frequency of the quartz?
- the battery side capacitor is only 100nF, is it OK? (commercial controllers have elko there)
Some ideas:
- 2 layer design to keep pcb price as low as possible
- 1206 size parts, easier to handle manually
- because of the above, it has to be bigger then the Jeti 04 or cc10, but I do my best to keep it small
- ceramic resonator (probably the accuracy is not very important, less sensitive to mechanical stress and smaller)
- 2 parallel 5V stabs (optional of course), as a single one maybe overloaded
Opinion?
odalaman
Jun 22, 2004, 06:05 AM
I have also started designing the PCB in Eagle, but I choose to design a single sided hybrid board, that is using both through hole components and SMD components, on different sides of the PCB. I am experimenting with the idea to have a simple-to-build-at-home PCB. But I think it will take some time to finalize this design.
An other possible solution could be seperating the driver board and the power board. With this solution, maybe it coud be easier to use the same driver board on different power boards with varying amp limits.
The freq of the xtal is 20mHz (at least thats what I see in the original EAGLE schematic). I think the ceramic resonator will do but like you, I am not sure.
I think the battery side cap should have a bigger value.
mmormota
Jun 22, 2004, 07:08 AM
Hmm, 20 MHz? On my schematic (v1.02 2004.06.09) there is only Q1, no freq. According to the datashheet, the maximum frequency is only 10MHz. Maybe there is a higher speed family member? I searched for the freq in the .asm too, but without success. But understoodd what is the job of the schottky diode... :)
I like to make a PCB wich is compact and not bigger then a usual commercial one. The power tracks must be thick, so I dont think I can design a small pcb using only 1 layer. Easier to put the smd FETs to one side with thick copper tracks, the rest and the majority of the signal routing to the other (of course some signal tracks have to go to the other side too).
For small motors, maybe 2 different boards (one for 10A, the other for 20...25A) is more compact then a separate driver board. Higher amps is a different question, but it needs modifications on the schematic too.
Battery side cap: I put 2 pads to the side of the panel. Then it is posible to use a big alu cap (laying outside the board, Jeti style) or a smaller smd one onboard.
clipclop
Jun 22, 2004, 07:21 AM
mmormota
805 sized SMT components would greatly reduce the PCB size , and they arent difficult to work with . I use 403's on my receiver and find they too are easy to work with . The hardest part of useing the small SMT components is getting past the idear that they are small , once you try useing them you will wonder why you stressed over them so much .
Stewart
Mr DIY
Jun 22, 2004, 08:28 AM
I use 403's on my receiver and find they too are easy to work with
You should design around what you can purchase. Size 0805 and 0603 is normally available. Not so much 0402. I use a microscope to help with the soldering on 0603 components as the naked eye cannot see how good the solder joint actually is. Most people would not handle 0603 easily and 0402 is out of the question without magnification
As for the design of this controller, there are a few questions. Yes, that schottkty .?
What about FET drivers. The output of the processor has limited drive capability. For low power motors, you may get away without the drivers, but as the current capacity goes up, you need to turn the FETs on effectively.
As for the current limiting circuitry referred to in the ASM file, a comparator is looking at one of the sense lines and comparing it to a reference, that being a voltage divider from the power supply. I am not sure how this works or how effective it is. I need to look at this a bit more closely
Brian
stumax
Jun 22, 2004, 09:01 AM
I would agree with odalaman that a separate power board would be good. That way we could use it for a whole range of planes. Another good feature would be the ability to set advance using and array of dip switches or even a trim pot. On my own esc's I used optos between the fet drivers (gotta have fet drivers!) and the micro, just in case. I also wonder if the Rx signal should be similarly isolated. BTW, nearly every circuit I see for an esc has an n channel transistor accepting the Rx's signal - even the one's with micro's on board. What's the reason for this? Surely the Rx can drive the input pin of a micro directly? (my esc's do, but I don't know if it's doing any harm to the Rx).
Regarding FET choice, I've had more success with TO220 fets than any surface mount ones. I've found that you could get away with 2x TO220 fets per leg of the bridge and be better off than god knows how many smd ones. Infineon are making some excellent fets for our stuff now, with as less than 3mohms on resistance for a 42V device. I use a 10ohm resistor on the gate to limit gate current at turn on, with a diode in parallel with the resistor to allow faster switch off. There are several advantages to the larger fets, the tab can be bolted to a heatsink (with an insulating spacer), the tab increases the thermal inertia, so the junction doesn't heat up as much when pwm-ing, the thermal de-rating is less than for an smd fet, and finally, less legs to solder. Sure, if you're really concerned about weight and size, go for so-8's, but use plenty of them, which then makes driving them all an issue, and with most of us now wanting good throttling efficiency, turning the fets on and off super quick is of utmost importance.
BTW, has anyone breadboarded something up to see how well the code works?
Stu.
odalaman
Jun 22, 2004, 09:07 AM
Come on QUAX. We need your ideas as the designer of this circuit. You have the honors to talk in the first place.
odalaman
mmormota
Jun 22, 2004, 09:38 AM
As for the design of this controller, there are a few questions. Yes, that schottkty .?
The schottky is a part of the current limiter sensor (as a 0.3V "zener" :) ).
If the voltage drop is bigger on the chA P fet then the voltage drop on the schottky, the inbuilt analog comparator senses it. Of course it has to be checked when the FET is open.
SMD parts: I am EE (working in development). We are working with very small components too, but our tools are above average. I like to use components that can be soldered with average irons and what's more important... skills :) . Probably you are right, 1206 is too big, let's go with 0805.
Quartz: I think a cheap and very small Loko resonator do the job. In this phase frequency is not very important - there are different freq ones same size. However, is there a schematic with the frequency? 20MHz seems heavy overclocking.
FETs: most people uses small motors, CDRom motors, PJSs, small AXIs, they need a light and small board - TO220 is big and heavy. For higher power (200+ Watts) it is OK.
quax
Jun 22, 2004, 05:59 PM
Hi,
I use 8MHz for the crystal. That makes 1µs ticks for the timers and is a comfortable timebase for all calculations.
R16 has to be 10k not 20k. If the current flows and the voltage at the P-FET is higher as the voltage at the diode, the comparator will switch. The moment I have some problems with the implementation: the current control seems to give signals at 5A and I expected them at about 10A. Maybe I scan not at the optimal moment.
The voltage control is ready to use, I think.
There are some mismatches between schematic and source. I don't have a board with exact the schematics design. The board I have in use is that what you can see in the history. CpFet and ApFet are exchanged there.
SI4420DY is the correct name.
My testboard and the first experimental board work fine, but I want to see the code working not only on my desk. I'm waiting impatiently for the PCB, I told you about.
If someone has a design ready, I will help to transfer the code to the design properties. I think that the design should be done for own demands. If the feedback uses the design of my schematic, the motor control loop should work.
QUAX
zagisrule!
Jun 22, 2004, 08:48 PM
Use the D2-pak (TO-252) MOSFET's. They will handle quite a bit of current, but are still quite small.
I use 603's and 805's for most of my stuff, anything smaller than that is useless almost all the time anyway because they are like 1/32W or something even smaller. 402 is commonly 1/16W.
Ceramic resonators are easily available and in small SMT sizes that eliminate the loading caps associated with crystals...we can get even smaller there.
It is not too complicated a circuit, shouldn't be to tough to route it up. I might give it a shot too.
-Matt
PCB Designer
Speed-Cubed
voltesep
Jun 23, 2004, 05:31 PM
first off:
thanks gents for the links to the code
but i have come across another problem (for me anyway) with the sch, eagle cad lite wont auto route and i cant import it into my protel 99se, does anyone know of a way i can convert it?
spent ages playing around getting it as small as possible just to find that i cant auto route it bit gutting really, maybe its a bit mean but i dont really want to pay for another program when i have protel
any ideas?
thanks
paul
zagisrule!
Jun 24, 2004, 12:03 AM
Just route it manually, it is not a big thing to do...sharpen the skills a bit too? ;)
Or re-draw the schematic in the Protel schematic capture?
-Matt
Mr DIY
Jun 24, 2004, 01:50 AM
Just route it manually
As it is my full time job to create PCBs, I cringe at that comment. :) Some good packages dont even allow that anyway. You need to start with a netlist.
PS: Autorouting not recomended ... unless you have the experiance to setup good rule sets and make the router do the board properly. You need to have the tracks placed in the best positions and not just anywhere.
I would re-capture the schematic into whatever package you prefer using and create a suitable netlist from which to work. You will probable need to create a few new components/footprints anyway, so why not do it properly. It is a tiny circuit. I t will go quickly.
mmormota
Jun 26, 2004, 07:27 AM
I am working hard on the PCB... :)
Minor modifications on the schematic:
- New solution to the overcurrent detector: no schottky but a pair of resistors to the comparator inputs, one to the ground, the other to the 5v stab. While the resistors are equal, the treshold independent of the Vcc, and now possible to set the trigger level by tuning the resistors pair (again, the 2 must be egual).
- 2 pcs LM2940 parallel, sot223
- elko on Vcc
- ceramic resonator, 2 or 3 pin possible (cheaper, less sensitive to vibrations)
The pcb is a bit bigger then I planned first, this is the deal for the cheap tecnology (double side only, 10 mil resolution etc.).
KreAture
Jun 26, 2004, 08:12 AM
Nice. But I have a question...
Do you have any experience paralelling LM regulators? Very often they will fight eachother due to a small 0.1-0.5% difference in accuracy and they can thus suck a lot of extra current.
Also, for the 3 pads to solder motor wires to. Don't route em to the end of the board. Use the same technique as used in the Castle Creations Phoenix 10 controllers, simply leave the pads between the N/P FET sets and let the motor-wires stretch onto the pads. The track resistance on the PCB is a lot higher than the motor-wires.
mmormota
Jun 26, 2004, 11:53 AM
I hope they are not fighting. Both sources only the current, not sinks from the load side. The lower voltage one just waits until the the voltage drops. I have no experience, but the CC10 seems to work this way.
KreAture
Jun 26, 2004, 12:48 PM
Just be careful with the parts selected, some actually sink and source...
kawasaki
Jun 27, 2004, 03:20 PM
I am working hard on the PCB... :)
Minor modifications on the schematic:
Nice work mmormota .
And I have find that you have elimated the UART and ISP connector, isn't it.
I also route the PCB with Protel manually. Because the SMD descrete components (such as R, C, Xtal, Connectors...) are dependent on supply source, I don't think that one design can fit every DIY people.
mmormota
Jun 27, 2004, 10:02 PM
I finished the pcb design.
NOT tested yet. I did some minor modifications on the schematic too, please check it and let me know if there are bugs. I included the modified schematic in png form too, if you are not familiar with eagle. Eagle brd file is in the zip too.
The .zip attachment is not worked in the newsgroup (maybe big?) so:
http://mmormota.uw.hu/blmc_v1.zip
Enjoy...
mmormota
Jun 27, 2004, 11:24 PM
Nice work mmormota .
And I have find that you have elimated the UART and ISP connector, isn't it.
I also route the PCB with Protel manually. Because the SMD descrete components (such as R, C, Xtal, Connectors...) are dependent on supply source, I don't think that one design can fit every DIY people.
Thanks. I decided to put back the UART, but the ISP is just too big, However, for program development, one can solder on the wires... :)
KreAture
Jun 28, 2004, 05:14 AM
mmormota, can't you use a rs232 based bootloader ?
I am doing that in my ESC. Basically the bootloader sits in a 128 word memory-block and can reprogram the entire rest of the memory from a simple 2-wire rs232 interface.
The rs232 can be used for debugging too. Very practical.
mmormota
Jun 28, 2004, 06:13 AM
mmormota, can't you use a rs232 based bootloader ?
I am doing that in my ESC. Basically the bootloader sits in a 128 word memory-block and can reprogram the entire rest of the memory from a simple 2-wire rs232 interface.
The rs232 can be used for debugging too. Very practical.
I am using that too. But this program is made by Quax, not me. I just developed a pcb for his design. However, there is the 2 wire + gnd connector onboard... :)
I am working with the Texas MSP430, Misubishi M16C, PIC, 8051 but not the Atmel AVR line so far. We have a MSP430 based device with Bluetooth connection, the firmware can be updated with the bootloader using Bluetooth too.
KreAture
Jun 28, 2004, 06:29 AM
Cool. I just wrote a bootloader for the Microchip PIC16F88 wich only uses 125 words of memory. Yet it contains checksum control of data, interrupt context-saving and is 100% bullet-proof once installed. (It won't let you breake the bootloader so the chip would have to be re-flashed manually.)
danyra
Jun 28, 2004, 07:19 AM
Nice work mmormota .
And I have find that you have elimated the UART and ISP connector, isn't it.
I also route the PCB with Protel manually. Because the SMD descrete components (such as R, C, Xtal, Connectors...) are dependent on supply source, I don't think that one design can fit every DIY people.
Well generaly you right but I ( maybe others also ) will have dificulty to buy
100% of the parts , also to make the pcb by myself.
so the best solution is if some company ( one man / home based ? ) will gather all parts and pcb to a kit and ship them .
Mr DIY
Jun 28, 2004, 07:39 AM
:)
Forget about kits for now. I want to see this controller work.
Still sorting out odd software bugs in mine at present. It can fly, but I want everything to be perfect. And knowing how difficult this is ... like a perfect start up on a 12 pole CD rom motor with major cogging every single time, I will wait to see the feedback from others here. It is sure going to be interesting. I am a bit concerned that the design lacks FET drivers though.
mmormota
Jun 28, 2004, 08:23 AM
Well generaly you right but I ( maybe others also ) will have dificulty to buy
100% of the parts , also to make the pcb by myself.
so the best solution is if some company ( one man / home based ? ) will gather all parts and pcb to a kit and ship them .
The pcb is not tested yet. The sw iw working accoerding to Quax (the author). I am about to test it, waiting for the panel.
About the components:
I made a search for available parts in Digikey.
N channel Fet (Si4420 on the schematic):
FDS6670ATR 0,74 USD/1pcs
P channel Fet (Si4425 on the schematic):
IRF7424 2,01USD/1pcs
Stab (LM2940 on the schematic):
LM2940IMP 2,05USD/1pcs
CPU (AT90S2313 on the schematic):
AT90S2313-10SI-ND 3,91USD/1pcs
Considering I found all main parts in one online shop, buying parts seems not so difficult. :D
PCB: check www.Olimex.com
They offer a protptype board for 26 USD + 5 USD S/H.
They receive the Eagle .brd file online. I just ordered my board, waiting for response. (I hope 9 pcs of my board can be panelised to their standard board size... :) )
Let's see, how the firmware and the board will work... ;)
mmormota
Jun 28, 2004, 08:30 AM
:)
Still sorting out odd software bugs in mine at present. It can fly, but I want everything to be perfect. I am a bit concerned that the design lacks FET drivers though.
What is your controller choice? Do you plan to publish the code too?
:)
I am a bit concerned that the design lacks FET drivers though.
No problem, it is a common solution in low power commercial controllers. I am pretty sure it will work.
Mr DIY
Jun 28, 2004, 08:52 AM
What is your controller choice? Do you plan to publish the code too?
As mentioned before, mine is somewhat different and bit more complex. I am using the Mega 8 device along with an Altera logic device. In hind site, I could replace the Altera device with a second Mega8.
It is my intention to start a thread within the next week or two that will work through the entire design including the code in 'C'. I intend the thread to be different to the norm, as the intention will be to educate people on BLDC design. Instead of a newby hunting down app notes as most of us here had to do, I would like the thread to become one. A reference so to speak :) We have a few threads here, but the information is spread out all over the show.
What do you guys think about the idea.
hadihf
Jun 28, 2004, 08:56 AM
Si4425DY = FDS6675
Farnell No. 3545015
KreAture
Jun 28, 2004, 09:00 AM
My designs don't use drivers either... I found that using FET's with 1v/-1v gate threshold values gave very fast switching. For the P's a pull-down could work, but a push/pull setup would be faster. Drivers tend to take way too much board-space. The push/pull set of FET's can be found in a 4 pin package smaller than a SO223 :)
Mr DIY
Jun 28, 2004, 09:12 AM
I found that using FET's with 1v/-1v gate threshold values gave very fast switching
The trend is to go for these logic level FETs, but the gate capacitance lands up being higher than the norm which does result in slower switching... which may well be within your requirements still? Just what sort of switching speed are we talking about here though?
As for the smaller packages you mention, just how many amps are you trying to pull through these devices. Even a FET in SO8 is getting too small for its thermal ability.
I suppose it is all about how many amps though and more specifically, what PWM frequency you require. :)
mmormota
Jun 28, 2004, 09:37 AM
The Phoenix cc10 has S0-8 Fets (irf7831 and fds6679) without drivers, and works well up to 10amps, even more...
KreAture
Jun 28, 2004, 09:42 AM
Well. Yeah. Higher PWM frequency is actually a good thing if you are using my method of filtering the pwm noise from the composite back-EMF signal. However it is a downside when you get to the gate capacitance, I agree.
If one could switch at 30khz or more it would really be benefichial for my design.
I only need a single pin on the controller for EMF feedback and to avoid emf offset errors I have to use dual sided PWM but that is done in software, masking or unmasking the commutation words.
I have forgotten the calculations so if anyone could remind me what currents I need to source to switch a 4-6000 pF gate at 30 kHz and still have 99% steady states I'd be happy...
Mr DIY
Jun 28, 2004, 09:55 AM
Hmm ... I must admit the use of FET drivers confuse me at times .. as somebody will design one in and then put in some high value resistor in series with the FET gate that appears to defeat the whole purpose of using a driver in the first place.
Anyways, glad to see you are getting away without em. Would love to know the PWM capability of the cc10 is mmormota. Would you know by any chance?
PS: Nice work with the layouts here. :cool: Like the 3D pcb tools being used. What package is it?
mmormota
Jun 28, 2004, 10:08 AM
Considering about 1V gap between "current low enough" and "current high enough" ( delta_U_gate = 1V) it is as follows:
f_switching * steady_ratio * 2_switcing_in_a_cycle * C_to_charge_ * _delta_U_on_gate = I_gate
30 * 10^3 * 100 *2* 6000 * 10^-12 * 1 = 36mA
KreAture
Jun 28, 2004, 10:18 AM
If your calculation is correct, the PIC I use can do this easily :)
It can source 25 mA continously but spikes of a lot more is possible.
As to the resistors inserted in path of the driving current, it is actually to create a smoother swithing (wich will loose more power due to half-on current-conductance in the FET) to eliminate a bit of the high frequency switching noise. Even a small resistor in series could reduce the number of significant harmonics by 90% or more.
mmormota
Jun 28, 2004, 10:19 AM
Would love to know the PWM capability of the cc10 is mmormota. Would you know by any chance?
Castle Creations claims 11 kHz PWM.
PS: Nice work with the layouts here. :cool: Like the 3D pcb tools being used. What package is it?
Thanks. It is just the free limited Eagle, with the Eagle3d addition (free too). :D
It was my first pcb in Eagle, takes me 3 days including nights. Most of the time I learned Eagle itself, struggled with the huge vias (Olimex standard...) and constructed library elements what are recognisable for the 3d addition. :D
However, I enjoyed the work a lot - in job I deal with program plans, maybe schematics but not pcb-s. Didn't designed a single pcb personally many years ago
Mr DIY
Jun 28, 2004, 10:32 AM
Castle Creations claims 11 kHz PWM
To be honest, it is slightly higher than I expected. Thought it would be under 10KHz
You know, I will try bypassing the drivers on a second PCB that is almost finished. Will do some tests and see what goes on for myself. Should be an interesting experiment.
However, I enjoyed the work a lot
mmormota .. That is clearly visible :)
Till tomorrow.. Brian
mmormota
Jun 28, 2004, 10:45 AM
If your calculation is correct, the PIC I use can do this easily :)
It can source 25 mA continously but spikes of a lot more is possible.
As to the resistors inserted in path of the driving current, it is actually to create a smoother swithing (wich will loose more power due to half-on current-conductance in the FET) to eliminate a bit of the high frequency switching noise. Even a small resistor in series could reduce the number of significant harmonics by 90% or more.
I just did a small simulation (using spice, SwitcherCad, free and great!). The circuit:
Si4420DY fet, Vcc=12V, load resistance R_load = 2 Ohm (for 6A load)
Drive: 0V/5V voltage generator and 100 Ohm in series of the gate.
Observed the drain voltage.
Switching times (5% to 95%): about 0,35 usec from low-to high, about 0,5 usec high_to_low.
It is not a heavy drive, easy to do better.
With 33 Ohm both are well below 200 ns.
stumax
Jun 28, 2004, 11:19 AM
Why 100 Ohm (so high) in series with the gate? Is there a ringing problem? I find 10 ohms is plenty for ball busting fets (ie 100A+), although I've never played with little ones. Also, to get the turn off a bit quicker to avoid shoot thru (as you may get in the above) I place a diode in parallel with the gate resistor so that it can dump it's charge around the resistor, not thru it.
Nice looking board, BTW, I may try one myself for my Axi 2212 I just ordered. Is anyone interested in getting some boards made up? I'd do it, but I think most of them would be leaving my country, so it probably makes more sense to make them over there.
Stu.
KreAture
Jun 28, 2004, 11:35 AM
I would like to learn a good way to make vias for 2-layer boards. I can pattern-transfer and etch em very precicely, but I can't make good vias. I'd either have to depend on pinns going through board or solder in small wires (wich is a PITA!) to get good joints.
As for the noise reducing resistors... Some circuits are rated with a max energy burst too, not just a continous current value. If the chip can deliver, I say switch as fast as you can :) We'll worry about the noise somewhere else.
mmormota
Jun 28, 2004, 11:36 AM
Why 100 Ohm (so high) in series with the gate? Stu.
I just didn't modified that part of Quax's original schematic. I think it should work with direct connection to the microcontroller output too. However, a small resistor is safer, prevents ringing. As I haven't tested the real thing yet, I don't know how it works in real life. When I get my pcb, I will test and modify the drive if necessary.
mmormota
Jun 28, 2004, 11:50 AM
I just got the answer from Olimex.
The calculation: 26 USD (board) + 5 USD (airmail) + 2,6 USD (exceed 500 holes limit) = 33.60 USD
Good price I think. The 2,6 USD extra is good sign: as I have 59 holes on the board, it means that they panelized 9 pcs to their 160*100 standard board. This is the maximum possible. :D :D :D
KreAture
Jun 28, 2004, 12:06 PM
Hmm. I'd rather make the boards myself... (It's fun!)
quax
Jun 28, 2004, 05:49 PM
Hi,
unfortunately the AT90S2313 is not able to write the flash under program control. The ATtiny2313 can do, but I don't have a loader for AVR.
I designed the board as cheap as I could, because I want to use more than one motor at a time.
For example a plane: the first controller is connected in normal way with the receiver and the others via serial with the first. It is possible that the motors start up one after the other, as in real live.
I also plan a quadcopter with a central "intelligence" that control the motors also via serial.
To reach my dreams I need a cheap controller as well as a changeable software for it. That are my goals, I think erveryone have his own goal.
Concerning the controller I agree with Mr DIY:
I want to see this controller work.
If the function is proven not only on my own desk then there may be changes for all demands (improvements). But first it should be reproduced with success.
QUAX :)
quax
Jun 28, 2004, 06:16 PM
I have a question concerning the "new reply".
In Threaded Mode I see trees with the relationship between posts.
How can I go to the front of the tree?
Sorry, but I could not find an answer in the FAQ.
QUAX :o
Comatose
Jun 28, 2004, 11:33 PM
Stumax,
One of the nice things about brushless drives (asd opposed to bi-directional brushed) is you always have 60 electrical degreen between the top and bottom transistors in a pair being on. This means shoot-through is, for all intents and purposes, impossible.
Also about drive resistors, does anyone have any hard data on pulse handling from PIC (or AVR, or other common microcontroller) IO pins? I think the smallest I've seen on a microchip datasheet is 33. Getting away with something on the bench and having it hold up over time are different animals. OTOH, certainly we can get over 25 mA pulses without sacraficing device life. Anyone have a pulse handling chart for PIC? I've seen them for resistors, caps and MOSFETS.
Bruce Abbott
Jun 29, 2004, 06:07 AM
Microcontrollers are usually designed to drive digital logic or resistive loads, so they don't have a pulse rating. Taking the PIC16F628 for example, its maximum rated PORT I/O current is 200mA, which probably equates to shorting the output to GND/Vcc. Maximum power dissipation of the package is 800mW, effectively limiting continuous I/O pin current to less than 200mA. Also the maximum Vdd current is only 250mA.
Another reason for not loading I/O pins too much is that read/modify/write instructions (BSF, BCF, IORWF etc.) may fail if the pin's voltage has not reached the logic level set by the previous I/O instruction. This can be a problem when driving power MOSFETs, due to their very large gate capacitance. If you need to drive paralleled MOSFETs at high frequency then I suggest using a buffer (some are needed anyway to drive the high-side FETs).
KreAture
Jun 29, 2004, 07:07 AM
Actually, the level needed for a logic one on a pic pin is quite low. and you can drive a massive capacitive load without problems.
The max power dissapation is 1 watt now on the new 16F88 wich I am using and again that is continous dissapation. 2 watts 50% duty would then be within spec!
I will soon see what happens in my circuit when I drive 3 FET's at 4000 pF each. Will be running them at 3 kHz first. I will try capturing something to the computer for posting.
Mr DIY
Jun 29, 2004, 07:16 AM
Actually, the level needed for a logic one on a pic pin is quite low.
KreAture .. What FETs are you using? Would like to see the spec sheet on them. I am not familiar with these low level FETS. Also would be interesting to see what max Vgs voltage is.
I am driving mine at about 8V and my top side FETs (same as bottom) are seeing similar levels, but via a 20V supply.
kawasaki
Jun 29, 2004, 03:41 PM
unfortunately the AT90S2313 is not able to write the flash under program control. The ATtiny2313 can do, but I don't have a loader for AVR.QUAX :)
Thanks to QUAX. And I have my first DIY BLDC controller working.
I have tested this controller with my everal BLDC motors, slot, slotless,inner and outer roator. This controller can run, but have to modify some paramator to fit motors in different characteristics.
So that I had study quax's source for 1 week. It is excellent!! :)
Now I use AVR ICE200 for on-line debugging and AVR ISP for in-circuit-programming. So I do not need the UART loader function in my board.
In quax's last version code, the over current protect function is under contructing. He use a red LED drive signal for templrary. So I think the hardware may have some little modification in the future.
mmormota
Jun 29, 2004, 04:10 PM
I have tested this controller with my everal BLDC motors, slot, slotless,inner and outer roator.
Glad to hear that, as I just ordered my pcb-s from Olimex and the main parts from Digikey.
In quax's last version code, the over current protect function is under contructing. He use a red LED drive signal for templrary. So I think the hardware may have some little modification in the future.
Check my modified solution for the overcurrent sensor, it makes possible to set different voltage tresholds- I omitted the schottky and applied a pair of resistors instead.
http://mmormota.uw.hu/blmc_v1.zip
quax
Jun 29, 2004, 06:10 PM
Thanks to kawasaki.
I'm very glad to hear about the success !
And I'm not any longer the only one with that controller running.
QUAX :)
Mr DIY
Jun 30, 2004, 01:41 AM
Well done quax :cool: and also to kawasaki.
Mr DIY
Jun 30, 2004, 07:53 AM
I was playing some more with my software and decided to change the PWM frequency. I had the controller setup to 19.5KHz and decided to try 13KHz. Guess what .. My 11-turn CD rom motor did not like it. Intermittent startups. Also, a roughish feel to the start. Switched back to a higher frequency and much better performance. Going to try 30+ KHz tonight.
Was searching for some info here and found some interesting stuff that people here might want to recap on.
Regard PWM frequencies http://www.rcgroups.com/forums/showthread.php?t=128351&page=2&pp=15 and check post 19
Regards FET driving.
http://www.rcgroups.com/forums/showthread.php?t=74379 and look for Stumaxs comments.
Yes you can do without em, but bear in mind what limitations you impose on your design … like obtaining the max efficiency out of a motor/controller setup.
ekf
Jun 30, 2004, 08:35 AM
Hi QUAX!
My controller by your schematic work!!!!
I using IR4428 gate driver for IRL2203 for n-FET
and IRF4905 for p-FET (all TO-220 case).
For correct work I made some
modifications in schematic :
changing visa versa connections for
pins 17 and 19, and for pins 9 and 11 of AT90S2313S.
You can made changing in ASM-file for pin definition port B ( if you wish).
It works with some types of CD-ROM, HDD, FDD motors.
Some problem is not good starting from stop position.
Today i will try to use with KONTRONIK FUN500-48 motor.
May be with different magnet system motor all will be OK.
Sorry for my English-I live in Ukraine(ex USSR).
anfarol
Jul 01, 2004, 11:56 AM
@ ekf
Don't worry for your English, mine isn't better :P
I live in Italy.
Did you try with the larger kontronic motor????
Bye,
Anfarol
ekf
Jul 01, 2004, 03:58 PM
Hi Anfarol!
Kontronik motor work too.
I don't adding a prop to the motor
so I make some measurements
with no loaded Kontronik.
Start-up current rise to 18amps and then lowered
to 3.8-4 amp with pack of 8xAA1000mA/h Sanyo.
Then I took a original Kontronik Beat 80-6-18
80/90Amps 6-25V OPTO kontroller and make measurement with it.
Start-up current near 10 Amps and lowered to same 3.8-4.2 amp.
In first and second case motor become warm.
Difference between kontrollers for me is some music when Kontronik starts
and cold controller case of original.
I don't think that IRF4905 for p-FET is good choice but this is best p-FET
which I can buy.
Attention! Minimum drive supply for IR4428 is 6V (when parameters guaranteed).
2QUAX : beeps in start procedure may be longer and you can make some
modifications in software for lowering start-up current.
But if not -I'm happy in any case.
Many , many thanks to you!!!
By, EKF.
mmormota
Jul 01, 2004, 05:01 PM
For correct work I made some
modifications in schematic :
changing visa versa connections for
pins 17 and 19, and for pins 9 and 11 of AT90S2313S.
You can made changing in ASM-file for pin definition port B ( if you wish).
Hi ekf,
Thank you for the pin replacement warning. I corrected it in the .asm code, as I already sent my pcb plan to the manufacturer. You saved me several FETs for sure. :)
It was easy, the .asm file is very well documented, thanks, Quax. :)
quax
Jul 01, 2004, 05:55 PM
@efk
Try this and you should have doubled the beep time:
****************
ldi temp2, 250
beep_ApBn: clr temp1
....
wait260ms: ldi temp2, 250
beep_ApBn20: ldi temp3, 8
****************
If the current is to low, some motors have problems to start. My motors love to start with MIN_DUTY=16, but you can try that:
****************
.equ MIN_DUTY = 8 ; no power
****************
The startup current should be lower.
Thanks for your positive feeback :)
QUAX
picclock
Jul 04, 2004, 06:35 AM
Hi All
Great thread.
I've constructed my own prototype controller using the SO8 P type fets. Because of the filtering problem I wanted to keep the switching frequency fairly high (30kHz).
The Drain to Gate capacitance on the P type was so high that even with 100 ohms Gate source the device (IRF7425) was going into conduction when disabled due to the large drain gate capacitance.
As the maximum gate voltage is specified as 12 volts my design needed to limit this to a safe value. The rise and fall times are very good (50-100 nS) and so far no problems. The lower device is a logic transister with a 5 k series base resister. This is driven with the appropriate 5v waveform. The driver works over a large voltage range, even down to 5 volts with some performance compromise. Using a gate voltage which is the lowest to give a good rds value speeds up the switching times and reduces delays.
Hope this is useful to someone.
Best Regards
Martin R Dare
odalaman
Jul 08, 2004, 04:27 AM
Hey guys,
What's going on with the controller. Everybody is silent nowadays.
mmormota, did you received PCBs from OLIMEX. I am waiting the results from you to order mine from them.
odalaman
mmormota
Jul 08, 2004, 05:20 AM
mmormota, did you received PCBs from OLIMEX. I am waiting the results from you to order mine from them.
Still waiting. I got an Email, that they sent me the pcb-s. Normal post seems slow.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.