Electronic speed control + BS2
Hello all,
I am about to run some tests to see how to control an electronic speed control with my BS2. I was wondering if there is anything I should watch out for before I start? I am figuring it should be the same as controlling a servo? Thanks guys.
Regards,
Matt
Post Edited (Matt Battle) : 8/9/2006 7:26:46 PM GMT
I am about to run some tests to see how to control an electronic speed control with my BS2. I was wondering if there is anything I should watch out for before I start? I am figuring it should be the same as controlling a servo? Thanks guys.
Regards,
Matt
Post Edited (Matt Battle) : 8/9/2006 7:26:46 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
What I want to do is make the motor that is connected to the ESC go forward for a few seconds and then back for a few seconds. I am just running some tests right now.
-Matt
I also looked at the battery and it says it’s a 1200mah. I think I need to get an 1800-2000mah battery, if not higher, just so that I am not recharging this thing everyday.
Regards,
Matt
Post Edited (Matt Battle) : 8/9/2006 9:44:01 PM GMT
What you SHOULD find out from your empirical testing is the following, or something like it, depending on the exact ESC:
Some ESC controllers use PWM (pulse width modulation) [noparse][[/noparse]see the PBasic Manual or PBASIC Help File for details on the PWM command] and the (PBASIC PWM) DUTY and/or DURATION parameters will need to be "exercised" to see what the ESC will do.
Some ESC controllers use only a pulse width (PBASIC PULSEOUT command) and that will need to be "exercised" as to DURATION [noparse][[/noparse]see the PBasic Manual or PBASIC Help File for details on the PULSEOUT command].
NOTE-1: The DURATION parameters for BOTH commnas will vary based on the exact PBASIC Stamp you are using.
NOTE-2: Although I doubt you'll run into one, SOME specialized ESC's permit a "reverse" feature. These are generally used on marine R/C vehicles. If you find yourself with one of these, there will be some "STOP" (some frequency/duty/etc) which delineates FWD from REV (forward from reverse) and that above or below that STOP point represents faster in the given direction (FWD or REV).
Let us know how you make out, and what kind of ESC you are using.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
The ESC that the R/C I have came with is the LM-406FB. I did a Google and came up with a lot of non-English websites. That is okay because I am thinking of going with a more durable, better brand ESC anyways.
I will post updates as I do more tests and learn more about the ESC.
Regards,
Matt
P.S. I have the BS2-IC Rev. C stamp.
Post Edited (Matt Battle) : 8/10/2006 8:45:52 PM GMT
-Matt
Thanks
Using the same code I plugged in a servo and got the results I was looking for; turning CW and CCW over and over. So from that I am going to say it has something to do with the ESC and how it receives or interprets the pulses.
Regards,
Matt
Update: Remembering what crgwbr said about how some ESCs don't need to be refreshed every 20 ms, I tried 200ms and it seems to work. I get a jerking motion from the ESC but it does go forward and backwards. Now I just have to figure out how fast I need to send pulses to it.
Post Edited (Matt Battle) : 8/11/2006 12:10:37 AM GMT
As you can see in the code below I have my pause for forwards set to 100 and the pause for backwards set at 200. There is little to no signs of jerkiness, so I am happy with the results. Just a heads up though. This works for my ESC but it might not work for yours. So you might have to play around with the numbers too until you find ones that work. I am still working on the code to get the car to turn right and left fully while it is going forward or backwards. Once I get that I will post the code. The only problem I came across is that I have power from the BOE and power from the ESC going into the motor which I expect cannot be a good thing. So I might be doing some hacking tomorrow.
Regards,
Matt
Does anybody have any good links to some tutorials on voltage comparators? Especially on the LM339? When I Google it mostly that comes up are links to buy them or Op-amp links. Thanks guys and girls.
Regards,
Matt
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Do you remember the name of it? It seems that amazon has a good collection of his books. Thanks
Matt
·· The Engineers Notebook II had a lot of information on it.· But there were also several mini-engineers notebooks as well.· Some specialized to various things.· For example, there was one for 555 timer ICs and another for Op-Amps.· I looked at my old Engineers Notebook II.· I hope this helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
It looks like several of the originals have been combined into a series of just four books. I'm pretty sure these are basically just reprints. This is the 555, Op Amp, and Optoelectronic mini-notebooks combined:
Timer, Op Amp, and Optoelectronic Circuits & Projects
If that link doesn't work, just search Amazon for Forrest Mims, or go to forrestmims.com
555 Timer IC Circuits 276-5010
Op Amp IC Circuits 276-5011
Optoelectronics Circuits 276-5012
Basic Semiconductor Circuits 276-5013
Digital Logic Circuits 276-5014
Communications Projects 276-5015
Science Projects 276-5018
Environmontal Projects 62-5019
Magnet and Magnet Sensor Projects 62-5020
Sensor Projects 62-5026
There are gaps in the numbers so I assume there are more...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
·
Schematic Symbols, Device Packages, Design and Testing 276-5017
The second one still has a $1.49 Radio Shack price sticker on it [noparse]:)[/noparse]
I must have gotten side-tracked from electronics and such for a while back then, because I don't have any of the ones after these two.
I have been banging my head on my desk over and over for the past week or so because I can't seem to figure which voltage comp to use or how to use them properly. As you all know I am trying to make an ESC for my Boe-Bot. I am trying to make one that will go forward and backwards but I don’t know if I need a dual or quad voltage comp for this. I know I can use a h-bridge but that means I would have to use two pins from the BS2. I might use one for now until I can figure out how ESC use voltage comps to control motor directions. Any insight on this and will I can go to learn more about them? Thanks guys and girls.
Regards,
Matt
What is it you want to use a voltage comparator for, guy?
In the case of LM339, a splendid IC, made especially for·+V & GND (single-ended) use:·if·the voltage at the +input is > than the voltage at the -input, then the output goes to supply/+V; similarly, if the voltage at the -input is > than the voltage at the +input, then the output goes to GND.
Comparators are used as level detectors --·a varying voltage, the input or signal,·is compared to a Reference / Threshold voltage and the output will result accordingly.
Comparators are not used as linear amplifiers, like for audio amplifiers.· They're kind of like a transistor switch with a programmable gate voltage.
Post Edit -- picture attached
Post Edited (PJ Allen) : 8/28/2006 3:02:48 AM GMT
1 pulse to go forward or reverse·or to vary the speed. A pulse duration of 2000 is STOP,
1000 is full speed reverse and 3000 is full speed forward. Values in between can be used
as intermediate speeds. A neat feature is that after giving the speed/direction pulse
another pulse can be given for how long to do the selected operation. A pulse duration
of 1400 gives 1 second of operation and 3000 gives 5 seconds of operation, Here is an
example from Scribbler code.
·' Turn right for 1 second
· PULSOUT MotorRight, 1500··· '1/2 speed rev on right motor
· PAUSE 1
· PULSOUT MotorRight, 1400··· 'maintain 1/2 speed rev for 1 second
· PULSOUT MotorLeft, 2500···· '1/2 speed fwd on left motor
· PAUSE 1
· PULSOUT MotorLeft, 1400···· 'maintain 1/2 speed fwd for 1 second
The PAUSE 1 instruction between the 2 PULSOUT instructions apparently allows
this operation.
Is there a schematic of the Scribbler motor controller available or is it a propriertary design?
The only schematic I can find just shows a motor controller BLOCK with no
details. Does Parallax make a motor controller with these features?
Hey PJ Allen,
Its not that I want to use a voltage comparator, it’s that a lot if not all of the schematics I have seen for ESC have either a dual or quad in them some where. I was just wondering if that is used for switching the polarity between negative and positive to make the motor go forward and backwards? If so how? I think that is my main hurdle right now in getting the ball rolling on my ESC. Seriously, if it comes down to it I guess I can give up two I/O pins on the BS2 for an h-bridge but how effective is that? How much power is wasted through heat?
Regards,
Matt
It's a kit, you can make it, it'll be effective, and maybe you can·finally get it together instead of all this hemming & hawwing·self-sabotage stuff and stop·laying landmines before yourself.
[noparse][[/noparse] And I mean that in the nicest way. ]
(the self-sabotage... )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Hardware - extra bits for the bit bucket =· 1 Coffeeless KaosKidd
·
What would I learn from the kit? I would still be in the same predicament that I am in now and that is not understanding how to build an ESC. My main goals for my first mini project will be shifted towards the programming aspect in the up coming weeks so with that in mind I can’t spend the next few weeks to month racking my brains over trying to build an ESC.
Matt
Roomba, LM339, ESC, 1000 miles at sea in the Atlantic Ocean, dual or quad, catsup or ketchup... all this "stuff".
Cripes.