Is there an easy way to get direction from a sin/cos signal?

D

default

Guest
I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).

So far, the only ways I've found to come up with a steer right/left
signal is to decode both inputs (the direction of the boat and my
input to the steering) and use multiple comparators and break the
inputs into quadrants and feed that as an offset to the final resolved
steering signal.

It aught to work, but what I see is a glitch around the crossover
points that will ultimately affect the proportional steering I want.

If the boat is way off the desired course I want it to turn faster and
slow when it approaches the desired course (the way a human would
steer)

Is there any totally analog way to do this? Want to keep it "simple."

I've reached the limits of my imagination on this one. Didn't see
anything on the internet, but I know someone has already done it
because (expensive) autopilot systems do exist and several predate
computers.

I know I could use a linear hall effect device or just turn the flux
gate so it is aimed north, but I'd like the boat to be able to tell if
it is 180 degrees off course and correct for it. It wouldn't do to
fall asleep at the wheel and find myself on the beach or on a shoal,
or have the boat turn the wrong direction to reach its course. (to go
from say: 270 to 0 without passing 180 to do it)

Any idea where to look for information? I tried robotics (they all
rely on GPS or gyros if they are that sophisticated) and model
airplanes. I'd like to use the earth's magnetic field because it's
reliable, and I've already started down that path.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
default wrote:

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).

So far, the only ways I've found to come up with a steer right/left
signal is to decode both inputs (the direction of the boat and my
input to the steering) and use multiple comparators and break the
inputs into quadrants and feed that as an offset to the final resolved
steering signal.

It aught to work, but what I see is a glitch around the crossover
points that will ultimately affect the proportional steering I want.

If the boat is way off the desired course I want it to turn faster and
slow when it approaches the desired course (the way a human would
steer)

Is there any totally analog way to do this? Want to keep it "simple."
I'd select quadrants based on the couse setting, using some hysteresis.
And then use the sine or the cosine to do the steering.

Thus, if the direction is 'generally north' or 'generally south' you'd
use the east-west oriented sensor.

The hysteresis determining whether to use the east-west or the
north-south sensor is desirable. Otherwise, a northwest course could
flip between the sine and the cosine compasses.

This will still cause a 'blip' when setting course, when NO, NW, SW, and
SE are passed. Hmm... by not switching but instead using a 'soft switch'
you can eliminate both.

By this, I'm lead to believe you can multiply the sine of the setting
with the cosine of the compass, and add that to the cosine of the
setting multiplied with the sine of the compass. That should be a
suitable error signal. Except when you're 180 degrees off - then it will
be 0 again. I guess you could detect this condition and steer hard to
one side, but I do not think it is needed at all.

I've reached the limits of my imagination on this one. Didn't see
anything on the internet, but I know someone has already done it
because (expensive) autopilot systems do exist and several predate
computers.

I know I could use a linear hall effect device or just turn the flux
gate so it is aimed north, but I'd like the boat to be able to tell if
it is 180 degrees off course and correct for it.
Well, it would be unstable at the '180 degrees off' direction. And
assuming it got there in the first place by a massive wave or so it will
certainly be bumped out of this point by the next wave.


Thomas
 
On Fri, 03 Oct 2003 19:02:09 +0200, Zak <Zak@spam.invalid> wrote:

default wrote:

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).

So far, the only ways I've found to come up with a steer right/left
signal is to decode both inputs (the direction of the boat and my
input to the steering) and use multiple comparators and break the
inputs into quadrants and feed that as an offset to the final resolved
steering signal.

It aught to work, but what I see is a glitch around the crossover
points that will ultimately affect the proportional steering I want.

If the boat is way off the desired course I want it to turn faster and
slow when it approaches the desired course (the way a human would
steer)

Is there any totally analog way to do this? Want to keep it "simple."

I'd select quadrants based on the couse setting, using some hysteresis.
And then use the sine or the cosine to do the steering.

Thus, if the direction is 'generally north' or 'generally south' you'd
use the east-west oriented sensor.

The hysteresis determining whether to use the east-west or the
north-south sensor is desirable. Otherwise, a northwest course could
flip between the sine and the cosine compasses.

This will still cause a 'blip' when setting course, when NO, NW, SW, and
SE are passed. Hmm... by not switching but instead using a 'soft switch'
you can eliminate both.

