ESP32 project

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

ad: L-HROutlet
ad: l-rl
ad: Subscribe
ad: abrind-2
ad: Left-2
ad: L-MFJ
ad: Left-3
  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.
     

Share This Page