Своя «Алиса»/Echo: Умная колонка на Arduino 101 и 1Sheeld с голосовым управлением
Компоненты и материалы
| Компонент | Количество |
|---|---|
| Arduino 101 | 1 |
| 1Sheeld+ (плата + приложение) | 1 |
| iPhone (в качестве «мозгов» и звука) | 1 |
| PVC-труба (корпус) | 1 |
| RGB LED-лента | 1 |
| Блок питания 12 В | 1 |
| Релейный модуль | 1 |
| 3× NPN-транзистора (для LED-ленты) | 3 |
| Макетная плата, перемычки (30 шт), USB-кабель | 1 комплект |
Инструменты
- Дрель, PVC-труба
Приложения
- Arduino IDE, 1Sheeld Library, 1Sheeld Mobile App (App Store / Google Play)
О проекте
Увидел у друга Amazon Echo: музыка, свет, новости, погода, время — всё голосом. Внутри макера закричало: «Почему бы не сделать самому!». Нашёл 1Sheeld — платформу, дающую Arduino доступ к сенсорам и возможностям смартфона по Bluetooth. Плата 1Sheeld ставится на Arduino, общается с Android/iOS-приложением.
Использовано 5 щитов (shields) из 40+:
- Voice Recognition — управление голосом. Активация:
VoiceRecognition.start(); - Music Player — доступ к плееру телефона.
MusicPlayer.play(); - Text to Speech — голосовые ответы.
TextToSpeech.say("time in cairo is"); - Clock — время телефона.
Clock.queryDateAndTime(); - Internet — HTTP-запросы. Погода через OpenWeatherMap API:
HttpRequest request1("https://api.openweathermap.org/...");

Пошаговая сборка
- Компоненты — список выше (~$260 с iPhone)
- Корпус — просверлите отверстия в PVC-трубе для звука, покрасьте в чёрный
- Схемотехника:
- LED-лента → транзисторы → блок питания
- Лампа → реле → сеть 220 В
- Реле и лента → Arduino 101 (пины по коду)
- Всё монтируется внутри трубы с iPhone
- Библиотека 1Sheeld: Arduino IDE → Sketch → Include Library → Manage Libraries → «OneSheeld» → Install. Или скачайте ZIP с 1sheeld.com → Add .ZIP Library
- Приложение 1Sheeld — установите со стора
- Выбор щитов — в туториале 1Sheeld выберите: Voice Recognition, Text to Speech, Clock, Internet, Music Player → нажмите Multiple Shield
Код (Amazon Echo Code)
#define CUSTOM_SETTINGS
#define INCLUDE_INTERNET_SHIELD
#define INCLUDE_VOICE_RECOGNIZER_SHIELD
#define INCLUDE_TEXT_TO_SPEECH_SHIELD
#define INCLUDE_MUSIC_PLAYER_SHIELD
#define INCLUDE_CLOCK_SHIELD
#include <OneSheeld.h>
unsigned long previousMillis = 0;
bool state = 0;
// API погоды (Каир, пример)
HttpRequest request1("https://api.openweathermap.org/data/2.5/weather?q=Cairo,EG&appid=YOUR_KEY");
#define strip1 3
#define strip2 6
#define strip3 5
int lamp = 13;
int hour, minute;
char b[4], c[4];
String strh, strm, noon;
const char mainCommand[] = "alexa";
const char weatherCommand[] = "how is the weather today";
const char playCommand[] = "play music";
const char clockCommand[] = "what time is it";
const char stopCommand[] = "stop";
const char lightonCommand[] = "turn on the lights";
const char lightoffCommand[] = "turn off the lights";
void setup() {
OneSheeld.begin();
pinMode(strip1, OUTPUT); pinMode(strip2, OUTPUT);
pinMode(strip3, OUTPUT); pinMode(lamp, OUTPUT);
request1.setOnSuccess(&onSuccess1);
request1.getResponse().setOnJsonResponse(&onJsonReply1);
VoiceRecognition.setOnNewCommand(&myFunction);
}
void loop() {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= 5000) {
previousMillis = currentMillis;
Clock.queryDateAndTime();
VoiceRecognition.start();
}
hour = Clock.getHours();
minute = Clock.getMinutes();
if (hour > 12) { hour -= 12; noon = "P M"; } else { noon = "A M"; }
strh = String(hour); strm = String(minute);
strh.toCharArray(b, 4); strm.toCharArray(c, 4);
}
void myFunction(char *commandSpoken) {
if (!strcmp(mainCommand, VoiceRecognition.getLastCommand())) { alexon(); MusicPlayer.setVolume(5); state = 1; }
if (!strcmp(playCommand, VoiceRecognition.getLastCommand()) && state == 1) { alexoff(); MusicPlayer.play(); delay(10000); MusicPlayer.stop(); state = 0; }
else if (!strcmp(weatherCommand, VoiceRecognition.getLastCommand()) && state == 1) { alexoff(); Internet.performGet(request1); OneSheeld.delay(5000); state = 0; }
if (!strcmp(clockCommand, VoiceRecognition.getLastCommand()) && state == 1) { alexoff(); TextToSpeech.say("time in cairo is"); delay(1300); TextToSpeech.say(b); delay(600); TextToSpeech.say(c); delay(800); TextToSpeech.say(noon); delay(500); state = 0; }
if (!strcmp(lightonCommand, VoiceRecognition.getLastCommand()) && state == 1) { alexoff(); digitalWrite(lamp, HIGH); TextToSpeech.say("the lights turned on"); delay(6000); state = 0; }
else if (!strcmp(lightoffCommand, VoiceRecognition.getLastCommand()) && state == 1) { alexoff(); digitalWrite(lamp, LOW); TextToSpeech.say("the lights turned off"); delay(3000); state = 0; }
}
void onSuccess1(HttpResponse & response1) { response1["weather"][0]["main"].query(); delay(200); }
void onJsonReply1(JsonKeyChain & hell, char * output) {
if (hell == request1.getResponse()["weather"][0]["main"]) {
TextToSpeech.say("the weather today in cairo is"); delay(2000);
TextToSpeech.say(output);
}
}
void alexon() { digitalWrite(strip1, HIGH); delay(200); digitalWrite(strip2, HIGH); delay(200); digitalWrite(strip3, HIGH); }
void alexoff() { digitalWrite(strip1, LOW); digitalWrite(strip2, LOW); digitalWrite(strip3, LOW); }
Схема

Производственный процесс
- Передача данных температуры и влажности между двумя Arduino через Firebase
- Цифровые кости на Arduino: генератор случайных чисел с LCD-дисплеем и кнопкой
- Универсальный Android-пульт на Arduino, 1Sheeld и ИК-управлении
- DIY USB-геймпад на Arduino: собственный высокопроизводительный контроллер
- Измерение расстояния в реальном времени: Ардуино-сонар с визуализацией в Processing
- Pixel Chaser: игра на один тап с NeoPixel Ring и Arduino Nano
- Бесшовное управление яркостью светодиодов с помощью Bolt IoT и Arduino UNO
- Умная робо-рука на Arduino: простое DIY-руководство
- Автономный танк с доставкой пива: Walabot, Arduino, Raspberry Pi и Alexa
- Сборка компактного FM-радио на Arduino Nano и RDA5807M