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
Send info from MPU9250 with a ESP32
#1
Hi!
I have ordered a new compass sensor (MPU9250) to replace my old Raymarine fluxgate compass that never works properly.

Now, I got a problem with the distance from the sensor to my Raspberry(Openplotter) (>5meter) and was thinking maybe I could use a ESP32 to deliver the signals to the Raspberry instead of buying a I2C range extender. What do you think, is it possible? I found this page (https://github.com/natanaeljr/esp32-MPU-driver)
//Patrik
  Reply
#2
or connect the imu to pi send to esp??
why would it need to be away from the pi???
cool link i may find a use for it in the future..
mare liberum
  Reply
#3
(06-05-2018, 08:28 AM)jim321 Wrote: or connect the imu to pi send to esp??
why would it need to be away from the pi???
cool link i may find a use for it in the future..

Well, I have the sensor in the middle of the boat under a seat and the rpi is placed a couple of meters from it. I was thinking that instad of using long wires between the sensor and pi with i2c range extender I could use a esp32 instead and do it wireless.
//Patrik
  Reply
#4
On my steelboat I had to put the imu on the mast with 5 m wire. It was working without extender but not very stable. Now with extender it is ok. 2-3 meters will perhaps work without extender.
Kalle
  Reply
#5
"Well, I have the sensor in the middle of the boat under a seat and the rpi is placed a couple of meters from it"
WHY???
its not like it needs to be mounted on the centerline..or mounted in a specific orientation
mare liberum
  Reply
#6
(06-05-2018, 09:30 AM)kalle Wrote: On my steelboat I had to put the imu on the mast with 5 m wire. It was working without extender but not very stable. Now with extender it is ok. 2-3 meters will perhaps work without extender.
Kalle

Hi Kalle! Thanks for your tips.

(06-05-2018, 10:06 AM)jim321 Wrote: "Well, I have the sensor in the middle of the boat under a seat and the rpi is placed a couple of meters from it"
WHY???
its not like it needs to be mounted on the centerline..or mounted in a specific orientation

Because, It's the best place for a compass. There is no engine or electronic that can mess up the sensor. Anyway, my question is: can I use ESP32 to send the signals? 
//Patrik
  Reply
#7
maybe thru mqtt or tcp in and udp out but i cant test now.
my sys being rebuilt at the moment..
you would need to write a program to send from the esp to node red then out to sk on udp. no guarantees..
mare liberum
  Reply
#8
I am also considering to use Wemos ESP32 Wifi/Bluetooth with Battery and IMU sensor to have a "portable fluxgate compass".
I plan to send NMEA 0183 sentences over TCP or UDP .
I noticed that node-red is much to resource hungry on my rpi3 (could be my setup) so prefer to stay with NMEA0183 to remain independent.

Has anyone already progressed on this line or can point me in the right direction?
  Reply
#9
(06-07-2018, 02:51 AM)SkipperEarly Wrote: Has anyone already progressed on this line or can point me in the right direction?

You could use one of those cheap travel routers.
Average current draw with WiFi is 125mA, idle is 68mA.
I send MQTT messages to OpenPlotter without issues from 5 meter, never tested a greater distance. Not sure if 1sec. interval would be reliable, I only send short messages on button presses or switch moves.
These old mini routers may not provide enough space with 4MB rom only, better a recent model with 8MB.
4MB is just enough for OpenWRT and Mosquitto, my setup excluding I2C binaries which would be needed to connect a MPU9250, has only 100kb left, I'm not sure if that would be enough for adding I2C.
As mentioned, these boxes can be complemented with an I2C bus after some soldering, see https://wiki.openwrt.org/toh/tp-link/tl-mr3020
I'm using such a box as a remote control to send my button presses or switch moves over MQTT to Node Red, that way I can cycle through sensor data which I see on an 8×8 bright RGB LED matrix.
  Reply
#10
(06-05-2018, 07:11 AM)Pkarl45 Wrote: Hi!
I have ordered a new compass sensor (MPU9250) to replace my old Raymarine fluxgate compass that never works properly.

Now, I got a problem with the distance from the sensor to my Raspberry(Openplotter) (>5meter) and was thinking maybe I could use a ESP32 to deliver the signals to the Raspberry instead of buying a I2C range extender. What do you think, is it possible? I found this page (https://github.com/natanaeljr/esp32-MPU-driver)
//Patrik

I have worked some with the sensors and used the ESP-32 and her little sister ESP-8266. However before starting to take the Internet of Things on Board (IoToB) I investigated in extending the I2C. This is a common problem and is solved easily. Use a simple I2C line driver chip. Take a look at my project : Yacht-server-with-raspberry and the I2C range extender . It might be that two small chips and two resistors and a 5m cable is simpler then using an ESP32 which also require power cable.

Good luck.

Ole
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)