reef-pi :: An opensource reef tank controller based on Raspberry Pi.

babrooks

New Member
View Badges
Joined
Feb 28, 2020
Messages
22
Reaction score
41
Rating - 0%
0   0   0
I'm not sure if there is. I've seen a couple of other pwm boards on Adafruit but couldn't find any details on frequency in the specs. I've never used the PCA9685 board before but is there a way to lower the resolution and push up the frequency that way?
I was actually a bit surprised by the lack of options there are for fan control when it comes to hardware. Maybe it's because its mainly done via a motherboard of a pc.

It would be nice to have some hardware support for pwm fan control if there is a suitable board for it. Variable fan speed might not be critical for a reef but it could make for better chiller options and control. Bigger fans on lower rpms means less noise but with the possibility to kick it up when the need is greater.

You could use an arduino board to read the PWM signal from the pi and then output it at higher frequency to the fans. By adjusting the prescaler you can set the output frequency to about 25khz. I did this with a nano to modify the signal from a bluefish controller for fans on my DIY light fixture.

(Planning to switch the light over to my reef-pi eventually :)

 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
This sounds good, I don't care to access the gpios.

Are you running something like xampp for the database?

Any special plugins for VS needed?

For your pH that's nice not having ADM3260 my complaint has been cost.

For the Atlas circuit is Reef-pi sending calibration values to it or managing them like the ph-board?
There's no need for xampp or anything like that. reef-pi is self hosting, so you don't need server. In general, you just need go and node. We have a dev setup guide that shows dependencies. I think the makefile may have changed since the last update, but I can help you work through it if you give it a try and find problems. That would also help identify what needs to be updated.

For VS Code, I don't recall which plugins I enabled, but it recommended a bunch of stuff and I installed the ones that seemed like they would be helpful (go and react plugins).

We were sending calibration to the EZO module In previous versions of reef-pi, but removed it in order to implement calibration in reef-pi.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
There's no need for xampp or anything like that. reef-pi is self hosting, so you don't need server. In general, you just need go and node. We have a dev setup guide that shows dependencies. I think the makefile may have changed since the last update, but I can help you work through it if you give it a try and find problems. That would also help identify what needs to be updated.

For VS Code, I don't recall which plugins I enabled, but it recommended a bunch of stuff and I installed the ones that seemed like they would be helpful (go and react plugins).

We were sending calibration to the EZO module In previous versions of reef-pi, but removed it in order to implement calibration in reef-pi.

Right on, thanks for the link and info, that should get me going and that's what I was hoping to hear about calibration.

The other day I setup my pH circuit like Atlas, it works now with the Atlas sketches but I get a strconv.ParseFloat error on Reef-pi. I found the EZO driver and the read function but not sure where the parse happens so can't figure out what it expects.

strconv.ParseFloat {"error":"strconv.ParseFloat: parsing
\"7.26\\x00xxxxxxxxxxxxxxxxxxxxxxxxx\": invalid syntax"} | HTTP 404

You can see the pH is there but something isn't right. This is what I'm sending to Reef-pi, any ideas what I'm missing?

computerdata[0] = '7';
computerdata[1] = '.';
computerdata[2] = '2';
computerdata[3] = '6';
Wire.write(1); // byte
Wire.print(computerdata); // char array
Wire.write(0); // byte
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
You could use an arduino board to read the PWM signal from the pi and then output it at higher frequency to the fans. By adjusting the prescaler you can set the output frequency to about 25khz. I did this with a nano to modify the signal from a bluefish controller for fans on my DIY light fixture.

(Planning to switch the light over to my reef-pi eventually :)


Yes that was one of the options I was considering. Glad to hear that it works!
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Right on, thanks for the link and info, that should get me going and that's what I was hoping to hear about calibration.

The other day I setup my pH circuit like Atlas, it works now with the Atlas sketches but I get a strconv.ParseFloat error on Reef-pi. I found the EZO driver and the read function but not sure where the parse happens so can't figure out what it expects.

strconv.ParseFloat {"error":"strconv.ParseFloat: parsing
\"7.26\\x00xxxxxxxxxxxxxxxxxxxxxxxxx\": invalid syntax"} | HTTP 404

You can see the pH is there but something isn't right. This is what I'm sending to Reef-pi, any ideas what I'm missing?

