Esp-wroom-32

Santa brought me a ESP-WROOM-32 because I would like to make a salt-level-indicator. I thought I could easily follow the instructions found here https://adonno.com/salt-level-sensor/

But : I cannot find a 5 volts output and whats more confusing …my esp has two rows of pin holes on both sides
So can some of you tell what row to use and where to find the 5v output ? Or did I ask Santa for the wrong hardware ??


On another forum some one told me I could probably use this ESP32- but he could not tell me pins to use. I hope someone here can.

Thanks in advance

1 Like

None of these boards have a 5v output. The pin labelled Vcc is a 5v input. You need to connect 5V to the Ultrasonic sensor and your ESP board.

Looks like it’s a copy of this: http://mh.nodebb.com/topic/8/mh-et-live-minikit-for-esp32

Which is an ESP32 board, not an ESP8266 Wemos D1 mini as used in that project write up. Good news: They are compatible for this project.

The ESPhome board config is:

esphome:
  name: salt_level_sensor
  platform: ESP32
  board: mhetesp32minikit

Instead of D1 and D2 change the config to use GPIO25 and GPIO32. These are labelled IO25 and IO32 and are in the outside row of pins on your board

IO25: to Trig
IO32: to Echo

So the full config would be:

esphome:
  name: salt_level_sensor
  platform: ESP32
  board: mhetesp32minikit

# WiFi connection, replace these with values for your WiFi.
wifi:
  ssid: !secret Wifi_SSID
  password: !secret Wifi_PWD

# Enable logging
logger:

# Enable Home Assistant API
api:

# Enable over-the-air updates.
ota:

# Enable Web server.

web_server:
  port: 80

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

# Text sensors with general information.
text_sensor:

  # Expose ESPHome version as sensor.
  - platform: version
    name: salt_level_sensor ESPHome Version

  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: salt_level_sensor IP
    ssid:
      name: salt_level_sensor SSID
    bssid:
      name: salt_level_sensor BSSID

# Exposed switches.

# Switch to restart the salt_level_sensor.   
switch:
  - platform: restart
    name: "salt_level_sensor Restart"

sensor:

  # Uptime sensor.
  - platform: uptime
    name: salt_level_sensor Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: salt_level_sensor WiFi Signal
    update_interval: 60s

  - platform: ultrasonic
    trigger_pin: GPIO25
    echo_pin: GPIO32

    name: "Saltlevel in percent"
    update_interval: 12h
    filters:
    # Calculates in %
    # Replace 0.42 by the height of your container. From the sensor to the bottom.
    # I used this website to know how I should multiply my values :https://www.skillsyouneed.com/num/percent-change.html 
    - lambda: return (0.42-x)*(100/0.42);
    unit_of_measurement: "%"

    

  - platform: ultrasonic
    trigger_pin: GPIO25
    echo_pin: GPIO32
    name: "Saltlevel in cm"
    update_interval: 12h
    filters:
    # Replace the 0.42 by the height of your container. From the sensor to the bottom.
    # I multiplied by 100 in order to get CM since the sensor works in meters
    - lambda: return (0.42-x)*100;
    unit_of_measurement: "cm"
4 Likes

Thank you for this extensive explanation. I will try this. And now I have to investigate how to get the power supply to the sensor.:slight_smile:

Actually I think based on the schematic on the page pointed to by @tom_l that when powered by usb the 5v pin can be used as a power source.

2 Likes

There is no 5v pin. The VCC is 3V3 out.

Have you tested it? Typically if powered by USB, the VCC will output 5V - it does on my ESP32 and ESP8266…

1 Like

Yes I did. I used VCC and GND from the outer row next to TXD. I use a multimeter for that.

I have one of these boards, or a similar copy from the same design. Vcc (next to pin IO2) is most definitely connected to the USB 5V in and supplies the 3.3V regulator for the board.

2 Likes

I am a noob with this kind of stuff so I have to believe you are right, but please look at the picture. Am i doing smething wrong. Is use the outer row of the board (third pin)

Yep. Move the red probe to the inner row. You are probing IO2. And move the black probe to the outer row, you are probing the RST pin.

Do it on the under side of the board it’s easier:

2 Likes

Thanks, that worked.
Now it’s time to solder pins :slight_smile: First time too

Soldering ain’t so hard.

  1. Use 60/40 tin lead (SnPb) rosin core solder rather than lead free solder. It’s easier.
  2. Poke the wire / component lead through the pad.
  3. Heat the pad and component lead with the iron.
  4. Apply a small amount of solder to the point the iron touches the pad and lead.
  5. Lift the solder away then the iron away.
  6. A good joint looks shiny and smooth. Not crystalline and dull or cracked.

To make it even easier you can ‘tin’ wires first.

  • Strip the wire and twist together the strands.
  • Heat the stripped wire with the iron.
  • Apply just enough solder to coat the strands.
  • This helps to ‘wet’ the joint when you solder it later.

Practice makes perfect.

11 Likes

What is more, get some sort of vise arrangement to hold the board still. You need one hand on the iron, one on the solder, don’t let the board skate around on the desk while you chase it with the iron. Something like this https://www.aliexpress.com/item/32864329897.html

Also a stand for the iron, if you have to put it down in a hurry, don’t just drop it on the desk. That vise I pointed to has one built in, but if you use something without a built in then there are these https://www.aliexpress.com/item/4000341445882.html (although make sure it is heavy enough to hold the iron securely).

1 Like

And above all don’t do like this idiot who was so concentrated on his first soldering that he picked up the soldering stick from the hot side :slight_smile: :slight_smile: :slight_smile: Nice hamburger smell :slight_smile:

1 Like

Thank you all for your wise advices :slight_smile:
Job was done a few weeks ago, and everything is working fine. No burns by the way.

2 Likes

Really nice explanation @tom_l. So kind to explain basics and I love the HA forum for the patience that is put into such detail.

If I give soldering instructions myself I always start with one more rule:

  1. Hold the iron by the cold end.

:wink:

1 Like

Who tests what side is cold ?

1 Like

I have “tested” the hot side.
The cable was slightly twisted so I figured I could use the other hand to help with the untwisting.
It’s painful in case anyone is unsure.

:joy: :rofl: :joy:
Incredible pics!!!

I guess we all did. Countless times. When you’re deep in the project with all eyes on the PCB and grab the iron without looking…
:hotsprings: