Technical Articles
HCP IoT Showcase using Sphero – Part 3: Maze Setup (Hardware)
Hello everyone! This is the third blog post based on following table.
HCP IoT Showcase using Sphero • Part 1: Overview • Part 2: Controlling Sphero using Raspberry Pi and Xbox 360 controller • Part 3: Maze Setup (Hardware) • Part 4: Unit Test (Gathering & Sending Data) • Part 5: Unit Test (MQTT) • Part 6: Integration Test • Part 7: XS Application • |
This blog explains the highlighted section in the overall architecture.
The easiest way to implement this part is just buying ready-made maze and sensors then connect them to Raspberry Pi’s GPIO.
For the maze for Sphero, SAP Korea team chose MazeBot since it is easy to assemble and extend.
We bought 6 MazeBots and assembled them as below.
For sensors, you can use any type of sensors such as infrared, pressure, light, vibration, water and so on as long as those can be connected to Raspberry Pi via GPIO.
SAP Korea team chose infrared sensors which is generally composed of transmitter and receiver.
For your reference, there are many ready-made infrared sensor kits available as below.
- MagicW Digital 38khz Ir Receiver 38khz Ir Transmitter Sensor Module Kit for Arduino Compatible
- Pack of 2 Digital 38khz Infrared Ir Sensor Transmitter Kit for Arduino
However, since SAP Korea team would like to embed infrared sensors in the wall of the maze, we decided to make it by ourselves.
So, if you would like to follow exactly what we did, you need following things.
Prerequisites
- Mazebot (6 EA)
- Receiver (16 EA)
- – 19×10 Epoxy Breadboard (16 EA)
- – Photo Transistor ST-7L (16 EA)
- – 20K Ohm Variable Resistor (16 EA)
- – Red LED (16 EA)
- – Round Socket (16 EA)
- – Female Connector (16 EA)
- Transmitter (16 EA)
- – 19×10 Epoxy Breadboard (16 EA)
- – Photo Transistor EL-7L (16 EA)
- – 50 Ohm Resistor (16 EA) – It depends on the distance between Transmitter and Receiver
- – Blue LED (16 EA)
- – Round Socket (16 EA)
- – Female Connector (16 EA)
- Power Hub (Many)
- – 11×3 Epoxy Breadboard
- – Pin Header
- – Wire Cable
- Male Connector (32 EA)
- Many Jumper Cables
- Many Wire Cables
- Many Jumpers
- Many Heat Shrink Tubings
- Epoxy Breadboard
- Soldering Kit
Schematic
For whom with Electronic Engineering background, here is the schematic.
Soldering & Assembling
And the followings are some photos during soldering and assembling.
Through above work, we created baseline for 16 pairs of infrared sensors as below.
In order to embed each sensor to the wall of maze, we made 2 holes on each wall block as below.
Then we prepared cables as below.
Yellow one is for signal communication to Raspberry Pi’s GPIO but red and blue are just for power supply. And only receivers have yellow cable.
After embedding transmitters and receivers into the wall blocks, we connected photo transistors respectively as above.
We also prepared 16 yellow extension cables with alphabetical order labels (A to P) as above.
Then we did our first test by connecting Raspberry Pi and power supply based on the maze map we prepared as below.
The reason why we used bottom side of the maze to test was for easy wiring work.
Ta-da! In this step, we quickly checked all sensors were working correctly with blue and red led.
After the first testing, we prepared infrared signal bus part as above to ensure stable connection to Raspberry Pi.
Then we did some wiring work as above.
Then finally, we made a black case for infrared signal bus and connected all cables. That’s it. This is all about hardware part.
Let me get back to you soon with Python codes to get signals from those sensors.
Best,
Seungjoon