computerdata[0] = '7';
computerdata[1] = '.';
computerdata[2] = '2';
computerdata[3] = '6';
Wire.write(1); // byte
Wire.print(computerdata); // char array
Wire.write(0); // byte
It looks like you are missing the string terminator. You may need something like computerdata[4] = '\0';
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
It looks like you are missing the string terminator. You may need something like computerdata[4] = '\0';

'\0' and 0 appear to do the same, tried '\r' '\n' '\0' and 0 in all combinations.

I thought the x's might be extra bytes but when I do Wire.print(computerdata,2); it only sends the first 2 bytes, the same amount of x's still follow in error so it's only sending what it should.

If there's one terminator it shows.

\"7.26xxxxxxxxxxxxxxxxxxxxxxxxx\": invalid syntax"}

every extra terminator adds \\x00 after 7.26

If I remove Wire.write(1); I get an execute error so it's handling that ok.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Macro and Timer update:

I have a pair of Macros that when I run manually, I run the first one ((1) - about 60minutes long) and about 2 minutes I trigger a second one (2) which is about 5 minutes long. When run manually, they run "concurrently" / at the same time.

On the back of this success, I wrote another Macro (3) to execute (1) and then 2 minutes later, (2) but (2) only executes 2 minutes after (1) finishes. I did this to simplify running (3) on a timer.

For various reasons, I want to keep (1) and (2) separate to be able to run individually as I want and be able to vary / add steps / times in (3) without directly affecting (1) and (2). I could just create one Macro combining (1) and (2), which will achieve the same goal.

My work-around to the above is to have two timers triggering (1) and then (2) two minutes apart.

Once again, just documenting my experiences in case someone else is battling with the same.
 

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
54
Reaction score
97
Location
Rome (Italy)
Rating - 0%
0   0   0
Hi all.
I still have problem with temperature sensor.
Which is exactly the 4.7k resistor to use to connect the red and yellow cable?
I see there are different kinds of resistor... blue (or ciano) type and light brown tipe.... which is the right I should use?

Thank you in advance for your answer.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Hi all.
I still have problem with temperature sensor.
Which is exactly the 4.7k resistor to use to connect the red and yellow cable?
I see there are different kinds of resistor... blue (or ciano) type and light brown tipe.... which is the right I should use?

Thank you in advance for your answer.
This resistor is just a pull up resistor for the one wire buss so its not handling any appreciable amounts of current. Being a pullup it just needs to be close to 4.7k so no need to spend alot for high tolerance resistors. Any resistor of 4.7k will do just fine. The light brown type 1/8 watt 4.7k resistor is perfect.
 

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
54
Reaction score
97
Location
Rome (Italy)
Rating - 0%
0   0   0
This resistor is just a pull up resistor for the one wire buss so its not handling any appreciable amounts of current. Being a pullup it just needs to be close to 4.7k so no need to spend alot for high tolerance resistors. Any resistor of 4.7k will do just fine. The light brown type 1/8 watt 4.7k resistor is perfect.

I have tried with a 6.8k resistor, but:
- if "dev_mode" is selected, I see 3 sensors.
- if "dev_mode" is not selected, I can't see any sensor.

I will buy some 4.7k resistor and I will try again.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
I have tried with a 6.8k resistor, but:
- if "dev_mode" is selected, I see 3 sensors.
- if "dev_mode" is not selected, I can't see any sensor.

I will buy some 4.7k resistor and I will try again.
Ok dev mode adds in 3 "dummy sensors" as a testing mode. You dont want to be in dev mode.

If you have 2 6.8k resistors, placing them in parallel would be the same as having a 3.4k resistor which should be ok. Depending on wire length etc on the one wire bus the pullup resistor isnt etched in stone as to its value. 4.7k is a good starting point but some people have had to experiment. Just dont go lower than 2k. Im suprised that 6.8k isnt working for you but you may need to try a few values.

So if you are not in dev mode, using a resistance in the range of 2k to 10k and see nothing then either your wiring needs double checked or perhaps the color codes of your temp sensors is not "standard". These sensors have had many color codes and are not always consistent.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ok dev mode adds in 3 "dummy sensors" as a testing mode. You dont want to be in dev mode.

