The awesome soda crate shelving cart I built for my dad this Father’s Day

My father loves to collect vintage wooden soda crates. These used to be used to deliver soda bottles to grocery stores, and many were lost either due to rot or because they were replaced with plastic crates and tossed. They feature beautiful vintage logos and artwork and serve as advertising pieces. Today they are highly collectable, and make for some fantastic up-cycled storage.

I wanted to build my dad a set of shelves that he could use to display his crates as well as use them functionally as storage. As usual, I jumped to my favorite computer aided design program, OnShape, to start sketching up the perfect soda crate shelving cart. First however I needed to know what I was going to make the shelves out of.

My dad had found another design online where the builder had welded a cart together that he really liked, and it had an awesome industrial look. I am not a welder, but I loved working in the machine shop in college. One of my favorite things to build with is 80/20, which is pretty much a heavy-duty erector set for adults. We used it to hold up heavy vacuum chambers and other equipment, but 80-20 also has a lightweight series called Quick Frame which features 1″ by 1″ aluminum extrusions and is far cheaper than its industrial counterpart. These square extrusions can be stuck together using a variety of plastic connectors, and there are extrusions with flanges perfect for holding up the crates. Even better they offer cheap machining services which means that I could literally design a complete shelf on my computer and have them cut each piece to size and ship it to me – I would just need to assemble it!

Also working in my favor was that the crates are roughly standardized- roughly each one is 4″ tall, 18.5″ deep, and 12″ wide. This let me assemble a repeating pattern of aluminum bars with flanges on the sides to support the crates, and design for having six inches for each shelf, giving 2″ of additional storage above the crate. I also added caster wheels to the bottom so that the shelves could be mobile, adding to the industrial look. To finish the shelves off, I added a wooden shelf on top to store the odd-sized crates in my dad’s collection. The final design ended up looking like this:

Screen Shot 2018-06-12 at 9.16.37 PM
A roughly dimensioned drawing of the shelves.

OnShape let me render this design using RealityServer, which gave this gorgeous render of what the eventual shelves would look like:

save_image-4

Sure enough, on assembly this is exactly how the shelves looked! And there is plenty of room for my dad to collect more. Happy Father’s Day!

For those interested, here is the final list of materials in case you wish to order a similar shelf from 80/20, and here is a link to the OnShape design so you can view and edit it yourself!

  • 16 12″ aluminum tubes, SKU #9000
  • 36 6″ aluminum tubes, SKU #9000
  • 6 3″ aluminum tubes, SKU #9000
  • 14 18.75″ aluminum tubes with a flange on one side, SKU #9005
  • 6 18.75″ aluminum tubes with a flange on both sides, SKU #9015
  • 20 gray plastic tee-connectors, SKU #9130
  • 6 gray plastic five-way junction connectors, SKU #9180
  • 4 gray plastic three-way corner connectors, SKU #9150
  • 12 gray plastic four-way corner connectors, SKU #9170
  • 6 gray plastic caster wheel receptacles, SKU #9113
  • 6 threaded stem swivel casters, 3/8-16×1.5″, SKU #2299

 

Roller Coaster Tycoon Ride Ratings IRL

Do you remember playing Roller Coaster Tycoon, the famous amusement park simulation game that shattered sales records and that remains one of the most beloved computer games of all time? I do, and I also remember the most important part of building any roller coaster in the game – testing. While it may seem mundane to someone who has never played, testing was how you figured out if your ride was going to make any money. The game would give your ride a score in three categories- excitement, intensity, and nausea. The goal was to maximize excitement, keep intensity reasonable, and keep nausea minimal. Largely this score was determined by the g-forces your ride produced. High g-forces could mean high excitement or it could mean people are too afraid to go on your ride. These ratings each varied from ‘low’ to ‘ultra-extreme’- both being scores you generally wanted to avoid. ‘Medium’ and ‘High’ were the sweet spot (except for nausea of course, which you always wanted ‘low’) and if you started to edge into ‘Very-high’ intensity you would start to see a drop in ridership, and thus revenue.

