-
Designing ESP8266 breakout board
First version with vroom module Schematic with the correct module PCB layout -
INPUT: DHT11
Both sides of opened DHT11 sensor -
OUTPUT: I2C OLED screen
Both sides of OLED board -
Input and output daughterboard
Schematic of daughterboard Daughterboard just had a pull-up resistor for DHT11 temperature and humidity sensor, and connector for I2C OLED display. I also added a connector for the unused pins.
The display had four pin male connector so I wanted to use a vertical female connector on the daughterboard. I used PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Left
as a footprint for the female connector but fab lab had PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Right
as a component. I was able to use a 5 pin connector instead. -
Assembling the boards
Assembled boards and DHT11 -
Quick tests
Arduino settings -
Flashing the ESP8266
For installing MicroPython I followed this tutorial. I installed esptool with pip.pip install esptool
I got the firmware from MicroPython downloads page. I connected the boards and run the commands below.esptool.py erase_flash
esptool.py write_flash --flash_size=detect 0 esp8266-20210202-v1.14.bin
Flashing was claims to be successful esptool.py write_flash --flash_mode=dio --flash_size=4MB 0 esp8266-20210202-v1.14.bin
At the time I thought that I had the same problem that the forum user had which was that the flash size was wrong. But you can see from the picture above that the flash size was detected correctly. Now I have read that the flash mode had to bedio
for the ESP-12E module.REPL in PuTTY -
Testing the input and output devices
I used the MicroPython documentation to get the DHT11 measurements in REPL. I followed this tutorial to get the display working. I think the OLED library scans the devices connected in the I2C since I don't need to give the device address anywhere.
Every pixel on OLED display import time, machine, dht, ssd1306 t = 'TEMPERATURE: ' h = 'HUMIDITY: ' d = dht.DHT11(machine.Pin(13)) I2C = machine.I2C(machine.Pin(14), machine.Pin(2)) # SCL, SDA oled = ssd1306.SSD1306_I2C(128, 64, I2C) oled.contrast(10) while True: d.measure() oled.fill(0) oled.text(t, 0, 16, 1) oled.text( str(d.temperature()), 8 * len(t), 16, 1) oled.text(h, 0, 24, 1) oled.text( str(d.humidity()), 8 * len(t), 24, 1) oled.show() time.sleep_ms(2500)
OLED showing the temperature and humidity measured by DHT11 Temperature and humidity after a hot breath -
Group assignments
I did the group assignments alone.Input devices analog and digital signals
Data transmission (top, channel 7), ends right when the next measurement starts (channels 1 and 2)
Analog signalsHumidity sensors legs on the left. I had probes in both legs in channel 1 and 2 in the oscilloscope. I think R3 in the right picture is the thermistor just based on the fact that it doesn't have a value written in to it. Humidity sensors legs in low humidity. Amplitude was 3.18 V Humidity sensors legs in high humidity. Amplitude was 1.54 V and maybe still climbing
Digital signalsPart of the DHT11 one-wire signal. handshaking from the start is missing. Manual decoding results were the same that I got from the ESP
0011 1010 + 0000 0000 + 0001 1001 + 0000 0001 = 0101 0100
Digital signal in lower temperature and humidity
Output devices power consumption
Current measurement -
Downloads
Download ESP.sch
Download ESP.kicad_pcb
Download ESP-traces.svg
Download ESP-outline.svg
Download dht_oled.sch
Download dht_oled.kicad_pcb
Download dht_oled-traces.svg
Download dht_oled-outline.svg