By this, I'm lead to believe you can multiply the sine of the setting
with the cosine of the compass, and add that to the cosine of the
setting multiplied with the sine of the compass. That should be a
suitable error signal. Except when you're 180 degrees off - then it will
be 0 again. I guess you could detect this condition and steer hard to
one side, but I do not think it is needed at all.

I've reached the limits of my imagination on this one. Didn't see
anything on the internet, but I know someone has already done it
because (expensive) autopilot systems do exist and several predate
computers.

I know I could use a linear hall effect device or just turn the flux
gate so it is aimed north, but I'd like the boat to be able to tell if
it is 180 degrees off course and correct for it.

Well, it would be unstable at the '180 degrees off' direction. And
assuming it got there in the first place by a massive wave or so it will
certainly be bumped out of this point by the next wave.


Thomas
Good idea, I'll toss it around.

180 out won't be a problem, from past experience, and no keel, the
boat can't maintain a course without constant corrections.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
The voices in the head of default uttered these words to the inhabitants of
alt.electronics.

I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).
This may sound odd, but take a look at some of the old Atari 8-bit computer
handling of X,Y plotting using paddles and joysticks. Here's a link to the
memory map of the computer. I believe the schematics are readily available.
If not I can scann them in and e-mail them to you. You can probably find
functional complete units extremely cheap. Although the computer mother
boards are probably too large to include in the boat. BTW, the computer ran
on +5VDC.

Try these. http://www.telusplanet.net/public/pairman/joy-fig1.gif and
http://www.telusplanet.net/public/pairman/joy-fig2.gif
The joysitck ports can be used for both input and output (4 bits each). The
paddle ports use resister values of a 10K ohm variable resistor on 0-5VDC.
There were many projects designed around these ports that may be of use for
this project. At least take a look.

I have a small book that I can scann in that has all sorts of projects with
schematics and parts lists for these ports as well.

--

Robert S. Ely (Bob)
rsely74@optonline.net robert.ely@dhs.state.nj.us
New Lisbon Developmental Center Communications Systems Technician-3
Work Phone: 1-609-894-4057 Work FAX: 1-609-726-0357
ICQ: 33390750 Yahoo Messenger: rsely74
MSN Messenger: rsely74@hotmail.com

Check out my photos:
http://www.shuttercity.com/ShowGallery.cfm?AcctID=4359
 
On Sun, 05 Oct 2003 02:05:34 GMT, "(Bob) Robert S. Ely"
<rsely74@optonline.net> wrote:

The voices in the head of default uttered these words to the inhabitants of
alt.electronics.

I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).



This may sound odd, but take a look at some of the old Atari 8-bit computer
handling of X,Y plotting using paddles and joysticks. Here's a link to the
memory map of the computer. I believe the schematics are readily available.
If not I can scann them in and e-mail them to you. You can probably find
functional complete units extremely cheap. Although the computer mother
boards are probably too large to include in the boat. BTW, the computer ran
on +5VDC.

Try these. http://www.telusplanet.net/public/pairman/joy-fig1.gif and
http://www.telusplanet.net/public/pairman/joy-fig2.gif
The joysitck ports can be used for both input and output (4 bits each). The
paddle ports use resister values of a 10K ohm variable resistor on 0-5VDC.
There were many projects designed around these ports that may be of use for
this project. At least take a look.

I have a small book that I can scann in that has all sorts of projects with
schematics and parts lists for these ports as well.
Thanks for the offer and thinking about my project.

I don't see the necessity or advantage to a joystick. Unless it is to
over-ride the course (jog it off course long enough to avoid colliding
with something in the water)

I generally don't need speed control. There will be one speed that is
ideal for boat's trim and sea state, (biased by my desire to get to
the fishing grounds versus saving fuel) and no automatic device is
likely to be able to balance those variables. Speed will take human
intervention and then it is set and forget until the conditions
change.

No need to reverse.

A knob and sine / cosine pot is my course input (infinite resolution)-
dial in the heading and let the boat steer. Four bits of resolution
wouldn't be enough for a course that has to be resolved to 360 or
better. A few degrees off course matters after several miles of
travel . . . "Thar be shoals about matey."


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
default wrote:

Thanks for the offer and thinking about my project.

I don't see the necessity or advantage to a joystick. Unless it is to
over-ride the course (jog it off course long enough to avoid colliding
with something in the water)

I generally don't need speed control. There will be one speed that is
ideal for boat's trim and sea state, (biased by my desire to get to
the fishing grounds versus saving fuel) and no automatic device is
likely to be able to balance those variables. Speed will take human
intervention and then it is set and forget until the conditions
change.

