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

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
Have I said how much I like having the Macro function???

Click the "Feed" button, go feed the tank, go back to doing whatever I was doing (Work in this last case) and it just works!!!

Thanks @Ranjib , one small request, would it be possible to put the Buttons for the Macros on the dashboard or am I asking too much???
 
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
Have I said how much I like having the Macro function???

Click the "Feed" button, go feed the tank, go back to doing whatever I was doing (Work in this last case) and it just works!!!

Thanks @Ranjib , one small request, would it be possible to put the Buttons for the Macros on the dashboard or am I asking too much???
Yup, thats on my mind as well, I dont know when I'll code it though. Ether right before the 2.0 final release , or soon after the release (since its only a new feature addition, and not a breaking change).. but we'll definitely get this feature
 

MrDeSaussure

New Member
View Badges
Joined
Jan 20, 2018
Messages
6
Reaction score
7
Rating - 0%
0   0   0
Ranjib-
Based on your input earlier in the thread, I'm setting up this power strip.
Adj srp 8: https://www.amazon.com/gp/aw/d/B01K...AC_SX236_SY340_QL65&keywords=adj+8+pack+relay

Can you explain how you are using the ULN2003 to convert the 3.3v GPIO logic to switch the 12v relays on the power strip?
I get the general idea of "Each of the pins on the INPUT side of the IC correspond to an equivalent OUTPUT" but I'm not sure how to supply the 12v to the output.

Thank you for all your work.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
Ranjib-
Based on your input earlier in the thread, I'm setting up this power strip.
Adj srp 8: https://www.amazon.com/gp/aw/d/B01K...AC_SX236_SY340_QL65&keywords=adj+8+pack+relay

Can you explain how you are using the ULN2003 to convert the 3.3v GPIO logic to switch the 12v relays on the power strip?
I get the general idea of "Each of the pins on the INPUT side of the IC correspond to an equivalent OUTPUT" but I'm not sure how to supply the 12v to the output.

Thank you for all your work.

The ULN Is a isolated Gate switch.. The gate side connects to the Pi. power side connects to your power supply.. Ground is common.. This isolates the Power required for the device . IE POWER STRIP. From the gpio of the pi... It helps protect pie from power surges with one way Diods.. Hope this helps..

So the input to the chip from the gpio is LOW Voltage Controlling a GATE Pin. When it gets powered by gpio it trips the switch open on the Higher Voltage Switch.. Very Similar to how relays work themselves.. ...
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
Small update from my side on the HAT PCBA.

Put first GND, 3.3V and then 5V power with small cables to the HAT from the PI, no smoke :)
Tested then the first OTA optical sensor, works ! :D
Then put the whole HAT directly on the PI, still booting and also the second OTA interface worked.

I'm still missing some connectors, but will start testing the relays interfaces now

So, so far, all green.
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
All 16 relays are working ok as well :cool:

Here some pictures of the tested board and OTA. As you can see I don't have the connector for the relays yet, so I had to improvise. 3 Connectors are missing, for the 12V supply and DS18B20 temperature sensors. Let's see tomorrow if I have a work around and can release the data.

upload_2018-8-10_15-38-11.png


And as promised a close up of the PI and HAT
upload_2018-8-10_15-38-54.png
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
All 16 relays are working ok as well :cool:

Here some pictures of the tested board and OTA. As you can see I don't have the connector for the relays yet, so I had to improvise. 3 Connectors are missing, for the 12V supply and DS18B20 temperature sensors. Let's see tomorrow if I have a work around and can release the data.

upload_2018-8-10_15-38-11.png


And as promised a close up of the PI and HAT
upload_2018-8-10_15-38-54.png

AWESOME!!!
 
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
All 16 relays are working ok as well :cool:

Here some pictures of the tested board and OTA. As you can see I don't have the connector for the relays yet, so I had to improvise. 3 Connectors are missing, for the 12V supply and DS18B20 temperature sensors. Let's see tomorrow if I have a work around and can release the data.

upload_2018-8-10_15-38-11.png


