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

Young_Reefer

Community Member
View Badges
Joined
Jan 4, 2019
Messages
42
Reaction score
42
Location
Nashville
Rating - 0%
0   0   0
I’m hoping to incorporate some type of wavemaker control into my reef pi build. The plan, so far, is to power a koralia nano (12 V) with this motor controller:

https://www.amazon.com/gp/aw/d/B074FR4BBJ?psc=1&ref=ppx_pop_mob_b_pd_title&th=1

My current questions/concerns are:

1. Do motor controllers, such as the doser module which I have already incorporated, require both GPIO inputs? For example, if I only connected the “forward” GPIO connection and left the “reverse” disconnected would the motor still function when forward is enabled? I’m trying to minimize wiring...

2. What would be the best way to implement a powerhead in reef pi? I’m thinking of setting it up as a doser to control the PWM signal throughout the day but also implementing a timer which makes it pause for two seconds every two seconds. Will this become an issue?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I’m hoping to incorporate some type of wavemaker control into my reef pi build. The plan, so far, is to power a koralia nano (12 V) with this motor controller:

https://www.amazon.com/gp/aw/d/B074FR4BBJ?psc=1&ref=ppx_pop_mob_b_pd_title&th=1

My current questions/concerns are:

1. Do motor controllers, such as the doser module which I have already incorporated, require both GPIO inputs? For example, if I only connected the “forward” GPIO connection and left the “reverse” disconnected would the motor still function when forward is enabled? I’m trying to minimize wiring...

2. What would be the best way to implement a powerhead in reef pi? I’m thinking of setting it up as a doser to control the PWM signal throughout the day but also implementing a timer which makes it pause for two seconds every two seconds. Will this become an issue?
The forward / reverse action is a required thing for dosing system , it’s an additional thing we do because l293d chip provides that capability. I am not sure if the koralia nano power head allows you to pass dc current directly , last time I checked it take ac current and won’t let you control the speed externally , only jebao or gyre allows that.
Currently reef-pi does not have powerhead automation capabilities builtin, so timers for on off and light or doser module for speed control is your best option. I am planning to add native wavemaker capabilities as part of 3.0 development
 

Young_Reefer

Community Member
View Badges
Joined
Jan 4, 2019
Messages
42
Reaction score
42
Location
Nashville
Rating - 0%
0   0   0
The forward / reverse action is a required thing for dosing system , it’s an additional thing we do because l293d chip provides that capability. I am not sure if the koralia nano power head allows you to pass dc current directly , last time I checked it take ac current and won’t let you control the speed externally , only jebao or gyre allows that.
Currently reef-pi does not have powerhead automation capabilities builtin, so timers for on off and light or doser module for speed control is your best option. I am planning to add native wavemaker capabilities as part of 3.0 development

So on the doser, if the reverse GPIO is simply grounded and the forward is enabled, the motor won’t work? And I have the koralia 12 V model which is DC and is controllable.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So on the doser, if the reverse GPIO is simply grounded and the forward is enabled, the motor won’t work? And I have the koralia 12 V model which is DC and is controllable.
If you are using drok board , this will not matter (forward /reverse logic), as you’ll be passing only the pwm signal and no direction control. Do you have a link for your powerhead,? I’m curious
 

Young_Reefer

Community Member
View Badges
Joined
Jan 4, 2019
Messages
42
Reaction score
42
Location
Nashville
Rating - 0%
0   0   0
If you are using drok board , this will not matter (forward /reverse logic), as you’ll be passing only the pwm signal and no direction control. Do you have a link for your powerhead,? I’m curious

I haven’t looked at the Drok logic much. Here is the pump, I’m not sure if koralia still makes these but you can find them. Also, the wavemaker they produce for them is $135. Quite expensive for my little 3.7 g pico haha.

https://www.amazon.com/Hydor-Koralia-Controllable-Circulation-100-260/dp/B0019IOJKE
 

revhtree

Owner Administrator
View Badges
Joined
May 8, 2006
Messages
47,821
Reaction score
87,593
Rating - 100%
1   0   0
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib @Tom Bishop
@theatrus
I ran across this today and wonder if it can be of use to our reef pi installs...its called Log2Ram.
It writes the linux logs to ram and then once an hour writes to the sd card. This lengthens the sd cards life tremendously. Can this be installed with reef pi?
Maybe the code is something that can be borrowed so reef pi logs can be written the same way?
This is a bit out of my realm but thought id let the code gurus weigh in.

Here is the link
https://mcuoneclipse.com/2019/04/01...rd-lifetime-for-raspberry-pi-lorawan-gateway/
I’m also waiting for pi 4 release updated, I don’t want to add software complexity if the new pi hardware has better storage portfolio (emmc or sata) .
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
I’m also waiting for pi 4 release updated, I don’t want to add software complexity if the new pi hardware has better storage portfolio (emmc or sata) .

+1, I'd really like to see some kind of Sata, be it m.2 etc but the footprint limits the option, I'd be happy with dual SD cards at least I could synch to make my second card ready to go or mirror the cards. I agree though waiting to see what the new hardware brings to the table makes a lot of sense, just my opinion though.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
Here is what I see with the update, if you have not updated since DEC then the list will be even longer and if you are running the desktop version it will be much longer:
Code:
The following packages will be upgraded:
  base-files gnupg gnupg-agent gpgv libasound2 libasound2-data libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev
  libpam-systemd libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libssl1.0.2 libsystemd0 libudev1
  libwbclient0 libxapian30 locales multiarch-support openssh-client openssh-server openssh-sftp-server python3-six
  raspberrypi-bootloader raspberrypi-kernel raspi-config raspi-copies-and-fills samba-common ssh systemd systemd-sysv tzdata
  udev wget wireless-regdb wpasupplicant