No need to reverse.

A knob and sine / cosine pot is my course input (infinite resolution)-
dial in the heading and let the boat steer. Four bits of resolution
wouldn't be enough for a course that has to be resolved to 360 or
better. A few degrees off course matters after several miles of
travel . . . "Thar be shoals about matey."


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
default,
Not the joystick, but the circuit it attaches to within the computer. It is a fairly simple circuit. Use it as an interface and
control system.
Oh a real fishing boat. Then this would work great. Inputs to these ports and a BASIC program to control the movement. You can
combine the ports to 8-bit resolution or if you use the 800 series, it has 4 ports. use 1 pair for input and the other pair for
control output. Being that the computers are still around and pretty cheap these days, they could fit the bill. Atari BASIC is
pretty robust and is built into the XL and XE versions or cartridge ROM for the 800 or 400.
It's been a while since I've done any programming, but I can help if I know the formulas and interface needs. I have an 800 and
an XL I can part with for about $5 US.

--

Robert S. Ely (Bob)
rsely74@optonline.net robert.ely@dhs.state.nj.us
New Lisbon Developmental Center Communications Systems Technician-3
Work Phone: 1-609-894-4057 Work FAX: 1-609-726-0357
ICQ: 33390750 Yahoo Messenger: rsely74
MSN Messenger: rsely74@hotmail.com

Check out my photos:
http://www.shuttercity.com/ShowGallery.cfm?AcctID=4359

I'm E. F. Mutton. When E. F. Mutton Speaks NOBODY listens!
 
On Sun, 05 Oct 2003 15:12:47 GMT, "Robert S. Ely (Bob)"
<rsely74@optonline.net> wrote:

default wrote:

Thanks for the offer and thinking about my project.

I don't see the necessity or advantage to a joystick. Unless it is to
over-ride the course (jog it off course long enough to avoid colliding
with something in the water)

I generally don't need speed control. There will be one speed that is
ideal for boat's trim and sea state, (biased by my desire to get to
the fishing grounds versus saving fuel) and no automatic device is
likely to be able to balance those variables. Speed will take human
intervention and then it is set and forget until the conditions
change.

No need to reverse.

A knob and sine / cosine pot is my course input (infinite resolution)-
dial in the heading and let the boat steer. Four bits of resolution
wouldn't be enough for a course that has to be resolved to 360 or
better. A few degrees off course matters after several miles of
travel . . . "Thar be shoals about matey."


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
default,
Not the joystick, but the circuit it attaches to within the computer. It is a fairly simple circuit. Use it as an interface and
control system.
Oh!
Oh a real fishing boat. Then this would work great. Inputs to these ports and a BASIC program to control the movement. You can
combine the ports to 8-bit resolution or if you use the 800 series, it has 4 ports. use 1 pair for input and the other pair for
control output. Being that the computers are still around and pretty cheap these days, they could fit the bill. Atari BASIC is
pretty robust and is built into the XL and XE versions or cartridge ROM for the 800 or 400.

So the input is via the analog paddle channels (I'm not an Atari fan
so I know little about them). What resolution is on those a to d
convertors? I'd need the sin and cos to about 10 bits input along with
the reference voltage since that might also drift. Output of four
bits or a variable voltage with that resolution and one directional
bit should be enough. And there would have to be some easy way to
adjust the effective gain or speed of response of the system to
compensate for sea state. Faster steering and tighter control with
calm conditions and faster forward speed.

This is, of course if I were to ditch my analog bias.

It's been a while since I've done any programming, but I can
help if I know the formulas and interface needs. I have an 800 and
an XL I can part with for about $5 US.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
"default" <R75/5@defaulter.net> wrote in message
news:qs7rnvkk7dvsmg8fuideca0ovm0l6ikoa6@4ax.com...
I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).
This is an interesting problem...

You have two angles, C and S. C represents the output of the compass, and S
represents the output of the pot.

If you could compute S - C, and then put it into cartesian form, you would
have a good directional and 'force' input; Assuming angles start at x = 1,
and rotate ccw, the x coordinate gives you the 'force' input (positive is
small, negative means large) and the y coordinate gives you the steer
direction (positive means steer starboard, and negative means steer port)

Fortunately, you have cos S, sin S, cos C and sin C as the outputs of your
two devices. If you think in terms of complex numbers,

s = cos S + jsin S
c = cos C + jsin C

