Blog - Sketching with Hardware

Team 3 – The iHooks

Published on: | Author: Patrick Mörwald | Categories: 2015b, Projects

Watch the project video:

The dog days of summer – usually you should definitely be relaxing during those high summer weeks, especially in a scorching hot year like this. But on the other hand, we where stoked to get into the Sketching with Hardware course at the Faculty of Media Informatics.

Let me tell you why: First, i prefer binging through some days and nights of Arduino tinkering, wood-crafting, hot solder action and low-level coding, instead of learning a fixed quota for a test every week during a whole semester. Second, the atmosphere in the course made us feel like hanging out with some good friends and creating something unique. I mean, this course will leave an impression and gave us some good problem solving excercise as well as an improvement to our team working skills.

Here, i want to give you a overview of our project, the most modern coat hook you will find: The iHooks.

Monday morning, our tutors Bernhard and Patrick gave us a great welcome followed by an Arduino and electronics crash course where we learned some basic skills like soldering and how to use electronic components.

Bernhard and Patrick showing the course how to use the soldering iron.

Bernhard and Patrick showing the course how to use the soldering iron.

The second half of the first day was reserved for a mini project to apply the new knowledge: The keyboard hack. Our task was to find an online game and build an innovative custom controller for it. Therefore, each team was given a standard keyboard controller PCB and some ball switches. We also had a big box with broken and random electronics devices and hardware, ranging from toy cars to pieces of pipes and teddy bears.

We dug deep into the scrap box and found a great looking black toy car truck in good condition. Combined with one of those side-scrolling racing games where you jump and rock your vehicle back and forth to score for flips and other tricks, we pictured this to be a fun human interface device.

We just needed a platform which you could rock back and forth to to tilt two attached ball switches replacing the forward and backwards arrow keys in the racing game. Luckily, the scrap box contained an aluminium half circle which was ideal as a rocker. We drilled holes for mounting the toy car on top of the rocker and glued the electronics to the inner side of it. Finally we put some grippy rubber on the bottom of the aluminium rocker to get one monster-truckesque game controller. After some calibration work, it worked surprisingly well and Ben was able to get some serious scores.

Gentleman, start your engines!

Gentleman, start your engines!


Yep, it actually worked pretty well.

Yep, it actually worked pretty well.

Tuesday began with a morning lecture on how to set up the Arduino Software and upload sketches to an Arduino. We also did some simple Arduino circuits to get familiar with hard- and software. At noon, the topic of this course was revealed: IooT – The Internet of old things.

So our task was to develop an Internet of things application with a little twist: the used object- the thing – should be antique and old-looking. In an IoT application, the user interacts with a physical object and thereby shares or retrieves data from the internet. For starters, each team got an Arduino Mega, and a WiFi or Bluetooth module. Smaller electronic components like resistors, sensors and LEDs where also available.

We had two hours to do some brainstorming and find good antique objects in second hand stores or on the internet. Afterwards, the whole group got together and discussed their ideas. We didn’t find a good project idea instantly and decided to further investigate. On the next morning, we came up with the idea to use an 80’s style skateboard as a physical notificator to do sports and increase health.

Marty McFly would've loved it...

Marty McFly would’ve loved it…

The basic functionality would be that the skateboard moves around and lights up LEDs when the user has not left the house for a specific time. Moreover it should be able to get weather information from an API on the internet and show when the weather conditions for exercising are good.

We discussed this first idea with the group and found that we could actually broaden our concept to a more general approach: We would build a bar with three coat hooks used for sports gear, a rain coat and a warm jacket. The hooks can sense electrically if an item is hung on them and if it is, they show information concerning the item’s use on specific LED lit symbols. The exact functions for the three hooks are:

  1. The sports hook will notify with a red light if the sports gear has not been taken off the hook for 2 days. When it is taken off and hung again, the notification light will turn green. That means that excercise has been done recently. After the two day interval it will turn red agin and thereby remind the user to do regular excercise and boost the health.
  2. The temperature hook holds a warm jacket and will indicate with a dark blue light that the temperature in the next three hours is chilly (i.e. 15°C or less). This helps that the user doesn’t forget a warm jacket when the weather outside is too cold.
  3. The rain hook can hold a rain jacket or an umbrella and will indicate with an ice white light if the chance of rain in the next three hours is above a threshold of 20 %. It reminds the user to bring rain protection gear when he or she heads outside.

All three notification lights at the corresponding hooks can pulsate in a warm yellow color if no object is hung on the hook. This feature helps the user to actually store their outdoor items on the hooks. The weather information is retrieved with the WiFi module from openweathermap.org using their API.

Our concept for the iHooks.

Our concept for the iHooks.

So, our concept was there and we started building the iHooks in the following days. Lets start with an overview of the technical details:

The „iHooks“ consists of an Arduino Mega, a LPD8806 LED strip with 24 RGB color LEDs, an ESP8266 WiFi module and one FSR-400 analog pressure sensor for each hook. The components were all placed in a self-made vintage style wood housing. For the construction of the front and hooks, we got three dark wood hooks from Butlers and a simple 4 mm wood board.

On Wednesday we hooked up the LPD8806 LED strip to two Arduino digital pins, it only needs a clock and a data pin and each LED can be addressed individually. Those strips are really great for colorful light in projects. Power was supplied by an external 5V wall adapter, since the LEDs draw quite some juice. We also built the core structure of the housing and ran some quick tests with the LED strip.

Making the concept come alive.

Making the concept come alive.

The rest of the day was spent mapping colors and positions on the LED strip to the three chambers in the core structure, so that we could light the three symbols in the front individually. This worked well and we where happy that the wood structure and LED strip fitted perfect.

The strip fits the housing nicely.

The strip fits the housing nicely.

On Thursday we programmed the display algorithm for the LED strip to a finished state, which was challenging because the other features like reading the pressure sensors and the WiFi communication had to be executed on the Arduino Mega concurrently. We solved this problem by implementing a simple Round Robin schedule structure in the Arduino main loop using the millis() function. This is a simple and effective approach if you need a couple of processes running parallel on an Arduino.

#define T_updateLED 24
#define T_pollSensor 200
#define T_getForecast 3600000 //1 hour

struct timers {
int32_t LED;
int32_t Sensor;
int32_t Forecast;
};
timers mytimers;

void loop() {
if (millis() - mytimers.LED > T_updateLED){
updateLED();
mytimers.LED = millis();
}
if (millis() - mytimers.Sensor > T_pollSensor){
pollSensors();
mytimers.Sensor = millis();
}
if (millis() - mytimers.Forecast > T_getForecast){
getForecast();
mytimers.Forecast = millis();
}
}

The case also made some great progress, it now featured a sliding shut mechanism for the back and the Arduino was firmly attached on the case. In the end no wires and electrical components should be visible at the outside of our project to give it an antique, non-technical look.

Sliding mechanism and Arduino mount.

Sliding mechanism and Arduino mount.


Neat acrylic glass diffusors for our icons.

Neat acrylic glass diffusors for our icons.

Friday was reserved to get the WiFi module up and running. Our tutors gave us the 3.3 V ESP8266 wifi chip on a breadboard with an included level shifter to fit the Arduino 5V logic. We connected the power and serial communication lines to the Arduino and ran first experiments by requesting the Google website via HTTP GET. It worked fine sometimes, but we also had problems to connect to the access point or even from the Arduino to the WiFi module. Other teams reported the same problems, and it was not really clarified wether it was due to a shaky power supply or firmware issues in the WiFi module. Anyway, we tempered this problem by implementing an automatic reconnect feature in our program.

On Saturday we tinkered around with the great FSR-400 pressure sensors, which we planned to attach below the hooks to sense when something is hung on them. The advantage of using analog pressure sensors – which vary resistance according to the pressure excerted to them – is that one can adjust the sensitivity of the switch and therefore set a custom switching threshold.

Each hook should have a specific pressure threshold and we could easily achieve that by setting the threshold variable in our Arduino Sketch. With the analogRead() function we polled the sensors constantly in our scheduler and then checked if the read pressure exceeds the threshold. If so, the LEDs on the specific hook became switched from the idle pattern to the display information mode.

Electronic circuit of iHooks.

Electronic circuit of iHooks.

On Sunday we improved the power circuit to supply all devices, namely the Arduino, the pressure Sensors and the WiFi module. To reduce spacial use and improve durability, we began transferring the electronic components from the breadboard setup to modular circuit boards. Solder time!

Fitting the electronics in the case.

Fitting the electronics in the case.

Then we researched on http://openweathermap.org/api how to format the API call to get temperature and probability of precipitation for a specific location. The API call was implemented in a short PHP script that runs on the university server. The received JSON data is parsed for the relevant key value pairs, which are then requested via HTTP GET from our WiFi module. The Arduino receives a simple String with two comma separated values for temperature and precipitation. Those values are stored and if they are significant, the respective symbol for cold temperature or precipitation risk is illuminated.

Monday morning was dedicated to combine the electronics and casing. For the casing the plywood was lasercut and engraved. The baroque design was made using Adobe Illustrator. It was then painted with multiple layers of paint and treated with the heat gun to give an antiquated look. We attached the hooks to the main board, drilled holes for the wires and glued the pressure sensors behind the hooks.

Aging the paint with the heat gun technique.

Aging the paint with the heat gun technique.

Sensor and LED final test.

Sensor and LED final test.

Let me explain the following picture from the final presentation on monday: The red running man symbol on the left means you should take your helmet and jump on your bike for some overdue excercise. The blue snow flake in the middle tells you that its freezing outside and you should definitely grab your jacket on the way out. Finally the ice white cloud symbol reminds you to also bring your umbrella since its most likely to rain.

Sport is due, and its rainy and cold. Tough one :)

Sport is due, and its rainy and cold. Tough one 🙂

To sum it up, we have learned to develop a basic IoT application together as a team. It was fun and inspiring to work together in a mixed group of Arts and Media Informatics students and i think we learned a lot on how to share ideas and coordinate a team effort. Seven other teams also created projects which where amazing and showed us that with low cost and in one week we could actually create a working and useful prototype.

My final words? I just hope this course and the whole field of IoT applications continues and thrives so more students across the faculties can have an introduction to this awesome topic!

linked categories 2015b, Projects

|

Write a comment

Comment