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

Eye H8 Empty V

Active Member
View Badges
Joined
Jan 11, 2019
Messages
462
Reaction score
729
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
644
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,166
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,843
Reaction score
17,058
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.
 

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
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,527
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
Michael shows how to chain them using his converters in his build.


If that was a reply to me, I know how to wire them up, just wondering if anyone is running more than 5 channels. Sorry if I didn't clarify. Upto 5 channels everything runs fine. As soon as 6th channel is introduced, Leds flicker until a channel is powered off.
 
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
Well done @Urtoo .. post a link to your build page I'll follow it with interest.

edit: its ok ive just spotted the big blue build thread button :)
Please link it here when you do. We love to read through the build threads as it help us understand wha to improve, what’s working well etc
 
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
Upgrading one of my older builds with reef-pi 3.0 based system. This housing was one of my favorite as it was a major upgrade form ply wood made box , and this thing was sturdy . I loved the clear cover :)
9C3FB482-8D0F-498B-8AE0-762C609AFCD9.jpeg

23AA6E8A-0D33-4CD0-9EB3-10CD4AAEA221.jpeg

That said , now I recall how much work it was to mount those connectors . All the dremel works involved decent amount of elbow grease
1416A331-6B1F-4FEB-A186-21D4093661EC.jpeg

and there were lots of mistakes made :)
AB2D6F25-3169-4EEC-B33D-1F60B57BA672.jpeg

Now, the new thing is like 1/2the size
30D9EF49-D75E-4668-AC07-676B2106D36B.jpeg


it looks sleek too :), I like the form factor. It was a dream to get down to exactly required volume .
EE99C5AA-1E38-408E-A5EE-FFA14327C7B1.jpeg

not to mention the huge amount of time saved. With 0.8 mm nozzle and at 60mm speed, my ended 3 Printed this housing under two hours . It takes longer for me to solder the boards :)
One of the changes i made was to use smaller switch. Earlier due to larger housing the bigger buttons didn’t look odd. Now with these purpose designed 3D printed enclosures, those buttons are visibly taking large real estate . Hence the new switch
EE99C5AA-1E38-408E-A5EE-FFA14327C7B1.jpeg


With this , u was able to keep the enclosure height at 28mm.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

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

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

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

    Votes: 19 14.6%
  • I don’t wear gear from reef brands.

    Votes: 74 56.9%
  • Other.

    Votes: 9 6.9%
Back
Top