And as promised a close up of the PI and HAT
upload_2018-8-10_15-38-54.png
this is awesome :-)
 
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
It's a diy 72 3watt led driven with 6 eln-60-48d drivers that supply the power for the diodes and dimming is a low current control signal.
I went through the datasheet , and looks like the 6-eln-60-48d require 0-10v analog for dimming, while 6-eln-60-48p requires 10v pwm for dimming. we mostly generate 10 or 5v pwm using reef-pi, so there is a risk that the 6-eln-60-48d might need an RC circuit to convert the pwm to analog signal. Have you purchased the drivers already ?
 
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
Small update from my side on the HAT PCBA.

Put first GND, 3.3V and then 5V power with small cables to the HAT from the PI, no smoke :)
Tested then the first OTA optical sensor, works ! :D
Then put the whole HAT directly on the PI, still booting and also the second OTA interface worked.

I'm still missing some connectors, but will start testing the relays interfaces now

So, so far, all green.
Go @wykat go :-) .. off to the relay connectors ..
 
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
Ranjib-
Based on your input earlier in the thread, I'm setting up this power strip.
Adj srp 8: https://www.amazon.com/gp/aw/d/B01K...AC_SX236_SY340_QL65&keywords=adj+8+pack+relay

Can you explain how you are using the ULN2003 to convert the 3.3v GPIO logic to switch the 12v relays on the power strip?
I get the general idea of "Each of the pins on the INPUT side of the IC correspond to an equivalent OUTPUT" but I'm not sure how to supply the 12v to the output.

Thank you for all your work.
I will recommend using uln2803 instead of uln2003, since it has 8 channels (uln2003 has only 7) and supports higher current draw.
Now , on the wiring,
you'll connect one GPIO from pi to each of the input (left side), GND will be common GND (across power source and pi), COM will be 12v+. Now, while connecting the relay, u'll connect each of the output pin (right hand side) to one db9 pins (it has 9 pins) and the GND (in db9 connector) will be connected to +12v. Yes, its opposite, but thats fine. There will be no GND connection to the db9 connector. The db9 connector will be connected to the relay (ADJ SR2 ) via a db9 cable.
ULN2803%20-%20Layout01.jpg

To summarize you specfiic question, the GND pin in db9 connector will be wired to +12v, and there wont be any GND connection to the db9 connector.
Its like this due to the fact that the uln2803a is a sink type driver. It does not supply the power, instead is sinks it, or put in other terms, it provides the GND/-ve side of the output, and you have to provide a common +ve. This works out with the powerstrip (even though we connect +12v in the GND), since relays are not directional.
 
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
are you working on a ATO warning? like if it stays running. just asking not needed for me anyway but if something did happen .
You can use the standard email alerting feature on individual ato. Its based on usage, so you have to specify a limit on "total number of seconds" the pump is run in an hour, if that goes above the limit, reef-pi will send alert. It will not lock down the ato . I think I'll add a feature to also lock down,

does that answer your question ?
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
Hi to all.Find out what is wrong with my Temp sensor.Cheep Amazon.ca after 1 month is gone.Rusty and i fund water inside

20180810_120113.jpg


20180810_120212.jpg


Oh wow, that's not good. I need to go check mine.

I bought some Plasticdip, but haven't done them yet. I guess I should apply to to any new ones I get before putting them in the water.
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
Hi to all.Find out what is wrong with my Temp sensor.Cheep Amazon.ca after 1 month is gone.Rusty and i fund water inside

20180810_120113.jpg


20180810_120212.jpg
Looks like the sealing of the metal housing and wires wasn't ok. The housing's 'rust' looks like the result of coming from the temp sensor/cable connection.
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
theres no fritzing file or documentation yet, but this should get you going:
- L293d is the main IC here: https://learn.adafruit.com/adafruit-raspberry-pi-lesson-9-controlling-a-dc-motor/lm293d
- en1 and en2 pins are wired to pi GPIO 18 & 19 ( declare them as jacks with rpi driver in reef-pi)
- IN1, IN2, IN3, IN4 are all connected to other GPIO (declare them as outlets in reef-pi, and create 4 virtual equipment to control them)
- I power the whole build with a 12 v 2 amp dc power source, use an lm2596 to convert it 5v for feeding pi. The 12v rail is also connected to Vmotor pin of l293d. Vcc pin of l293d is wired to 5v rail
- OUT1,OUT2 of l293d is wired to one peristaltic pump (12v, from adafruit), OUT3 & OUT4 powers the other pump
- Thats all, use reef-pi doser ui to create two dosing pumps each attached to one of the jack (PWM pin 0 & 1 in the UI, GPIO pin 18 & 19 in the physical wiring). Dosing UI will let you schedule the pumps to run at specific time (same UI as timer), as well as run them on demand for specific duration at specific speed (calibration). Calibrate the pump to get an understanding of how much liquid its drawing at a certain speed and certain duration. Then decide on the dosing regimen (frequency, duration and speed)
- The virtual equipment (which is controlling en1,en2,en3,en4) is used for controlling on/off or direction of the pumps. If both en1 and en2 is either on or off then the pump will be off. If one of them in on and other is off, then the pump will run. Depending upon which one is on that will control the direction of the pump

