#IoT Project - ESP32 Weighting scale - Arduino IDE: Result: 0

1 messages · Page 1 of 1 (latest)

scarlet basalt
#

Hi girlies,
I'm currently working on my first IoT project for uni, a simple scale with the ESP32_DevKitc_V4, a HX711 amplifier and the 5 kg Load cell from Purecrea.

I mainly used the following tutorial for my project, although I have a different version of the ESP32 board and I realized, that the code for the calibration of the scale is depricated, so I had to update some parts of the code, which is also added to this post. https://randomnerdtutorials.com/esp32-load-cell-hx711/

Here's the wiring scheme:
Load Cell HX711 HX711 ESP32 Red (E+) E+ GND GND Black (E-) E- DT GPIO 16 White (A-) A- SCK GPIO 4 Green (A+) A+. VCC 3.3V

I successfully uploaded the code 'calibrating_scale.ino' to my ESP32 board and the HX711 connection also seems to be fine. But the problem is I get only 'Result: 0' even though I put weight on my scale. The goal of the calibration code is, to find out what my calibration factor is to make sure the scale shows the correct weight and this is calibration factor is different for everyone, so I can't really skip this step. I really don't know what the issue is, I watched a lot of youtube tutorials and read about people in forums, where this setup seems to work fine.

Does anyone have an idea what I could do to troubleshoot or solve this issue? I'm thankful for every tip.pcow

scarlet basalt
#

Update: What I'll do next is testing it again with another code and if it still doesn't give me any readings I'll remove my 3d printed plates from the load cell to check if it works without them.

I soldered the wires from the Load Cell to the HX711 amplifier and I let someone else check my soldering job, which should be okay according to their feedback. For an additional check the soldering job I need a multimeter, which I don't have around but I'll check if there is one at my uni's workshop. Also the GPIOs should be correctly wired, since I saw a lot of tutorials doing it this way.

scarlet basalt
#

I tried it with another code and removed my 3d printed plates, the Load Cell still gives me only readings of 0 although I put weight on it. Much appreciated, if anyone has additional ideas what I can do here or what the issue could beim_fine

signal timber
#

I can absolutely try to help 💙 Can you please ping me in an hour or so so I don't forget? I'm going back to sleep for a bit so my memory will get wiped 🤣

scarlet basalt
scarlet basalt
#

created this wiring diagram for better visualisation

scarlet basalt
#

@signal timber Wakey, wakeywumpusplushpeek2

signal timber
#

Do you maybe have the white and black from the load cell switched? I think E- is usually white. Let me double check though

scarlet basalt
#

I can‘t switch the wires rn since I need a soldering station for that. I could change it on monday in uni tho. But I think the soldered wires should be okay since I did it the same way as in the tutorial

signal timber
#

Hmm ok. I'll just assume that it's correct then. It's been forever since I've worked with these 😅

#

Did you intentionally choose the Rx pin on the ESP32 for the data line? That should be fine as long as you disable UART on that pin but otherwise the UART function may interfere

#

I forgot that you shared a sketch! I'll check it out

#

Ok yea, in the sketch you shared you have the DOUT pin set to 16, but in the wiring diagram you're connecting DOUT to the Rx pin

scarlet basalt
#

I can change RX to slot 16, and try again

#

hmm I changed the DT wire from Rx to 16 and still the same result:
17:17:49.452 -> Place a known weight on the scale...Result: 0 17:17:55.456 -> Tare... remove any weights from the scale. 17:18:00.465 -> Tare done... 17:18:00.465 -> Place a known weight on the scale...Result: 0 17:18:06.469 -> Tare... remove any weights from the scale.

signal timber
#

Hmm ok, this is trickier than I expected 🤔

#

Would you mind sending me an actual picture of your setup?

scarlet basalt
signal timber
#

Your data line is still going to another pin. There's a pin labeled "16" right next to your SCK line (the red wire). Did you try moving the blue wire to that pin?

scarlet basalt
#

Yes, I changed the blue DT wire from Rx to 16. these pictures are from before I changed it

#

i still had the same result 0

#

otherwise everything is still the same

signal timber
#

Hmm ok, just making sure 💙 Do you have a multimeter?

scarlet basalt
#

I do have one in the uni lab, but i’ll only have access next monday

signal timber
#

Oh ok, bummer! I'm getting to the "is the hardware fried" stage of this project 🤣

scarlet basalt
#

thinky oh man!

scarlet basalt
scarlet basalt
signal timber
#

I'm not giving up hope yet! 😎 I have one more thought. I think the Arduino framework might do some weird pin mapping, so the pins you're specifying aren't actually correct. Can you tell me exactly which board you have selected in Tools -> Board?

#

Hmmmm this might not be it actually 😦 I think what's printed on the ESP32 is correct actually

scarlet basalt
#

I had to leave my laptop to get dinner, but I get back to you to screenshot my Arduino IDE as soon as I‘m back home.

#

I know I had to install ESP32 library for it to find it over usb

signal timber
#

I don't think that's the problem but I don't know what else 😩 Do you happen to have an LEDs and resistors laying around? You could try blinking an LED on those pins to double check

#

Or you could use a logic analyzer if you happen to have one

scarlet basalt
#

i have neither of that 😦

scarlet basalt
#

I just put the HX711 amplifier on a breadboard while the calibration_scale.ino was running on the ESP32 and I saw that during the time I put it on, there are finally results that were NOT 0 in the serial monitor... idk but it's just during the input, as soon as the component is in the breadboard I get only 0 again. just a loose contact or sum? thinky
11:58:29.903 -> Place a known weight on the scale...Result: 51 11:58:36.625 -> Tare... remove any weights from the scale. 11:58:41.633 -> Tare done... 11:58:41.633 -> Place a known weight on the scale...Result: 0 11:58:47.639 -> Tare... remove any weights from the scale. 11:58:52.647 -> Tare done... 11:58:52.647 -> Place a known weight on the scale...Result: -1 11:58:58.742 -> Tare... remove any weights from the scale. 11:59:03.753 -> Tare done... 11:59:03.753 -> Place a known weight on the scale...Result: -209714 11:59:09.745 -> Tare... remove any weights from the scale. 11:59:14.755 -> Tare done...

scarlet basalt
#

Ok - I spent way too much time on this "simple" scale for it to still not work LOLim_fine To be fair, I don't have a clue what I am doing as this is my first IoT project.
I'll try to ask around in campus on monday and do some tests with the Multimeter. I'll write again in here, to update if it's solved

signal timber
#

Huh that's interesting! That certainly does sound like a bad solder joint. If you put pressure on the pins on the right of the board can you make it work again?

scarlet basalt
signal timber
#

You can snap off those extra pins by the way

scarlet basalt
scarlet basalt
#

hopefully I can find out more on Monday. I'll let you know. Thanks for your help Sofie!!!

signal timber
#

You're very welcome Faye!! 💙💙 I hope you get it working well!!

scarlet basalt
#

update: It's working now!😭

signal timber
scarlet basalt
#

yes I had to since the green wire fell off. But the real solution to the problem was soldering the pin connections on the bottom side of the HX711

signal timber
#

Did you not have those soldered already?

scarlet basalt
#

nope I thought it just works with the pins like that lmao_facepalm

signal timber
#

Ahh girl no 🤣 That's such a cute mistake for some reason haha. It reminds me of when I was first starting 🤣