Minion Network: MQTT-like Communication Over I2C

MQTT-like communication method to use over I2C to interconnect many devices.

Similar projects worth following
I used MQTT in a lot of internet connected project and I just love using it! I also loved building ROS (Robot Operating System) applications because it gives your system a lot of flexbility as the way you create applications or robots is just like how MQTT works. A program does not know which program it is talking to, it is just publishing messages to some topic and receiving messages from topics it needs to.

I've had this idea of bringing MQTT-like (pub-sub) communication to microcontrollers to be able to create physical applications from cheap, single purposed modules just like how we build applications on top of ROS.

What makes Minion Network special?
- If you want to connect multiple devices (5-10-100) you won't have to invent your communication protocol. You can use Minion Network to communicate as if you are communicating over MQTT, completely offline.
- In the future Master would be able to sync offline communication with real MQTT protocol.
- Runs on Arduino

Assumptions/Features of Minion Network

  • Slaves
    • I2C address is hardcoded.
    • Ack is received form master and error is generated in case no Ack is received.
  • Master
    • Able to discover new joining slaves. (Doesn't have knowledge of slave addresses beforehand)
    • Keep tracks of all the subscriptions and performs proper message delivery to all the slaves.

Assumptions/Features of Minion Modules

  • Minions are able to pass power & I2C cable to each other.
  • Each minion is modularized to be able to easily plug & unplug from existing system.
  • Each minion is relatively cheap to create.

Simple Module Ideas using Minion Network

  • Human Detector Minion (PIR sensor)
    • publish("/human-detector", "{'data': 'timestamp'}"
    • subscribe("/human-detector/config")
  • Light Detector Minion
    • publish("/light-sensor/analog-value", "{'photoresistorValue': '26'}")
    • publish("/light-sensor/threshold-status", "{'isThresholdReached': 'true'}")
    • subscribe("/light-sensor/config")
  • Alarm Minion
    • subscribe("/alarm-status")
  • Button Minion
    • publish("/button-press", "{'buttonPress': 'true'}"
  • LED Minion
    • subscribe("/led-status")
  • Buggy Minion
    • publish("/sound-recording-data", "{some-audio-buffer-data-here}"
    • subscribe("/sound-recording-status")
  • Battery Minion
    • subscribe("/battery-on-off")
    • publish("/battery-status", "{'capacity': '56'}"
  • Tank Body Minion
    • subscribe("/moving-direction")
    • subscribe("/speed")
  • Offline Storage Minion
    • subscribe("/store-data")
    • publish("/offline-storage-capacity")
  • Wifi Minion (MQTT-Minion Net. Bridge)
    • Minion Network
      • subscribe("/up-to-date-subscription-list")
      • publish("/request-subscription-list", "{}")
      • publish("/some-existing-subscription-in-offline-net", "a-message-received-from-real-mqtt-network")
    • MQTT Network
      • publish("/some-existing-subscription-in-offline-net", "a-message-received-from-minion-network")
      • subscribe("/all-of-the-existing-subscription-in-offline-net")

Possible Projects Using Minion Network/Modules

  • Simple home alarm system.
  • Internet connect button.  (Wifi Minion needed)
  • Internet connected car. (Wifi Minion needed)

  • I2C Restrictions

    Birkan11/12/2019 at 16:06 0 comments

    • I2C cables have to be short otherwise error rate is very high.
    • Arduino I2C wire library has 32 bytes of buffer thus overhead has to be very low.
    • 32 bytes restriction will likely require packet based communication under the hood.

View project log

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates