Cmiller95
Posts: 1
Joined: Mon Jun 24, 2019 7:15 pm

Sensor to RPi 3+ B

Mon Jun 24, 2019 7:21 pm

Hey guys,
I'm rather new to the electronics works, I'm a MechE technically. My mind is currently being blown by the world of RPi and the capabilities as I slowly work through them. I'm working on a project that utilizes 4 IMUs. The IMUs utilize an I2C protocol. I'd need to run cable at least 8ft (~3m) long to the RPi from the sensors. The Sensors and RPi will be in IP67 enclosures with cable glands. I would like to utilize the four USB capability of the RPi so here comes my questions.

Is I2C to USB a common thing or is it rare? If so why?
Is there a better route that I'm missing to communicate the sensor over long distance to the RPi?

Any and all feedback is greatly appreciated!
Colton

jbudd
Posts: 837
Joined: Mon Dec 16, 2013 10:23 am

Re: Sensor to RPi 3+ B

Tue Jun 25, 2019 4:51 pm

I wouldn't claim this was better but:

A lot of people connect one or more sensors to an ESP8266 - a very cheap microcontroller with WiFi and deep sleep capability, then send the data to their Pi using MQTT over the WiFi.

You need an MQTT broker running on the Pi - probably Mosquitto.
ESPs can be programmed using the Arduino IDE. There are many examples online of code to access sensors and send data by MQTT

Return to “Beginners”