Control the Balance Maze With Alexa

by アロー明和レーシング in Circuits > Remote Control

1939 Views, 9 Favorites, 0 Comments

Control the Balance Maze With Alexa

head.png
archtech.png

Control the balance maze with Alexa

Move the maze by voice.

First of all, please see the video.

It is a summary of operation.

  1. Talk to Alexa (Raspberry Pi + AVS)
    SAY: Alexa
  2. Start Skill
    SAY: BARANSU MEIRO WO KIDOU SHITE
  3. Instruct Skill
    SAY: 1 DO, UE NI SHITE
  4. Skill communicates with Raspberry Pi and throws a command
  5. Raspberry Pi moves servo motor

I will explain how to make it.

Prepare Amazon Echo

P_20180120_190637_vHDR_Auto.jpg
P_20180120_161204_vHDR_Auto.jpg

Let's buy Amazon Echo.

As of January 2018, Amazon echo can not be obtained due to limited sale in Japan.

Therefore, I created an Alexa device using Raspberry Pi.
https://github.com/alexa/alexa-avs-sample-app/wiki/Raspberry-Pi

Skill Settings

skill.png
cloud_node1.png

Set up a custom Skill.

1. Create Skills with Alexa Skills Kit
Amazon Alexa Skills Kit
https://developer.amazon.com/ja/docs/ask-overviews/build-skills-with-the-alexa-skills-kit.html

Define four intents and one slot.

2. Custom Skill on IBM Cloud
You can use it for free by using the light account.
https://www.ibm.com/cloud/lite-account

1) Configure Node-RED on the IBM Cloud.
https://nodered.org/docs/platforms/bluemix

2) Install (copy & paste) the flow.

Downloads

Hardware Preparation

servo_folder.jpg
mazemake.jpg

Create a maze game.

1. Servo and servo folder
Servo uses Tower-pro SG90. Please refer to the URL for details. 3D data can also be downloaded.
https://www.thingiverse.com/thing:746116

2. Maze game (light stuff, made with styrene board)

3. Ball (Light stuff)

4. Raspberry Pi (using Raspberry Pi 3B)

Connection

pin.png

Connect the servo to the Raspberry Pi.

1. Align the direction of the servo.
Connect the upper line to GPIO 12 (32 PIN).
Connect the lower line to GPIO 18 (12 PIN).

2. LED that glows when Skill is activated
Connect an LED with 200 Ω to 330 Ω on the anode. GPIO04(7 PIN)
Connect Graund(9 PIN)

Setting Up Raspberry Pi

rasPi_node1.png

Install the software on the Raspberry Pi.

1. GPIO
 Chattering is done with Rpi.GPIO installed in the standard.
 Therefore, I will install pi-gpiod.
 This is because the PWM output is stable.

 Installation method

sudo apt-get install pigpio python-pigpio python3-pigpio
http://abyz.me.uk/rpi/pigpio/index.html

 Start the daemon
   sudo pigpiod

2. Node-RED
 Install the library for pi-gpiod.
  https://flows.nodered.org/node/node-red-node-pi-gpiod

Install the dashboard library for debugging.
https://flows.nodered.org/node/node-red-dashboard

3. Creating flow Please import (Copy & Paste) the following files to Node-RED.

 Deploy when you can copy normally.

Downloads

I Will Talk to You

P_20180120_185930_vHDR_Auto.jpg
Move the maze by voice

Please pronounce to Alexa.

1. Speak as "Alexa, activate the balance maze".

When the skill is activated, the LED turns on.

2. You are in dialog mode and you can talk without saying a wake word.

3. Speak as "Once you speak up", the maze moves in the specified direction.

4. Speak as "Stop", maze stop.


Happy instructables.