You want the x and y coordinates of the vector v representing S - C. Because
they are normalized vectors, v = s/c (remember, division is angle
subtraction in the complex plane), which means

v=s/c = exp(jS) / exp(jC)
= exp(j(S - C))
= cos (S - C) + j sin(S - C)

we know, from trig that

cos (S – C) = cos S cos C + sin C sin C

and

sin (S – C) = sin S cos C – cos S sin C

so

v = cos S cos C + sin S sin C + j (sin S cos C - cos S sin C)

and so you have your x and y coordinates, in the form of

x = cos S cos C + sin S sin C
y = sin S cos C - cos S sin C

Now, it turns out you can build analog multipliers, adders, and subtracters
out of
opamps if you really want to, and using these, derive signals which are
equal to x and y. Map those to the control inputs for the rudder, and you
have it. There are published circuits to build multipliers, adders and
subtracters. There may be prebuilt ICs that do this as well.

I'm guessing there was a reason why analog autopilots were so expensive.
Lots of opamps.

Regards,
Bob Monsen
 
default <R75/5@defaulter.net> wrote in message news:<qs7rnvkk7dvsmg8fuideca0ovm0l6ikoa6@4ax.com>...
I know I could use a linear hall effect device or just turn the flux
gate so it is aimed north, but I'd like the boat to be able to tell if
it is 180 degrees off course and correct for it. It wouldn't do to
fall asleep at the wheel and find myself on the beach or on a shoal,
or have the boat turn the wrong direction to reach its course. (to go
from say: 270 to 0 without passing 180 to do it)

I like the idea of simply turning the compass its self to set the
direction you want to go. It doesn't get any more simple than that!

Pick a direction that will give you zero on one axis for the
steering error signal. On course equals zero, off course left equals
some value depending of how far, and the same for right but with the
opposite sign.

Forget the second axis, you don't need it. If, for instance, you
set the autopilot to north and happen to be going south for some
reason (big wave?), your boat will never be able to go *exactly* the
wrong direction for long. As soon as the course swings even a little,
say east for example, the compass will think uou've gone west and give
a further easterly correction which will rapidly bring you back around
to the north course you originally set.

Jim "Old Salt" Meyer

Jim
 
On 6 Oct 2003 06:25:06 -0700, jmeyer@nektonresearch.com (Jim Meyer)
wrote:

default <R75/5@defaulter.net> wrote in message news:<qs7rnvkk7dvsmg8fuideca0ovm0l6ikoa6@4ax.com>...
I know I could use a linear hall effect device or just turn the flux
gate so it is aimed north, but I'd like the boat to be able to tell if
it is 180 degrees off course and correct for it. It wouldn't do to
fall asleep at the wheel and find myself on the beach or on a shoal,
or have the boat turn the wrong direction to reach its course. (to go
from say: 270 to 0 without passing 180 to do it)

I like the idea of simply turning the compass its self to set the
direction you want to go. It doesn't get any more simple than that!

Pick a direction that will give you zero on one axis for the
steering error signal. On course equals zero, off course left equals
some value depending of how far, and the same for right but with the
opposite sign.

Forget the second axis, you don't need it. If, for instance, you
set the autopilot to north and happen to be going south for some
reason (big wave?), your boat will never be able to go *exactly* the
wrong direction for long. As soon as the course swings even a little,
say east for example, the compass will think uou've gone west and give
a further easterly correction which will rapidly bring you back around
to the north course you originally set.

Jim "Old Salt" Meyer

Jim
No doubt about it that is the simple solution. The fly in that
ointment is that the sensor really wants to be at the waterline and
center of gravity of the boat to minimize roll and pitch, and on a
gimbal to boot, or the steering system is going to try and compensate
for things it has no control over. The flux gate is almost useless
mounted up high, add enough damping to slow it down and the steering
input would be a long fuel wasting "S" course.

Long flexible shaft to turn the gimbal assembly. A couple of R/L
LED's to balance out the error before engaging the pilot. And hope it
never deviates more than 90 degrees from the desired course.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
On Sun, 05 Oct 2003 21:04:35 GMT, "Robert Monsen"
<postmaster@BulkingPro.com> wrote:

"default" <R75/5@defaulter.net> wrote in message
news:qs7rnvkk7dvsmg8fuideca0ovm0l6ikoa6@4ax.com...
I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).

This is an interesting problem...

You have two angles, C and S. C represents the output of the compass, and S
represents the output of the pot.