G-force relates the acceleration produced by something to the gravitational pull of the Earth. Most roller coasters pull at most 5G’s, or 5 times Earth’s gravity. They only do this briefly though- on big hills or tight turns. The Space Shuttle, for example, pulled 3Gs on reentry and sustained them longer – amusement park goers are clearly not astronauts! Big drops, lots of inversions, intense helixes, and lots of air-time (or negative Gs, where you feel like you are floating out of your seat) are what sell big rides. While real coaster designers don’t use the Roller Coaster Tycoon rating system to determine if their ride is any good they surely have the same design philosophy- be exciting, be intense but not too intense, and make sure the poor teenagers running the thing aren’t scrubbing vomit off the seat every time people get off. I hypothesized most rides, if they were in the game, would probably fall in the ‘Medium’ to ‘High’ intensity and excitement scores. Fortunately we now all carry around an accelerometer in our pockets built right into our smart phones so we can find out for ourselves!

smartphonediagram.png
This diagram shows how the accelerometer maps to the G’s measured by the Roller Coaster Test Meter.

The above diagram shows the axes I chose so that your phone could measure acceleration while resting safely in a zipped or sealed pocket while you rode a roller coaster. Vertical Gs are along your phone’s x-axis while lateral G’s are measured along your phone’s z-axis. This assumes that you put your phone into your pocket with your screen facing to your left and top-first, by convention.

The game’s formulas for computing the ratings for each ride were somewhat mysterious until the OpenRCT2 project published their open-source code and formulas. We knew for years that primarily the g-forces the ride produced made up the bulk of the score, and other features like theming, dueling trains, and music among other things also contributed. There are also unique multipliers for each ride that come into play.

I am simply trying to build a toy however that you can turn on, throw in a pocket, and share with your friends so I avoided the design route of asking you a whole survey about the ride’s features before you get on. Instead I went a different route to produce a set of formulas that roughly approximate that in the game regardless of what kind of roller coaster you are on, mystery multiples and all, by comparing the scores of real roller coasters to those in the game. Fortunately this summer I have had access to a roller coaster that was in the game and that I could ride in real life- a ‘boomerang’! These roller coasters are everywhere, as they have a small footprint and low cost that makes them perfect for parks wanting to add a coaster on a small budget. The model in the game is ‘Defibrillator’ and it can be found in the ‘Funtopia’ scenario of the original game.

So, readers, I rode it just for you! Just kidding- I am obsessed with roller coasters and the fact that I needed to ride one to complete this project was no coincidence. I started building a prototype of my app using Ionic and Apache Cordova, which would enable me to release my app for you on either Android or iOS without needing to rewrite any of my code. There are excellent tools for making a fun UI (I tried to keep the colors and theming true to the original game) and you can import great packages for social sharing and interfacing with the accelerometer. I ran my app and saved the base score using the basic formulas from OpenRCT2 with no multiples. I then tested for the scores for ‘Defibrillator’ in the game, computed my multiples empirically to scale my ratings appropriately, and voila! We now get scores we would expect if real coasters were in the game!

Screenshot_20180604-132623.png
My Boomerang test ride with raw (unscaled) scores reported at the bottom.

Additionally I wanted to provide you with the raw data that went into your scores, just like the game. I used the awesome Chart.js library to plot the vertical and lateral G-forces live for you right on the screen, letting you have a nice plot of the forces experienced on the ride once you’re done:

Screenshot_20180606-103541.png

Here are a few scores from my recent trip to Cedar Point and Kings Island in Ohio:

It is amazing fun- my favorite highlights are the legendary The Beast having an appropriate intensity of ‘Very-high’ and the crowd-favorite Maverick having excitement at ‘Very-high’. I even rode the new Steel Vengeance– just look at those vertical G’s! Simply download the app from Google Play or Apple App Store, insert the phone top-first and screen facing left into a pocket, and hang on tight! Obviously follow any rules about loose articles (they are there for a reason) but generally as long as you have a pocket that can be sealed this is a fun way to rate coasters, plot their g-forces, and brag to your friends about how you pulled 5G’s on Steel Vengeance this summer. Once you hit the ‘end’ button hit ‘share’ and post the scores to social media, then hit ‘clear’ and enter the next coaster’s name before going and conquering it. Have fun and make good choices!

Download on Google Play

Download on the Apple App Store

Use Python to collect and save data from microcontrollers to your PC

