This instructable will cover the creation of Inno, a wooden robot-looking idol, that serves as an IoT marketing medium, for a new educational initiative at the Software Engineering and Management program, in the University of Gothenburg. It is based on this article, initially published in my blog.
Inno, serves as a proof of concept example on ways to combine Internet of Things and traditional marketing tactics, increasing their effectiveness.
In our case at the University of Gothenburg, we wanted students to fill in their email addresses so to add them to our mailing list. The most common way of doing that, would be with a sheet of paper, where the ones interested would write their email. It goes without saying, that this is not the most attention catching or intriguing method to get people to sign up for something.
In order to increase the effectiveness of our campaign, we specified the three properties our strategy should possess:
- Noticeable, we have a big building and busy students
- Affordable, we do not have an approved budget yet
- Easy to use, simple tasks should be easy
- Lovable, the "wow" or "cute" factor wins the target audience's favor
To achieve the above, we built a robot looking, wooden idol with a small LCD screen and a keyboard, that is connected wirelessly to the Internet, which we called Inno!
You can find all code used in it, at my GitHub repository, published under an Apache license.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials & Tools
The tools and components you will need to build a similar project can be found below. Of course you will have to make something to mount them on, like the wooden robot. For that part, I cannot give you a lot of guidance, since it was completely hand made, therefore there are no CAD files to put in a laser cutter and get it automatically cut. So feel free to experiment, innovate and share your creation back with the rest of the world!
- Arduino Nano
- ESP8266 WiFi module (ESP-01)
- I2C LCD screen (16x2)
- LM2596 voltage regulator
- PS/2 keyboard
- HC-SR04 ultrasonic sensor
- Male & Female pin headers
- DC socket
- 6 pin mini din socket
- Jumper cables
- Soldering iron & wire
- Hot glue gun
- Screwdriver & screws
Step 2: Connect a PS/2 Keyboard to an Arduino
First things first. This system is composed of many components, which you should gradually test and integrate. Let's start with connecting a PS/2 keyboard to an Arduino. To do that, we will use the very handy PS2 Keyboard library. You will find all necessary resources in the previous link, as well as in the example found on the arduino.cc website.
The trickiest part was to build the small breakout board for the PS/2 female mini din connector, in order to be able to read signals from it. But as long as you are careful with the connector's psdinout (refer to the pictures above), that should not be a problem.
You know you will have it working when what you are typing on the keyboard appears in your computer's serial monitor.
Step 3: Attach an LCD Screen
Next, you should interface an I2C LCD screen with the Arduino, in order to display instructions to the user along with the information the user has typed via the keyboard.
For this purpose, we will use the new Liquid Crystal library, by F. Malpartida. There are plenty of examples on that page on how to use the said library. After you initialize it successfully, printing text on the LCD screen is as trivial as through the serial, with just one big difference: You are constrained by the very limited size of the screen.
I am personally using a 16 by 2 LCD screen, meaning that I have just two rows, of 16 writable positions for my output. One of the most challenging parts, especially when long strings are involved, is how to handle which part of the string to display.
You can start by just printing a predefined text on the screen and then move to more dynamic text, sent to the Arduino via the serial port, before you start trying to display text typed in from the PS/2 keyboard.
Last but not least, if you are not sure what is the I2C address of the screen you are using, try the I2C scanner.
Step 4: Get the WiFi Module Working
And now the fun part! The ESP8266 is an inexpensive WiFi module. You can communicate with it, via its so called AT commands, sent over a serial connection. I have included all the ESP8266 related functions of Inno, in the wifi_module.ino sketch file, where you can see that I use some of the commands in order to connect to a wifi network and send some GET and POST http requests. Since I am too bored to create my own page to handle the http requests sent by the robot, I took advantage of the easy to use services of thingspeak.com, which do that for me.
Try to make your Arduino, post something to a thingspeak.com channel, using the ESP8266 before you integrate the rest of the system (i.e. the LCD screen and the keyboard).
The WiFi module, works at 3.3 Volts, so its IO pins should be at the same voltage as well. Arduinos typically work at a 5 Volt logic level, so if you want to ensure the longevity of your WiFi module either get a logic level converter or use the appropriate resistors in order to drop the voltage between your Arduino's pins and those of the ESP8266. I personally did not use any, since it worked without them, but that is not a good practice.
Finally, in order to ensure that the Wifi module gets enough current, you might need to power it separately (e.g. using a voltage regulator), in case the Arduino's 3.3 volt output pin, is not sufficient.
Step 5: Attach an Ultrasonic Distance Sensor
The ultrasonic distance sensor (HC-SR04 or SRF05) was a last minute addition to the system, when I realized that the sensor's transducers can look and act like the robot's eyes!
These inexpensive sensors (I recently ordered a couple for 0.5$ each, including shipping from China!) are capable of measuring distances relatively accurately, until around 1.5 meters. In our case, we will use them to wake the screen up, whenever someone approaches Inno. They are widely adopted, so it won't be hard to find out how to use them. I personally utilized my Smartcar sensors library to easily measure distances with the specific ultrasonic modules. The library is thoroughly documented, but as I am thinking of deprecating it, you should not expect any kind of improvements in the near future.
Try to read the detected distance from the Ultrasonic sensor and print it on the LCD screen. Once you manage to do that, you have "mastered" the sensor!
Step 6: Connect Everything Together
OK, if you have followed through the steps, you should have realized how each component each used. Time to integrate them all together. You can follow the connection schema found above and use the Arduino sketch found here to run everything together! Do not omit to add a voltage regulator if necessary.
Now, all you need is to find a way to carefully and intuitively place your components. The code in the sketch, despite being fairly straight forward in concept, tends to get a little complicated, due to the fact that we have to define how the various screens are displayed, along with the transitions between them.
Furthermore, do not forget to fill in your own wireless network credentials and your thingspeak.com API keys. If you paid a lot of attention in the code related to the ESP8266, you might have noticed that there is a "bonus" method, which is not currently used and can be utilized to post tweets!
Feel free to incorporate it into your sketch, to further enhance your creation with cool tweeting capabilities!
Step 7: Enchant the Crowds
To sum up, this was a simple example on how to incorporate the Internet of Things in your marketing campaign. With very cheap and readily available materials, you can enhance traditional advertising media and maximize your visibility and customer engagement.
If you are making something similar, feel free to share your creation back with me!
Participated in the
Epilog Contest VII