lynchlab
@aoife_l22 · Joined April 2025
Engineering student · university
- Topics
- 15
- Replies
- 79
- Points
- 0
Forum Replies Created
WROVER has extra PSRAM on the module, WROOM doesn’t. For a weather station you won’t need PSRAM.
Had the exact same thing in a lab last term with a fridge logger. Modbus registers are just 16 bits, they don’t know about signs. Your Arduino stores -125 as two’s complement, which is 0xFF83, and as an unsigned number that’s 65411. The Pi then reads it as unsigned.
So convert it back on the Pi:
raw = rr.registers[0]
if raw > 32767: # top bit set means negative in int16
raw -= 65536
temp = raw / 10 # -12.5
Or let pymodbus do it, the client has a helper for this (in 3.x):
temp = client.convert_from_registers(rr.registers, data_type=client.DATATYPE.INT16) / 10
On the Arduino side, cast before the register so rounding is explicit: holdingRegisters[0] = (uint16_t)(int16_t)lround(temp * 10);. With int16 x10 you have -3276.8 to 3276.7 C, plenty for a freezer.
If a gateway polls it instead of your script, set that register’s type to signed 16-bit in the gateway config and it does the same conversion.
I did a module on this last term, and then spent a summer placing gateways at a dairy, so here goes.
Mesh works at home because the routers are mains powered and always listening. LoRaWAN end devices are battery sensors that sleep almost all the time and only open short receive windows after they send. A sleeping node can’t forward anyone else’s traffic, so the network is a star of stars instead: every gateway in range hears every uplink, and the network server throws away the duplicates. More gateways means more coverage, and on Hermetry a device message is stored once no matter how many gateways heard it.
James, the Pending status is real, it’s for relay gateways that were seen but not accepted yet. A relay is still one more box to place and power though, and for four sensors behind one warehouse a second gateway is simpler.
Your two heard devices are joining at SF12 with SNR around -15, which is at the edge. The join request gets through, but the join accept has to come back to the device 5 s later in RX1, or 6 s in RX2 at 869.525 MHz (DR0), and at that margin the downlink often doesn’t make it. The other two probably never reach the gateway at all.
Put a second gateway on the warehouse itself, ideally on the side facing those sensors. It can be another Basics Station gateway or a licensed router with a LoRa radio. Both register to the same network server and the sensors just use whichever hears them best.
Relays and the other ways to extend coverage: Local mode and relays
The sample source is perfect timing for me. My sensors for my final year project arrive in two weeks and I have to demo the board before that. Anything to watch out for if I leave sample cards on it?
Both of them are partly right. U.FL is Hirose’s name. IPEX makes a family called MHF, and the original MHF (sometimes MHF1 or MHF I) mates with U.FL, so those pigtails are interchangeable. MHF4 is a smaller connector (about the size of a W.FL) and does not mate with U.FL at all, which is what Aisha hit. Newer LTE modules use MHF4 a lot to save space, sometimes only on the main antenna.
So check the mechanical drawing of the modem, not the word “IPEX”. Height around 2.5 mm is MHF1/U.FL, around 1.2 mm is MHF4.
Two other things. These connectors are rated for only about 30 mating cycles, so don’t plug and unplug them for every test. And keep pigtails short: the thin 1.13 mm cable loses a fair bit at LTE frequencies, a 30 cm pigtail where 10 cm would do costs you signal.
Built it with load cells (two per bed, HX711, ESP32) and the Rules card. Test last night with my supervisor lying on a spare bed and getting up at 23:10: the alarm opened at 23:20 and the carer got it in the chat app.
One thing I got wrong first: I left my old alarm rule on the profile switched on, so the 3 p.m. lounge alarms kept coming. Deleted it, only the Rules card is left. And Rachel, the manager is getting written consent from the families before we put the other two in.
One carer at night, walking around, phone in pocket. There’s a PC at the nurse station but nobody sits at it at night.
Same chip does both, the mode is a register setting. Why would cold matter though, the distance doesn’t change?
Are the probes on 3 wires or parasite power? And when you say short legs, how short?
TIL about the limit of 10. Our lab has 12 Raspberry Pis running a kiosk browser, all signed in with the same account, and they keep kicking each other out. Now I know why lol
fair, an alarm per courier would have been silly. stealing the opto circuit for our lab door.
Fair enough, thanks for answering!
Student question: why is the PRV after the reservoir branch and not right after the pump station?
Alarm rule on the profile with ring == 1? That’s how we did our lab fridge alerts.
We did this in our control systems module last term and I’ve since drawn a few panels for a summer job, so here’s the IEC way as we were taught it.
Designation: IEC 81346 letter codes, terminal strips are X. First strip -X1, second -X2. A single terminal is the strip plus its number with a colon: -X1:3. Equipment gets its own code too: power supply -T1, fuses -F1, the gateway maybe -A1.
Symbol: IEC 60617 draws a terminal as a small circle (or a small square, many CAD libraries use that for terminal blocks) with the number next to it, on the wire where it passes through the strip. You don’t draw the whole strip as one box in the circuit diagram, each terminal appears where its wire is.
Then a separate terminal diagram (terminal plan) per strip: a table, one row per terminal, with internal destination on one side (e.g. -A1:A+) and external cable/core on the other (W12 core 1). Electricians wiring on site work almost only from that list.
A few habits that made my drawings get fewer questions:
- Keep field power and signals on separate strips like you do, and say so in the strip’s title (X1 24 V field, X2 RS485 + 4-20 mA).
- Draw jumpers between terminals explicitly.
- For the RS485 terminals, mark A/B and the shield terminal clearly and note where the 120 Ω termination sits.