I’m at PyCon 2018 in Cleveland this upcoming week, so I thought that it would be a great time to post a quick Python writeup on how you can collect data from microcontrollers like Arduino and then save the data to your PC to process however you wish! PySerial makes this remarkably easy. This is a great project for science teachers as they show how you can use simple, ~$10 microcontrollers to create excellent data collection systems by connecting a few sensors and modifying my simple software! If you want to skip the tutorial you can download my software for Windows or Mac at the bottom of this page or use the link there to clone my repository on GitHub.

As usual,

THE PROBLEM

How can I collect a bunch of sensor data and then save it to my computer so that I can analyze it in a Jupyter notebook or in Excel?

THE SOLUTION

Over serial, and then use a simple Python program to save the data into a format like CSV that can be easily read by any analysis program!

For this writeup, I was specifically trying to collect data from an analog temperature sensor (TMP36) and then plot that temperature over time. I used a Teensy LC- a $12 Arduino-compatible microcontroller board that is so cheap and easy to use that I throw them at any of my rapid-prototyping problems. It features an ARM Cortex-M0+ processor, lots of analog and digital pins (including capacitive touch!) and a convenient micro-USB port for setting up an easy USB serial connection.

Here’s how I wired up the sensor:

temp_diagram.001
This probably would not pass UL certification.

Since all of my projects must include 3D printing, I also 3D printed a great case off of Thingiverse by a user named Kasm that nicely contains the project and makes sure I don’t accidentally short any of the pins to anything:

20180504_204414
Slightly more safe and professional looking. The temperature sensor is down on the bottom left.

For those curious how this works, the temperature sensor is an analog component that, when given 3-5V, returns a voltage that is proportional to the temperature around it. We are feeding the voltage into an analog to digital converter (ADC) so that our digital microcontroller can make sense of the reading. This means that in our code, we need to convert a number from 0-1023 back into a voltage so that we can use the formula from the data sheet to convert to a temperature. Fortunately, this is a simple conversion:

gif.latex

This will return a voltage in millivolts. The 3300 comes from the 3.3V reference voltage of the Teensy, and the 1024 comes from the Teensy having a 10-bit ADC, meaning it has 210 discrete analog levels.

We can then convert to a temperature using the formula from the device data sheet:

gif.latex-2

This will return a temperature in Celsius. I have adapted the Arduino sketch from this excellent Adafruit tutorial so that it will work with the Teensy:

Note what we are doing here:

  1. We are opening a serial port at 9600 baud (bits per second)
  2. We are reading from analog pin 9 on the Teensy, where the voltage out pin is connected
  3. We are converting the reading there to a voltage.
  4. We are converting that voltage to a temperature
  5. We are printing that line to serial so that it is transmitted
  6. We convert again from Celsius to Fahrenheit
  7. We print this line to serial as well
  8. We print a new line character so each row only has the one pair of readings
  9. We wait one minute to take another reading

Pretty simple! You can change the delay to any interval you wish to collect more or less data- the units are milliseconds. I wanted to only collect data once per minute, so I set it to 60000 milliseconds. Go ahead and flash this to your Teensy or Arduino using the Arduino IDE, making sure your device type is set to Serial. This is important, as without doing it you will not be able to read the data being sent over serial USB.

Entypo_e757(0)_1024.png
All software must have a nice icon.

Now to build the Python program. If you would rather simply download the binaries or clone the repository on Github for the Python client the links are available at the bottom of this page. We are going to use PySerial. We are also going to use Python 3, so make sure you have it installed if you are still using Python 2. Pip install PySerial by typing pip install pyserial. The logger is going to be wrapped in a simple Tkinter GUI. We want to accomplish the following:

  • Read the temperature data being printed to serial by the Teensy
  • Save it to a CSV value
  • Let the user select an interval to read from serial
  • Let the user select where they want the csv file saved
  • Let the user select what serial port they want to read off of.

The end result will look like this:

gui_screenshot
Who says Tkinter has to look ugly?

Let’s take a look at the code and then break it down:

