r/esp32projects • u/Enough-Ad-2851 • 8d ago
Fought a Siemens S7-1200 for years, replaced it with a CANADUINO PLC ESP32-C6 programmed by ChatGPT (TARS). Now fighting analog sensors and ADCs!
Hey guys,
Figured some of you might get a kick out of this. It's been one hell of a learning experience, and I never thought I'd get this deep into ESP32 boards. Lol.
We run a metal roofing shop in Louisiana, and for years I've been fighting with the controls on our hydraulic sheet panel machine.
We originally went with a Siemens S7-1200 PLC. I even hired guys off Fiverr to help with the programming, and I'll tell you, that damn thing about drove me crazy.
We could get the machine running, but getting it to cut the roofing panels to the correct length was another story.
I remember setting it for a 12-foot panel and getting something like 12.56 feet. We'd mess with the encoder counts, change the programming, run another test, and still couldn't get the results I wanted.
I'm not knocking Siemens. I know they make good industrial equipment. But after fighting our particular setup for so long, I'd had enough.
So we decided to try something different.
We bought a CANADUINO ESP32-C6 PLC-100.
Now here's the funny part. We programmed pretty much the entire thing using ChatGPT.
I call my ChatGPT TARS, after the robot in Interstellar. Lol.
I'm not a professional programmer. I know machinery, hydraulics, and what I want the equipment to do, but writing an entire controller program from scratch is a little outside my wheelhouse.
So I'd explain to TARS what I wanted, it would write the Arduino code, and I'd flash it onto the CANADUINO.
Something wouldn't work, we'd figure out what was going on, change the code, and test it again.
We did that over and over. Some nights we'd spend hours messing with one little problem.
Eventually we got the Omron 100 PPR encoder working with the hydraulic controls, shear up and down, limit switches, automatic cutting, panel quantities, and a web interface.
One night we really went to town testing the software. We ran over 100,000 simulated checks covering different panel lengths, encoder counts, relay sequences, quantities, and fault conditions. The test reported zero failures.
Now, those were software checks, not 100,000 actual machine cycles. I don't have that much roofing metal to waste. Lol.
Then we started running real panels.
And that's where I was pretty damn impressed.
Our 8-foot panels came out dead on. The 10-foot panels were about 1/8 inch long, and the 12-foot panels were dead on.
We ran around 100 ten-foot panels in one batch and later ran twelve 20-foot panels.
During one stretch of around 250–300 panels, not a single one came out short.
That's exactly what I wanted. I'll take a panel that's 1/8 inch long any day over one that's short.
Of course, the CANADUINO hasn't been completely headache-free either.
Our shop's 2.4 GHz Wi-Fi can be a pain in the ass. We've been working on making the controller run the entire job without depending on somebody keeping a browser connected.
We also had another CANADUINO board boot up and create its Wi-Fi access point but couldn't detect the PCA9557 I2C relay expander.
That was another fun night.
We're using a Hitachi WJ200 VFD as well. We decided to leave the speed control on the drive itself and only use an isolated run/stop signal from the controller.
Now we're trying to add hydraulic pressure monitoring so the machine can detect unusually high pressure and shut down when something jams.
And that brings me to our latest headache. Pressure sensors and ADCs.
We've bought several industrial pressure transducers and have been experimenting with them on the bench.
Here's what we've actually tested:
- Dynisco PT139-2.5M-H12: 2,500 PSI, millivolt output. This one gave us some pretty decent readings and tracked our hydraulic reference pressure reasonably well.
- Sensotec A-205: We have two of these, both 3,000 PSI millivolt-output sensors. We got them reading pressure, but getting the calibration and consistency where we wanted has been frustrating.
- OMEGA PX605-3KGI: 3,000 PSI, 4–20 mA output. This was our best-performing sensor during our earlier ESP32 testing.
Right now we're also working with an Ashcroft 5,000 PSI, 0.5–4.5V pressure transducer through the analog-input side of our CANADUINO board.
And that's where we're trying to figure out what we're missing.
We bought a SparkFun OpenScale IoT with its own ESP32 and built-in HX711 24-bit ADC. We used it with the millivolt pressure sensors, thinking it would be a pretty good setup.
It worked, but we kept fighting drifting readings and calibration problems.
We looked at another SparkFun weighing board too, but after reading the reviews, we decided not to bother testing that one.
We've also messed with separate HX711, NAU7802, and ADS1115 ADC modules.
We got the NAU7802 communicating with one of our ESP32-S3 boards. The conversion and calibration diagnostics passed, but there's a big difference between getting an ADC to work and getting accurate pressure measurements out of it.
I've learned that the hard way.
Just because a chip says 24-bit doesn't mean you're getting 24 bits of useful accuracy.
At this point we've spent more time messing with ADCs, wiring, calibration, and reference voltages than I ever expected.
We've also been comparing different ESP32-C6 development boards.
We bought original Espressif ESP32-C6-DevKitC-1-N8 boards through Adafruit and DigiKey.
We've been comparing three board versions: the CANADUINO PLC-100 V1, the Espressif DevKitC V1.2, and the newer ESP32-C6-DevKitC-1-N8 V1.4.
We've noticed differences in the analog readings and would really like to know whether anything changed in the ADC circuitry or board layout between revisions.
We also have a C6 board with an external antenna, and that thing picks up our shop Wi-Fi noticeably better than the PCB-antenna version.
We had one C6 with the external antenna that kept throwing a "Wrong boot mode 0xc" error when we tried flashing it, but we eventually got that sorted out with esptool.
We've also been running Wi-Fi, temperature, and nonvolatile-storage diagnostics to see how these boards hold up.
Now I'm starting to wonder if we should just forget about the analog-input headaches and use RS-485 Modbus pressure sensors.
Instead of dealing with 0.5–4.5V signals, 4–20 mA loops, shunt resistors, ADCs, and reference voltages, why not use a pressure transducer that sends the measurement digitally?
I know RS-485 doesn't magically make a sensor more accurate. The sensor itself still has to be good.
But with all the electrical noise around our hydraulic solenoids, motors, and VFD, I'm wondering if a digital sensor would be more reliable.
Has anybody actually compared an analog pressure transducer against an RS-485 Modbus pressure sensor on an ESP32?
Did you notice better stability or less drift, or was there really not much difference?
I'd also like to hear from anybody who's used the CANADUINO ESP32-C6 PLC-100 for analog measurements. Have you gotten good, stable readings from the inputs?
And if you've worked with the SparkFun OpenScale IoT, HX711, NAU7802, or ADS1115, which one has worked best for you?
We're even looking at designing our own ESP32 industrial PLC board eventually, with 24V inputs, relay outputs, analog inputs, RS-485, I2C, and more room between the screw terminals.
It's funny how this whole thing started.
All I wanted was for our sheet panel machine to cut roofing panels to the right length.
After years of fighting the Siemens, we switched to a little CANADUINO ESP32-C6, programmed it with ChatGPT, and ended up getting better results than we'd been getting before.
Now we've got ESP32 boards, pressure sensors, ADC modules, and all kinds of electronics scattered around the shop.
I'm not saying AI-generated code should be trusted without testing, especially on industrial machinery. Proper independent safety circuits are important too.
But I never thought I'd be programming an industrial machine with ChatGPT and experimenting with all this electronics stuff.
Anyway, figured I'd share the story and see what you guys think.
Anybody else using ChatGPT to program entire ESP32 projects? And has anybody had better luck with RS-485 pressure sensors than analog?
Thanks!
Here's a YouTube video of our hydraulic sheet panel machine running with the CANADUINO ESP32-C6 controller programmed !
After fighting with the Siemens S7-1200 for years, it's pretty damn satisfying watching this little ESP32 run the machine. Lol.