Wireless bike pumps and computer game using MySensors



  • Hi,

    I run a couple of sensors using MySensors in my household which send temperatures, airpressure, humidities of various rooms as well as automatic watering some plants with peristaltic pumps when a threshold has been exceeded. However, for an "open day" event at my employer I suggested to make a game involving bike pumps which will control water levels. Children (and also adults 😉) have to physically pump on the the pumps. To make everything wireless, I used the MySensors library to see if I could use it for this game. Just wanted to share this project with you and some background as it might inspire someone else to make something fun!

    alt text

    So how does it work?

    An Arduino Pro Mini (3.3v) , NRF24l01, a joystick (configured to be two-directional), a 18650 battery holder+regulator for 3.3v, and microphone (MAX9814) are inside each pump. The bike pump's tube is actually going inside the box with the microphone. Using Arduino code the microphone is looking for certain threshold (peak) volume for a et amount of time... When the bike pump goes "psssh" 😄 this threshold is exceeded and some custom data is send to the gateway.

    Data send can be anything, but for me it was just: PlayerId|PumpDirection|Strength. Also, these "player nodes" are all wireless and you could put them anywhere 😎 . In the end the green node was closer to the TV as it started to have some connection issues for whatever reasons (could be very well my soldering and all the massive vibrations from the children being really though on these devices!!)

    Gateway is an ESP8266 (as "serial gateway") also with NRF24L01 attached and three programmable LED strips. Every time when data is received; the receive() function will dissect the input data so the appropriate LED strip can be triggered... Pumping would generate a "wave" effect in the LED strips. The direction of the pumping would also change whether the wave would go from the player or to the player.

    The ESP8266 is connected with only USB to a laptop. The game engine Unity is just processing the incoming packets directly on the serial port, and splitting the incoming data, etc:

    3;0;1;0;23;1|0|123

    which would be: Player 1, Direction 0, Strength 123. It would even ignore the rest of the standard MySensors information as I really didn't care and only would allow packets which would result in three values anyway. So that would trigger the "pump" in the game... either one of the two windmills or the steam pump.

    alt text

    Now, I can guarantee that the result was a lot of excited children - and adults - that were... pumped 💪 to get going! I noticed one of the holes on top of the bike pump got quite a bit larger! However I do not really feel like putting photos online these days with people (especially children) I do not know.

    In total 153 games of 2 minutes were played in 6.5h time! 😃


  • Admin

    Impressive @Kokosnoot!


Log in to reply
 

Suggested Topics

  • 8
  • 1
  • 2
  • 90
  • 2
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts