HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jan 16, 2004, 01:41 PM
Registered User
Baltimore Bwi Rr Stn, Maryland, United States
Joined Oct 2003
520 Posts
Quote:
Originally posted by zagisrule!
Ugh...

Ok, Because I think that the 3-phase sensing is better than Microchips method, I will work on it this way and you can do it your way Whanderson. Since you seem to know everything there is to know about this, perhaps you could build the demo circuit and tell us all how it works for the model motors. Also note that timing is going to probably need changed around because our motors tend to not be the high-wind, low current servo motors that they tested that code on.
AN857 tested with this motor as well as others. looks like you use some seriously large servos.
whanderson is offline Find More Posts by whanderson
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 16, 2004, 07:35 PM
Senior Member
zagisrule!'s Avatar
Edgewood, NM
Joined Jan 2002
1,038 Posts
I just was saying that the controller was not aimed at a model motor and their needs timing wise.

Sorry about the things I said, I was a little out of line. You were only trying to help. It was your constant suggestion of the Microchip document and no other ideas that irritated me.


Here is the source code if you want to go over it. It is in .txt format so everyone can look over it.
zagisrule! is offline Find More Posts by zagisrule!
Reply With Quote
Old Jan 17, 2004, 12:12 AM
Registered User
Baltimore Bwi Rr Stn, Maryland, United States
Joined Oct 2003
520 Posts
zagisrule!

Thank you. I will be out of town for a couple of days, will get back to you early next week.
whanderson is offline Find More Posts by whanderson
Reply With Quote
Old Jan 17, 2004, 12:18 AM
Registered User
Bozeman, Montana
Joined Dec 2003
46 Posts
Please post the schematic that goes along with this code.

BTW, the 2313 is not a particularly good device for our brushless controllers. RC BL controllers potentially need 5-6 channels of higher resolution A/D - 3 for position sensing, one for current sense, one for temp, and one for battery voltage. The ATmega series has 6-8 channels of 8 and 10-bit A/D and can clock to 16MHz.

-John
JohnnyS is offline Find More Posts by JohnnyS
Reply With Quote
Old Jan 17, 2004, 09:05 AM
Registered User
Baltimore Bwi Rr Stn, Maryland, United States
Joined Oct 2003
520 Posts
Quote:
Originally posted by JohnnyS
Please post the schematic that goes along with this code.

BTW, the 2313 is not a particularly good device for our brushless controllers. RC BL controllers potentially need 5-6 channels of higher resolution A/D - 3 for position sensing, one for current sense, one for temp, and one for battery voltage. The ATmega series has 6-8 channels of 8 and 10-bit A/D and can clock to 16MHz.

-John
PIC 16Fxxx parts have 6 channels of 10 bit A/D and clock to 20Mhz. They also have a PWM module among other things. If you feel the need for speed 18Fxxx parts clock to 40Mhz similar peripheral capabilities.
whanderson is offline Find More Posts by whanderson
Reply With Quote
Old Jan 17, 2004, 11:32 AM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
I am not sure that A/D conversion is really necessary. Probably a comparator do the job. On the other hand, a/d is built in and cheap, so why not...

A draft idea:
- the absolute phase angle seems not really critical, in my controller I can set it from 0 to 30 degree, not too much difference
- it is possible to sample the comparator several times, as the emf is a linear ramp, the result is very similar to A/D conversion
- as drive is pulsed, there are distinct time windows when emf measurement possible (if the fets are open, no measurement possible)
- sample the signal at the window in the middle, and in the window before and after
- smooth the angle representative digitally, add or substitute slightly according to the middle window sample if the side window samples are correct
- or correct it radically if the angle error is so high that one of the side window samples is incorrect

Something like that...
The following is oscillogram of a CDrom motor - Jeti controller drive (the upper trace just marks one full turn of the shaft)
mmormota is offline Find More Posts by mmormota
Last edited by mmormota; Jan 17, 2004 at 11:41 AM.
Reply With Quote
Old Jan 17, 2004, 12:59 PM
Registered User
London Heathrow, Great Britain (UK)
Joined Sep 2001
314 Posts
Am i underestimating the complexity of controlling a brushless motor. Surely if I used a CD-ROM motor ( after re-wind) and hooked up the Hall sensors to a PIC and then wrote a prog to check the sensors and work out which FET to send signal to to turn on a coil - this would work ?? Obviously I'd need to use a conventional speed controller to power this circuit.

I am new to pics am I being to simplistic ??

The code would be simple !! I reckon - the code above is very complex,

Cheers
Tim
mr_wood is offline Find More Posts by mr_wood
Reply With Quote
Old Jan 17, 2004, 01:42 PM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
Quote:
Originally posted by mr_wood
Surely if I used a CD-ROM motor ( after re-wind) and hooked up the Hall sensors to a PIC and then wrote a prog to check the sensors and work out which FET to send signal to to turn on a coil - this would work ?? Obviously I'd need to use a conventional speed controller to power this circuit.
Yes, it will work. Considering the PWM voltage from the conventional controller, you have to take care of the gate-source inverse voltage problem.
The motor together the above mentioned circuit is very similar to a brushed motor, but with "electronic brushes", free of the usual brush problems.

Next step: there is everything in your controller to handle speed too, just write some additional code, read the pulses from the receiver, and feed your fet bridge with sw emulated pwm signal.