What’s happening here is actually more simple than it seems! Let’s go through how it works, step by step, starting in Main():

  1. We create the root window where all of our widgets are stored (buttons, fields, etc.)
  2. We give it a name
  3. We grid a label
  4. We grid a dropdown menu
  5. We use PySerial to look at all serial ports open on the system and look for one called ‘USB Serial’. By default when you flash the Arduino or Teensy with the sketch shown above it will appear as ‘USB Serial’ on either Windows or Mac computers. We want to make sure the user selects the right serial port, so we filter the choices to these. More than likely there will be only one- the Teensy or Arduino connected to the machine.
  6. We populate the dropdown menu with these serial ports.
  7. We add a button and a counter. The default value of this counter is 60. This is letting the user know that they don’t have to sample every 60 seconds, and they can increment this value if they wish. You can change this value to whatever sampling rate you have set on your Teensy or Arduino in the sketch above.
  8. We add a button that lets the user start the data collection. This triggers a function where we ask the user where they want to save their output file in a save dialog, then open a serial port we called sp using PySerial. We must make sure we open it at 9600 baud, just like the serial port we opened on the Teensy! This is so the two ports can talk to each other. We then create a new thread to run our code in- if we did not, the program would freeze and you would not be able to stop the program because it would constantly be running the timer() function, collecting data, and never returning to the thread running the GUI! We set up this thread to run the timer() function as long as the global variable running is set to true. This lets us have a stop condition to terminate the thread when we are finished. In the timer function we use the filename the user has given to use and every sixty seconds save a time stamp in the first column, the temperature in Celsius in the second column, and the temperature in Fahrenheit in the third column. We read a line of of serial using the PySerial serial port’s readline() function and then convert whatever it gets to UTF-8 to make sure that what we are saving are readable Unicode characters. The output database is always being updated with each minute’s data in a new row! We open the CSV value in append mode (open(f.name, a)) so that we do not overwrite any existing data.
  9. We add a button to stop data collection. This sets the global variable running to false, causing the thread where we are saving the temperature data to stop. This halts all data collection.

And we are done! PySerial handles the heavy lifting and we have a nice, simple GUI to collect our data from. The CSV files can then be read into your favorite analysis program to create plots or fits:

Screen Shot 2018-05-05 at 12.28.30 PM
A quick plot I created in Numbers, showing that over the short interval tested the temperature did not stray far from 23 degrees.

SHARING THE SOLUTION

You can clone or fork the repository that contains all of these files here or you can download binaries to use right away on your system:

Clone the Repository

Download for macOS High Sierra or Windows 10

Stop the flu with this DIY Ultraviolet-C iPad Sanitizer and Charger

THE PROBLEM

Our touchscreens are disgusting, and researchers are increasingly turning to UV-C light to disinfect them. UV-C is naturally blocked by the ozone layer, but can be artificially created and it is known to be germicidal. How can we create a convenient way for people such as teachers to disinfect many screens at once?

THE SOLUTION

Using hardware store materials (making them easy for anyone to procure) we can create an enclosed system that bathes screens in UV-C light and charges the devices at the same time! All we need is a box, a UV-C bulb, a power strip, and some elbow grease. Watch the video above for all the details, and click these links to buy the materials I used to create my sanitizer/charger:

Beat the flu with this easy and inexpensive charger and sanitizer!

20180304_171151.jpg

I also designed this 3D printable iPad stand to sit inside the system. As always, you can download it on Thingiverse or edit it for yourself on OnShape!

 

Exploring 3D Printing with First Graders and Tinkercad

This month I have had the privilege to work with a class of talented first graders in order to teach them about computer aided design, or CAD. This is an essential tool in any engineer’s toolbox, but it using it can get very complicated very quickly. Frequent readers of this blog likely know my fondness for OnShape and it’s spiritual predecessor and industry titan, SolidWorks. These programs are far too complicated for a quick introduction in how to use CAD, and the number of features can be overwhelming. While OnShape does work on iPads, which these children are fortunate to have in their classrooms, there is a much friendlier way to introduce 3D design to children- Tinkercad.

Screen Shot 2018-02-23 at 10.16.35 AM.png
The Tinkercad interface and a quick elephant I drew using the basic primitives it offers.

Users create their models out of simple 3D shapes like boxes, cylinders, and pyramids just like they were building with wooden blocks. The big difference is that these blocks can be morphed and stretched like clay, letting users make pretty much whatever they want. They can set how big they are in millimeters and give a precise orientation in degrees.

