Posts

Showing posts from May, 2021

ESP32 DHT22 Temperature Humidity to MySQL Database

Image
 ESP32 DHT22 Temperature Humidity to MySQL Database  I have decided to replace the Arduino Nano, DHT22 and HC-05 Module with something more simple, smaller, cheaper and with longer battery life. The main focus of this project is the code, for a simple power supply a power bank should last a week or more. The power usage will be 3mA for 99% of the time and only rising to ~140mA for a few seconds per reading. The following were used : ESP32 Devkit C DHT22, temperature humidity sensor MySQL database on local network eg. Raspberry Pi with MariaDB, phpMyAdmin is usefull as well. USB Powerbank Breadboard, wires etc. To connect the DHT22, connect + to 3.3v, Out to pin 14, Gnd to Gnd. Simple :) The complete code is below with extra comments shown in bold. Parts that you need to change are shown in red.  The code can be downloaded from gitlab https://gitlab.com/leahC123/ESP32DHT22MYSQL/-/blob/master/ESP32DHT22.ino ------------------------------------------------------------------...

ESP 32 Devkit C Power usage and reduction

Image
ESP32 Real world power use.  The specification for the ESP32 WROOM that is included on the ESP32 DevkitC are : Worst case scenario Active WiFi 802.11b WiFi TX 345mA 802.11n WiFi TX 280mA RX mode are all around 83mA For the processor: @160 MHz 20mA @80 MHz 15mA To measure real world power usage I am using a USB power meter from Amazon. Ruideng shows on the screen when it first loads and it seems accurate enough for this test. When programming via USB ~ 300mA Plugging in an ESP32 Devkit C with the default code shows 125mA. TimerWakeUp / Deep Sleep sketch in Arduino IDE 10mA This is with a serial connection open ! Without serial connection open from PC the power consumption drops to ~3mA I only realised this by chance and a lot of online sources state ~10mA BLE server example sketch 56 - 57mA BLE Beacon Scanner example sketch 125mA Taking these readings into account it seems that 3mA while in deep sleep is as good as the ESP32 DevkitC is going to get. It is also significantly lower th...

Calibrate 3D Printer

Image
Steps to Calibrate 3D Printer I have a very cheap Geetech I3 Pro B, it cost around £80 delivered in the UK. The slider bars are hollow, linear bearings are nylon, the frame is plywood and the heated plate is wonky but it is capable of some nice prints (after some modification, I will post about this when I have done a few more parts). It is however printing items smaller than they should be. I noticed this when printing a case to hold a 18650 battery and some circuit boards, they would not fit :/ Before attempting callibration please ensure that all belts are taught and nuts bolts and connections are secure. Pay special attention to your bed as mine had a lot of slack where it attached to the belt causing serious issues / circles and curves being uneven, dimensions being short on that axis being the most obvious issue.  This can be resolved by calibrating the printer stepper motors but we may as well calibrate all of them to get the best prints possible. I will do it in the follow...

Exchange 2013 Event ID:15021, OWA blank screen

Image
 This is an annoying issue that seems to occur when the SSL certificate is renewed using ECP. Everything appears to be working fine until the server is restarted...  Under Windows Logs - System there are hundreds of Event ID: 15021 logged with source HttpEvent. Outlook Web Access shows the login page normally but once logged in a blank page is displayed, sometimes with HTTP error 503. Outlook connections and mobile also fail. The first thing to do is open an elevated cmd prompt and run netsh http show sslcert   At the bottom of the output you should see IP:port 127.0.0.1:443 Copy the Certificate Hash and Application ID into a text document as we will need them in a subsequent step. In the elevated cmd prompt run: netsh http delete sslcert ipport=0.0.0.0:444 Next we need to create the command as below substituting the Certificate Hash and Application ID that were previously saved. netsh http add sslcert ipport=0.0.0.0:444 certhash=CertificateHash appid=ApplicationID If thi...