Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sensors keep disconnecting
#1
Hi

I have connected in two temperature sensors and a PH sensor to the Robo-Tank deluxe. However these sensors which have all been stable now seem to keep dropping offline.

If I run 

Code:
watch ls -lsaF /sys/bus/w1/devices

I can see both temperature sensors 28-f85b0f1e64ff and 28-ac240f1e64ff which are connected into Temp1 and Temp2. Not sure if it's relevant but it did seem more stable when using Fahrenheit but I need to validate this a bit


Apr 24 17:23:04
temperature sub-system. Failed to read sensor Temp01 > 28-f8. Error:open /sys/bus/w1/devices/28-f85b0f1e64ff/w1_slave: no such file or directory


Apr 24 17:23:04
temperature sub-system. Failed to read sensor Temp02 > 28-ac. Error:open /sys/bus/w1/devices/28-ac240f1e64ff/w1_slave: no such file or directory


Also the PH sensore seems to be dropping out now to, this was running fine for a few days but now I see the following error:-

ph subsystem: Failed read probe:PH Probe01Error:strconv.ParseFloat: parsing "\xb7\xae\xb0\xb9\xb6\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80": invalid syntax

I've tried reloading, restarting removing the sensors and plugging buck in but is seems to creep back in...

I'm running reef-pi v5.2

Any help gratefully received.

Best, Ian
[-] The following 1 user Likes iancarp's post:
  • Rob F
Reply to top
#2
Hi Ian, sorry you're having issues. Have you added any equipment since they started acting up? Are the temp sensor cables routed away from AC power cords? It could just be bad sensors however it seems a little odd both are acting up and based on the error at the same time.

When you installed reef-pi did you use the script I have available?

https://docs.google.com/document/d/1t9ma...5qkcuznso3

The pH requires extra configuration, if not done you would see an error like you posted. To fix this you need to add the following line to the /boot/config.txt file on the Pi, the above script does this.

dtparam=i2c_arm_baudrate=10000

You can run the following command to see if that line is in the file.

sudo nano /boot/config.txt
Reply to top
#3
Hi Rob

It's still on the bench at the moment so cables aren't running near mains power. It does seem as though this starter happening when I was (incorrectly) testing an XKC-Y25-NPN sensors instead of the XKC-Y25-V. This has now been corrected and all sensors are working fine.

I did install the reef-pi via one of your installation guides but have since upgraded reef-pi via the UI to 5.2 (I'll rerun the install script to get it back to your version).

If I deleting the ATO associations, Charts and disconnect the sensors after a reboot I see them in /sys/bus/w1/devices when I add them into the UI it seems fine for a while I can see the data coming in in the w1_slave file and in the UI. I'll try to see if same happens without setting it to Celsius.

I'll add the baud rate config also...
Reply to top
#4
Yeah maybe try running 4.3 for a little while, I don't think it's related but maybe. Having the -NPN vs the -V won't have affected anything else.

It might also be worth getting this DS18B20, I know of a few people who have gotten these as they had lots of issues with the eBay/Amazon versions and it fixed the problem.

https://www.droking.com/2-PCS-LOT-DS18B2...eter-Probe

When you check the baud rate configuration make sure it's on it's own line, recently a few people have had this and for some reason the line added to the /boot/config.txt file didn't go on it's own line so it was ignored.

Let me know how things go.
Reply to top
#5
Hi Rob

I've reverted back to version 4.3 and everything seemed to be going well but then the temperature sensors dropped off again... Disconnecting them and reconnecting them from the aquarium controller seems to work for a short time but then they disappear again in /sys/bus/w1//devices. The sensors I have are DS18B20 https://www.amazon.co.uk/gp/product/B08H...UTF8&psc=1

Box <> Cable
+5v - Red VCC
Data - Yell Data
Grnd - Black Grnd

Could this be a scanning bug? quite often I see devices 00-100000000000, 00-900000000000 and 00-e00000000000 coming and going in that directory. The behaviour is repeatable now every time the device disappears i disconnect and reconnect and it reappears in the directory for about 10 mins.

I've actually got a third sensor I'll give that a try maybe somehow they became damaged when I was dicking about with the sensors...
Reply to top
#6
Hi Ian, yeah try that 3rd sensor and let me know. Unfortunately there are a lot of buggy sensors out there, it definitely won't be related to the other sensors, each of the sensor ports and temp ports have their own GPIO on the Pi. There's also no circuit for the temp ports, they just have a pullup resistor so not much to go wrong there. Those odd addresses are likely due to the bus being locked up. When you unplug them the bus can reset but seems it just locks up again, definitely can happen from bad sensors. I've had some when in the tank they would act up but out of water ok so it's possible moisture is getting in but maybe not a problem as you still have it on the bench.
[-] The following 1 user Likes Rob F's post:
  • iancarp
Reply to top
#7
Hi Ian, I just had another person who had an issue similar, his temp sensor was working good but then started disconnecting every few minutes after a restart. In the end he thought he would try a different connector and low and behold that fixed it. I know you have two sensors so it seems odd both could have this issue especially as these connectors have been good but I guess it's possible. Also another issue I've seen with these connectors is if the cable is moved around lots it's possible the wire gets cut where it's clamped in the connector. Other wires will hold it in place so you can't spot it easy and it could create an intermittent connection.
[-] The following 1 user Likes Rob F's post:
  • iancarp
Reply to top
#8
Hi Rob,

I tried the third sensor...(same behaviour) curiously when I changed the refresh time from 1 second to 60 seconds it took much longer (probably about 60 times longer) to disconnect. I've ordered some of the Drok sensors so I'll give those a go.
Reply to top
#9
Oh wow, seems a little odd. I think it took longer to disconnect as it only happens when it gets read. Do you have any equipment connected to the controller?

I don't think it's related to the controller as the temp ports are independent and they only have a pull resistor so nothing to really go wrong. Another possibility is the power supply, any chance you have another one you can try to power up the controller?

Were you able to get rid of that error for the pH?
Reply to top
#10
The only other equipment is the PH probe, I tested with the sensors and DC/LED ports disconnected... I'll test tomorrow with everything disconnected and one set to 30 secs and the other to 60 secs see how that looks...

I don't have a spare supply but it's a 5 amp 12v so should be able to drive it OK.
Reply to top
#11
The pH won't affect anything, I was wondering about some possible DC motors, lights or such that would be a draw on the power supply and cause possible spikes, a voltage spike could definitely cause the sensor bus to lock. It's probably not the power supply and doesn't really sound related, just thought if you had an extra on it would be worth trying. I'm really stumped, how long were they stable? How long do you think it'll be till you get those Drok sensors?

Does the pH still give you that error?
Reply to top
#12
Hi @Rob

I think we may have cracked it!

The DROK sensors seem much mor stable! They’ve been connected since Friday on 1 sec sample in Celsius… So far so good!

I think the other sensors I had weren’t up to the job, despite claiming to be DS18B20!

Thanks for you help! :-)
Reply to top
#13
Hi Ian, that's great news, thanks for letting me know. I think I'm going to have to start selling them soon.
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Temperature sensors disappearing Dewd 1 363 04-16-2024, 05:20 PM
Last Post: Rob F
  Controller disconnecting jeffln12345@hotmail.com 7 2,346 07-23-2023, 08:13 PM
Last Post: Rob F
  Replacement ATO Sensor Mount (+ sensors, too) RyKl 1 1,846 12-05-2022, 02:21 PM
Last Post: Rob F
  Mounts for optical sensors johnt_tally 5 4,611 12-22-2020, 07:27 PM
Last Post: Rob F

Forum Jump:

Current time: 04-29-2024, 03:38 AM