Some problems configuring Reef-Pi

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
Hello all,

I'm more familiar with arduino projects but I also wanted to try building a Reef-Pi system with a Raspberry Pi Zero W.
I have everything installed and the webinterface is working, but so far I'm having two problems configuring everything.
I have tried adding relays and I can manual turn them on and off in the devices tab (apparatuur). So I know the outputs are working but I'm having problems with inputs.


Problem 1:

I want to use a float switch to turn on and off the relay, I tried something but it isn't working.

I have added 2 devices
Floatswitch connected to GPIO21 as INLET
Relay connected to GPIO14 as OUTLET

Next I setup ATO with the switch as input and the relay as output.
When I do this, the relay does not turn on or off when I move the float switch.

20210717_204417.jpg


1626548150000.png


1626548500214.png



Problem 2:

I have also tried adding a DS18B20 themperature sensor.
Positive wire to 3.3V of the RPi
Negative to GROUND of the RPi
Signal cable to GPIO4
4.7k resistor between the 3.3V and the SIGNAL wire.

The problem is that I can't figure out how to add the temperature sensor.
In the guide (reef-pi Guide 3) it tells me to go to "temperature" than click "+", than choose the sensor.
But when I go there it doesn't show anything. I have also tried adding an analog input but also that didn't work.

20210717_182209.jpg


1626549175506.png


1626549192608.png



If someone could help me out with these problems it would be highly appreciated!
Im also sorry my interface is in Dutch, I can't find a setting to change it to English.
 

attiland

2500 Club Member
View Badges
Joined
Jul 22, 2020
Messages
2,594
Reaction score
4,800
Location
United Kingdom
Rating - 0%
0   0   0
Hello all,

I'm more familiar with arduino projects but I also wanted to try building a Reef-Pi system with a Raspberry Pi Zero W.
I have everything installed and the webinterface is working, but so far I'm having two problems configuring everything.
I have tried adding relays and I can manual turn them on and off in the devices tab (apparatuur). So I know the outputs are working but I'm having problems with inputs.


Problem 1:

I want to use a float switch to turn on and off the relay, I tried something but it isn't working.

I have added 2 devices
Floatswitch connected to GPIO21 as INLET
Relay connected to GPIO14 as OUTLET

Next I setup ATO with the switch as input and the relay as output.
When I do this, the relay does not turn on or off when I move the float switch.

20210717_204417.jpg


1626548150000.png


1626548500214.png



Problem 2:

I have also tried adding a DS18B20 themperature sensor.
Positive wire to 3.3V of the RPi
Negative to GROUND of the RPi
Signal cable to GPIO4
4.7k resistor between the 3.3V and the SIGNAL wire.

The problem is that I can't figure out how to add the temperature sensor.
In the guide (reef-pi Guide 3) it tells me to go to "temperature" than click "+", than choose the sensor.
But when I go there it doesn't show anything. I have also tried adding an analog input but also that didn't work.

20210717_182209.jpg


1626549175506.png


1626549192608.png



If someone could help me out with these problems it would be highly appreciated!
Im also sorry my interface is in Dutch, I can't find a setting to change it to English.
I feel your pain. In Arduino inputs and outputs are super easy.
anyway the temp probes should appear in the list if not either incorrectly wired or one wire is not enabled in pi configuration.

as per input I think this link puts you in the right direction. https://github.com/reef-pi/reef-pi/issues/1018
 

Paulo Hanashiro

Community Member
View Badges
Joined
Jun 4, 2013
Messages
30
Reaction score
19
Location
Sydney/Australia
Rating - 0%
0   0   0
Hi.

Are you sure one-wire is enabled?

run the below:

Code:
$ grep w1-gpio /boot/config.txt
dtoverlay=w1-gpio.                  <---You should have this line if 1-wire is enabled
$ ls /sys/bus/w1/devices/
 28-3c01d6000000  28-3c01d999x000 w1_bus_master1            <---Your temp probe should show here.
 