Tinkercad is maintained by industry heavyweight Autodesk, which is famous for it’s CAD packages like AutoCAD and 3D art software like Maya and 3DS Max. It gives a nice set of features for beginners to computer aided design- lots of primitives and shape generators to choose from, rulers and workplanes to reference your work to and measure distances, the ability to dimension shapes, and a navigation system straight out of the best parametric modelers are all present here. This is great because it means the skills you develop learning Tinkercad transfer into using other popular packages, like OnShape or Inventor, likely the most similar Autodesk offering. As an engineer this is the biggest selling point for teaching children with this package- I know that whatever they get out of this activity, they can transfer forward to bigger and better things. This cannot be said for other programs I tried- Autodesk has another offering called 123D Sculpt that simulates making something out of clay that I found too limiting and too application specific. Microsoft Paint 3D is an impressive upgrade of the drawing program I remember, but it is more oriented towards 3D art than serious 3D part design.

That said, the activity we tackled was not one of designing parts for a rocket or model car but instead making models of the animals they were studying in their science unit. This may seem like a bad application on the surface for modeling programs like Tinkercad if the goal is to teach students how to make useful parts on 3D printers, but in my opinion it is perfect. A big part of imaging how a part should look or be designed is to imagine how it can be made out of simple shapes and figures. When working with a parametric modeler you often observe a designer create the basic shape out of circles, boxes, arcs, and lines and then begin to add the finer details. Working with something like an animal the children are familiar with is perfect for teaching this higher-level skill. It is one thing to teach them how to draw boxes and spheres and dimension them, but to teach them how to think about what they are designing and introducing them to the creative process is much more valuable than the technical skill of using the program itself. Take this elephant the children drew, for example:

Funky Jaagub-Esboo.png
An impressive elephant the first graders drew. This was the first model they created.

I had shown them my demo elephant, and they used it as a springboard to make their own. They identified the shapes I had used to make mine and impressed me with how they understood the creative process I had gone through to create those shapes. They then extended it by thinking of what shape they wanted to use for standing legs (I modeled mine laying down to make things easier), and what shape they wanted to use for eyes, both of which I did not have in my model! They also creatively added a baseplate for the elephant to be printed on with a label, taking advantage of the Tinkercad text tool. They were already thinking in terms of what shapes they had available to them and how they could be stretched and morphed into the figures they wanted. They were also thinking in terms of what could actually be 3D printed. These students had the privilege of having a 3D printer in the classroom and with a little coaching on my part realized why you cannot have big pieces hanging in thin air if you want a successful print, and identified that parts have to be stacked one on top of the other, not hanging in space. I taught them the ‘sandcastle principle’- imagine that you are making this model in sand. You cannot have sand floating in midair, and it won’t stay up without support. They seemed to quickly grasp the idea and they ran with it.

Here are a few of their amazing creations:

If you would like to view the presentation I gave to the students that explains some easy dos and don’ts about 3D printing and design, I’ve included it here in Google Slides format:

This was an awesome experience, and I know the students enjoyed it too. They are now obsessed with Tinkercad and 3D printing, and I have been amazed by what they have independently been creating. This is truly an awesome tool for introducing 3D art, design, and 3D printing to primary and intermediate students, as there is a lot of flexibility here for making very complicated things. I have even found that for very quick designs Tinkercad is more than adequate and it is fast. I am excited to return and work with a new set of students on another set of animals. I am sure I will be just as surprised at their creativity and inventiveness.

 

Making a Star Wars Poster Lithopane Lamp

Star Wars has some of the most iconic artwork of any movie franchise in history. Nowhere is this more apparent than in its theatrical posters. This lithopone lamp captures all nine main storyline Star Wars posters (with a blank standing in for Episode 9 until the official poster is released!) in a lovely desktop lamp that celebrates your favorite movies. Simply place an approximately 2.5 inch diameter LED puck light (like you would place under a cabinet) inside the indentation in the base and run the cord out the slot!

As always, you can edit this project on OnShape!

Also as usual you can download and print these files right now from my Thingiverse account.

Drawing johngineer’s Oscilloscope Christmas Tree using a Particle Photon

Tree

