iyerdev
@iyer-l · Eylül 2026 tarihinde katıldı
Backend developer · logistics · 21 years in the field
- Konular
- 1
- Yanıtlar
- 6
- Puan
- 0
Oluşturulan forum yanıtları
Yapay zekâ tarafından English dilinden çevrildi ·
İkisi birden kullanmak sorun değil. Uno, VIN gerilimi yaklaşık 6,6 V’un üzerine çıktığında 5 V hattını regülatöre bağlayan bir karşılaştırıcıya sahip ve seri hatlar gücün nereden geldiğini umursamadığı için USB veri iletişimi çalışmaya devam eder. Dizüstü bilgisayarınız bundan dolayı bir risk altında değil.Asıl sorun solenoid. Serbest dönüş diyotu olmayan bir solenoid bobini, röle her açıldığında büyük bir gerilim sıçraması oluşturur ve bu sıçrama ortak breadboard toprağınız üzerinden yayılır. Analog okumadaki sıçrama ve büyük ihtimalle USB bağlantısının kopması bundan kaynaklanıyor. Benim değiştireceklerim:
- Solenoidin üzerine, katot +12 V’a gelecek şekilde bir 1N4007.
- Röle bobininin gücünü Uno’nun 5V pininden değil, 12 V tarafından ya da ayrı bir 5 V kaynağından alın. Üzerindeki regülatör, 12 V girişten röle beslerken ısınır.
- Vananın toprağını adaptöre geri götürün ve Uno toprağına yalnızca tek bir noktadan bağlayın; sensörün kullandığı breadboard raylarından geçirmeyin.
- Sensör beslemesinin üzerine, sensöre yakın şekilde 100 nF ile birlikte 10 µF.
- Sketch içinde, vanayı değiştirdikten sonra bir saniye boyunca örnek almayın ve 8 okumanın ortalamasını alın.
Dizüstü tarafında yalnızca temiz okumaları gönderin ve dizüstü saatiniz senkronize değilse zamanı Hermetry’nin damgalamasına bırakın:
import serial, requests
s = serial.Serial("/dev/ttyACM0", 9600, timeout=5)
URL = "https://<your-host>/api/v1/telemetry"
HDR = {"Authorization": "Bearer <device token>", "Content-Type": "application/json"}
while True:
line = s.readline().decode(errors="ignore").strip()
if line.isdigit():
requests.post(URL, json={"soil_moisture": int(line)}, headers=HDR, timeout=10)
Yük kuralları Device HTTP API sayfasında.
Both at once is fine. The Uno has a comparator that switches the 5 V rail to the regulator when VIN is above roughly 6.6 V, and USB data keeps working because the serial lines don’t care where power comes from. Your laptop is not at risk from that.
The trouble is the solenoid. A solenoid coil with no flyback diode throws a big voltage spike every time the relay opens, and that spike goes through your shared breadboard ground. That’s the jump in the analog reading and very likely the USB dropping out. What I’d change:
- A 1N4007 across the solenoid, cathode to +12 V.
- Take the relay coil power from the 12 V side or a separate 5 V supply, not the Uno’s 5V pin. The onboard regulator gets hot feeding a relay off 12 V in.
- Run the valve’s ground back to the adapter, and join it to the Uno ground at one point only, not through the breadboard rails the sensor uses.
- 100 nF plus 10 µF across the sensor supply, close to the sensor.
- In the sketch, don’t sample for a second after switching the valve, and average 8 readings.
On the laptop side, send only clean readings and let Hermetry stamp the time unless your laptop clock is synced:
import serial, requests
s = serial.Serial("/dev/ttyACM0", 9600, timeout=5)
URL = "https://<your-host>/api/v1/telemetry"
HDR = {"Authorization": "Bearer <device token>", "Content-Type": "application/json"}
while True:
line = s.readline().decode(errors="ignore").strip()
if line.isdigit():
requests.post(URL, json={"soil_moisture": int(line)}, headers=HDR, timeout=10)
Payload rules are on Device HTTP API.
Agree on batching. Also give the APs a minimum data rate of 6 or 12 Mbps if the yard boxes can still hold that, it stops one far client from dragging the whole cell down.
Yapay zekâ tarafından English dilinden çevrildi ·
+1 bashrc parçasına, bizim geçitlerde de aynı. htop’ta kutu çizim karakterleri bozuluyorsa oraya export LANG=C.UTF-8 satırını da eklerdim.
+1 to the bashrc snippet, same on our gateways. I’d add export LANG=C.UTF-8 there too if you see box-drawing characters break in htop.
Can’t the alarm rule just text the carer’s phone? Add the number as a recipient.
Yapay zekâ tarafından English dilinden çevrildi ·
Bunun için yönetici yetkisi gerekiyor mu? Ekibimin çoğu sadece normal üye.
Does this need admin? Most of my team are plain members.
Trucks lose signal a lot. If a device buffers and sends its readings an hour late, do they land at the time they were taken?