OP
OP
Michel

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
I feel your pain. In Arduino inputs and outputs are super easy.
anyway the temp probes should appear in the list if not either incorrectly wired or one wire is not enabled in pi configuration.

as per input I think this link puts you in the right direction. https://github.com/reef-pi/reef-pi/issues/1018

Thank you for the reply but it doesnt fix my problem, im not even able to configure a button (or any input)


Hi.

Are you sure one-wire is enabled?

run the below:

Code:
$ grep w1-gpio /boot/config.txt
dtoverlay=w1-gpio.                  <---You should have this line if 1-wire is enabled
$ ls /sys/bus/w1/devices/
 28-3c01d6000000  28-3c01d999x000 w1_bus_master1            <---Your temp probe should show here.

It seems 1-wire is enebled but the RPi does not see the temperature sensor.

1626603821475.png
 

attiland

2500 Club Member
View Badges
Joined
Jul 22, 2020
Messages
2,594
Reaction score
4,800
Location
United Kingdom
Rating - 0%
0   0   0
Check one wire is enabled see image
BB288266-2E29-4653-8412-43DC9E29E0AE.png

On your description the wires are correct but your picture the resistor seems to be in the wrong line. Might be wrong.
if your sensor getting hot you are not wired it right for sure.
It is also possible you have a weak connection due you have wired the sensor without a pin. I had similar before

also possible you have a faulty sensor but I think that is less likely.

also some help to get it working here. https://www.circuitbasics.com/raspberry-pi-ds18b20-temperature-sensor-tutorial/
 
OP
OP
Michel

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
Check one wire is enabled see image
BB288266-2E29-4653-8412-43DC9E29E0AE.png

On your description the wires are correct but your picture the resistor seems to be in the wrong line. Might be wrong.
if your sensor getting hot you are not wired it right for sure.
It is also possible you have a weak connection due you have wired the sensor without a pin. I had similar before

also possible you have a faulty sensor but I think that is less likely.

also some help to get it working here. https://www.circuitbasics.com/raspberry-pi-ds18b20-temperature-sensor-tutorial/

How do you get in that "Raspberry Pi Configurator"? Is that in the RPi when you connect it to a monitor?
I haven't connected my RPi to a monitor yet because I don't have a keyboard/mouse I can connect with micro usb.

The sensor does not get hot, I also have a second sensor with soldered pins with the same results.
The sensors are both old but I dont think they are faulty because they worked the last time I used them.

Even when I try to add a simple switch I can't even get it to work so I think there is going something wrong when configuring inputs.
 

attiland

2500 Club Member
View Badges
Joined
Jul 22, 2020
Messages
2,594
Reaction score
4,800
Location
United Kingdom
Rating - 0%
0   0   0
How do you get in that "Raspberry Pi Configurator"? Is that in the RPi when you connect it to a monitor?
I haven't connected my RPi to a monitor yet because I don't have a keyboard/mouse I can connect with micro usb.

The sensor does not get hot, I also have a second sensor with soldered pins with the same results.
The sensors are both old but I dont think they are faulty because they worked the last time I used them.

Even when I try to add a simple switch I can't even get it to work so I think there is going something wrong when configuring inputs.
I connect with vnc viewer.

For your switch here is the set up you need to fallow.
 
OP
OP
Michel

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
I connect with vnc viewer.

For your switch here is the set up you need to fallow.

Thank you for the tip about VNC Viewer, I was already wondering if something like this existed.

1626713961891.png
 

Paulo Hanashiro

Community Member
View Badges
Joined
Jun 4, 2013
Messages
30
Reaction score
19
Location
Sydney/Australia
Rating - 0%
0   0   0
Hi Michel.

Configuration looks good, so I think this would be one or a combination of 3 things:
- Defective GPIO pin (GPIO4)? https://pinout.xyz
- Cabling issues?
- defective DS18B20?

