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

5) Disable the Low ATO
6) Wait few seconds
7) Start the High ATO, which will pour fresh saltware mix and wait for a period little longer than it usually takes to reach the correct level, again you dont have to be precise as the High ATO will turn off the pump controlling new fresh saltwater mix
8) Disable High ATO
9) Wait for few seconds
10) Enable the Actual ATO
 
I think I have a better understanding after reading through this https://www.instructables.com/id/A-Simple-Introduction-to-Transistors-and-PWM-Puls/

If I want to use the Pi to generate the pwm then I would just need to just need to get a npn transistor, I think based on that article I have a better feel for what I would need to do. Basically I could feed 12v from reef-pi which goes to the transistor and then have pwm feed from the pi. Am I missing anything?

Thanks
Yes. What yo have to remember is pi has only two pwm pins, if you need just two led channel control, pi is sufficient, for more channels (upto 16) pca9685 is your option. This is choice (pi or pca9685) is solely based on number of pwm channels.
 
I followed first three guides, powering with a 12v 2.5amp power supply. I will need more guidance since im not familiar with the components, I don't mind reading to come up to speed but it may take me a little while to get my head wrapped around what I need to do. First question would be which is cheaper and/or better to use? I have access to a good electronics store that will have just about anything I need, just need to know what I need to go purchase. From what I read I need to get a pca9685 and a npn transistor or mosfet/meanwell driver. would it help to cut open the current dimmer component to see what its using?

Thanks for the help...
No worries. I have repeated this multiple times, but I think its encouraging to mention again :-), I am not a career electronics engineer, I learned electronics three years before and its pretty much through reef-pi. It was a way for me to stay off internet, and not to overengineer my tank. You are more than welcome to use this project as an opportunity to learn as well, in fact thats why the guides are in adafruit, i literally learned most of the things (and the build components reflect that) from their tutorials and kits. There are bunch of us here who would be happy to help you out. This is a hobby thing, and most of us have a different day job so our response may not be very timely, but we'd definitely lend you a hand in troubleshooting,
 
Yes. What yo have to remember is pi has only two pwm pins, if you need just two led channel control, pi is sufficient, for more channels (upto 16) pca9685 is your option. This is choice (pi or pca9685) is solely based on number of pwm channels.

I only have 2 lights that have the dimmers so I could go with the pi for now and if I upgrade the other light expand at that time. If I use the pi where do I need to connect it to and then how do i control it with reef-pi, where should I start with my testing number wise for the pwm control?

I actually think this may be easier than I first thought, i understand from looking at the wiring on th transistor how that fits into the circuit just not sure how to tie it into the pi from the pwm stand point. I will need to feed it 12v from the pi, thats easy and then tie it into the pwm circuit. Will go and see if I can figure out which pins are for pwm.

One additional question, I guess if I end up driving both led's from the pi, my current ps is 2.5amps, I am guessing I will need to beef that up, your thoughts? i have lots of power supplies since I do a lot of building of things, I think I have one that will put out 5amps at 12v if needed, just bigger brick to hide, lol.

Thanks :)
 
@Ranjib can I use this instead of point to point wiring your circuit for the doser?

Motordriver-500x500.jpg
 
I'm planning on a small "nano" (I'm calling it a mini) build, and have been looking at what I'd like to monitor from a Reef-Pi perspective on that smaller system. Right now, my main 90g is "hard plumbed" (its actually a reservoir in the garage + a Spectrapure Peristaltic ATO pump) for automatic top-off, which means I only have to move water around when I need to do a water change (though one day I may make that easier too ;)). Its also run on a Calcium reactor. Neither of these would work with space or plumbing in the mini tank's location.

I love automation and I suck at remembering to do things as simple as emptying the skimmer cup, and ATO water and replacing 2-part solutions would also be a thing oft forgotten. To that end, I'd like to monitor and alert on levels of these liquids.

Inspired by the Spectrapure ATO pump, I realized using a pressure sensor with a rigid tube immersed in the reservoir (full of air) would be a fantastic method of measuring liquid level. I'm going to try to experiment a bit with this, and it adds another sensor type to Reef-Pi (analog level).

Specifically, I'm looking at this sensor:

https://www.digikey.com/product-detail/en/nxp-usa-inc/MPXV7002DP/MPXV7002DP-ND/1168436

Its cheap, its differential (or else you also make a barometer as well!), and the signal range would allow you to measure up to 20cm of depth. Subbing out a different sensor gives more depth capability as the range increases.
 
I only have 2 lights that have the dimmers so I could go with the pi for now and if I upgrade the other light expand at that time. If I use the pi where do I need to connect it to and then how do i control it with reef-pi, where should I start with my testing number wise for the pwm control?

I actually think this may be easier than I first thought, i understand from looking at the wiring on th transistor how that fits into the circuit just not sure how to tie it into the pi from the pwm stand point. I will need to feed it 12v from the pi, thats easy and then tie it into the pwm circuit. Will go and see if I can figure out which pins are for pwm.