Next step: some more coplex code and no need for that sensors any more...
mmormota is offline Find More Posts by mmormota
Last edited by mmormota; Jan 17, 2004 at 01:55 PM.
Reply With Quote
Old Jan 18, 2004, 03:54 AM
Registered User
London Heathrow, Great Britain (UK)
Joined Sep 2001
314 Posts
should I be checking the sensors in interups or just in the main loop ? What sort of clock speed should I use and what is a good cheap PIC for this sort of task - I'd only need 3 bit input, 3 bit output (perhaps an A/D too ) and enough clock speed to enable to motor to run - what do you reckon ???

Thanks
Tim
mr_wood is offline Find More Posts by mr_wood
Reply With Quote
Old Jan 18, 2004, 04:33 AM
Registered User
Joined Dec 2003
115 Posts
DIY Controller

Hi,
A very good site for sensor DIY Controller....But in japanese only

http://www.cityfujisawa.ne.jp/~iijima-p/BRA2.htm

Translate using

http://babelfish.altavista.com/

Regards
hadihf is offline Find More Posts by hadihf
Reply With Quote
Old Jan 18, 2004, 05:42 AM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
Quote:
Originally posted by mr_wood
should I be checking the sensors in interups or just in the main loop ? What sort of clock speed should I use and what is a good cheap PIC for this sort of task - I'd only need 3 bit input, 3 bit output (perhaps an A/D too ) and enough clock speed to enable to motor to run - what do you reckon ???
Probably the best method with a not very fast controller:
- assembly, not even dream about C
- handle the receiver with IT and a timer, keep the IT routine as simple and fast as possible
- handle the phase detectors and the driver outputs in the main loop
- the job is not easy (hard for the first uC project)

You need 6 outputs, the series Fets need break-before-make drive to avoid high current spikes.

This is a complex development, I can't estimate the clock speed without a lot of calculations. If you decided to use a uC family, use the fastest member, and lower the clock later, if it seems possible. A 20MHz Pic seems to be fast enough, but it is just a feeling... (a Pic unfortunately needs 4 clocks for 1 instruction cycle)
Microchit offers sample code for sensored controllers too. While I am a bit skeptic about the sensorless code, I am sure the sensored is perfect. (and you can try the sensorless code on the same hw...)
mmormota is offline Find More Posts by mmormota
Last edited by mmormota; Jan 18, 2004 at 05:50 AM.
Reply With Quote
Old Jan 18, 2004, 07:27 AM
Registered User
Bozeman, Montana
Joined Dec 2003
46 Posts
whandnerson,

ATmega - 16Mhz, 16mips.
PIC - 40Mhz, less than 10 mips. (Two word instructions can take 2 instruction cycles or 8 clocks.)

Do you work for Microchip?

-John
JohnnyS is offline Find More Posts by JohnnyS
Reply With Quote
Old Jan 18, 2004, 08:53 AM
Registered User
Baltimore Bwi Rr Stn, Maryland, United States
Joined Oct 2003
520 Posts
Quote:
Originally posted by JohnnyS
whandnerson,

ATmega - 16Mhz, 16mips.
PIC - 40Mhz, less than 10 mips. (Two word instructions can take 2 instruction cycles or 8 clocks.)

Do you work for Microchip?

-John
No, I don't work for Microchip. The PICs have 32 instructions and AVRs have 90+. Code segments in PICs are much smaller than Atmel. The effective throughput for both devices is equivalent.
whanderson is offline Find More Posts by whanderson
Reply With Quote
Old Jan 18, 2004, 10:13 AM
Registered User
Long Beach Municipal, California, United States
Joined Feb 2003
208 Posts
Bob,

You want a processor designed to run brushless motors look at the Intel 196, very powerful, probably too large for aircraft, definitely expensive. I am enjoying my PIC so far I can download code and get it to do simple things like brushed controller. The ICD 2 is very useful as is the simple and cheap flash kit which allows programming of the x12 devices. The PIC seems to have a very efficient assembly, the 14 bit opcode allows for direct, indirect and immediate addressing, also like how the I/O and memory is linearly addressed, no extra instructions required.

After I master the DC brushed stuff I will try my hand at the brushless controller, just finished a nice CD rom motor I'd like to control, my CC controller does not do a good job with it.

Steve
hbsloper is offline Find More Posts by hbsloper
Reply With Quote
Old Jan 18, 2004, 12:59 PM
Registered User
London Heathrow, Great Britain (UK)
Joined Sep 2001
314 Posts
i am confused why i need 6 outputs - can someone explain this to me ?

Thanks
Tim
mr_wood is offline Find More Posts by mr_wood
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Brushless speed control problem TomL Sport Planes 8 Jun 08, 2003 02:23 AM
TMM-18-3ph Brushless Speed Control nelsonjo1 Power Systems 5 Apr 04, 2003 01:33 AM
FS: Model Motors 40 amp Brushless Speed Control. Jim McPherson Aircraft - Electric - Airplanes (FS/W) 3 Dec 10, 2002 06:02 PM
Dragon 35 brushless speed control Steve H. Aircraft - Electric - Airplanes (FS/W) 0 Aug 17, 2002 01:29 AM
Hooking up a Jeti Brushless Speed Control to a Jeti Pashor 15/4 motor. HELP!!! Rob R Power Systems 3 Jan 10, 2002 07:37 PM