IoT Fidget

by 陳亮 in Circuits > Arduino

24568 Views, 247 Favorites, 0 Comments

IoT Fidget

IMG_5942.jpg
IMG_5939.jpg

This instructables show how to make an IoT Fidget.

When you playing a fidget cube, someone may ask: "what is the effect when you press the Fidget's button?"

Apart from the explanation of how to reduce your stress level, lets make your click become part of IoT big data. It may help to analyse how stress you are...

Preparation

IMG_5863.jpg

Switches and Buttons

buttons, lots of buttons, you may find some from your spare parts or reclaim it from your old toys

PCB board

6 of 14 x 14 holes PCB board, it will be combined into a cube

ESP8266 Breakout Board

This time I use a WeMos D1 Mini, any ESP8266 breakout board should be ok

Lipo Charge Board

This time I use a WeMos Lipo charge board, any small Lipo charge board should be ok

Lipo Battery

A Lipo battery that can fit in the PCB cube

Others

Some coated wire for circuit connection

Cut the PCB Board Into 14 X14 Holes Size

IMG_5864.jpg
IMG_5865.jpg

Smoothen the PCB Edge and Corner

IMG_5866.jpg
IMG_5867.jpg

Design the Button Layout

IMG_5868.jpg

My design is imitating a dice faces from 1 to 5. The design is arbitrary just depends on what switches and buttons in hand.

Some points about the IO connection:

  • WeMos board have 9 IO pins (not count the serial port) from D0 to D8
  • D0 and D4 cannot pull down while boot up
  • D8 already pull down by default, so cannot detect button pressed with common GND
  • if pull down D3 while boot up, it will enter program mode, this side effect can be used while programming
  • including D3, only 6 IO available, so on each face all buttons connect to same IO pin
  • multiple switches on the same face require independent IO to detect single click

Face 1

IMG_5869.jpg
IMG_5870.jpg
IMG_5871.jpg
IMG_5872.jpg
IMG_5881.jpg

Face 2

IMG_5883.jpg
IMG_5882.jpg

Face 3

IMG_5884.jpg
IMG_5885.jpg

Face 4

IMG_5886.jpg
IMG_5887.jpg

Face 5

IMG_5888.jpg
IMG_5889.jpg

Connect Each Face With Wire

IMG_5890.jpg
IMG_5891.jpg

Decorate With Button Caps

IMG_5892.jpg

Soldering Work

IMG_5893.jpg
IMG_5894.jpg
IMG_5895.jpg

Here is my circuit connections summary:

Lipo Charge Board 5V  -> WeMos 5V
Lipo Charge Board GND -> WeMos GND -> all PCB common GND
WeMos D1 -> Face 5 trigger pin
WeMos D2 -> Face 4 trigger pin
WeMos D3 -> Face 3 trigger pin
WeMos D5 -> Face 2 switch 1
WeMos D6 -> Face 2 switch 2
WeMos D7 -> Face 1 three way switch pin 1 and 3

Squeeze Altogether

IMG_5943.jpg

Program ESP8266 Board

IMG_5937.jpg

Download the code:

https://github.com/moononournation/IoT-Fidget

Create your new IoT data channel at: https://thingspeak.com

Fill your AP and channel details into the code:

#define APSSID "Your AP name" // your network SSID (name)
#define APPASS "Your AP password" // your network password #define CHANNELID 0 // your thingspeak channel ID #define WRITEAPIKEY "YOURAPIKEY" // your thingspeak write API key

If you are not familiar how to program WeMos, you may try follow this instructables:

https://www.instructables.com/id/Programming-the-W...

Happy Fidget!

IMG_5938.jpg

It is now all your click recorded into the internet. Record the click is not the end, you can do much more. e.g. make this fidget as a WiFi remote control, utilise it as a wireless gamepad, etc...