If you could compute S - C, and then put it into cartesian form, you would
have a good directional and 'force' input; Assuming angles start at x = 1,
and rotate ccw, the x coordinate gives you the 'force' input (positive is
small, negative means large) and the y coordinate gives you the steer
direction (positive means steer starboard, and negative means steer port)

Fortunately, you have cos S, sin S, cos C and sin C as the outputs of your
two devices. If you think in terms of complex numbers,

s = cos S + jsin S
c = cos C + jsin C

You want the x and y coordinates of the vector v representing S - C. Because
they are normalized vectors, v = s/c (remember, division is angle
subtraction in the complex plane), which means

v=s/c = exp(jS) / exp(jC)
= exp(j(S - C))
= cos (S - C) + j sin(S - C)

we know, from trig that

cos (S – C) = cos S cos C + sin C sin C

and

sin (S – C) = sin S cos C – cos S sin C

so

v = cos S cos C + sin S sin C + j (sin S cos C - cos S sin C)

and so you have your x and y coordinates, in the form of

x = cos S cos C + sin S sin C
y = sin S cos C - cos S sin C

Now, it turns out you can build analog multipliers, adders, and subtracters
out of
opamps if you really want to, and using these, derive signals which are
equal to x and y. Map those to the control inputs for the rudder, and you
have it. There are published circuits to build multipliers, adders and
subtracters. There may be prebuilt ICs that do this as well.

I'm guessing there was a reason why analog autopilots were so expensive.
Lots of opamps.

Regards,
Bob Monsen

It is looking like that's what it takes.

It would almost be easier to abandon the DC steering motor in favor of
some old fashioned AC servo drive.

A big bar magnet on the rudder shaft with equally big sin/cos windings
around the magnet and just amplify the flux gate signal to drive the
magnet coils?


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
"default" <R75/5@defaulter.net> wrote in message
news:v413ov8j15elf91d4kpb8lkdol7ko3sofo@4ax.com...
On Sun, 05 Oct 2003 21:04:35 GMT, "Robert Monsen"
postmaster@BulkingPro.com> wrote:

"default" <R75/5@defaulter.net> wrote in message
news:qs7rnvkk7dvsmg8fuideca0ovm0l6ikoa6@4ax.com...
I want to play at building an automatic pilot.

I have a flux-gate compass that outputs sine and cosine signals,
depending on direction (A fixed relationship if the vessel is going
straight).

I have a directional input in the form of a sine / cosine
potentiometer (two slide pots at right angles moved by a circular cam
against springs).

This is an interesting problem...

You have two angles, C and S. C represents the output of the compass, and
S
represents the output of the pot.

If you could compute S - C, and then put it into cartesian form, you
would
have a good directional and 'force' input; Assuming angles start at x =
1,
and rotate ccw, the x coordinate gives you the 'force' input (positive is
small, negative means large) and the y coordinate gives you the steer
direction (positive means steer starboard, and negative means steer port)

Fortunately, you have cos S, sin S, cos C and sin C as the outputs of
your
two devices. If you think in terms of complex numbers,

s = cos S + jsin S
c = cos C + jsin C

You want the x and y coordinates of the vector v representing S - C.
Because
they are normalized vectors, v = s/c (remember, division is angle
subtraction in the complex plane), which means

v=s/c = exp(jS) / exp(jC)
= exp(j(S - C))
= cos (S - C) + j sin(S - C)

we know, from trig that

cos (S - C) = cos S cos C + sin C sin C

and

sin (S - C) = sin S cos C - cos S sin C

so

v = cos S cos C + sin S sin C + j (sin S cos C - cos S sin C)

and so you have your x and y coordinates, in the form of

x = cos S cos C + sin S sin C
y = sin S cos C - cos S sin C

Now, it turns out you can build analog multipliers, adders, and
subtracters
out of
opamps if you really want to, and using these, derive signals which are
equal to x and y. Map those to the control inputs for the rudder, and you
have it. There are published circuits to build multipliers, adders and
subtracters. There may be prebuilt ICs that do this as well.

I'm guessing there was a reason why analog autopilots were so expensive.
Lots of opamps.

Regards,
Bob Monsen

It is looking like that's what it takes.

It would almost be easier to abandon the DC steering motor in favor of
some old fashioned AC servo drive.

