lewisfw
@lewis-e · Mart 2026 tarihinde katıldı
Embedded developer · energy · 14 years in the field
- Konular
- 1
- Yanıtlar
- 37
- Puan
- 0
Oluşturulan forum yanıtları
Yapay zekâ tarafından English dilinden çevrildi ·
Tyler, burada daha düşük baud hızı durumu daha da kötüleştirir; saniyede 200 satır için zaten yer kalmıyor. Liam’ın üç ayrı darboğazı var.Radyo. 250 kbps, 802.15.4’ün ham hava hızıdır. Çerçeveleme, Zigbee ağ ve APS başlıkları, onaylar, yeniden denemeler ve kanal erişimi sonrasında tekil yayın (unicast) için gerçek uygulama aktarım hızı onlarca kbps düzeyindedir. Her RF paketi en fazla yaklaşık 80 bayt yük taşır, şifreleme varken daha azdır. Herkesin ölçtüğü değer kabaca 20 kbps’tir.Seri taraf. Şeffaf modda XBee baytlarınızı tamponlar ve kısa bir süre veri gelmediğinde ya da tampon dolduğunda bir paket gönderir. 115200 girişte, ~20 kbps çıkışta tampon taşar ve baytlar kaybolur; yarım satırların nedeni budur. CTS akış kontrolünü (D7) açın ve kodunuzda buna uyun; daha iyisi, API moduna geçip ikili çerçeveler gönderin: 10 örneği (her biri 3 × int16) tek bir 60 baytlık çerçevede paketleyin.Hermetry. Her örneği ayrı bir mesaj olarak yayınlamak, tek bir cihazdan saniyede 200 mesaj demektir. Varsayılan profil limitleri saniyede 10 mesaj ve saniyede 200 veri noktasıdır; bunların üzerine çıkarsanız sahiplere bildirim gider, aşmaya devam ederseniz oturum kapatılır. Bunlar sizin uyarı işaretleriniz. Toplu gönderseniz bile saniyede 600 değer, cihaz başına nokta limitinin ve kuruluşun dakikalık veri noktası sınırının çok üzerindedir.Bir fan düzeneği için özellikleri Pi üzerinde hesaplayın: her eksen için saniyede bir RMS ve tepe değeri, belki tepe faktörü. Bu, saniyede tek bir mesajda 6 ila 9 değer demektir; limitlerin rahatça içinde kalır ve ham g değerlerinden çok daha kullanışlı bir grafik sağlar.Limitler MQTT sayfasında, Limits bölümünde.
Tyler, lower baud would make it worse here, there’s even less room for 200 lines a second. Liam has three separate bottlenecks.
The radio. 250 kbps is the raw air rate of 802.15.4. After framing, Zigbee network and APS headers, acknowledgements, retries and channel access, real application throughput for unicast is in the tens of kbps. Each RF packet carries around 80 bytes of payload at most, less with encryption. 20 kbps is roughly what everyone measures.
The serial side. In transparent mode the XBee buffers your bytes and sends a packet when it goes quiet for a moment or the buffer fills. At 115200 in, ~20 kbps out, the buffer overflows and bytes are lost, which is your half lines. Turn on CTS flow control (D7) and honour it in the sketch, or better, switch to API mode and send binary frames: pack 10 samples (3 × int16 each) into one 60-byte frame.
Hermetry. Publishing each sample as its own message is 200 messages a second from one device. The default profile limits are 10 messages a second and 200 data points a second, go over them and owners get a notice, keep going over and the session gets closed, so those are your warnings. Even batched, 600 values a second is far more than the per-device point limit and the organisation’s per-minute data points.
For a fan rig, compute features on the Pi: per axis RMS and peak every second, maybe crest factor. That’s 6 to 9 values in one message per second, comfortably inside the limits, and a much more useful chart than raw g values.
Limits are on MQTT under Limits.
Yapay zekâ tarafından English dilinden çevrildi ·
Ultrason, küçük hareketli ürünlerde 1 mm’yi ölçemez; ışın demeti çok geniş. Genellikle kullanılan çözüm lazer triangülasyondur: bant yüzeyinin üzerinde, bant yüzeyinde bir referansla birlikte bir sensör başlığı. Birçok endüstriyel başlık ±0.05 mm değerine ulaşır. Parlak yüzeyler zorlayıcı olabilir; ürününüzle ilgili bir demo isteyin.
Ultrasonic won’t do 1 mm on small moving products, the beam is too wide. Laser triangulation is the usual answer, a sensor head above the belt with a reference on the belt surface. Plenty of industrial heads do ±0.05 mm. Shiny surfaces can be tricky, ask for a demo on your product.
Yapay zekâ tarafından English dilinden çevrildi ·
Aoife bunu açıkladı. Her DevKit, şu şekilde çapraz bağlanmış iki NPN transistöre (veya tek bir UMH3N çiftine) sahiptir:
DTR ──[10k]── base Q1 Q1: collector → EN, emitter → RTS
RTS ──[10k]── base Q2 Q2: collector → IO0, emitter → DTR
EN veya IO0, yalnızca DTR ve RTS zıt durumdayken aşağı çekilir. İkisi birlikte etkinleştirildiğinde (birçok seri terminalin portu açarken yaptığı şey budur) hiçbir şey olmaz. esptool, EN yükselirken IO0’ı düşük tutan bir sırayla bunları değiştirir; böylece çip indirme modunda başlar, ardından ikisini de bırakarak çalışmaya geçer.Doğrudan kablolarınızla, hatlardan herhangi birindeki her değişim çipi resetler veya strap pinlerini etkiler; bu yüzden monitör açıldığında resetler ve takılı kalan indirme modu oluşur.Ayrıca EN’e 10k pull-up direnci ile toprağa 1 uF kapasitör ekleyin. Kapasitör olmadan EN, 3.3 V hattı stabil olmadan önce yükselebilir ve özellikle yavaş olan AMS1117 ile güç açılışında rastgele açılış hataları alırsınız.
Aoife has it. Every DevKit has two NPN transistors (or one UMH3N dual) cross-coupled like this:
DTR ──[10k]── base Q1 Q1: collector → EN, emitter → RTS
RTS ──[10k]── base Q2 Q2: collector → IO0, emitter → DTR
EN or IO0 only gets pulled low when DTR and RTS are in opposite states. When both are asserted together (which is what many serial terminals do when they open the port), nothing happens. esptool toggles them in a sequence that holds IO0 low while EN goes high, so the chip starts in download mode, then releases both to run.
With your direct wires, any change of either line resets or straps the chip, hence the resets when the monitor opens and the stuck download mode.
Also add 10k pull-up on EN plus 1 uF to ground. Without the cap, EN can come up before the 3.3 V rail is stable and you’ll get random boot failures on power-up, especially with the AMS1117 which is slow.
Yapay zekâ tarafından English dilinden çevrildi ·
Butonları koruyun. Kaydırıcı yalnızca cihazın Hermetry’ye bildirdiğini gösterebilir; bu yüzden ESP32, her harekettan sonra, butondan ya da komuttan gelmiş olsun, konumu bildirmek zorundadır.Geri zıplamanın Current value bağlantınızdan kaynaklandığından eminim. Kaydırıcının Current value yuvasının neye bağlı olduğunu kontrol edin. Yalnızca siz gönderdiğinizde değişen (ya da hiç değişmeyen) bir değeri okuyorsa, oraya geri döner. Bunu ESP32’nin kendisinin gönderdiği bir telemetri anahtarına bağlayın, örneğin damper1_pos.ESP32 üzerinde, her harekettan sonra:
void moveTo(int ch, int angle) {
angle = constrain(angle, 0, 90);
servo[ch].write(angle);
pos[ch] = angle;
char buf[48];
snprintf(buf, sizeof buf, "{"damper%d_pos":%d}", ch + 1, angle);
mqtt.publish("v1/telemetry", buf);
}
// button handler: moveTo(ch, pos[ch] + 15);
// command handler for damper.set: moveTo(ch, params["angle"]); then answer ok
Bizim için işe yarayan kaydırıcı ayarları: Minimum 0, Maximum 90, Step 15; böylece buton adımlarıyla eşleşir. Kaydırıcı, sürüklerken değil bıraktığınızda bir kez gönderir; servo böylece gereksiz yere bombardımana tutulmaz. Damper için Ask before running off seçeneğini açabilirsiniz; aksi halde resepsiyon her harekette bir onay penceresi alır. Komutu Basic seviyesinde bırakın, kart bundan yükseğini göndermez.Varsayılan olarak açık olan “Disable the control when the reading is old” seçeneği de var. ESP32 yalnızca değişiklikte bildiriyorsa ve saatlerce kimse dokunmadıysa kaydırıcı gri görünebilir. Konumu diğer okumalarla birlikte birkaç dakikada bir tekrarlamasını sağlayın.Kurulum adımları Control cards sayfasında.
Keep the buttons. The slider can only show what the device tells Hermetry, so the ESP32 has to report the position after every move, from a button or from a command.
I’d bet the jump-back is your Current value binding. Check what the slider’s Current value slot points at. If it reads something that only changes when you send (or nothing), it snaps back to that. Bind it to a telemetry key the ESP32 sends itself, for example damper1_pos.
On the ESP32, after any move:
void moveTo(int ch, int angle) {
angle = constrain(angle, 0, 90);
servo[ch].write(angle);
pos[ch] = angle;
char buf[48];
snprintf(buf, sizeof buf, "{"damper%d_pos":%d}", ch + 1, angle);
mqtt.publish("v1/telemetry", buf);
}
// button handler: moveTo(ch, pos[ch] + 15);
// command handler for damper.set: moveTo(ch, params["angle"]); then answer ok
Slider settings that worked for us: Minimum 0, Maximum 90, Step 15 so it matches the button steps. The slider sends once when you let go, not while dragging, so the servo isn’t spammed. For a damper you can turn Ask before running off, otherwise reception gets a confirm dialog on every move. Leave the command Basic tier, a board won’t send anything higher.
There’s also “Disable the control when the reading is old” on by default. If the ESP32 only reports on change and nobody touched it for hours, the slider may grey out. Have it repeat the position every few minutes with the other readings.
Setup steps are on Control cards.
Yapay zekâ tarafından English dilinden çevrildi ·
O zaman ikiye ayırın, ben de ilk projede bunu yapardım.Şebekeye bağlı 4 sıcaklık sensörü: ESP32, Wi-Fi üzerinden doğrudan MQTT ile Hermetry’ye. Ara geçit yok, aracı yok; her sensör bağlanıp bağlantısını kestiğini görebileceğiniz bir cihaz. En kısa yol bu ve konuları ile veri yüklerini hata ayıklaması kolay bir şey üzerinde öğrenirsiniz.Pilli 4 kapı kontağı: Wi-Fi değil. Her kapı açılışında ESP32’nin uyanıp Wi-Fi’ye katılması ve TLS el sıkışması yapması AA pilleri haftalar içinde tüketir. Hazır Zigbee kontak sensörleri alın (düğme pille birkaç yıl dayanır), bir Zigbee USB koordinatörü ve bir Pi üzerinde küçük bir köprü çalıştırın; bunlar bir ağ geçidinin alt cihazları olarak raporlansın. Daha fazla hareketli parça var, bu yüzden Wi-Fi olanlar çalıştıktan sonra ikinci adım olarak yapın.Emily’nin mesh konusunda haklı olmadığı söylenemez, ancak 4 pilli kontakla ortada söz edilecek bir mesh yok; pilli uç cihazlar yönlendirme yapmaz. Şebekeye bağlı Zigbee cihazları yapar.Neyin nasıl bağlanacağına dair dokümanlarda iyi bir genel bakış var; temelde bu akıl yürütmenin bir tablo halinde özeti: Choose how to connect your devices.
Then split it, that’s what I’d do as a first project too.
The 4 mains-powered temperature sensors: ESP32 on Wi-Fi, straight to Hermetry over MQTT. No gateway, nothing in between, every sensor is a device you can see connect and disconnect. It’s the shortest path and you learn the topics and payloads on something that’s easy to debug.
The 4 battery door contacts: not Wi-Fi. An ESP32 waking up, joining Wi-Fi and doing a TLS handshake for every door open eats AA cells in weeks. Buy ready-made Zigbee contact sensors (a couple of years on a coin cell), a Zigbee USB coordinator, and run a small bridge on a Pi that reports them as child devices of a gateway. More moving parts, so do it second, once the Wi-Fi ones work.
Emily’s not wrong about the mesh, but with 4 battery contacts there’s no mesh to speak of, battery end devices don’t route. Mains-powered Zigbee devices do.
There’s a decent overview of which way to connect what in the docs, it’s basically this reasoning as a table: Choose how to connect your devices.
Yapay zekâ tarafından English dilinden çevrildi ·
Her trafo merkezi işinde bunu çözüyorum ve sinyali, referansı ve ekranı üç ayrı iletken olarak ele alıyorum.Sinyal: bükümlü çiftteki A ve B.Referans: RS-485, ortak mod referansına ihtiyaç duyar. Üçüncü bir iletken ekleyin (2 çiftli kablo kullanın, ikinci çift 0 V için) ve her alıcı-vericinin 0 V’unu buna bağlayın. Bu olmadan, pano ile 140 m uzaktaki sayaç arasındaki toprak farkı alıcının ortak mod aralığını tüketir ve VFD gürültüsü geri kalanını yapar.Ekran: pano ucunda koruyucu topraklamaya bağlayın; kablonun kutuya girdiği yerde 360° kelepçe kullanın, bir terminale pigtail ile bağlamayın. Sayaç ucunda ya açık bırakın ya da 10 nF’lik bir kondansatör üzerinden toprağa bağlayın; bu, düşük frekanslı bir toprak döngüsü oluşturmadan YF ekranlama sağlar. Her iki ucun sert bağlanması yalnızca topraklama sisteminin örgü şeklinde ve eşpotansiyel olduğu yerlerde uygundur; VFD kablo tavasının yanında bunu varsaymamalısınız.Ayrıca kontrol edin: hattın yalnızca iki ucunda 120 Ω, polarizasyon dirençleri geçitte bir kez, VFD kablolarından tava ayrımı (gerekirse 90° kesişim) ve yıldız bağlantı olmaması.Rapor için hata oranını kaydetmek faydalı olur. Geçidin her sorgu döngüsü başına CRC hatalarını ve zaman aşımlarını saymasını ve bunları telemetri olarak göndermesini sağlayın, örneğin mb.crc_err ve mb.timeouts, böylece bir grafikte önce/sonra durumunu gösterebilirsiniz.
I sort this out on every substation job we do, and I treat signal, reference and shield as three separate conductors.
Signal: A and B on the twisted pair.
Reference: RS-485 needs a common mode reference. Add a third conductor (use a 2-pair cable, the second pair for 0 V) and connect the 0 V of every transceiver to it. Without it, the ground difference between the panel and a meter 140 m away eats into the receiver’s common-mode range, and VFD noise does the rest.
Shield: to protective earth, at the panel end, with a 360° clamp where the cable enters the cabinet, not a pigtail to a terminal. At the meter end either leave it open or connect it to earth through a 10 nF capacitor, which gives you HF shielding without a low-frequency ground loop. Both ends hard-bonded is fine only where the earthing system is meshed and equipotential, which next to a tray of VFD cables you shouldn’t assume.
Also check: 120 Ω at both ends of the line only, bias resistors once at the gateway, the tray separation from VFD cables (cross at 90° if you must), and no star wiring.
For the write-up, it helps to log the error rate. Have the gateway count CRC errors and timeouts per poll cycle and send them as telemetry, e.g. mb.crc_err and mb.timeouts, so you can show the before/after on a chart.
Yapay zekâ tarafından English dilinden çevrildi ·
Varsa kurutucu baypasını da çizin, operatörler biri açtığında neden basıncın düştüğünü hep sorar.
Draw the dryer bypass too if you have one, operators always ask why pressure dropped when someone opened it.