You could test the DS18B20 in the arduino, using a simple sketch to print the output to serial so you confirm both the probe and cabling is correct, this will isolate the problem to the RPi itself.
 
OP
OP
Michel

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
Hi Michel.

Configuration looks good, so I think this would be one or a combination of 3 things:
- Defective GPIO pin (GPIO4)? https://pinout.xyz
- Cabling issues?
- defective DS18B20?

You could test the DS18B20 in the arduino, using a simple sketch to print the output to serial so you confirm both the probe and cabling is correct, this will isolate the problem to the RPi itself.

- Defective GPIO pin (GPIO4)? https://pinout.xyz
Ive tested multiple pins, and after this test I've configured GPIO4 as output to switch a relay and that works.

- Cabling issues?
hmmm guess that should be good.

- defective DS18B20?
Maybe. I have 2 of the same (old) DS18B20 sensor which both worked last time I have used them. But that was also a long time ago so I might need to test them first on another device. Or maybe I will just order some new ones to be sure, they are pretty cheap and it's always good to replace sensor like this after a few year.
 

attiland

2500 Club Member
View Badges
Joined
Jul 22, 2020
Messages
2,594
Reaction score
4,800
Location
United Kingdom
Rating - 0%
0   0   0
Ive tested multiple pins, and after this test I've configured GPIO4 as output to switch a relay and that works.


hmmm guess that should be good.


Maybe. I have 2 of the same (old) DS18B20 sensor which both worked last time I have used them. But that was also a long time ago so I might need to test them first on another device. Or maybe I will just order some new ones to be sure, they are pretty cheap and it's always good to replace sensor like this after a few year.
GPIO 4 is the default 1wire. While not impossible to have a defective pin it is unlikely. You have to do something silly to break them and as you said you are familiar wit Arduino I would say this is not the case. By the way you can test the sensor with Arduino test code in like 10 minutes.
 
OP
OP
Michel

Michel

Community Member
View Badges
Joined
Nov 24, 2020
Messages
97
Reaction score
64
Location
The Netherlands
Rating - 0%
0   0   0
I have checked both DS18B20 sensors with an arduino with a simple test script, it keeps reading -127 degrees C. This would normaly say the sensor is broken, but there are a lot of people online talking about this problem with good sensor so its quite confusing.

But just to be sure the sensors are good, I have ordered 2 new sensors.
 

Lubo.2302

New Member
View Badges
Joined
Jan 23, 2021
Messages
6
Reaction score
5
Location
Slovakia
Rating - 0%
0   0   0
I need advice, the water change is working properly for me. I need advice when the water reaches the backup swimmer I need to turn off DC port 7 and turn on DC port 6 until the backup swimmer falls, then turn off DC port 6. How to set the macro / ATO to turn off DC port 6
 

Attachments

  • IMG_20220410_183822.jpg
    IMG_20220410_183822.jpg
    61.2 KB · Views: 31

Lubo.2302

New Member
View Badges
Joined
Jan 23, 2021
Messages
6
Reaction score
5
Location
Slovakia
Rating - 0%
0   0   0
I need advice, the water change is working properly for me. I need advice when the water reaches the backup swimmer I need to turn off DC port 7 and turn on DC port 6 until the backup swimmer falls, then turn off DC port 6. How to set the macro / ATO to turn off DC port 6
 

A worm with high fashion and practical utility: Have you ever kept feather dusters in your reef aquarium?

  • I currently have feather dusters in my tank.

    Votes: 68 37.8%
  • Not currently, but I have had feather dusters in my tank in the past.

    Votes: 59 32.8%
  • I have not had feather dusters, but I hope to in the future.

    Votes: 25 13.9%
  • I have no plans to have feather dusters in my tank.

    Votes: 28 15.6%
  • Other.

    Votes: 0 0.0%
Back
Top