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

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
640
Location
United States
Rating - 0%
0   0   0
@theatrus any progress on the driver for the DLI power strips? I was going to tinker, but life got in the way. I'm wondering if the TP-Link drivers can be used as a starting point (DLI is simpler...plaintext authentication)....
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
640
Location
United States
Rating - 0%
0   0   0
Using the pico board, i am trying to make use of the 0-10V for analog dimming. i've created a jack (pins 0,1) with "rpi" as the driver. However, when I go to the "Lights" tab, i keep getting a 404 error from reef-pi...any ideas?

Update...I got them to add in (had to reload reef-pi)...but how do i use them as analog 0-10V vs PWM?
 
Last edited:

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Using the pico board, i am trying to make use of the 0-10V for analog dimming. i've created a jack (pins 0,1) with "rpi" as the driver. However, when I go to the "Lights" tab, i keep getting a 404 error from reef-pi...any ideas?
Based on page 2 and 5 in the schematic, it looks like the lights are on GP 13 and 18 instead of 0 and 1. Maybe redefining the jack would help?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yeah, i don't know if i need to specify the GPIO pins vs PWM pins for using them as 0-10V analog....
Its not true 0-10V analog. Its 3.3V pwm generated by pi then a rc filter (if i recall correctly) makes it a triangular shaped 10v signal,
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,165
Location
Winchester, TN
Rating - 0%
0   0   0
So, I have an issue with the ATO. It is set on GPIO23. issue is the pump NEVER turns off. When i check Reverse, It Never turns on. I have verified that one wire is GPIO23. other is 3v. even when unhooking wire, it does nothing.

I re-installed latest Raspbian. Version 2.5 of Reef-pi. Everything else seems to work as appropriate.

any suggestions on where to start. im stumped.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So, I have an issue with the ATO. It is set on GPIO23. issue is the pump NEVER turns off. When i check Reverse, It Never turns on. I have verified that one wire is GPIO23. other is 3v. even when unhooking wire, it does nothing.

I re-installed latest Raspbian. Version 2.5 of Reef-pi. Everything else seems to work as appropriate.

any suggestions on where to start. im stumped.
What sensor you are using? Can you share the configuration? Like check interval etc
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,165
Location
Winchester, TN
Rating - 0%
0   0   0
@Ranjib its a simple 2 wire float switch. 3 volt on one side, GPIO23 on the other side. Interval is 1 sec but tried others. I did not do the optic sensor.

Wire runs from 3v to the switch then from switch to the GPIO. setup as an inlet. when reverse is checked in config tab, its off. removing wire does nothing. when reverse is unchecked, pump runs regardless of wires.
 

Eye H8 Empty V

Active Member
View Badges
Joined
Jan 11, 2019
Messages
486
Reaction score
675
Location
Magnolia, TX
Rating - 0%
0   0   0
Hey guys is there any way to build RS-232 or 485 temp and ORP sensors? I see that’s it’s easy with the Ph probe. I’m thinking of building my own control system via Crestron.

Thanks!
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
640
Location
United States
Rating - 0%
0   0   0
Can you measure the voltage between the two outer legs on the pot? It would be constant.

You can use an analog output to feed into the connector for the center leg of the pot, referenced to the bottom/ground leg.

@theatrus .... finally getting around to this. Should I be going from the pico board to the pot to the input on the LED. Or should I simply go pico to LED, and if so, would the wiring be the same on the TRS connectors as for PWM control?
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
@Ranjib its a simple 2 wire float switch. 3 volt on one side, GPIO23 on the other side. Interval is 1 sec but tried others. I did not do the optic sensor.

Wire runs from 3v to the switch then from switch to the GPIO. setup as an inlet. when reverse is checked in config tab, its off. removing wire does nothing. when reverse is unchecked, pump runs regardless of wires.

Your current setup is missing some resistors. Essentially you have two options for this, solder some resistors in, or use a program to set the pi built in resistors.
If you go for the solder route, it should be something like this.
R1 is a current limiting resistor for the safety of the system
R2 is a pull down resistor to keep the pin from floating somewhere randomly between 0 & 3.3V
reef-pi_ATO_schem_update.jpg


If you want to go with the built in resistors, @Bzar worked up the solution below.

So I took some time and figured out how to use regular float switches in a simple fashion using the built in pi resistors. This makes me happy because I don't have to have extra wiring and soldering tasks when adding a bunch of switches, and I don't have to pay for something I already bought. So to get regular float switches (or any switches for that matter) working safely you can do this...

Step A) create a python script to control the pull up resistance. From the terminal...

sudo nano switches.py

#switches.py
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(20, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP)


ctrl+X > Y > <enter>

Step B) make the file executable...

sudo chmod 755 switches.py

Step C) make the script run at startup by adding a line just before "exit" in rc.local (note: the python start command must point to the directory from root /...

sudo nano /etc/rc.local

sudo python /home/pi/switches.py &


ctrl+X > Y > <enter>

Step D) Restart or Reboot

sudo reboot

Step E) Plug your float switch wires into the GPIO. One wire to Pi header connected Ground, and one to the GPIO you used in switches.py

Step F) Check to see if your script is running...


ps -aef | grep python

Step G) Designate those pins in Reef-Pi to inlets/ATO for your application.

Hope this helps, working for me here.

This site explains what is going on...https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/
 
Last edited:

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,165
Location
Winchester, TN
Rating - 0%
0   0   0
OK.strange how it has worked flawlessly (perceived) for me from day 1.

If I wish to use the Python script, am I to assume that the numbers presented in the script are the GPIO # that correspond to where he has the switches? if so, I only need a single at this point but good to know.
 

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
Hello

First i would say sorry for my bad English. I hope all of you can understand me :-)
I am new in this Forum and at the time i build my first reef pi.

I have a Question. It is in future possible to use the jacks as outputs ? Its easier to drive Mosfets for my ATO over the pca9685. Or is very usefull for other high current applications.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hello

First i would say sorry for my bad English. I hope all of you can understand me :)
I am new in this Forum and at the time i build my first reef pi.

I have a Question. It is in future possible to use the jacks as outputs ? Its easier to drive Mosfets for my ATO over the pca9685. Or is very usefull for other high current applications.
Yes. With 3.0 (next release) this is possible.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yes. With 3.0 (next release) this is possible.
Welcome to reef2reef :-) . and dont worry about english, we understand you loud and clear . Would love to know about your build.
 

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
Welcome to reef2reef :) . and dont worry about english, we understand you loud and clear . Would love to know about your build.
Thank you :-) and thanks for the very good news :) that makes me very happy :) it would so easy to drive with mosfets :-D

and thanks for all your work with reef pi
 

DO YOU THINK TECHNOLOGICAL ADVANCEMENTS ARE MORE HELPFUL OR HURTFUL TO REEFING?

  • More helpful.

    Votes: 58 42.0%
  • More hurtful.

    Votes: 5 3.6%
  • I think it depends mostly on the technology.

    Votes: 53 38.4%
  • I think it dependsmostly on the reefer behind the technology.

    Votes: 41 29.7%
Back
Top
Home
Post thread…
Market
What's new