New here: how do i control a brushless motor with bs2p?
A12
Posts: 17
i did some search in this forum, there doesn't seems to be much about controlling a BL motor. i seen one post on sending PWM signals to the esc (electronic speed controller)·which in turn control a motor.
i am using the Himax 2015-3600 motor, and am planning to buy a Phoenix 10 esc. my question is, is the pwm signals from the bs2p i had able to control the esc?
also, i am thinking of using a H-bridge to control the motor as an alternative, but i think it is only for brush motors. correct me if i am wrong.
PS: 1st time using basic stamp, sry if i ask dumb qns.
i am using the Himax 2015-3600 motor, and am planning to buy a Phoenix 10 esc. my question is, is the pwm signals from the bs2p i had able to control the esc?
also, i am thinking of using a H-bridge to control the motor as an alternative, but i think it is only for brush motors. correct me if i am wrong.
PS: 1st time using basic stamp, sry if i ask dumb qns.
Comments
·
·· If you just need to turn the motor on/off you could use a simple transistor or MOSFET that handles the rated current of the device.· If you need speed control then that’s another story as you would need PWM.· As for an H-Bridge that is for controlling the polarity of the motor whereas brushless motors are typical only one polarity, so see above control methods.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
where can i find such info? the phoenix specs doesn't have it. is there some kind of formula out there to get the type of signal needed?
i,m knew too ,,,just got my boebot and just about halfway through the manual,,,
the guibot program on ur bot disk should help figure out what pwm to use,,,hope this helps
·
·· Is this a 3-phase brushless motor such as those used in high-end R/C cars?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It converts typical R/C PWM signals to speed control and may do several other functions as well [noparse][[/noparse]like battery protection].
In sum, the BS2p can easily output the PWM and you merely need to focus on the PBasic code for controling servos. It is the same.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
PS: can't connect the speed controller coz of this prob too.
1 more thing, the servo is rated for 4.8V, so connecting it to Vdd of 5+ volts shldn't be a prob rite.
Here are a number of different R/C servo extension cables:
http://www.allelectronics.com/cgi-bin/category.cgi
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
·
·· Most 4.8V servos run up to 6V no problem.· As a side-note, we also carry the 3-pin headers you refer to, but you can cut them down from a longer strip.
http://www.parallax.com/detail.asp?product_id=451-00303
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
but when i try to do 2 direction in a single program, the servo moves bit by bit from 1250 position to 3000 position. den i did some more editing and now it just jerks a little back and fro.
below is my program, can't find anything wrong. i·added·in the DEBUG·in both loops·and the message appears on the screen repeatedly from the Servo_1 loop, never from the Servo_2. (i removed the DEBUG·from the program already)
do i need some sort of code to exit the 1st FOR loop?
' {$STAMP BS2p}
' {$PBASIC 2.5}
'
[noparse][[/noparse] Constants ]
Scounter VAR Word····· 'Servo counter
Main:
· GOSUB Servo_1···· 'Move servo to open blades
· GOSUB Servo_2···· 'Initial Position
END················· 'end the program
'
[noparse][[/noparse] Servo Motion ]
Servo_1:
· FOR Scounter = 1 TO 100
··· PULSOUT 0, 1250····· 'servo connected to pin 0, move to push blades out, 1250, 2125, 3000
··· PAUSE 20
· NEXT
· PAUSE 1000······· 'Time for blades to open up is 1 second
· RETURN
Servo_2:
· FOR Scounter = 1 TO 100
··· PULSOUT 0, 3000····· 'servo move back to neutral position
··· PAUSE 20
· NEXT
· PAUSE 1000
· RETURN
took me some time to figure it out. i added a 'High 7' to get that full throttle. just to share wif those using Ph-10 ESC too.
anyway, now i need to get a tachometer to measure the rpm of the motor. oh well, leaves some free·time for me to figure out the servo prob. great to noe i can control the motor though thx to everyones help.
·
right now, i have a prob wif my speed controller. i tried PWM, PULSOUT and with different settings, but there is no response. only HIGH and LOW will move the motor, which is not what i want. i need to control the speed. anyone had any experience with Phoenix 10? it reacts strangely. sometimes the motor wun run when BS is running. den i switch off the BS and it starts to run.
Do you have the negative terminal (ground) of the Stamp conected to the negative terminal of the battery? If not, you will never get it to work. They MUST have a COMMON GROUND.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
i have my 3 wire speed controller connected by:
Brown to Vss (on BOE)
Orange to Pin 7
Red, no connection since it is a battery eliminator circuit.
i am assuming the speed controller and the basic stamp are gnd together at Vss, unless i am suppose to gnd the motor (which has its own Lipo battery) together into Vss. Or shld i ground the red wire. hmm, i will try putting a resistor to the red wire and gnd it.
A "common ground" is where you wire ALL your grounds to. You need a "common ground", because even though the Power system of a Servo can be separate from the Power system of the BS2, the BS2 AND the servo need to 'share' the ground wire (JUST the ground wire) to reference the control signal to.
So, if you use a 9v battery to power the BS2, and a 'three-wire' speed controller with a different power supply, then you need to insure that the ground of the 'different power supply' is in fact connected to that 'brown' wire you mention, which then connects to Vss (which IS the ground of the BS2's power supply).
The result is the ground for the 9V battery (aka Vss) is connected to the BS2 (aka Vss) and is connected to the brown wire (ground for signal) which MUST be connected to the ground of the "battery eliminator circuit" you mention above. Voila, a "common ground".
Now, IF you connect the RED wire (the power supply + line for the servo) to ANYTHING other than the servo, things either heat up or blow up, so don't do that. "Common grounds" are a good thing. "Common supply lines" for + supplies at different voltages is a TERRIBLE thing. And "putting a resistor to the red wire and grounding it" just burns power for no good reason. Don't do that either.
then i figured out that the Phx-10 needs 4 sec of brake signal which simply isn't what·the HIGH function gives out. dun ask me why the motor runs on HIGH, isn't suppose to. this kinda mislead me to think i got through the 4 sec rule. so i tried the PULSOUT to get through it and it worked after a few tries.
now to try the servo and motor at the same time *tells self to gnd everything together*
just to reciprocate, this is part·of my motor·code (not guranteed to work for all ESC and motors)
'
··· FOR·i = 1 TO·100····· 'this loop is to satisfy the 4 sec safety·guard on the Phx-10
····· PULSOUT 3, 1000··· 'at 1000, this gives a brake signal, trial and error
····· PAUSE 20············· 'the whole loop must run at least 4 sec, use DEBUG to·check
··· NEXT
··· FOR·i = 1 TO 100····· 'this loop makes the motor run
····· PULSOUT 3, 2000··· '2000 controls the speed, higher number=higher speed
····· PAUSE 20··············'for longer running,·put·this loop inside a DO...LOOP
··· NEXT
'
·
You may get bettter results in terms of feedback, if you take the time to write in English. That is the official language of this forum, since it is based in the United States.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Well I for one have recently gotten into the RC industry and man is
there room for A LOT of improvement, but as I'm relatively new I will
need help and a maybe a giants shoulder to stand on ;-)
First I need a sensorless high speed brushless motor controller,
The reason I don't want to use the phoenix is
·· A. its expensive
·· B. its limited (little or·nothing for rpm, easing, etc)
·· C.·i'd prefer to design and not hack... (even though·I'm·good at hacking) [noparse];)[/noparse]
Second, I need a way to sense a batteries life, How much juice is left in it?
·· 1. Not picky here, even 10 led's in a row to make a funky progress bar would be cool..
Third, I need a way to communicate to the board from a controller (handheld)
·· 1.·For instance, say I want to remotely interrogate the battery meter, the rpm, or maybe the inferred mph
·· 2. I don't like the current designs of 75Mhz 27Mhz etc, 3 channels, 4 channels, 5 channels...· (any reason I can't have like 16 or 32?)
·· 3. Any reason I can't use a Zigbee? or Something Like that... They have·LONG RANGE (multi-mile)·versions...
······ - Maybe a Zigbee to a PIC18Fxx31 to a Propeller or SX? or SX/B? ... not sure here bout options.
I don't know whether or not I can even use anything from parallax for this,
I have some assembler knowledge and believe I can get a PIC18Fxx31 to
do the high speed dynamic commutating needed for high rpm sensorless brushless dc motors..
I'm a fairly good programmer in the higher level languages and would like to
apply my knowledge and love for robotics to the RC, like I said there is plenty
of room for improvement in that industry... Most designs have no fail safes,
and with the usual designs they tend to break easily over time since there is no
error checking whatsoever...(except maybe minimum voltage detectors) (boring)
I started with the Homework Stamp, having finished that and making a few designs not
in the book to determine my level of competency I now feel like I could bridge some gaps here...
In object oriented programming I can make a class and extend it with functionality or treat it
entirely as blackbox... not saying, of course,·that·I (do) treat them like that, but
In micro controller programming could I configure some components from various manufacturers
and then put them all together? if so what would be the base? parallax or like microchip? I also
have seen some things useful from hobbyengineering.com like an SD mem card reader, or like
roguerobotics.com where they have a uMP3 player (might make a cool command module) of
course I have questions about integration...
This may seem like a nightmare for some but I've successfully integrated things in Information Technology
that have also seemed difficult but I got them working swimmingly (for instance irc over web without plugins)
I'd also like to know for instance... say I get the Parallax Pro board and get my project "working"
what options do I have to bring it to market? or produce em outside of the "Project Boards" which
I'm going to shortly outgrow?
a point in the right direction or books would suffice, thank you...
Btw this is my first post... And I' just wanted to say thanks to parallax, nuts & volts and everyone...
I was in the US FIRST Competition for my school in South Carolina, which
is where I got the first contact with parallax and I'm still impressed...
kinda took me a long time to get around to microcontrolling...· was busy with web development ;-)