I have been playing Pokemon Go quite a bit recently. We've enjoyed going for walks and finding new Pokemon.
One thing I’ve noticed about Pokemon Go - It sucks alot of power! I was looking for a solution to this problem when I came up with an idea - what about a Pokeball that vibrates when rare Pokemon are around? That way I don’t have to keep my app open and drain my phone battery.
The Pokeball includes a Particle Electron cellular data development board. This way, my project can be connected to the internet without draining my phone battery. Inside the Pokeball, a GPS shield detects my location so it knows its current position. A servo placed inside the Pokeball lets it wiggle just like the Pokeballs in the game.
Using all of these parts together and some code running on a web server, the Pokeball can detect nearby Pokemon and alert you by wiggling around.
How it works:
- First the Pokeball uses it's GPS to get its current latitude and longitude
- Next, the Particle Electron sends this information along with the battery status to my web server over the cellular network.
- My webserver used to use the pokevision.com API to watch for new Pokemon that show up near the Pokeball. However, since then Niantic has shutdown pokevision. So I had to roll my own solution using an opensource Pokemon Go API project. This exercise is left up to the reader, as using this code potentially violates the Pokemon GO terms of service.
- When a new Pokemon is close enough, the server sends a command over the Particle cloud to the Pokeball to tell it to wiggle.
- When the Pokeball receives a wiggle command, It moves the servo back and forth about 10 times. The servo has a weight attached that rocks the Pokeball around.
How I built it:
I found the sphere at a local craft store. It's made up of two Styrofoam half shells. I embedded magnets inside the Styrofoam using hot glue to help the two halves stick together without using an adhesive or tape. This allows me to access the insides quickly to charge the battery or make adjustments. People also like to see how it works, so being able to open it easily is convenient.
I cut out a circle from foam-core board that sits down inside one of the half shells. To this board, I mounted all the circuitry and GPS antennae.
Next I attached the servo and a counterweight:
Now it just needs a paint job! I used acrylic paints so that it wouldn't dissolve the Styrofoam sphere.
Once we turn it on and give it a few moments to get a GPS lock, we start to see it notifying the server of its location and the server responding of nearby Pokemon.
After firing up the Pokeball for its official first hunt, The first wiggle alerted me of this Pokemon which I was able to catch after a bit of a struggle: