EW Project 2: Development stage 2 - Bringing it all together

So far we have four individual elements:

  • Two personalized drink receptacles: one mug, one glass
  • The coaster that profiles users based on the mug/glass placed upon it.
  • The keyboard with the force sensor that can detect when a user slams their fist on it.
  • The servo-powered remote which can turn up to two mains devices on and off. 
 Now the next step of development is to link them all together to form the constellation.

So we have two Arduinos, each with their own WiFi shield. Chris ran a workshop on using the MQTT protocol to get devices to talk to each other which was extremely helpful - it's definitely something I'll be using in my final project. So we got the two Arduinos working with WiFi and got them connected up to Chris' message broker. I hooked up the force-sensitive-keyboard to the Arduino. I then hooked up the servo-remote to the Same Arduino. I used the keyboard hit as a switch to call a function which effectively used the servo to hit and hold a button on the remote for a few seconds. This sent a several second long on signal to the mains-connected device, to which a coffee machine was plugged into. This is what the result looked like. Just a little disclaimer, this was using a different servo configuration that only pressed one button. The dual button configuration was added later.



Once I'd accomplished this the next step was to add the coaster and use MQTT to connect the components wirelessly. Ideally each one of the three elements would be completely wirelessly connected to each other. However for the sake of this demo we only had two WiFi shields. So we connected the force-sensitive-keyboard to one Arduino. The coaster and servo-remote was connected to another Arduino. 

We ended up with a system which when you hit the keyboard with the appropriate amount of force, it sends a message over the internet to Chris' remote MQTT broker. The second Arduino was subscribed to the appropriate topic. When the second Arduino received the message it checked the coaster to see whether there was a mug or a glass on it. It then sent a command to the servo to press one of two buttons depending on whether there was a mug or a glass on the coaster. In this case if there was a mug, it would turn the coffee machine on. If there was a glass it would turn my record player on. Jamie and I shot a little video of the system in action:


Just to add, everything in this video is 100% functional. 

Comments

Popular posts from this blog

Logitech G502 Proteus Core Teardown & Scroll Wheel Replacement

Turning a laptop screen into an external monitor.

Letter basket: Productive procrastination