Zum Inhalt springen

Wemos LOLIN32: Unterschied zwischen den Versionen

Reox (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „The [https://wiki.wemos.cc/products:lolin32:lolin32 Wemos LOLIN32 ] is a ESP32 based IoT development board. As the original page has no documentation at all,…“
 
Katze (Diskussion | Beiträge)
K added categories
 
(11 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
The [https://wiki.wemos.cc/products:lolin32:lolin32 Wemos LOLIN32 ] is a ESP32 based IoT development board.
The [https://wiki.wemos.cc/products:lolin32:lolin32 Wemos LOLIN32 ] is a [http://espressif.com/sites/default/files/documentation/esp-wroom-32_datasheet_en.pdf ESP-WROOM-32] based IoT development board.
It is available in the [https://hacker.parts].


As the original page has no documentation at all, here are some findings about the hardware.
As the original page has no documentation at all, here are some findings about the hardware.
Zeile 17: Zeile 18:
  esptool.py --port /dev/ttyUSB0 erase_flash
  esptool.py --port /dev/ttyUSB0 erase_flash
  esptool.py --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180108-v1.9.3-238-g42c4dd09.bin  # Adjust image Name
  esptool.py --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180108-v1.9.3-238-g42c4dd09.bin  # Adjust image Name
== Upload Files ==
You can use [https://github.com/adafruit/ampy ampy] to upload files.
WebREPL should also work, but it looks like this code is also missing in the current ESP32 branch of Micropython.
ampy is very straight forward.:
ampy --port /dev/ttyUSB0 put main.py


== I2C ==
== I2C ==
Zeile 31: Zeile 41:
  i2c.scan()
  i2c.scan()


== Open Questions ==
== Battery Monitoring ==
 
Unfortunately, no direct method of battery voltage measurement is built into the system.
But it should be quite easy to implement such a thing: Use a voltage divider on the battery to get a 1.1V max. For a 4.2V cell, this can be achieved using a 27k and 100k resistor.
Note, that the ADC of the ESP32 is set to 1.1V range by default! You can use the attenuation but this is not available on every platform.
 
  ^  V_bat
  |
  R1 = 100k
  |
  +----o ADC
  |
  R2 = 27k
  |
GND
 
Now you can measure the voltage on the battery using the ADC. As the ADC is 12bit, you can get the actual voltage by multiplying the reading by ((27+100)/27) * 1.1 / 2**12, or in more general terms: ((R1 + R2) * V_ref) / (R2 * 2**Resolution).
 
Super nice would be charge monitoring. The TL4054 can do this, you need to hookup to the PRG pin. But this results in nasty bodges on the SOT23 chip...
 
== Battery ==
The battery can be connected via a JST PH2 connector.
They can be bought also from Conrad: [https://www.conrad.at/de/buchsengehaeuse-kabel-phr-polzahl-gesamt-2-jst-phr-2-rastermass-2-mm-1-st-740547.html ArtNr. 740547].
 
 
== Example Projects ==
 
* Temperature and Humidity measurement using collectd as datalogger: [https://github.com/reox/esp32_sht21_collectd ESP32_SHT21_collectd]
 
== Further Readings ==
 
* [http://esp32.net/ esp32.net]


* Can you monitor the battery voltage? Schematic says no...
[[Kategorie:English]]
[[Kategorie:Interessensgebiete]]