Environmental Monitor

The Project

A device that records environmental data over time and send it to an online database.

Parts

  • Raspberry Pi Zero W
  • SSD1306 Oled Display
  • MCP3008¬†Analog to Digital Converter
  • TMP36 Temperature Sensor
  • Plywood and Standoffs (for the enclosure)

How it Works

The entire device runs on the Raspberry Pi Zero W. The display and sensor are passed through the GPIO pins of the Pi. I used cron job to run a node.js script that records the temperature every 5 minutes and sends it to the server.

Some Things that Didn’t Work

  • I tried to use a MAX4466 Mic Amp to record noise pollution level. However,, it was not sensitive enough.
  • I also tried to use a Yeti USB Mic to record noise pollution, but it also didn’t work out because the pi needed an external sound card.
  • I wanted to do an aruino based device and a raspberry pi based device running side by side to compare the two, but unfortunately I ran out of time.

Links

Philips Hue Controller

The Project

I am making a tangible controller for the Philips Hue. It’s quite a rudimentary controller, the controller will be able to turn a singular light on or off, and it can also control the brightness, hue, and saturation of the light.

How it Works Part I – The Network

In each of the Hue Bulbs, there’s a small wireless receiver that will receive signals from the Hue Hub. The Hue Hub is essentially a small web server that runs on the local network which will send in Zigbee radio requests to the bulbs. We can communicate easily with the hub by sending Http requests to it to change the state of the bulb (the API of which is very well documented here).

System Diagram

How it Works Part II – The Controller

For this particular project, I am utilizing an Arduino MKR 1010. I am using this particular microcontroller because of its Wifi capabilities, any other Wifi capable board or a regular board with a Wifi shield will do.

I am keeping it very simple, just three rotary encoders, with one display. Very straightforward.

Circuit Diagram

Pictures

First Prototype
Final Prototype – Front View
Final Prototype – Side View

Videos

Links

WiFi Connected Online Game Controller

This week I am making a physical wifi-enabled controller for an online game called Ball Drop. I will be using an Arduino-Nano-IoT-33 for this since it has an already built-in wifi shield. To actually play the game, I will be using a 4-way joystick to control the game, and one push button with a built-in LED as the connect/disconnect button and an indicator light.

The indicator light will show one of four states:
1. Off – This means that the controller is off.
2. Slow blink – This means that the controller is on, but is not connected to WiFi.
3. Fast blink – This means that the controller is connected to WiFi, but not connected to the game server.
4. On – This means that the controller is connected to the game.

The connect/disconnect button will be used to connect and disconnect to the game server.

System Diagram
Circuit Diagram

During the creation of this controller, I borrowed heavily from the WiFi Nina example code. The full source code for this controller is available here.

Below are some photos of the controller. I used a ready-made plastic box for the enclosure with some rubber feet at the bottom, I think it adds a nice touch.

And this is a demo of the controller in action!

I am very happy with how the controller turned out. I do enjoy the transparent case, even though I do admit that I can do a better job of organizing the wires.