Discussion forum for the BasicX family of microcontroller chips.
|
Hello, I'm using the BasicX-24 chip to program a few servos to do all sorts of things. The problem I am coming across is that the servos are not working! I have tried every combination of code I can think of - I'm sure the answer is staring me in the face but I just don't get it. I am using a standard servo from Parallax Inc. (www.parallaxinc.com) connected to the Servo 0 pins. I can get the 4.8 V needed to the pins, however the servo still doesn't move. How do you call the servo? Thank you. Matthew Mangione P.S. I'm sure I probably need to give more info so feel free to write back for more if you can help Thank You! [Non-text portions of this message have been removed] |
|
|
|
first off, do you understand how the servo works? the servo need 4-5 V from a batt. not from the basic-x chip. (red & black wire on the servo) the ground (black) on that batt pack needs to conect to the ground on the basic-x chip. now the singnal wire (usaly white) on the servo needs a pulse that is 1-2mS in length. the center being 1.5mS. that pulse needs to be repeted every 30mS or so. the easy way to do this is with the T8-Servo board from basic-x. --- Matthew Mangione <> wrote: > Hello, > I'm using the BasicX-24 chip to program a few servos to do all sorts of things. The problem > I am coming across is that the servos are not working! I have tried every combination of code I > can think of - I'm sure the answer is staring me in the face but I just don't get it. I am using > a standard servo from Parallax Inc. (www.parallaxinc.com) connected to the Servo 0 pins. I can > get the 4.8 V needed to the pins, however the servo still doesn't move. How do you call the > servo? Thank you. > Matthew Mangione > > P.S. I'm sure I probably need to give more info so feel free to write back for more if you can > help Thank You! > [Non-text portions of this message have been removed] > ===== Tony Brenke North Tacoma, WA __________________________________________________ |
|
|
|
I'm with you up until your last sentence. This is all absolutely trivial to do without an outboard board. The BX24 supports PWM and multitasking and comes with sample servo code. I wound up writing my own to better faciliate multitasking (i.e. set-and-forget), but the ideas are the same. Matthew, the most likely problem is that the servo needs a separate voltage source than the chip, with the grounds tied together. A servo uses a LOT of power, much more than you should run through the BX24. At 10:58 AM 11/1/01 -0800, Tony Brenke wrote: >first off, do you understand how the servo works? > >the servo need 4-5 V from a batt. not from the basic-x chip. (red & black >wire on the servo) >the ground (black) on that batt pack needs to conect to the ground on the >basic-x chip. > >now the singnal wire (usaly white) on the servo needs a pulse that is >1-2mS in length. >the center being 1.5mS. > >that pulse needs to be repeted every 30mS or so. > >the easy way to do this is with the T8-Servo board from basic-x. > >--- Matthew Mangione <> wrote: > > Hello, > > I'm using the BasicX-24 chip to program a few servos to do all > sorts of things. The problem > > I am coming across is that the servos are not working! I have tried > every combination of code I > > can think of - I'm sure the answer is staring me in the face but I just > don't get it. I am using > > a standard servo from Parallax Inc. (www.parallaxinc.com) connected to > the Servo 0 pins. I can > > get the 4.8 V needed to the pins, however the servo still doesn't move. > How do you call the > > servo? Thank you. > > > Matthew Mangione > > > > P.S. I'm sure I probably need to give more info so feel free to write > back for more if you can > > help Thank You! > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > >===== >Tony Brenke >North Tacoma, WA > >__________________________________________________ |
|
|
|
the servo code works great. But if you are running more than 10 it will not update fast enough. the servo code depends on timmer1. that can be put to better use. Warning -- if you use PulseOut to generate servo signals, the real time clock can lose time unless pulse widths are smaller than the real time clock period (about 1.94 ms). it all depends what "few servos" means. --- Fringe Ryder <> wrote: > I'm with you up until your last sentence. This is all absolutely trivial > to do without an outboard board. The BX24 supports PWM and multitasking > and comes with sample servo code. I wound up writing my own to better > faciliate multitasking (i.e. set-and-forget), but the ideas are the same. > > Matthew, the most likely problem is that the servo needs a separate voltage > source than the chip, with the grounds tied together. A servo uses a LOT > of power, much more than you should run through the BX24. > > At 10:58 AM 11/1/01 -0800, Tony Brenke wrote: > >first off, do you understand how the servo works? > > > >the servo need 4-5 V from a batt. not from the basic-x chip. (red & black > >wire on the servo) > >the ground (black) on that batt pack needs to conect to the ground on the > >basic-x chip. > > > >now the singnal wire (usaly white) on the servo needs a pulse that is > >1-2mS in length. > >the center being 1.5mS. > > > >that pulse needs to be repeted every 30mS or so. > > > >the easy way to do this is with the T8-Servo board from basic-x. > > > > > > > >--- Matthew Mangione <> wrote: > > > Hello, > > > I'm using the BasicX-24 chip to program a few servos to do all > > sorts of things. The problem > > > I am coming across is that the servos are not working! I have tried > > every combination of code I > > > can think of - I'm sure the answer is staring me in the face but I just > > don't get it. I am using > > > a standard servo from Parallax Inc. (www.parallaxinc.com) connected to > > the Servo 0 pins. I can > > > get the 4.8 V needed to the pins, however the servo still doesn't move. > > How do you call the > > > servo? Thank you. > > > > > Matthew Mangione > > > > > > P.S. I'm sure I probably need to give more info so feel free to write > > back for more if you can > > > help Thank You! > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >===== > >Tony Brenke > >North Tacoma, WA > > > >__________________________________________________ > > > > > > > > ===== Tony Brenke North Tacoma, WA __________________________________________________ |
|
|
|
For four, it's working well. The rest of your caveats are completely situational. For example, while I'm vaguely aware of a real-time-clock on the BX24, I don't see much use for it in a typical device; a connected robot is much better than an independent clock-driven robot. And similarly, putting timer1 to better use depends on having a use that needs timer1. The beauty of the BX24 is that it provides everything you need for beginning functional mock-ups. Some people may be producing commercial products with it, but where it really shines is letting you prototype and proof-of-concept the product or in doing one-offs, because BX24s are pretty expensive in quantity compared to PICs. At 11:31 AM 11/1/01 -0800, Tony Brenke wrote: >the servo code works great. >But if you are running more than 10 it will not update fast enough. >the servo code depends on timmer1. >that can be put to better use. > >Warning -- if you use PulseOut to generate servo signals, the real time >clock can lose time unless >pulse widths are smaller than the real time clock period (about 1.94 ms). >it all depends what "few servos" means. > >--- Fringe Ryder <> wrote: > > I'm with you up until your last sentence. This is all absolutely trivial > > to do without an outboard board. The BX24 supports PWM and multitasking > > and comes with sample servo code. I wound up writing my own to better > > faciliate multitasking (i.e. set-and-forget), but the ideas are the same. > > > > Matthew, the most likely problem is that the servo needs a separate > voltage > > source than the chip, with the grounds tied together. A servo uses a LOT > > of power, much more than you should run through the BX24. > > > > At 10:58 AM 11/1/01 -0800, Tony Brenke wrote: > > >first off, do you understand how the servo works? > > > > > >the servo need 4-5 V from a batt. not from the basic-x chip. (red & black > > >wire on the servo) > > >the ground (black) on that batt pack needs to conect to the ground on the > > >basic-x chip. > > > > > >now the singnal wire (usaly white) on the servo needs a pulse that is > > >1-2mS in length. > > >the center being 1.5mS. > > > > > >that pulse needs to be repeted every 30mS or so. > > > > > >the easy way to do this is with the T8-Servo board from basic-x. > > > > > > > > > > > >--- Matthew Mangione <> wrote: > > > > Hello, > > > > I'm using the BasicX-24 chip to program a few servos to do all > > > sorts of things. The problem > > > > I am coming across is that the servos are not working! I have tried > > > every combination of code I > > > > can think of - I'm sure the answer is staring me in the face but I > just > > > don't get it. I am using > > > > a standard servo from Parallax Inc. (www.parallaxinc.com) connected to > > > the Servo 0 pins. I can > > > > get the 4.8 V needed to the pins, however the servo still doesn't > move. > > > How do you call the > > > > servo? Thank you. > > > > > > > Matthew Mangione > > > > > > > > P.S. I'm sure I probably need to give more info so feel free to write > > > back for more if you can > > > > help Thank You! > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >===== > > >Tony Brenke > > >North Tacoma, WA > > > > > >__________________________________________________ > > > > > > > > > > > > > > > > > > > > > > > > > > > >===== >Tony Brenke >North Tacoma, WA > >__________________________________________________ |