Home hackathon project: Make a Bluetooth-LE (Low Energy) controlled water gun
Guest post by Noel Geren
A hackathon is a perfect place to build something you’ve been thinking about creating. I wanted to make a Bluetooth Low-Energy (LE) water gun for sometime and decided this would be the perfect project to tackle at an AT&T Hackathon. Here’s how I did it and everything you need to know to make your own Bluetooth LE water gun in your spare time.
AT&T’s August 2015 Hackathon at The Foundry in Plano, TX provided the perfect opportunity to finish a project that had been sitting on my TODO list for over a year. I’ve always had a fascination with combining water and electricity (Founder of sprinkl). For this specific project, I wanted to make a Bluetooth Low-Energy (BLE) controlled water gun. Not only did I want to build a proof of concept, I wanted something that looked and functioned like a finished product. Obviously, I needed a quick concept, so I threw down a sketch while Ben Nelson gave his hackathon intro speech.
The Kickoff: Getting Parts from the Sponsor Tables
Before the event got underway, I had an opportunity to scope out the goods available on the sponsor tables. I noticed the ARM guys had a relay breakout. While I didn’t necessarily need this specific board (and it’s connectors), I did need that 5v relay it had. After hearing the sponsor’s talk, I ran up to the table and snatched up the relay board.
The Shopping Spree: Getting Additional Parts
With one of my core components in hand, I packed up and headed to the store. My lucky day! At the store, I found a Nerf Super Soaker Thunder Storm. Based on the weight, I was hoping that this specific gun could be redesigned to an even smaller form factor. If I had to use the original gun, I knew my base would need to be strong and that portability would become an issue. I wouldn’t be sure until I tear it down; time to head to the shop to find out!
The Teardown: Breaking down the Super Soaker Thunder Storm for Parts
At the shop, I cracked open the Super Soaker Thunder Storm. Getting it apart was easy, a few screws and voilà! The only thing to be cautious of are the wires running from the pump to the battery pack. For the project, I will be using the pump (along with the barrel tube), and the AA battery pack. The source tube won’t work for the water source I planned on using. At this point, I carefully removed each item.
The Make: Reassembling the Water Gun
Once all of the parts were removed, I measured the bottom of the pump to see how a servo bracket could be added. It was crucial that the device had a turret for aiming (and it wouldn’t be nearly as cool without it). Luckily, there was spacing between the pump motor and the plastic housing. Not a lot of room, but enough to get a few short (and small) screws into it. Along with a good seal of hot glue, this should do a decent job holding the weight up.
The servo bracket has a flat top (for mounting directly to the pump); the bottom of the bracket has a small offset with walls for covering up the servo shaft (more for aesthetics than anything). The offset gives some much-needed extra clearance for our turret when it’s turning.
While having the gun apart, I saw that the pump works by suction, pulling the barrel tube back and fourth. Without a way to have the barrel tube attached, the gun wouldn’t fire. The barrel would need to be recreated. Using the gun’s barrel bracket as a guide, I modeled a new one, but instead of going inside another support, the new one mounted directly to the pump using a screw. The barrel tip would be reused and work as a retention clip for the barrel tubing.
Once the parts were ready, I assembled the barrel and servo/pump bracket. The barrel tubing needed to be cut, the original length was too long for the barrel. At this point, I attached the servo to the servo bracket. One thing to note (that was not done in the model) is the servo will need to have an opening in the case. In my build, this was done to cut time, as I knew I could Dremel out the opening faster than I could reprint a new case if the print was off. The gun is beginning to come together and looks like something from a sci-fi film – AWESOME!
Before I smoke tested the firing mechanism, I needed to replace the water source/feeder tube. I removed the 90-degree connector (connecting the clear tube and the rubber barrel tube) and replaced it with a new 3D printed “coupler.” This allowed me to use aquarium tubing (and get a longer distance to a water source).
At this point, I was able to test the firing mechanism using a cup of water and the AA power pack. The pump took a few seconds to prime, but then started firing a steady stream around 12-15ft – it almost took out a few Macs in the process!
With a working firing mechanism, I started on the case and control board. I had a RF Duino in my parts box that I wanted to use for a project. Perfect! Instead of just stuffing the RF Duino into a case and connecting everything up with a bunch of jumper wires, I wanted to layout a perforated board that would sit up inside the case beneath the servo. This meant my case needed to have standoffs to mount the circuit board, and have proper clearance to the servo.
Once the case was designed and printed, using a Dremel I ground out a hole for the servo, and attached it with two screws along with a seal of hot glue.
Case with Servo Installed
Using a razor blade, I scored/cut the perforated board so it would set against the standoffs within the case. Unfortunately, as I was doing this I broke one of the corners off my board (doh!), and didn’t have any others lying around. This didn’t affect anything, but you will notice it in the photographs. Given more time, I would have picked up a new board, but hey, we’ve got 24 hours!
Laying the board out was straightforward considering the limited main components. Since the RF Duino has both male and female headers, I was able to mount the Servo Shield beneath the RF Duino. This allows the RF Duino to be removed once everything is assembled for flashing (or to be easily reused in another project at a later date). Next to the Servo Shield I attached the relay breakout to the perforated board using hot glue. Both the Servo Shield and the relay board were mounted at the back of the board, so that there was room for the small terminal block and the coin cell battery holder.
The coin cell battery provides power for the RF Duino and is run through a small switch next to the Relay Shield. I didn’t have the proper regulator with me, otherwise I would have used a single power source/switch to power both. It’s a hackathon, you got to do what you got to do!
Once the board was assembled, I connected the servo wires to our servo shield, and relay (along with a ground) to the pump in the firing mechanism. This let me develop the firmware against the actual hardware, ensuring everything was working properly.
With working firmware, it was time to mount up everything. The board was attached to the case standoffs using extra screws that came with the servo. With the board mounted, the firing mechanism was attached to the servo.
Assembled, but something was missing. The device needed a platform, legs for the case to sit on top of. Having around two hours left until presentation time, I searched the shop for something that could be used. I knew I didn’t have time to model and print out new legs (that came later). Score! I found a boomerang that fit perfectly – a little hot glue and a base was created!
The final task was to develop firmware that would allow control of the turret and firing. This meant I needed a basic protocol. I used a two byte payload to accomplish this. The first byte (action) is either “1” or “2” with “1” being “fire” and “2” being “move.”. The fire action doesn’t require any additional data, whereas an action of “2” (move) requires an additional byte to tell it how far to move. Instead of implementing every degree of rotation, I configured five different positions of the servo (0, 35, 75, 95, and 125).
Once a connection to our BLE Soaker is established you can …
- Fire the device by sending the hex value: 31 (1)
- Move the device by sending the hex value: 32 (2) AND the position to move:
- 35 (5) – 0
- 36 (6) – 35
- 37 (7) – 75
- 38 (8) – 95
- 39 (9) – 125
The water gun was definitely a crowd favorite at the Hackathon, but besides the relay board, no other sponsor technologies were used, limiting the selection for a prize. The project turned out fantastic.
Here’s what you need if you want to build a BLE-controlled water gun:
Super Soaker Thunder Storm
RF Duino Servo Shield
CR2025 + Battery Holder
Optional (2 wire) Terminal Block
Hot Glue Gun
Hookup Wire (18-20 gauge)
Computer (w/ Arduino IDE and 123D Make)
Digital Calipers, Aquarium Tubing
Source code and 3D models can be downloaded here.
Watch the BLE Soaker in action on my YouTube page.
Read our Featured Developer Blog on Noel.
About the Author:
Noel Garren is a Software Architect, Hardware Hacker, Inventor and Serial Entrepreneur. @zoomrank @sprinkl_io”