This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using ESP2866 to connect motor driver
#1
I am thinking about my installation layout for the autopilot and getting Wind speed and direction data to the OpenCPN computer.
It seems advantageous to locate the raspberry Pi Zero W on the top of the mast with the Davis wind and speed and the GPS. Then there are no wires going to the mast except power which is going there anyway. The only question is connecting Sean's motor driver output to the motor driver. Since it is just a serial connection  between the PiZ and the motor driver it seems I could use an ESP2866 module, or a 900mhz telemetry connection, at both ends to connect them. It is a little sailboat and the mast is about 25 ft tall. So I guess the question would be how reliable a wifi connection would be at that distance. Maybe also having two wifi connections, although I could put the main PiZero on 5ghz if needed.

Any thoughts?
Thanks
  Reply
#2
I don't really recommend this, because the inertial sensors would be at the top of the mast.
  Reply
#3
(06-04-2019, 01:23 PM)seandepagnier Wrote: I don't really recommend this, because the inertial sensors would be at the top of the mast.

The compass would be away from large metallic influences. GPS gets clear view of the sky. I2C cables short. Are you thinking about the IMU? Greater movement of the IMU versus the bottom of the mast?

Would connecting the motor driver to the Piz with ESP8266 be ok?

Also does your library support the Bosch BMI160 IMU, https://www.bosch-sensortec.com/bst/prod...cts/bmi160

Thanks Sean
  Reply
#4
I don't think this imu is supported, but the driver for imu is a small piece of code so it would not be difficult to support. It only needs raw sensor values.

At the top of the mast, accelerometers will give very high readings in waves, possibly exceeding 2g and saturating them unless you use a larger range with decreased resolution. The gyros also might be influenced although they are not supposed to. I think only the compass would maybe be improved but not in a useful amount. In theory it wouldn't matter at all because the math compensates everything, but the system has discrete time and noise, so I'm sure it won't give as accurate results. It might work, and in flat water it won't matter much, but in waves I think it's a bad idea.

What is the motivation? To avoid running 1 extra wire when you already have 2 for power? wind sensors only need one wire for tx to send nmea data. You could also use a wireless connection for the wind sensors.

There is no advantage of putting the gps up there that I know of.
  Reply
#5
(06-04-2019, 04:36 PM)seandepagnier Wrote: I don't think this imu is supported, but the driver for imu is a small piece of code so it would not be difficult to support.  It only needs raw sensor values.

At the top of the mast, accelerometers will give very high readings in waves, possibly exceeding 2g and saturating them unless you use a larger range with decreased resolution.   The gyros also might be influenced although they are not supposed to.   I think only the compass would maybe be improved but not in a useful amount.   In theory it wouldn't matter at all because the math compensates everything, but the system has discrete time and noise, so I'm sure it won't give as accurate results.   It might work, and in flat water it won't matter much, but in waves I think it's a bad idea.  

What is the motivation?  To avoid running 1 extra wire when you already have 2 for power?    wind sensors only need one wire for tx to send nmea data.    You could also use a wireless connection for the wind sensors.

There is no advantage of putting the gps up there that I know of.

Yes running extra wires was the motivation. I am used to, building drones, needing to get the compass away from negative influences and giving the GPS a clear view of the sky.  If you count the I2C, serial for GPS, Speed (analog?) and direction you have quite a few wires to deal with. Plus I guess getting the devices away from more easily being damaged at deck level.

It is probably smarter to distribute the functions on multiple sbc rather than using one more sophisticated board so I will stick with an 9250 series IMU. Bring a draw full of PI zeros as spares Smile

Thanks for your thoughts
  Reply
#6
If you do end up putting it at the top of the mast I would love to hear about it. The motor controller needs a bi-directional serial link but the baud rate could be 4800 or even lower.

I suggest if you try this, have another pi zero on the deck and compare performance for compass steering at least. I don't think it will make much difference unless you have waves. The compass is not affected much even on steel boats, since it's basically steering from the gyros, the compass and accelerometers compensate integration drift.

gps can get a clear view of the sky from the deck no?
  Reply
#7
(06-04-2019, 07:40 PM)seandepagnier Wrote: If you do end up putting it at the top of the mast I would love to hear about it.   The motor controller needs a bi-directional serial link but the baud rate could be 4800 or even lower.

I suggest if you try this, have another pi zero on the deck and compare performance for compass steering at least.  I don't think it will make much difference unless you have waves.   The compass is not affected much even on steel boats, since it's basically steering from the gyros, the compass and accelerometers compensate integration drift.

gps can get a clear view of the sky from the deck no?

Might be interesting to simulate. One set on top of a pole and the other at the bottom and log the results. So I should be able to use ESP8266 modules for the motor controller to PiZ at those baud rates.

Why do all the drone implementations use an additional external mag chip like the old HMC5883 rather than use the AK8963 internal to the MPU9250 series like you do? Is it because "it's basically steering from the gyros" and an external mag is just not required?

It is going to be a fun project, thanks Sean!
  Reply
#8
(06-04-2019, 08:36 PM)mike_kelly Wrote:
(06-04-2019, 07:40 PM)seandepagnier Wrote: If you do end up putting it at the top of the mast I would love to hear about it.   The motor controller needs a bi-directional serial link but the baud rate could be 4800 or even lower.

I suggest if you try this, have another pi zero on the deck and compare performance for compass steering at least.  I don't think it will make much difference unless you have waves.   The compass is not affected much even on steel boats, since it's basically steering from the gyros, the compass and accelerometers compensate integration drift.

gps can get a clear view of the sky from the deck no?

Might be interesting to simulate. One set on top of a pole and the other at the bottom and log the results. So I should be able to use ESP8266 modules for the motor controller to PiZ at those baud rates.

Why do all the drone implementations use an additional external mag chip like the old HMC5883 rather than use the AK8963 internal to the MPU9250 series like you do? Is it because "it's basically steering from the gyros" and an external mag is just not required?

It is going to be a fun project, thanks Sean!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)