One additional question, I guess if I end up driving both led's from the pi, my current ps is 2.5amps, I am guessing I will need to beef that up, your thoughts? i have lots of power supplies since I do a lot of building of things, I think I have one that will put out 5amps at 12v if needed, just bigger brick to hide, lol.

Thanks :)
In Raspberry Pi GPIO18 and 19 is used for pwm, in reef-pi you'll declare them as pin 0 (gpio18) and pin 1 (gpio 19), with driver "rpi". Use https://reef-pi.github.io/guides/electronics/ to understand the physical positions of GPIO18 and 19.
You will not feed the transistor from pi, but from your power adapter (12 V). Pi will be fed 5v generated from an LM2596 that feeds from 12V and converts it into 5V for Pi's consumption, does that make sense?
If you dont have lm2596, then use two different power supply, 5v for pi and 12v for npn transistor's collector pin. Make sure to connect the GND's of both power supply in your circuit. You should not need more than 12V 1A for the whole thing (pi + control circuit)
 
@Ranjib can I use this instead of point to point wiring your circuit for the doser?

Motordriver-500x500.jpg

This will work. I am doing something similar. Vcc2 will be the source voltage for whatever your motors require, pwm inputs will be pins 18 and 19 (don’t forget to enable pwm in in the config file), and the other inputs will be 4 unused GPIO pins of your choosing. You will set the polarity of the motors with the virtual outputs in reefpi like in the guide.
 
Thank you, I'll order up the components, I have most parts ready from a failed arduino (it worked, apart from the rtc,5 modules later I gave up) build so hopefully should be straight forward. I'll start a build thread once I'm ready.
Awesome. Keep us posted, and thank you for giving reef-pi a try
 
I'm planning on a small "nano" (I'm calling it a mini) build, and have been looking at what I'd like to monitor from a Reef-Pi perspective on that smaller system. Right now, my main 90g is "hard plumbed" (its actually a reservoir in the garage + a Spectrapure Peristaltic ATO pump) for automatic top-off, which means I only have to move water around when I need to do a water change (though one day I may make that easier too ;)). Its also run on a Calcium reactor. Neither of these would work with space or plumbing in the mini tank's location.

I love automation and I suck at remembering to do things as simple as emptying the skimmer cup, and ATO water and replacing 2-part solutions would also be a thing oft forgotten. To that end, I'd like to monitor and alert on levels of these liquids.

Inspired by the Spectrapure ATO pump, I realized using a pressure sensor with a rigid tube immersed in the reservoir (full of air) would be a fantastic method of measuring liquid level. I'm going to try to experiment a bit with this, and it adds another sensor type to Reef-Pi (analog level).

Specifically, I'm looking at this sensor:

https://www.digikey.com/product-detail/en/nxp-usa-inc/MPXV7002DP/MPXV7002DP-ND/1168436

Its cheap, its differential (or else you also make a barometer as well!), and the signal range would allow you to measure up to 20cm of depth. Subbing out a different sensor gives more depth capability as the range increases.
I think its an awesome idea. Very early version of reef-pi (then called as reefer) had mcp3008 based etape integration , which also gave similar information. But I didnt see whole lot of initial use case, and SPI is more wires.. so i dropped those bits
 
I remember reading some mention that there was talk in adding support for dc wavemakers and pumps. what brand were you going to start with? I know the jabeo line can be run with a brusless dc motor contorller with PWM+24V so techinically could almost control them now, just need the logic added for the wavemaker, and prolly the pump as well.
 
In Raspberry Pi GPIO18 and 19 is used for pwm, in reef-pi you'll declare them as pin 0 (gpio18) and pin 1 (gpio 19), with driver "rpi". Use https://reef-pi.github.io/guides/electronics/ to understand the physical positions of GPIO18 and 19.
You will not feed the transistor from pi, but from your power adapter (12 V). Pi will be fed 5v generated from an LM2596 that feeds from 12V and converts it into 5V for Pi's consumption, does that make sense?
If you dont have lm2596, then use two different power supply, 5v for pi and 12v for npn transistor's collector pin. Make sure to connect the GND's of both power supply in your circuit. You should not need more than 12V 1A for the whole thing (pi + control circuit)

I have a better idea trying to make my shopping list, on your builds with the break out boards you are using resistors, will I need any resistors when using the 2 pi pwm outputs? My thoughts are that I will purchase a small proto board for the npn transistors feeding that 12v from my existing pi ground controller circuit and then output to female jacks. What I am not sure about is will I need any resistors like you are using in the diagrams with the adafruit pwm breakout boards.

Here is my shopping list if anyone can chime in will be leaving soon for the store:

npn transistors <70ma
resistors 10k, 1k, 2.2k (will grab some not sure if needed)
5.5/2.1 dc power plug(s) for jumpers to lights
small proto board

