ESP32 project

Discussion in 'Arduino Playground' started by VE3CGA, Apr 3, 2021.

ad: L-HROutlet
ad: l-rl
ad: L-MFJ
ad: abrind-2
ad: L-Geochron
ad: Left-3
ad: Left-2
ad: l-BCInc
  1. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    Making a new version of a wifi home status. The current board uses a Nodemcu fed info from a stand-alone 328P that is used to monitor some inputs and send info to the Nodemcu where its simple displayed on a webpage.
    Got a couple ESP32's and I'll be able to simplify things. Many advantages due to more I/O on the esp32, down to 1 processor, able to use 2 pin change IRQ's and the Timer IRQ, at least 3 Voltage measurements (for now) - basically more I/O and bluetooth (if I ever get a cell phone)

    Made the web screen with LED indicators which I may change to small icons of devices monitored.
    Still have the serial for monitoring at least for development.
    The board is going to be simple, a few optos & voltage dividers plus a 3v3 wall wort
    upload_2021-4-3_9-20-29.png

    Not sure if I'll actually be able to use the ultrasonic module, it works great on the desktop however, theres too much physical interference in the sump pit to get a good reflection. The pvc sump pit walls, 110vac & 12v backup pump dont give enough water area to get a good reading.

    I was hoping to use ajax or java to just update the inputs but nothing on this setup needs to report instantly - every minute or 30seconds would be soon enough, all the monitoring of inputs is calculated in the main loop, besides I'm no expert with that code.

    STILL upload_2021-4-3_9-49-34.png
     

    Attached Files:

  2. AD5MB

    AD5MB Ham Member QRZ Page

    I made the mistake of buying 1 ESP32. I should have bought 4, a mistake I will rectify later today. One radio equipped ESP32 is like one hand clapping.

    ( Side note: if I find the sadistic SOB who invented auto-correct I will fish slap him with a tuna. I had to correct about a dozen auto corrections in that sentence ).

    Have you discovered the Keyestudio ESP32 IO shield, and the I2C interface conversion shield?
     
  3. AD5MB

    AD5MB Ham Member QRZ Page

    Keyestudio I2C interfface shield:

    [​IMG]

    Keyestudio ESP32 IO shield:

    [​IMG]
     
  4. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    No I haven't seen those, nice add-on.
    Normally, I mount the wifi chips on a pcb with the finished I/O.
    I'm still using thru hole for my boards since I've a good inventory of parts for that
    I should get a few more of the esp32's as well, they are quite versitile.
    upload_2021-4-4_9-22-58.png

    One thing thats on the back-burner is using a couple nodemcu's to send & receive between my rotor slave and master unit. It uses 9600 8n1 with text commands and it would be great to remove another wire from the shack. Going to try and use the ESP-NOW code. Experimented having 2 talking back & forth a few weeks ago, just need to program them as serial bridges.
     
  5. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    fixed up the code for the home monitor yesterday,
    One rabbit hole I fell into was cut and pasting example code into this project.
    worked perfectly except when calculating change in pump intervals, a negative would always
    show on the web page as some huge positive number
    After several hours of breaking down each line, following variables thru the program flow and looking up assigning variables (again)
    the solution became obvious.
    The variable used in a client.print statement was declared as an unsigned long
    took off the unsigned and all is good.
    Not totally versed in arduino C but able to eventually figure syntax out.
     
  6. NM9X

    NM9X Ham Member QRZ Page

    Thanks for the heads up on that SWEET I2C bus. Much less hassle than all those ribbon cables I've got strung all over!
     
  7. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    just an update on this home monitor project as I decided to do a major rewrite of the thing.
    Generator firmware is going to be added to the wifi monitor and put on 1 board - an ESP32 with I/O interface: 2 adc channels, 4 digital inputs for pumps plus gen and house AC, digital outputs for starter, kill switch, transfer relay and exhaust fan
    The better part of doing this is more graphics, less text and 1 processor doing generator autostart plus house monitoring.
    I found code to measure the generator and 12V sump pump batteries on suprisingly nice graphics.
    The graphics are almost the same as some applications we used at Honeywell Building Controls
    below is a test page from the esp32.
    The 2 on the left are actually measuring 2 pots on the esp32 3.3V and the 2 on the right are just preset
    I'll be using the 2 on the right in the final code
    [​IMG]
    Other info like status will be Icons that have either a green (ON) circle or red (OFF) circle with a slash in it
    similar to these.
    I still have to fix up this screen into 3 colums with text info listed below the icons and have the battery voltage below that

    The Distance measurement was removed. I tried to do ultrasonic depth measurement but the water in the sump well is too turbulent when the pump runs and there isnt a clear path with 2 pumps in the sump well. It would work great in a larger container
    [​IMG]
     

Share This Page