One of my favorite blogs is johngineer, which features projects by the very talented J. M. De Cristofaro. Basically, his blog is what my blog wants to be when it grows up. Anyway, I was in a festive mood and wanted to revisit one of my favorite articles of his in which he draws a Christmas tree on an oscilloscope using an Arduino and a pair of RC filters. He does a great job of going into the details of how exactly this works, but the gist is that the RC filters on the end of your PWM output pins on your Arduino act as a very simple digital to analog converter, letting you draw arbitrary shapes on an oscilloscope in X-Y mode! For those who are unaware of what an oscilloscope is, they are measurement tools that let you visualize electronic signals by plotting the signal versus time. Older ones, like mine, use cathode ray tubes so that you can draw with an electron beam! I made a small modification to his setup- my Arduinos were otherwise indisposed, so I used my favorite dev board, the Particle Photon. I also used different values for my RC filter- 18 kilohms for the resistor and 0.47 microfarads for my capacitors. These were chosen purely because they gave me the best picture on my scope- you may need to play with your part values as well, as your goal is to smooth the square wave that will be coming out of your digital outputs. A diagram of the quick circuit I built is shown below:

christmastree

I also had to modify the original code a bit to get it to work on the Photon. Mainly you will want to set the X and Y variables to whatever digital pins you want to use, and you will need to modify the trace delay. Using the original value is too fast with the Photon, and I found the value below produces the tracing effect you see in my above .GIF. You can adjust it to taste to get a more constant image or to make the hypnotic drawing process slower. My modifications are shown here:

Simply paste this into the Particle IDE and flash it to your board- this is a quick and geeky holiday season project that is sure to get some curious looks in the lab. What better way to start the holiday season than bending a beam of electrons produced by an expensive and invaluable piece of equipment in order to draw yourself a little green tree?

3D Printing Dinosaur Skulls after the Thornton Triceratops Discovery

Recently a triceratops fossil was found at a construction site in my hometown of Thornton, Colorado. Inspired by some incredible 3D printing work being done with 3D scans of dinosaur fossils, I decided to make my own triceratops skull and later made a t-rex skull after the discovery of a tyrannosaur tooth at the site days later. These were done on my Robo 3D R1 Plus printer with special marbled PLA that gives the models a nice stone look. The time lapses were done with an iPhone 7 and then sped up considerably in editing!

Assembled Skeeter unit

Skeeter- an Open Source Internet-of-Things Pranking Device

THE PROBLEM

I want to be able to harmlessly prank friends, pets, and neighbors from my smartphone (and a safe distance away).

THE SOLUTION

Skeeter is an open-source internet-of-things hardware project I have developed that will harmlessly prank your friends, pets, neighbors, etc. by emitting a 17.4kHz tone (just within the hearing of young people) or an 8kHz tone (just within the hearing range of older people) with the press of a button on a smartphone app I have developed. By emitting tones just within the hearing of your victims, they will become annoyed and agitated just as if there were a mosquito or fly buzzing in their ear, hence the name Skeeter! Use it as a dog whistle, a way to shut your loud neighbors up, or leave it hidden somewhere in the office so that you can trigger it at will.

How is this possible? Skeeter is driven by the Particle Photon WiFi IoT development board and runs on rechargeable batteries. A small amplifier is put on the output of the Particle Photon to drive a speaker with an impedance of 4 ohms or higher, perfect for small speakers like the one I used, which was an 8 ohm, 3W speaker which produced a nice, clean output sound.

Skeeter Electronics Assembly
Assembled Skeeter circuit with all parts labeled.

Here is what you need:

  • 1 Particle Photon WiFi development board
  • 1 Particle Photon Power Shield (with rechargeable battery). This will let you charge the batteries over USB and the Photon slides right into it.
  • 1 Adafruit 2.5W Mono Audio Amplifier, or an appropriate circuit to drive your speaker as the Photon cannot do it alone.
  • 1 speaker (if using the Adafruit amplifier choose any speaker of 4-8 ohms impedance that can accept up to 2.5W of power.)

