Hi, I started off with a slightly different board using BLE through a gateway to the mqtt broker but the Bluetooth just wasn’t strong enough (these are going in fridges/freezers) so I moved to 2.4Ghz WiFi instead. Antenna wise I started with the one that comes with the board but the rssi was often -80 or worse so I thought that might be the issue and it was losing network connection so now have these 2.4GHz Rod Antenna for XIAO ESP32C3 | The Pi Hut and getting -30 to -50.
I think I had it working perfectly before powered solely from a usb power block but I’ll need to check as I’ve been at this a month or two and that was at the start so can’t remember if it was actually a different board I was using. It definitely didn’t have sleep involved though so that may have been the difference. And then I got possibly down the wrong road reading about esp32c3 and deep sleep issues on battery, a few of them turned out to be unrelated though but I was left with a feeling it may be the problem.
I need to log the temperatures every 15 minutes whether it’s changed or not so while I could try changing the code to only send when theres a change for testing I’d need to change it back for long term use
What I’ve got/want to work is esp32c3 battery powered without needing charged for a month or two at least. Wakes every 15 minutes sends temperature (have Mac, rssi etc just now as well for info) to mqtt broker over WiFi. Anytime I’d expect there to be a temperature from one of them and it isn’t there, if I check the broker logs it shows that it connected but timed out and was disconnected before the message was sent. Broker is mosquito running on a raspberry pi. There’s a python script also running on the raspberry pi that listens to the broker and dumps the message content into a SQL database on another machine on the network.
The broker on the pi is at site A the database is at site B and currently the sensors are at site C all connected by VPN.
I’ve got a new case printing for them with space to incorporate the cap added and will be taking one down to site A tomorrow as part of me also suspects the network but it works so well a lot of the time , just once or twice every few hours it “misses a check in” but I suppose it’s possible that those times there’s an issue with the internet/VPN. They’ve never tried to connect simultaneously yet as I reset them a minute or so apart when starting testing.
You can see in the screenshots above, sometimes it works perfectly then randomly it’ll timeout at the broker before being able to send the message. Rarely it’ll happen twice in a row and it won’t report in for 45 minutes, usually when it happens it’ll miss one 15 minute but be back the next and once in a blue moon I’ve had the same one report in twice within a minute
my guess definitely would be network problems. A fridge often has a metal casing around it and that works like a Faraday cage, which would block all communications. There will be small leaks in the cage that allows part of the signal through. You reported good signal strength with the better antenna’s but is that both ways? What is the signal strength at the other end? is that with the device in the fridge?
Is you 2.4Ghz network on a different name than the 5Ghz? I don’t know, you router might be trying to switch your device to the 5Ghz network when it is using the same name.
… just some thought that might get you going, but that also might be totally irrelevant.
I don’t have these ones in fridges etc yet, there is one at Site A just now which is doing exactly the same (worse actually, NS3 in the screenshot) but the code is out of date on that one, i’ve since added retries and waiting for the network etc, it’s sitting in a multideck which is an open sided fridge with shelves and the rssi is showing as -50+/-.
Still waiting on my prints to finish so i can move a couple of updated ones down there and remove the NS3 that’s there just now. In the mean time i have flashed 1 with just a battery and cap but updated code so it doesn’t sleep at all and just sends the temp every 5 minutes. The network is from a Unifi ac pro on the roof about 10ft away from the multideck (same where the test sensors are just now), you’ve got me thinking about the 5Ghz though, network is the same name, I’ll check Unifi just now and see what’s been happening and lock one to 2.4Ghz only (will do that with all of them eventually) to see if that’s the issue. Can’t believe that hasn’t occurred to me before you mentioned it thank you for helping
Wi-Fi experience for the test sensors is poor in general but the one that doesn’t sleep now is connected with excellent. I can’t look back to see what band it was trying to connect at when it was poor, but i’ve disabled 5Ghz on that network for now to see how it goes.
Will do, would be handy to see if they agree
I’m getting this from 3 of them in serial monitor, constant immediate boot loops, realised after i had the batteries still connected when i was soldering them have i fried them?
I’ll check it out, just put them aside for now to get this one going. It’s been sent over to the site with the broker locally so will hopefully get some better results, It’s missed 1 out of 8 so far but 5Ghz is still enabled down there, waiting for the guy with access to disable it.
Looks good case wise, The rest NOT so Much , all those long wires and bare ones twisted together is that a resistor ? flying over ? That’s not gonna FLY with any kind of of solid repeatability or reliability. IMO. humbly
Firstly, Look at this info and compare the seeed schematic of the Xiao from the wiki, and does most of it to the letter, Except…
“ESP32-C3 is transmitting signals, there may be a sudden increase in the current draw, causing power rail collapse. Therefore, it is highly recommended to add a 10 μF capacitor to the power rail, which can work in conjunction with the 0.1 μF capacitor(s).”
From the data sheet , Look through the Check list and consider some changes. Schematic Checklist - ESP32-C3 - — ESP Hardware Design Guidelines latest documentation
You don’t have to do it all, But consider with your prototype there, Route all the connections UNDER the XIAO , Having the resistor and wires over the can is asking for signal issues among other things too.
A nice PCB would fit great with all the stuff with the Battery.
So as to your expectations…
What size is the Battery? Did you use the battery profiler from DigiKey? to ball park your requirements. It’s so easy a third grader can do it. How much current does the Apparatus draw while powered ON and doing its’ main functions. ?
I’d forget all the other capacitors and crap, just stick to the basic’s and get that working and documented as the baseline power wise. Start there.
You don’t need that big A$$ cap either. 25vdc working … WHAT ??
C’mon man, looks like you were trying EVERYTHING…
HTH
GL PJ
LMK.
Also the DS18B20 doesn’t look like it’s mounted properly UP next to the case like that. There’s a minimum air flow requirement.
Are you using parasitic power? You have a schematic?
Can you verify when you don’t get a check- in You DO get a TEMP reading? Also You are aware the C3 is not the best sleeper in the Xiao Line-up even among its ESP 32 brethren’ So. (It’s cheap though)
Hi there,
So looking at this from my house , LOL it’s easy to be a critic, but hear me out.
This is great for what you have, But for LOCAL op not so much either.
It’s a perfect app for the E-ink display. The last temp will always be displayed even when it’s a sleep . No power penalty and you get a local display that is accurate and a backup if the network goes down. (someone can always look at it).Do you place the whole unit inside, what about temperature for battery? lipo’s don’t like the cold.
Check out this makersmart board this guy did. same kinda setup 2 or 3 temp sensors and an IMU , ESP32 his DS18B20’s have the connector one the end too. Food for thought. Here are some pics of a set I helped with a similar project his sends data to a online web page you can view.
His schematic is open source,