hope this help


@Ranjib

Dragging this back up again. I found some time to work on my doser. I'm still not getting it working. I'm probably in over my head, but hey, the only way to learn right???

I have a breadboard wired up with just one motor, but when I try to create a Jack in Reef-pi. I get this error. Not sure what I'm doing wrong!

upload_2018-8-10_13-42-53.png


upload_2018-8-10_13-43-13.png



Any ideas???

Thanks
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
@Ranjib

Dragging this back up again. I found some time to work on my doser. I'm still not getting it working. I'm probably in over my head, but hey, the only way to learn right???

I have a breadboard wired up with just one motor, but when I try to create a Jack in Reef-pi. I get this error. Not sure what I'm doing wrong!

upload_2018-8-10_13-42-53.png


upload_2018-8-10_13-43-13.png



Any ideas???

Thanks

Do you have rpi checked on in the Configuration tab ?
 

MrDeSaussure

New Member
View Badges
Joined
Jan 20, 2018
Messages
6
Reaction score
7
Rating - 0%
0   0   0
I will recommend using uln2803 instead of uln2003, since it has 8 channels (uln2003 has only 7) and supports higher current draw.
Now , on the wiring,
you'll connect one GPIO from pi to each of the input (left side), GND will be common GND (across power source and pi), COM will be 12v+. Now, while connecting the relay, u'll connect each of the output pin (right hand side) to one db9 pins (it has 9 pins) and the GND (in db9 connector) will be connected to +12v. Yes, its opposite, but thats fine. There will be no GND connection to the db9 connector. The db9 connector will be connected to the relay (ADJ SR2 ) via a db9 cable.
ULN2803%20-%20Layout01.jpg

To summarize you specfiic question, the GND pin in db9 connector will be wired to +12v, and there wont be any GND connection to the db9 connector.
Its like this due to the fact that the uln2803a is a sink type driver. It does not supply the power, instead is sinks it, or put in other terms, it provides the GND/-ve side of the output, and you have to provide a common +ve. This works out with the powerstrip (even though we connect +12v in the GND), since relays are not directional.

Thank you for your help, I think I understand the setup now.
Unfortunately, I ran into a little problem....

I supplied the ULN2803 with ground on PIN 9, (tied to my Raspberry Pi ground pin, and supplied +12v, via a power supply to pin 10, with the power supply on the same Raspberry Pi ground plane. All GPIO's tied to the inputs, and all of the outputs to the power strip. +12V on Pin 5, (which when I took the cover off the power strip, appears to be the common across all the relays)

Twice now, it appears to work fine for a few minutes, and then go "unresponsive" (though the Raspbery Pi and Reef-pi interface are still good, and I can still cycle the GPIO's). Once it goes "unresponsive" it absolutely appears like it destroys the ULN2803.

Am I missing something? I can go back to the drawing board and start with a single input and output, to see if that resolves anything, but from what I see, it looks good.
 

Cal_stir

Community Member
View Badges
Joined
Aug 6, 2018
Messages
64
Reaction score
29
Location
Corunna, Ontario
Rating - 0%
0   0   0
I went through the datasheet , and looks like the 6-eln-60-48d require 0-10v analog for dimming, while 6-eln-60-48p requires 10v pwm for dimming. we mostly generate 10 or 5v pwm using reef-pi, so there is a risk that the 6-eln-60-48d might need an RC circuit to convert the pwm to analog signal. Have you purchased the drivers already ?
Yes this is a light I built a few years ago, I plan to change up some of the diodes and make it more toward full spectrum. I just got a bunch of the parts I ordered and I pretty sure I got a DAC, or I could do an RC circuit. I got my pi3+ up and running and updated. The lighting is down the road a bit, need temp, dosing and outlets first.
 

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