The Particle Photon is an exceptionally handy board to have around- you can write code for it that can be triggered via an HTTP request, meaning that any functions you write you can set up so that clicking a link on a website, in an app, or even querying Alexa will trigger a function to occur in your system. They are low-cost, tiny, and there are a number of peripherals you can buy. I bought the Power Shield which includes a charging circuit and a battery so that the system could be powered by rechargeable lithium ion batteries. I chose a small speaker I had handy (3W, 8 ohms) and wired it with a small amplifier circuit. I could have built my own, but the Adafruit 2.5W mono amplifier is perfect for this application and was actually cheaper than ordering the independent components that I wanted to use, not to mention it works out of the box without debugging. Thus, the whole thing fits together quite nicely and simply. The D0 pin is connected to the audio input of the amplifier (this is arbitrary of course- you can modify the code to use another pin if you would like) and the amplifier is connected to the power and ground pins of the Photon so that it can drive your speaker. The speaker itself is connected to the two output pins on the amplifier, as shown in the wiring diagram. It comes with handy screw terminals so that you can simply connect or swap speakers until you find one you like or that is loud enough. You can see exactly how to wire it up in the wiring diagram I have included, which excludes the batteries and the power shield. These simply plug into the Photon directly.

skeeter_bb
Skeeter wiring diagram, showing exactly how to wire your Skeeter on a breadboard or on a perforated board.

Skeeter, since it was built around the Particle Photon, is programmed using their online development environment. The details of how exactly to do this can be found here, however the gist is that you connect your Photon to your WiFi using the Particle app you can download on your smartphone. Then, from their online IDE you can simply directly paste the code you find in the Firmware section of my GitHub repository for Skeeter. The code itself is quite simple- it generates a square wave at either 17.4kHz or 8kHz depending on what the software receives in an HTTP POST request from your website or app.

Screen Shot 2017-05-26 at 4.03.34 PM
WolframAlpha diagram of a 17.4kHz square wave.

This square wave goes directly to the audio input of the amplifier and then out to your speaker. An off function is also provided that sets the outputs on the audio pin, D0, low. A quick test shows that this works extremely well, giving a nice, well defined peak on a spectrum analyzer where one would expect the 17.4kHz tone to be. It is also satisfyingly loud! You can see if you can hear a 17.4kHz sound yourself by clicking here.

25623
Output of a spectrum analyzer as the Skeeter plays a 17.4kHz tone.

You can follow this tutorial provided by Particle to build your own website or app to control your Skeeter or you can use the Ionic smartphone application I have provided in the GitHub repository under Ionic Application to drive your Skeeter from your smartphone!

Screenshot_20170526-160535-2
Screenshot of the Ionic application I developed for Skeeter

Ionic, if you are not aware, is a framework for developing mobile apps which lets you build with your favorite web development languages. I put together a quick app that simply performs a different HTTP POST request each time one of the different buttons in the screenshot shown on the left is pressed. The Photon will then cause the Skeeter to play a 17.4kHz tone, an 8kHz tone, or turn off all tones. You can compile the app’s code found in the GitHub repository using Ionic for your smartphone’s OS and then load it. Alternatively, you can simply use the HTML from Skeeter.HTML in that repository to build a web app or website for your own use.

The app needs a quick modification before you compile and use it however. It needs your Particle access token and your device ID, which you can post in Skeeter.HTML in the spots I have outlined for you. These details can be found for your device and account by going to the Particle Photon IDE and looking in your settings. Skeeter.html should look like this:

Simply paste your token and your device ID in the form tag as indicated and you are good to go!

3D Printing the Case

boxrender
Render of Skeeter’s 3D Printed Case

Skeeter’s case was designed in OnShape in a public document that you can edit yourself! I tried to make it as small as possible, with holes for the speaker and the charge cable. The small jog in the perimeter of the case allows for the USB port on the power shield to be accessed on the side, as shown in the above image of the inside of the Skeeter unit. This can be customized to your content! Simply download the files from the OnShape document or from your own copy of the case files and send them off to your printer!

What do I use this for again?

Hide it in your house to annoy your siblings or the family dog. Leave it on your porch and annoy the neighbors. Connect it to the school WiFi and annoy your classmates. Bring it to the office and probably get fired. The possibilities are endless! Produce an annoying buzzing sound that will drive everyone crazy with the press of a button. So long as you’re in range of a WiFi network you can put your Skeeter anywhere and cause hilarious mayhem wherever you go.

You don’t even have to be on the same network as Skeeter- leave it somewhere and go get a coffee or lunch and press the button. Skeeter will start playing the noise even if you are miles away since it communicates with Particle’s cloud service, so you can craft the perfect alibi while still driving people nuts. Have fun!