If you have 2 6.8k resistors, placing them in parallel would be the same as having a 3.4k resistor which should be ok. Depending on wire length etc on the one wire bus the pullup resistor isnt etched in stone as to its value. 4.7k is a good starting point but some people have had to experiment. Just dont go lower than 2k. Im suprised that 6.8k isnt working for you but you may need to try a few values.

So if you are not in dev mode, using a resistance in the range of 2k to 10k and see nothing then either your wiring needs double checked or perhaps the color codes of your temp sensors is not "standard". These sensors have had many color codes and are not always consistent.
Exactly what @Bigtrout mentioned. Dont use dev_mode for actual builds, its for development in laptop, when no real pi is available. Hence test sensors are added.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Right on, thanks for the link and info, that should get me going and that's what I was hoping to hear about calibration.

The other day I setup my pH circuit like Atlas, it works now with the Atlas sketches but I get a strconv.ParseFloat error on Reef-pi. I found the EZO driver and the read function but not sure where the parse happens so can't figure out what it expects.

strconv.ParseFloat {"error":"strconv.ParseFloat: parsing
\"7.26\\x00xxxxxxxxxxxxxxxxxxxxxxxxx\": invalid syntax"} | HTTP 404

You can see the pH is there but something isn't right. This is what I'm sending to Reef-pi, any ideas what I'm missing?

computerdata[0] = '7';
computerdata[1] = '.';
computerdata[2] = '2';
computerdata[3] = '6';
Wire.write(1); // byte
Wire.print(computerdata); // char array
Wire.write(0); // byte
I'd suggest having code related discussion in slack or over Github issues. and leave this thread to the rest of the stuff :-). For anything that will lead to reef-pi integration at code level, you will likely need lot more code discussion. Better to have to there with folks more aware of the software side. And because things move every release its whole lot easier to keep context for code related things there instead of this ginormous thread :-)
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
252
Location
Near Seattle
Rating - 0%
0   0   0
okay, ever since I upgraded from my s9+ (from s7edge), the reefpi page won't load on my phone. never really knew what it was. I tried running incognito, tried the firefox mobile app, tried the samsung internet app, tried clearing cache...nothing. Access from my s7edge still worked last time I tried, and access via chrome on my macbook is fine.

today I'm WFH (covid-19...company recommended WFH), and found on my work laptop (windows 10), chrome also loads an empty page. does this shed any light on the subject, @Ranjib ?

1583278133340.png


1583278164596.png
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
475
Reaction score
594
Location
Knoxville
Rating - 0%
0   0   0
Seeing this post, I decided tp try and delete my test ATO. You are correct. It will not let me delete my test ATO. I can disable it but not delete it.

Hmm, interesting. Seems to be a bug introduced with the 3.2 release. @AbjectMaelstroM also reported the same issue on the 7th, but i couldn't find any responses addressing it.

@Ranjib , any ideas?

Is there a way to go manually via terminal and delete an ATO from reefpi? Trying to avoid resetting config.

I can't seem to be able to delete ATOs from the UI. I've tried untying them from any equipment and sensors and still won't delete.
 

Zaphod

New Member
View Badges
Joined
Feb 19, 2020
Messages
3
Reaction score
21
Rating - 0%
0   0   0
Unfortunately 9 wires are needed, 8 relays + one for a common GND. I considered only have 7 outlets switch but last minute changed to all 8, maybe 7 is better.

Maybe a Cat6e/a patch cord (8 wires and a shield). Or, Cat7 Patch cord. 6ft cords start at around $5 US With that said, The panel mount Cat6/7 RJ45's can get expensive unless you use Keystone types which require a standard Keystone panel mount.

Amazon product
 
Last edited:

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
54
Reaction score
97
Location
Rome (Italy)
Rating - 0%
0   0   0
I have bought a proto board on Amazon and it will arrive in the next days.
In the meanwhile I can’t see the temperature sensor in the temperature board.
What’s wrong???

47A60D43-B41C-4541-8347-99E9647E7A93.jpeg
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 37 27.2%
  • 100% dry rock + 100% live sand

    Votes: 46 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 22.1%
  • 75% live rock, 25% live sand

    Votes: 13 9.6%
  • 25% live rock, 75% live sand

    Votes: 10 7.4%
Back
Top