0

I'm very new to robotics so bear with me. I'm looking for a way to detect when my raspberry pi is in motion. More specifically, I'm looking to attach a raspberry pi to my motorcycle and have it send a text when the motorcycle starts and stops moving. I'm an avid programer so the sending a text is not a problem but when I look up how to detect motion all I get is results for PIR sensors detecting when somthing moves in front of it. I'm looking into accelerometers and gyroscopes but I'm not sure if this is the right way to go. Any point in the right direction is appreciated.

0
0

A power hungry Raspberry Pi is NOT the way to go, look into Arduino and perhaps a "tilt switch" to reduce the power consumption with the magnitude of hundreds.

This will give you a indication that the bike is experiencing bumps or shakes. The "Accelerometer and Gyroscope" that is proposed uses I2C interface and the same interface is also present on Arduinos.

The benefit is also that a Arduino is resilient to power lost and that is a weakness that Raspberry Pi has.

There is GMS modules like SIM800, but that is something that I understand that you are quite aware of, so I will not dwell on that topic.

Ref.:

https://learn.adafruit.com/tilt-sensor

https://www.youtube.com/watch?v=PMUZqr5iSjw

http://www.learnedu.us/learn.php?file=ard_basics

Note: There is a feature called "Deep sleep" where you could put a Arduino into deep power saving mode and then wake it up with the tilt switch. I use the same concept for alarm devices and then they can use small batteries independent of the bikes power source. There is also a deep sleep feature that it can wake up every "time interval" and perform a task. The time interval could be seconds/minutes/hours.

3
  • Thanks! I decided to go with the Ardunio Nano 33 IoT as it has a 6 axis IMU integrated along with Bluetooth so I can send data to my phone. I'm looking at this adafruit.com/product/2687 to handle the GPS / Cellular connection. The problem now is I don't quite know how to power everything...
    – kfeen
    Dec 1 '20 at 8:24
  • In the case of supplying the solution from the bike battery (12volt) you should look for a "Step down converter" och "buck converter". But some cautions look into deep sleep/sleep walking and try to disable power hungry features as WiFi, mobile module (Adafruit FONA 3G). I have done some similar projects and there I cut the power to the GSM module until I needed it. Remember more features = more power is consumed! Dec 1 '20 at 8:43
  • 1
    Yup! I'm hoping how I could get it to work would be when the IMU detects the bike is moving it tells the GSM to send a text then the GSM goes back to sleep. GPS would be used if the IMU detects a crash and would send a text along with the location. Therefore GPS would only have to be used when the bike is on motion. I'm hoping this doesn't draw too much power but we'll just have to find out. Thanks for the help!
    – kfeen
    Dec 1 '20 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.