[amsat-bb] Re: PIC rotator control
Marc Vermeersch
amvm at skynet.be
Tue Oct 13 05:07:00 PDT 2009
Hi Andrew,
Let's take azimuth as an example. The PC sends a string containing the ascii
value of the required azimuth. That value is converted to a binary value.
That binary value (0-360) is converted to an "expected" 10-bit ADC value
(theoretically 0-1024) for that angle.
The range I get from my rotor is not 0-1024 but roughly 100-950 on one rotor
and 50-800 on the other. Therefore I use a lookup table to do the
conversion. After that I drive the rotor to make the measured angle equal to
the expected angle within a certain tolerance. That makes the motors run
smoothly without "chasing" the desired value.
This can be done in Perl on a LINUX PC, no doubt about that. The control
loop will be longer and you would have to solve some additional problems
like how often do you need to communicate between the PC and the PIC to make
the motors run smoothly.
Good Luck,
--
/\/\arc
> -----Original Message-----
> From: Andrew Rich [mailto:vk4tec at tech-software.net]
> Sent: dinsdag 13 oktober 2009 13:50
> To: Marc Vermeersch; amsat-bb at amsat.org
> Subject: Re: [amsat-bb] PIC rotator control
>
> Kewl
>
> Do you convert
>
> "067" from ascii to binary and then compare that to an A/D value ?
>
> I have worked out how to do binary to ascii
>
> Sometime I wonder if just programming in perl on the LINUX side might
> be
> just as easy
>
> I think potentiometers are used on most rotators ?
>
> Unless stepper motors have entered the scene ?
>
> Andrew
>
>
> ----- Original Message -----
> From: "Marc Vermeersch" <amvm at skynet.be>
> To: "'Andrew Rich'" <vk4tec at tech-software.net>; <amsat-bb at amsat.org>
> Sent: Tuesday, October 13, 2009 9:44 PM
> Subject: RE: [amsat-bb] PIC rotator control
>
>
> > Hi Andrew,
> >
> > I have a PIC based solution currently in the prototype stage. It uses
> a
> > PIC18F4455 and drives a Yeasu AZ/EL rotor without the Yeasy control
> box.
> >
> > The PC sends information to the PIC (RequestedAZ,RequestedEL) and the
> PIC
> > sends back status information to the PC
> > (RequestedAZ,RequestedEL,CurrentAZ,CurrentEL,Status).
> >
> > Everything is done by the PIC:
> > - Control of the rotor motors based on either move-every-n-seconds or
> > move-when-error-angle-is-greater-than-n
> > - Measurement of the actual AZ/EL with 10-bit resolution
> > - Parking when no signal has been coming from the PC in x seconds -
> or- an
> > explicit park command is received
> > - Stall protection
> > - Some horizon protection: EL cannot go below x when AZ is y to avoid
> > pointing into my neighbors' bedroom.
> > - Over the top rotor control (under development)
> > - ...
> >
> > I'm using a PIC18F4455 and it is very well capable of doing all that
> and
> > more. I have chosen this path for several reasons:
> > - Eventually I want to run a tracking algorithm in the PIC too
> > - To make the control loop shorter
> > - To avoid dependence on the PC part specifically on safety related
> > aspects
> > like stall control and horizon protection.
> > - To explore the capabilities of the PIC18
> > - (Because it's my job to do embedded HW/SW)
> >
> > BR,
> > --
> > /\/\arc
> >
> >> -----Original Message-----
> >> From: amsat-bb-bounces at amsat.org [mailto:amsat-bb-bounces at amsat.org]
> On
> >> Behalf Of Andrew Rich
> >> Sent: dinsdag 13 oktober 2009 12:22
> >> To: amsat-bb at amsat.org
> >> Subject: [amsat-bb] PIC rotator control
> >>
> >> Hello
> >>
> >> I am re-visting a rotator controller.
> >>
> >> I am curious, should I push the processing of the "compare and make
> a
> >> decision" onto the PIC, or pull that function back into the PC ?
> >>
> >> PC is LINUX
> >>
> >> I/O is serial
> >>
> >> PIC is 16F877
> >>
> >> Andrew VK4TEC
> >>
> >> _______________________________________________
> >> Sent via AMSAT-BB at amsat.org. Opinions expressed are those of the
> >> author.
> >> Not an AMSAT-NA member? Join now to support the amateur satellite
> >> program!
> >> Subscription settings: http://amsat.org/mailman/listinfo/amsat-bb
> >
>
>
> -----------------------------------------------------------------------
> ---------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.421 / Virus Database: 270.14.12/2431 - Release Date:
> 10/12/09
> 13:01:00
More information about the AMSAT-BB
mailing list