Few months ago I was thinking about a security system for my car that will allow to receive notification when my car is parked near my house. Requirements where:
- minim 700m communication range
- power consumption as low as possible that will allow to run at least 10 days from car battery without discharging battery so that will be impossible to start the car
- bi-directional communication ( I plan to add few components that will be remote controlled )
As I already had experience with AVR micro controllers, I have used an Atmega-328P that is used on Arduino Mini, for radio connectivity HC-12 module that theoretically allows ranges up to 1Km and a module with Gyroscope and Accelerometer GY-521.
Controller supports two operating modes, first mode will send a JSON packages with an alert in case thresholds are exceeded, and second mode will send packages with data read from accelerometer. At this moment connection is insecure and I’m not using a protocol for checking data integrity, in next version I will use a symmetric encryption algorithm and possible I will implement a kind of mesh network. Maximum communication speed is 115,200 bps.
For debugging I have connected on HC-12 module to a USB to TTL module, then have used “moserial” GUI or from terminal “cat” and “echo” commands directly with USB port name.
HC-12 data sheet: https://www.elecrow.com/download/HC-12.pdf