A big bar magnet on the rudder shaft with equally big sin/cos windings
around the magnet and just amplify the flux gate signal to drive the
magnet coils?
No, I'd say do the multiplication with a PIC chip. You only need 4
multiplies. Those little jellybean PIC chips with 8 pins could do this. 4
A/D inputs, two PWM outputs into a F to V converter... The whole thing will
cost you $5. I'll write the software for you if you want.

Regards,
Bob Monsen
 
(snip)
No, I'd say do the multiplication with a PIC chip. You only need 4
multiplies. Those little jellybean PIC chips with 8 pins could do this. 4
A/D inputs, two PWM outputs into a F to V converter... The whole thing will
cost you $5. I'll write the software for you if you want.

Regards,
Bob Monsen

Hi Bob

I think the pic idea is opening another can of worms. It isn't a bad
idea just introduces some different things to think about. Some
things I have a handle on, some things I do not.

The digital idea

Why use a sin/cos pot for input? Convert to voltage and use a look up
table to get the bearing. Course setting could be a keypad or counter
with an encoder and knob, or (less desirable - since a boat's bow
isn't necessarily pointing where one wants to go even when the
steering is perfect) a "steer and engage" way to input the course.
But alternate course input setting eliminates two AD conversions and
attendant problems and limitations.

Use another AD channel just for the flux gate reference voltage, so
the digital conversion is slaved to the ref.. In an analog system I
would incorporate that as a matter of course - because it is there and
easy to apply and increases the safety.

In thinking about digital, I think I need 9 bits of resolution minimum
with 10 or 12 a better choice. One degree of resolution is a
navigational problem, .3 degrees is probably the total minimum
resolution and accuracy error that can be tolerated.

A planing powerboat hull in a heavy sea has to be able to correct up
to three times a second, so that probably means more frequent
calculations per second (30/sec?)

The things I don't have a handle on: I know I would need gain
control but not how much or with what resolution and probably damping
control as well.

A lot of the things I'd have to consider in a digital system take care
of themselves in an analog system, but there are advantages to digital
as well.





-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
"default" <R75/5@defaulter.net> wrote in message
news:mo95ovkbpp46aha19qkn22lg9eo353u9ef@4ax.com...
(snip)
No, I'd say do the multiplication with a PIC chip. You only need 4
multiplies. Those little jellybean PIC chips with 8 pins could do this. 4
A/D inputs, two PWM outputs into a F to V converter... The whole thing
will
cost you $5. I'll write the software for you if you want.

Regards,
Bob Monsen

Hi Bob

I think the pic idea is opening another can of worms. It isn't a bad
idea just introduces some different things to think about. Some
things I have a handle on, some things I do not.

The digital idea

Why use a sin/cos pot for input? Convert to voltage and use a look up
table to get the bearing. Course setting could be a keypad or counter
with an encoder and knob, or (less desirable - since a boat's bow
isn't necessarily pointing where one wants to go even when the
steering is perfect) a "steer and engage" way to input the course.
But alternate course input setting eliminates two AD conversions and
attendant problems and limitations.

Use another AD channel just for the flux gate reference voltage, so
the digital conversion is slaved to the ref.. In an analog system I
would incorporate that as a matter of course - because it is there and
easy to apply and increases the safety.
The PIC I'm thinking of has an analog reference input...

In thinking about digital, I think I need 9 bits of resolution minimum
with 10 or 12 a better choice. One degree of resolution is a
navigational problem, .3 degrees is probably the total minimum
resolution and accuracy error that can be tolerated.
This isn't going to be that accurate no matter what you do. You are going to
have a hard time entering the proper course. Also, you aren't going to be
correcting for drift, and even if you are doing it manually, forcasts aren't
accurate enough to worry over 2 degrees.

A planing powerboat hull in a heavy sea has to be able to correct up
to three times a second, so that probably means more frequent
calculations per second (30/sec?)
The PIC can collect an A/D sample in 22uS. The multiply routines take less
than a mS. Thus, you could do about 200 calculations per second. Thats using
a 1MHz instruction clock (4 MHz internal.) The chip can supposedly go up to
a 20Mhz high speed oscillator, which will give you 5MHz instruction rate,
and thus more like 1000 calculations per second. It doesn't speed up the
A/D, but that isn't your bottleneck.

The things I don't have a handle on: I know I would need gain
control but not how much or with what resolution and probably damping
control as well.

A lot of the things I'd have to consider in a digital system take care
of themselves in an analog system, but there are advantages to digital
as well.
If you have your heart set on analog, look at the MLT04 chip. At first
glance, its just what the doctor ordered...

http://www.analog.com/UploadedFiles/Data_Sheets/431190299mlt04.pdf

It has 4 independent multipler circuits. Thus, your steer/force output would
require one of these, and a few (probably three) opamps to do the
adding/subtracting.

Thus, your steer left/right will be

sin S cos C - cos S sin C

(go left if V is negative, right if its positive)

And your rudder force will be

cos S cos C + sin S sin C

(hard turn if its positive, easy turn if its negative)

Where you are getting sin S and cos S directly from the steering pot, and
sin C and cos C directly from the compass.

However, biasing everything properly so that it doesn't drift with
temperature and time will be fairly complex, unless you are willing to tune
it up every time you use it. Using a PIC might let you hack all that up in
software, which is much cheaper, since you don't need the pots etc..

Isn't electronics fun?

Regards,
Bob Monsen
 
(Snip)
This isn't going to be that accurate no matter what you do. You are going to
have a hard time entering the proper course. Also, you aren't going to be
correcting for drift, and even if you are doing it manually, forcasts aren't
accurate enough to worry over 2 degrees.
I have used autopilots and the compass ones (not loran or GPS) seem
accurate to less than a degree. Drift is something that would take a
radio signal and some more sophisticated autopilot.

A really good autopilot can hold a course nearly as well as I can, but
for a lot longer, and they never get distracted.

Airplane autopilots correct for drift. Ocean currents are less
predictable since they are affected by the depth and contour of the
bottom.

A planing powerboat hull in a heavy sea has to be able to correct up
to three times a second, so that probably means more frequent
calculations per second (30/sec?)


The PIC can collect an A/D sample in 22uS. The multiply routines take less
than a mS. Thus, you could do about 200 calculations per second. Thats using
a 1MHz instruction clock (4 MHz internal.) The chip can supposedly go up to
a 20Mhz high speed oscillator, which will give you 5MHz instruction rate,
and thus more like 1000 calculations per second. It doesn't speed up the
A/D, but that isn't your bottleneck.

The things I don't have a handle on: I know I would need gain
control but not how much or with what resolution and probably damping
control as well.

A lot of the things I'd have to consider in a digital system take care
of themselves in an analog system, but there are advantages to digital
as well.



If you have your heart set on analog, look at the MLT04 chip. At first
glance, its just what the doctor ordered...
I've got an analog heart. I like circuits.

http://www.analog.com/UploadedFiles/Data_Sheets/431190299mlt04.pdf

It has 4 independent multipler circuits. Thus, your steer/force output would
require one of these, and a few (probably three) opamps to do the
adding/subtracting.
That does look easier than what the Op Amp Cookbook shows. Probably
better accuracy than separate transistor arrays. The error sources
look intimidating, hopefully I won't have anywhere near the
temperature extremes they spec the devices to.

Can't be any worse than some pilots. I know deep down my girlfriend
still thinks turning the wheel turns the compass backwards, drift is
an arbitrary concept I invented to criticize her steering, and praying
is a necessary and fundamental part of finding land.
Thus, your steer left/right will be

sin S cos C - cos S sin C

(go left if V is negative, right if its positive)

And your rudder force will be

cos S cos C + sin S sin C

(hard turn if its positive, easy turn if its negative)

Where you are getting sin S and cos S directly from the steering pot, and
sin C and cos C directly from the compass.

However, biasing everything properly so that it doesn't drift with
temperature and time will be fairly complex, unless you are willing to tune
it up every time you use it. Using a PIC might let you hack all that up in
software, which is much cheaper, since you don't need the pots etc..

Isn't electronics fun?
Well, yes.

Regards,
Bob Monsen

Thanks for all you help Bob


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
"default" <R75/5@defaulter.net> wrote in message
news:md38ovcqgs2etjc8ep4ftcgqes952cf8ga@4ax.com...

Thanks for all your help Bob
My pleasure. I'd love to see a picture/schematic of the circuit when you
have it running...

Regards
Bob Monsen
 
Find a synchro or a resolver transformer , it takes in 2 sin/cos
inputs and outputs a third. (resolver is 2 signals @ 90', synchro is 3
phases @ 120')
One is your course, one is your fluxgate output conditioned to be nice
clean sin/cos waveforms. The output is the difference, feed it into
another synchro or resolver to provide the steer drive to the boats
sin/cos pot. you may also get a shaft output on the ST as well. If you
dig around there are resolver to digital and digital to resolver
converter blocks. It's been years since I read the navy books on the
things, but they are still one of the prefered ways of targeting and
steering highly distructive naval things and can add , subtract or
multiply and do other weird things if you use some gears. I have a
feeling thats all you need is a R.T. and a resolver with a knob to
generate your bearing. If you can't find them on ebay, or the scrap
sale of your local defense contractor, you can try a google search for
"C and H Sales" their catalog usualy lists a few hundred of the things
at decent prices. make sure what your getting is all 60 hertz or all
400 hertz, both are made. just a guess , but thats what sin/cos pots
are for, to generate resolver compatable signals.,
 
Dont think sin/cos pots are the way to go. The ones I have seen dont thave
that much accuracy, 10 degrees maybe a little better is about the best you
can count on.


"Robert Monsen" <postmaster@BulkingPro.com> wrote in message
news:JgGgb.427322$2x.145299@rwcrnsc52.ops.asp.att.net...
"default" <R75/5@defaulter.net> wrote in message
news:mo95ovkbpp46aha19qkn22lg9eo353u9ef@4ax.com...
(snip)
No, I'd say do the multiplication with a PIC chip. You only need 4
multiplies. Those little jellybean PIC chips with 8 pins could do this.
4
A/D inputs, two PWM outputs into a F to V converter... The whole thing
will
cost you $5. I'll write the software for you if you want.

Regards,
Bob Monsen

Hi Bob

I think the pic idea is opening another can of worms. It isn't a bad
idea just introduces some different things to think about. Some
things I have a handle on, some things I do not.

The digital idea

Why use a sin/cos pot for input? Convert to voltage and use a look up
table to get the bearing. Course setting could be a keypad or counter
with an encoder and knob, or (less desirable - since a boat's bow
isn't necessarily pointing where one wants to go even when the
steering is perfect) a "steer and engage" way to input the course.
But alternate course input setting eliminates two AD conversions and
attendant problems and limitations.

Use another AD channel just for the flux gate reference voltage, so
the digital conversion is slaved to the ref.. In an analog system I
would incorporate that as a matter of course - because it is there and
easy to apply and increases the safety.


The PIC I'm thinking of has an analog reference input...

In thinking about digital, I think I need 9 bits of resolution minimum
with 10 or 12 a better choice. One degree of resolution is a
navigational problem, .3 degrees is probably the total minimum
resolution and accuracy error that can be tolerated.


This isn't going to be that accurate no matter what you do. You are going
to
have a hard time entering the proper course. Also, you aren't going to be
correcting for drift, and even if you are doing it manually, forcasts
aren't
accurate enough to worry over 2 degrees.

A planing powerboat hull in a heavy sea has to be able to correct up
to three times a second, so that probably means more frequent
calculations per second (30/sec?)


The PIC can collect an A/D sample in 22uS. The multiply routines take less
than a mS. Thus, you could do about 200 calculations per second. Thats
using
a 1MHz instruction clock (4 MHz internal.) The chip can supposedly go up
to
a 20Mhz high speed oscillator, which will give you 5MHz instruction rate,
and thus more like 1000 calculations per second. It doesn't speed up the
A/D, but that isn't your bottleneck.

The things I don't have a handle on: I know I would need gain
control but not how much or with what resolution and probably damping
control as well.

A lot of the things I'd have to consider in a digital system take care
of themselves in an analog system, but there are advantages to digital
as well.



If you have your heart set on analog, look at the MLT04 chip. At first
glance, its just what the doctor ordered...

http://www.analog.com/UploadedFiles/Data_Sheets/431190299mlt04.pdf

It has 4 independent multipler circuits. Thus, your steer/force output
would
require one of these, and a few (probably three) opamps to do the
adding/subtracting.

Thus, your steer left/right will be

sin S cos C - cos S sin C

(go left if V is negative, right if its positive)

And your rudder force will be

cos S cos C + sin S sin C

(hard turn if its positive, easy turn if its negative)

Where you are getting sin S and cos S directly from the steering pot, and
sin C and cos C directly from the compass.

However, biasing everything properly so that it doesn't drift with
temperature and time will be fairly complex, unless you are willing to
tune
it up every time you use it. Using a PIC might let you hack all that up in
software, which is much cheaper, since you don't need the pots etc..

Isn't electronics fun?

Regards,
Bob Monsen
 

Welcome to EDABoard.com

Sponsor

Back
Top