RS232 Inputs
Archiver
Posts: 46,084
I am a complete novice with Stamps, unfortunately for my final year
univeristy project I need to drive two servos from an RS232 input
via a BASIC Stamp.
I have been messing about with the SERIN command and also have the
code needed to drive the servos. However, I can't seem to get the
stamp to act on the inputs.
Has anyone any suggestions as to how I go about achieveing this? Any
help at all would be appreciated.
Cheers,
Rob.
univeristy project I need to drive two servos from an RS232 input
via a BASIC Stamp.
I have been messing about with the SERIN command and also have the
code needed to drive the servos. However, I can't seem to get the
stamp to act on the inputs.
Has anyone any suggestions as to how I go about achieveing this? Any
help at all would be appreciated.
Cheers,
Rob.
Comments
The Basic Stamp can directly drive hobby servos, but not through an RS232
interface. Go to the Parallax site and look at the StampWorks book in the
download section. If this is an industrial servo, we would need the device
specifications in order to help. I don't have any personal knowledge about
those kinds of devices, but I'm sure someone on the list does.
I hate to show myself as the grouchy old man I have become, but I really do
think that this is a very lazy question for someone to be asking about a
university senior project. An engineer should know enough to provide
reasonable specifications. A university senior should know enough about
research to type "basic stamp servo" into Google and then bring a more
informed question to his instructors, even if we are talking about informal
instructors on this list. There is no such thing as a stupid question, but
there is a proper venue for each question.
-- Al
Original Message
From: robnorthwood1981 <rob_northwood@h...>
[noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=zTVmyptfUcihK60S58XfwvKWSnsAJj95XfGt4jHAJNVM2li1Y7lTy7zt3l-1sdyMDm9S1cRS62W9uQhSs8xdp4sNNTc]rob_northwood@h...[/url
Sent: Saturday, February 08, 2003 8:28 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] RS232 Inputs
I am a complete novice with Stamps, unfortunately for my final year
univeristy project I need to drive two servos from an RS232 input
via a BASIC Stamp.
I have been messing about with the SERIN command and also have the
code needed to drive the servos. However, I can't seem to get the
stamp to act on the inputs.
Has anyone any suggestions as to how I go about achieveing this? Any
help at all would be appreciated.
Cheers,
Rob.
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
am not an Electronic Engineer and have no previous experience with
Stamp code.
Whilst my question may appear lazy I had infact pointed out that I
do know how to control servo's from the BASIC stamp and have managed
achieved this. I have also managed to use the SERIN command to
provide data via RS232 and put it in a variable.
My question is more related to the code/commands required to use
this variable to run the servos for a set time. E.g. if the variable
is 100, then the servos run for 100ms (very simplyfied example I
know!).
Since RS232 is asynchronus I am aware that the timing of the input
may be important. Is this correct?
> What kind of servos?
>
> The Basic Stamp can directly drive hobby servos, but not through
an RS232
> interface. Go to the Parallax site and look at the StampWorks
book in the
> download section. If this is an industrial servo, we would need
the device
> specifications in order to help. I don't have any personal
knowledge about
> those kinds of devices, but I'm sure someone on the list does.
>
> I hate to show myself as the grouchy old man I have become, but I
really do
> think that this is a very lazy question for someone to be asking
about a
> university senior project. An engineer should know enough to
provide
> reasonable specifications. A university senior should know enough
about
> research to type "basic stamp servo" into Google and then bring a
more
> informed question to his instructors, even if we are talking about
informal
> instructors on this list. There is no such thing as a stupid
question, but
> there is a proper venue for each question.
>
> -- Al
>
>
Original Message
> From: robnorthwood1981 <rob_northwood@h...>
> [noparse][[/noparse]mailto:rob_northwood@h...]
> Sent: Saturday, February 08, 2003 8:28 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] RS232 Inputs
>
>
> I am a complete novice with Stamps, unfortunately for my final year
> univeristy project I need to drive two servos from an RS232 input
> via a BASIC Stamp.
>
> I have been messing about with the SERIN command and also have the
> code needed to drive the servos. However, I can't seem to get the
> stamp to act on the inputs.
>
> Has anyone any suggestions as to how I go about achieveing this?
Any
> help at all would be appreciated.
>
> Cheers,
>
> Rob.
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
I think I still need to know exactly what kind of servo you are talking
about.
Hobby servos are Pulse Width Modulation (PWM) devices. The movement is
determined by the length of a pulse, and the pulse must be repeated every
1/50th of a second or the servo returns to its neutral position. The PBASIC
command is PULSOUT. The stampworks book I referenced has an example in
Experiment #25.
The commands you give to the hobby servo (really just the width of the
pulse) determine degree of rotation. These servos normally rotate within a
180 degree radius. The pulse width determines where within that 180 degree
range the servo should be positioned.
I think that what you have or need are hobby servos modified for continuous
rotation. A purist would say these aren't really servos at all, but I
digress. Then the pulse width controls speed and direction. You can buy
modified servos or hack them yourself. You'll find lots of instructions on
the WEB. This one is pretty good:
http://www.junun.org/MarkIII/Manual/Appendix.jsp.
You should probably do a Google search for "continuous rotation xxx" where
"xxx" is the model of servo you have.
If you really have a motor with a serial interface, you have two issues.
One is setting up the serial interface (baud rate, stop bits, parity) and
getting the devices to communicate at all. Then I suspect there would be
some kind of application protocol used to control speed, direction, etc. I
would really need to know more about the device to help here.
Good luck. If you post again, I'd be interested to know where you go to
school and what sort of project you are working on. I'm nosey!
-- Al Margolis, founder
www.hobbyengineering.com
The WEB's newest source for robotics supplies and information
Original Message
From: robnorthwood1981 <rob_northwood@h...>
[noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=IPVWjAqdSIV_0xbTn5my-nsCs_ObAy8ZTDq568bokY9uaNC2BtJMPsn-VixnB7o0foSl7s7-6FqKlk9BnvfmfNLsMS4]rob_northwood@h...[/url
Sent: Saturday, February 08, 2003 9:54 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: RS232 Inputs
Thanks for your help. First of all I would like to point out that I
am not an Electronic Engineer and have no previous experience with
Stamp code.
Whilst my question may appear lazy I had infact pointed out that I
do know how to control servo's from the BASIC stamp and have managed
achieved this. I have also managed to use the SERIN command to
provide data via RS232 and put it in a variable.
My question is more related to the code/commands required to use
this variable to run the servos for a set time. E.g. if the variable
is 100, then the servos run for 100ms (very simplyfied example I
know!).
Since RS232 is asynchronus I am aware that the timing of the input
may be important. Is this correct?
> What kind of servos?
>
> The Basic Stamp can directly drive hobby servos, but not through
an RS232
> interface. Go to the Parallax site and look at the StampWorks
book in the
> download section. If this is an industrial servo, we would need
the device
> specifications in order to help. I don't have any personal
knowledge about
> those kinds of devices, but I'm sure someone on the list does.
>
> I hate to show myself as the grouchy old man I have become, but I
really do
> think that this is a very lazy question for someone to be asking
about a
> university senior project. An engineer should know enough to
provide
> reasonable specifications. A university senior should know enough
about
> research to type "basic stamp servo" into Google and then bring a
more
> informed question to his instructors, even if we are talking about
informal
> instructors on this list. There is no such thing as a stupid
question, but
> there is a proper venue for each question.
>
> -- Al
>
>
Original Message
> From: robnorthwood1981 <rob_northwood@h...>
> [noparse][[/noparse]mailto:rob_northwood@h...]
> Sent: Saturday, February 08, 2003 8:28 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] RS232 Inputs
>
>
> I am a complete novice with Stamps, unfortunately for my final year
> univeristy project I need to drive two servos from an RS232 input
> via a BASIC Stamp.
>
> I have been messing about with the SERIN command and also have the
> code needed to drive the servos. However, I can't seem to get the
> stamp to act on the inputs.
>
> Has anyone any suggestions as to how I go about achieveing this?
Any
> help at all would be appreciated.
>
> Cheers,
>
> Rob.
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
is to communicate with the RS232 device and the second is to command the
servo.. The Stamp manual is very clear on both cases. In a nut shell, the
hobby servo uses a 1ms to 2ms positive going pulse to position the servo.
1.5 ms being the centered position. This pulse is repeated 50 time per
second, (20 ms period). It is a +5vdc system.. VERY easy to control with
the Stamp.. They also sell a board for $39.00 that controls 8 servos and
communicates with the Stamp vis TTL level RS232. EXTREMELY easy to use...
Like Al said. More specific info is need to be of much help...
Mike B.
Original Message
From: "Al Margolis(TX)" <al@b...>
To: <basicstamps@yahoogroups.com>
Sent: Saturday, February 08, 2003 10:33 AM
Subject: [noparse][[/noparse]basicstamps] RE: [noparse][[/noparse]basic stamps] Re: RS232 Inputs
> Sorry for the lecture in inappropriate.
>
> I think I still need to know exactly what kind of servo you are talking
> about.
>
> Hobby servos are Pulse Width Modulation (PWM) devices. The movement is
> determined by the length of a pulse, and the pulse must be repeated every
> 1/50th of a second or the servo returns to its neutral position. The
PBASIC
> command is PULSOUT. The stampworks book I referenced has an example in
> Experiment #25.
>
> The commands you give to the hobby servo (really just the width of the
> pulse) determine degree of rotation. These servos normally rotate within
a
> 180 degree radius. The pulse width determines where within that 180
degree
> range the servo should be positioned.
>
> I think that what you have or need are hobby servos modified for
continuous
> rotation. A purist would say these aren't really servos at all, but I
> digress. Then the pulse width controls speed and direction. You can buy
> modified servos or hack them yourself. You'll find lots of instructions
on
> the WEB. This one is pretty good:
> http://www.junun.org/MarkIII/Manual/Appendix.jsp.
> You should probably do a Google search for "continuous rotation xxx" where
> "xxx" is the model of servo you have.
>
> If you really have a motor with a serial interface, you have two issues.
> One is setting up the serial interface (baud rate, stop bits, parity) and
> getting the devices to communicate at all. Then I suspect there would be
> some kind of application protocol used to control speed, direction, etc.
I
> would really need to know more about the device to help here.
>
> Good luck. If you post again, I'd be interested to know where you go to
> school and what sort of project you are working on. I'm nosey!
>
> -- Al Margolis, founder
> www.hobbyengineering.com
> The WEB's newest source for robotics supplies and information
>
>
>
Original Message
> From: robnorthwood1981 <rob_northwood@h...>
> [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Yo6eOBO-PyDIdLGIzDMmr6nHXt5ru8KtWyFMqV794nidc9onZpKH2nh6v0Y5sR6JC2AzUrDgEMFNcRhe5N385Q7AZD4]rob_northwood@h...[/url
> Sent: Saturday, February 08, 2003 9:54 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: RS232 Inputs
>
>
> Thanks for your help. First of all I would like to point out that I
> am not an Electronic Engineer and have no previous experience with
> Stamp code.
>
> Whilst my question may appear lazy I had infact pointed out that I
> do know how to control servo's from the BASIC stamp and have managed
> achieved this. I have also managed to use the SERIN command to
> provide data via RS232 and put it in a variable.
>
> My question is more related to the code/commands required to use
> this variable to run the servos for a set time. E.g. if the variable
> is 100, then the servos run for 100ms (very simplyfied example I
> know!).
>
> Since RS232 is asynchronus I am aware that the timing of the input
> may be important. Is this correct?
>
>
>
> > What kind of servos?
> >
> > The Basic Stamp can directly drive hobby servos, but not through
> an RS232
> > interface. Go to the Parallax site and look at the StampWorks
> book in the
> > download section. If this is an industrial servo, we would need
> the device
> > specifications in order to help. I don't have any personal
> knowledge about
> > those kinds of devices, but I'm sure someone on the list does.
> >
> > I hate to show myself as the grouchy old man I have become, but I
> really do
> > think that this is a very lazy question for someone to be asking
> about a
> > university senior project. An engineer should know enough to
> provide
> > reasonable specifications. A university senior should know enough
> about
> > research to type "basic stamp servo" into Google and then bring a
> more
> > informed question to his instructors, even if we are talking about
> informal
> > instructors on this list. There is no such thing as a stupid
> question, but
> > there is a proper venue for each question.
> >
> > -- Al
> >
> >
Original Message
> > From: robnorthwood1981 <rob_northwood@h...>
> > [noparse][[/noparse]mailto:rob_northwood@h...]
> > Sent: Saturday, February 08, 2003 8:28 AM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] RS232 Inputs
> >
> >
> > I am a complete novice with Stamps, unfortunately for my final year
> > univeristy project I need to drive two servos from an RS232 input
> > via a BASIC Stamp.
> >
> > I have been messing about with the SERIN command and also have the
> > code needed to drive the servos. However, I can't seem to get the
> > stamp to act on the inputs.
> >
> > Has anyone any suggestions as to how I go about achieveing this?
> Any
> > help at all would be appreciated.
> >
> > Cheers,
> >
> > Rob.
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
> Subject and
> > Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
I think you have to be more specific about what exactly you want to
know. If I got this right so far, you are now able to make your servo
rotating clock- and counterclock wise at a certain abgle (activated
for a certain amount of time) and you managed to get some value into
a variable via RS232. E.g. a positive value makes it rotating
clockwise and a negative value makes it rotating ccw. Is that right?
If so, what do you want to know now?
Regards
Adrian
> Stamp vis TTL level RS232. EXTREMELY easy to use...
Just to point out, a PAK-VIII does a great job of controlling 8 servos
and it uses SHIFTOUT to do the control which is also very easy to setup.
http://www.al-williams.com/pak8.htm
Al Williams
AWC
* Easy RS-232 Prototyping
http://www.al-williams.com/awce/rs1.htm