I already have 5.5 female power plugs
jumper cables etc...

Anything else that I might need to complete the build?

Thanks:)
 
I have a better idea trying to make my shopping list, on your builds with the break out boards you are using resistors, will I need any resistors when using the 2 pi pwm outputs? My thoughts are that I will purchase a small proto board for the npn transistors feeding that 12v from my existing pi ground controller circuit and then output to female jacks. What I am not sure about is will I need any resistors like you are using in the diagrams with the adafruit pwm breakout boards.

Here is my shopping list if anyone can chime in will be leaving soon for the store:

npn transistors <70ma
resistors 10k, 1k, 2.2k (will grab some not sure if needed)
5.5/2.1 dc power plug(s) for jumpers to lights
small proto board

I already have 5.5 female power plugs
jumper cables etc...

Anything else that I might need to complete the build?

Thanks:)

I can't answer your questions, but I'm jealous that you live close enough to a hobby electronics store to make a trip. The nearest to me is almost an hour away. These are the days I miss Radio Shack.
 
I have a better idea trying to make my shopping list, on your builds with the break out boards you are using resistors, will I need any resistors when using the 2 pi pwm outputs? My thoughts are that I will purchase a small proto board for the npn transistors feeding that 12v from my existing pi ground controller circuit and then output to female jacks. What I am not sure about is will I need any resistors like you are using in the diagrams with the adafruit pwm breakout boards.

Here is my shopping list if anyone can chime in will be leaving soon for the store:

npn transistors <70ma
resistors 10k, 1k, 2.2k (will grab some not sure if needed)
5.5/2.1 dc power plug(s) for jumpers to lights
small proto board

I already have 5.5 female power plugs
jumper cables etc...

Anything else that I might need to complete the build?

Thanks:)
Get few 4.7k resistor, couple of logic level power mosfets for backup
 
I have a better idea trying to make my shopping list, on your builds with the break out boards you are using resistors, will I need any resistors when using the 2 pi pwm outputs? My thoughts are that I will purchase a small proto board for the npn transistors feeding that 12v from my existing pi ground controller circuit and then output to female jacks. What I am not sure about is will I need any resistors like you are using in the diagrams with the adafruit pwm breakout boards.

Here is my shopping list if anyone can chime in will be leaving soon for the store:

npn transistors <70ma
resistors 10k, 1k, 2.2k (will grab some not sure if needed)
5.5/2.1 dc power plug(s) for jumpers to lights
small proto board

I already have 5.5 female power plugs
jumper cables etc...

Anything else that I might need to complete the build?

Thanks:)

I got this
https://www.amazon.com/gp/product/B01N1T1GSP/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1
It was cheap enough to justify probably never ruinning out of resistors for my small projects.

That being said there are to many unknown variables to determine which resistor to use. You need the gain (hFE) of the transistor, the amount of current you want to pass, and need to calculate from there. The minimum current at the base is the collector current divided by the gain. So just for example if you are passing 40mA at the collector and the transistor gain is 35 it would be 40/35=1mA. So the base resistor needs to pass 1mA to operate with one end at 3v3 (pi PWM Voltage but could be different if using the PCA 9685) and the other at 0.7v (the base-emitter junction voltage) so 2.6v across it. Using ohms law that resistor should be 2k6. However because gain varies greatly and its not going to hurt to throw a little more current at it a 1k resistor should work to make sure the transistor is saturated with more than 1mA.

I am learning as well so sorry if thats a confusing explanation.
 
I remember reading some mention that there was talk in adding support for dc wavemakers and pumps. what brand were you going to start with? I know the jabeo line can be run with a brusless dc motor contorller with PWM+24V so techinically could almost control them now, just need the logic added for the wavemaker, and prolly the pump as well.
Yes I wanted to do this for 2.0 but didn’t get enough time . It is slated for 3.0 and we know a lot more now (bldc drivers , control signals for different jebao pumps etc) than before. But this still needs software works and field testing. I ll be working on a feature related to custom profiles (ability to define arbitrary wave forms) before the wave maker . I have a bldc driver board from drok, and I think that’s all I need (profile + bldc driver ) and reuse everything that exists ( pca9685/rpi integration, lights ui ) for field testing at least
 
I can't answer your questions, but I'm jealous that you live close enough to a hobby electronics store to make a trip. The nearest to me is almost an hour away. These are the days I miss Radio Shack.

No doubt that many, many people miss Radio Shack!
 
Finally got my ribbon cable, and I'm updating all the software now. I was on reef-pi 1.0 for pi3, now I'm taking it to 2.0, and updating the OS as well. I was unable to add any outlets when I fired everything up, so either the ribbon cable is backward, my db-9 cable is the wrong one, or it simply needed to be updated. I'll know soon enough.
 

TOP 10 Trending Threads

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 26 61.9%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 16 38.1%
Back
Top
Home
Post thread…
Market
What's new