5679 views|6 replies

1w

Posts

25

Resources
The OP
 

Simple MicroPython IoT Smart Home (ESP8266) [Copy link]

 

From: https://www.hackster.io/alankrantas/simple-micropython-iot-smart-home-esp8266-d83f8e

hardware

  • Board: NodeMCU V3 with breakout board (ESP8266 ESP-12E)
  • Power supply: 7.5V 1A on the breakout board (which in turn provides 5V and 3.3V power)
  • LCD 16x2 display (I2C) (address may be 0x27 or 0x3F; power required may be 3.3V or 5V)
  • BH1750FVI (GY-30 or GY-302) Light Sensor (I2C) (3.3V)
  • MPU-6050 3-axis accelerometer/gyroscope (I2C) (3.3V)
  • DHT22 Temperature and Humidity Sensor (5V)
  • HC-SR04P Ultrasonic Sensor (3.3V) (Non-P version can also be used, but requires 5V power supply)
  • MQ2 Gas Sensor (5V)
  • Active piezo buzzer (can be triggered by low voltage) (3.3V)
  • Red LED
  • Relay Module (5V)

Most ESP8266 boards have almost the same functionality. Note that the NodeMCU V3 (CH340 USB chip) has wider


software than the V2 (CP2102 USB)

The MicroPython firmware includes a DHT22 driver. Upload the .py library file to your board. See How to upload .py-files to an ESP8266 running MicroPython or use Thonny's File / Save copy option.

Latest reply

Where can I buy the kit?   Details Published on 2020-3-8 18:44
 
 

1w

Posts

25

Resources
2
 

Model

picture
picture

picture

picture

 
 
 

1w

Posts

25

Resources
3
 

Features

Will connect to your WiFi router on startup. If the connection is lost after that, the board will reboot itself.

The LCD displays brightness (illuminance in lux), temperature (Celsius), humidity (%), and the analog reading from the MQ2, updating every 2 seconds.

The LCD's backlight turns on when you're in front of the house (detected by the ultrasonic sensor).

Every 10 seconds the board transmits the temperature, humidity, and MQ2 readings to a Google Spreadsheet in my Google Drive via IFTTT's Webhook API

. (The service allows you to send 3 data at once.) The API also keeps track of the time. If the house tilts more than 3 degrees, the buzzer is triggered. The same effect can be achieved by shaking the house. (Earthquake/burglar alarm.)

The buzzer is also triggered if the MQ2 reading exceeds 700. (Smoke alarm. Although I don't know how high the threshold should be.)

picture

picture

 
 
 

3

Posts

0

Resources
4
 

I don't know why my LCD 16x2 library keeps giving errors when starting up~~~

download ok
exec(open('./esp8266_i2c_lcd_test.py').read(),globals())
Running_test_main
Traceback (most recent call last):
File "py", line 25, in __init__
OSError: [Errno 19] ENODEV

All 3 files are loaded into the board

Comments

Check the chip used by I2C LCD. There are two common types, PCA8574 and PCA8574A, and their addresses are different.  Details Published on 2020-2-10 14:45
 
 
 

1w

Posts

25

Resources
5
 
seco_li posted on 2020-2-10 13:41 I don't know why my LCD 16x2 library keeps giving errors when it starts~~~ download ok exec(open('./esp8266_i2c_lcd_test.py').r ...

Check the chip used by I2C LCD. There are two common types, PCA8574 and PCA8574A, and their addresses are different.

 
 
 

2

Posts

0

Resources
6
 

Where can I buy the kit?

Comments

There should be no kit yet, the website has production instructions and reference files  Details Published on 2020-3-8 21:15
 
 
 

1w

Posts

25

Resources
7
 
wayzinc posted on 2020-3-8 18:44 Where can I buy the kit?

There should be no kit yet, the website has production instructions and reference files

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list