The interesting bits to me are the kernel updates, bootloader updates, openssh-server and the wpasupplicant which is really interesting.

WPA supplicant changes that are prompted during the upgrade:
Code:
apt-listchanges: News
---------------------

wpasupplicant (2:2.6-19) unstable; urgency=medium

  With this release, wpasupplicant no longer respects the system
  default minimum TLS version, defaulting to TLSv1.0, not TLSv1.2. If
  you're sure you will never connect to EAP networks requiring anything less
  than 1.2, add this to your wpasupplicant configuration:

    tls_disable_tlsv1_0=1
    tls_disable_tlsv1_1=1

  wpasupplicant also defaults to a security level 1, instead of the system
  default 2. Should you need to change that, change this setting in your
  wpasupplicant configuration:

    openssl_ciphers=DEFAULT@SECLEVEL=2

  Unlike wpasupplicant, hostapd still respects system defaults.

 -- Andrej Shadura <[email protected]>  Sat, 15 Dec 2018 14:22:18 +0100

My upgrade did not go smoothly at all, I would recommend to hold off for the time being, I will do some more poking around and see what I can figure out:

Code:
Setting up samba-common (2:4.5.16+dfsg-1+deb9u1) ...
Segmentation fault
Segmentation fault
dpkg: error processing package samba-common (--configure):
 subprocess installed post-installation script returned error exit status 139
Setting up openssh-server (1:7.4p1-10+deb9u6) ...
dpkg: error processing package openssh-server (--configure):
 subprocess installed post-installation script returned error exit status 139
Setting up locales (2.24-11+deb9u4) ...
Segmentation fault
dpkg: error processing package locales (--configure):
 subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of ssh:
 ssh depends on openssh-server (>= 1:7.4p1-10+deb9u6); however:
  Package openssh-server is not configured yet.

dpkg: error processing package ssh (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 samba-common
 openssh-server
 locales
 ssh
E: Sub-process /usr/bin/dpkg returned an error code (1)

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
Update, it boots up but I have no wireless connection, making an image so I can poke around some more at it but will probably just go with another fresh install and reload the backup configurations. Right now not sure what caused the update to go south, I have another older pi running same version of code and it updated fine, YMMV at the moment.

:)
 

ChrisNH

Active Member
View Badges
Joined
Mar 21, 2019
Messages
305
Reaction score
254
Rating - 0%
0   0   0
I am having trouble doing the "light" test in the adafruit guide 1. The first one, the on off light, works fine. However, I am having trouble defining a jack. When I create it I get:

{"error":"Failed to update. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500​

Checking the error log after trying to create the light as described in the tutorial I have:

Apr 12 10:45:19 reefpi reef-pi[334]: 2019/04/12 10:45:19 health check: Used memory: 10.44 Load5: 0.21
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 lighting-subsystem: Setting PWM value: 48 at channel: 0
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 Setting pwm driver: rpi pin: 0 value: 48
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument​

This pi came off a pi-cluster I was using for a distributed computing project so to troubleshoot I flashed it and ran through a clean install using the directions here:
https://reef-pi.github.io/general-guides/install/

There are a few slightly different versions of the install floating around. Perhaps I am missing something? And yes, I did add
dtoverlay=pwm-2chan

to the config.txt.

This is with reef-pi 2.3

One thing that was different.. the adafruit has me enabling 1-wire while the above did not. It does not have an effect on my current problem either way.

Thanks for your insight!
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
Hi, I've been testing reefpi and it seems great, thanks to all the people that make this possible, I have the same problem when I add a jack, Failed to create error. Error: write / sys / class / pwm / pwmchip0 / pwm0 / period: invalid argument "
Has any solution been found?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I am having trouble doing the "light" test in the adafruit guide 1. The first one, the on off light, works fine. However, I am having trouble defining a jack. When I create it I get:

{"error":"Failed to update. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500​

Checking the error log after trying to create the light as described in the tutorial I have:

Apr 12 10:45:19 reefpi reef-pi[334]: 2019/04/12 10:45:19 health check: Used memory: 10.44 Load5: 0.21
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 lighting-subsystem: Setting PWM value: 48 at channel: 0
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 Setting pwm driver: rpi pin: 0 value: 48
Apr 12 10:45:49 reefpi reef-pi[334]: 2019/04/12 10:45:49 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument​

This pi came off a pi-cluster I was using for a distributed computing project so to troubleshoot I flashed it and ran through a clean install using the directions here:
https://reef-pi.github.io/general-guides/install/

There are a few slightly different versions of the install floating around. Perhaps I am missing something? And yes, I did add
dtoverlay=pwm-2chan

to the config.txt.

This is with reef-pi 2.3

One thing that was different.. the adafruit has me enabling 1-wire while the above did not. It does not have an effect on my current problem either way.

Thanks for your insight!
Can you reload reef-pi and see if the error happens again ? This happens when you update the pwm frequency and not rebooted pi after that
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi, I've been testing reefpi and it seems great, thanks to all the people that make this possible, I have the same problem when I add a jack, Failed to create error. Error: write / sys / class / pwm / pwmchip0 / pwm0 / period: invalid argument "
Has any solution been found?
Welcome to reef2reef. Can you try rebooting pi and see if the error persist? I just shared some details on why this may happen sometime
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 35 16.3%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 13 6.0%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.5%
  • I wear reef gear primarily to relax where I live.

    Votes: 28 13.0%
  • I don’t wear gear from reef brands.

    Votes: 124 57.7%
  • Other.

    Votes: 14 6.5%
Back
Top