Robo-Tank 3.0 for reef-pi

What form factor do you prefer for a controller?

  • All-in-one

    Votes: 5 41.7%
  • Modular

    Votes: 7 58.3%

  • Total voters
    12
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Not directly, steppers are usually controlled by a few configuration pins (enable, microstep select, etc) and pulses on the STEP pin.

I'm happy to collaborate on a simple USB to stepper control firmware (or USB to X). Got a partial reel of SAMD11s which would be plenty of horsepower for this sort of glue.
I was referring to the sensor. The steppers will likely be controlled via PWM signal or maybe just GPIO depending what Ranjib does. Using the drv8825 it's easy to connect to a Pi.
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Stepper driver (based on drv8825) is coming to reef-pi next minor release. It will be available through doser module in the beginning . the color sensor should not be a hard integration , since it’s all i2c based, we already have code to reference against.
I have to address some locking issues with macros, and after that I think we should be in a good state to start experimenting with titration
I know a lot of people are going to be excited about this. Are you using PWM? One pin per pump?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,950
Reaction score
3,351
Location
Sacramento, CA area
Rating - 0%
0   0   0
I was referring to the sensor. The steppers will likely be controlled via PWM signal or maybe just GPIO depending what Ranjib does. Using the drv8825 it's easy to connect to a Pi.
Crossing threads, my apologies.

(Linked to the FT200X, which I just realized is a I2C _SLAVE_, not a master)

You can also do all sorts of GPIO bit bang control using other FTDI chips and their D2XX drivers, its an option for remote extension and adding more busses.
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Crossing threads, my apologies.

If you want a one chip drop in solution:


You can also do all sorts of GPIO bit bang control using other FTDI chips and their D2XX drivers, its an option for remote extension and adding more busses.
Right but if reef-pi driver was trying to read I2C sensor this wouldn't work. I'm just wondering if the code can be written for serial input on Pi USB as that'll be better than I2C for DIYers.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,950
Reaction score
3,351
Location
Sacramento, CA area
Rating - 0%
0   0   0
Right but if reef-pi driver was trying to read I2C sensor this wouldn't work. I'm just wondering if the code can be written for serial input on Pi USB as that'll be better than I2C for DIYers.

Yes, depending on how you want to expose it. Since I'm working on some USB bridge functionality, right now I'm planning on shipping a companion daemon which:

- Hosts libusb and watches for known devices to appear
- Polls those devices
- Presents a spot on the filesystem with their sensor values and also files used to trigger inputs and outputs.
- Reef-Pi uses the file driver pointed to these spots to integrate.
- I even bind-mounted /sys/..1wire.../ and can present fake 1wire devices, just in the vein of not changing stuff, but don't tell anyone :-D

Long term this driver can be slid into Reef-Pi. It complicates a bit of the build process, as it can't be done as CGOENABLED=0 build, but libusb is tried and true functionality even in Go. From a least changes required effort, I'm doing the external approach.

The other option is to use the USB VCP class, which presents a COM port (/dev/ttyACMx, /dev/ttyUSBx), which is also very DIY friendly, just washes away a bunch of nice USB functionality (such as knowing whats plugged in, enumerating VID/PIDs of devices, defined 64 byte transfers, interrupt transfers, etc). Nearly every USB example firmware does a USB VCP device, just because there is zero host software to write.

Happy to share everything as I cook it up and test it, Apache licensed and all.
 

AquaKey

New Member
View Badges
Joined
Jan 3, 2022
Messages
24
Reaction score
12
Location
Portland
Rating - 0%
0   0   0
Curious... How would a robo tank compare vs. an apex classic? Was thinking about getting a used one for ~$200 but now seeing this. Not sure how it compares. Thanks!
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Yes, depending on how you want to expose it. Since I'm working on some USB bridge functionality, right now I'm planning on shipping a companion daemon which:

- Hosts libusb and watches for known devices to appear
- Polls those devices
- Presents a spot on the filesystem with their sensor values and also files used to trigger inputs and outputs.
- Reef-Pi uses the file driver pointed to these spots to integrate.
- I even bind-mounted /sys/..1wire.../ and can present fake 1wire devices, just in the vein of not changing stuff, but don't tell anyone :-D

Long term this driver can be slid into Reef-Pi. It complicates a bit of the build process, as it can't be done as CGOENABLED=0 build, but libusb is tried and true functionality even in Go. From a least changes required effort, I'm doing the external approach.

The other option is to use the USB VCP class, which presents a COM port (/dev/ttyACMx, /dev/ttyUSBx), which is also very DIY friendly, just washes away a bunch of nice USB functionality (such as knowing whats plugged in, enumerating VID/PIDs of devices, defined 64 byte transfers, interrupt transfers, etc). Nearly every USB example firmware does a USB VCP device, just because there is zero host software to write.

Happy to share everything as I cook it up and test it, Apache licensed and all.
Well you mostly lost me here, I'm just thinking for average Joe doing DIY. With pca9685, pH, possible extra ADS1015, humidity sensors and now possible a light sensor that's turning into a lot of I2C wires. People will be pushed into buying prefab board if they want all that. Maybe that's just the way it has to be for most compatibility. Of course there's various buffers and extenders people can use.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,950
Reaction score
3,351
Location
Sacramento, CA area
Rating - 0%
0   0   0
Well you mostly lost me here, I'm just thinking for average Joe doing DIY. With pca9685, pH, possible extra ADS1015, humidity sensors and now possible a light sensor that's turning into a lot of I2C wires. People will be pushed into buying prefab board if they want all that. Maybe that's just the way it has to be for most compatibility. Of course there's various buffers and extenders people can use.
Absolutely, its a concern to keep that reliable and working. I think your idea of a pre-fab adapter board is probably inevitable (and low cost), but I won't drown out this thread with more wild tangents, happy to jump elsewhere :-D

Give us more RoboTank goodness :)
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Curious... How would a robo tank compare vs. an apex classic? Was thinking about getting a used one for ~$200 but now seeing this. Not sure how it compares. Thanks!
Not sure if you want me to answer that, obviously there's no comparison, Robo-Tank wins every day of the week lol...

No in all seriousness if Apex saw me I don't think they would be too worried, they have team of people so I don't know if it can be compared. $200 sounds good but maybe you only get a few ports and need to spend another $500 to get anywhere. I've spent very little time looking at other controllers so I don't know much about Apex but it does have more features overall.

My controller is most suited for people who want to control a variety of equipment without spending too much. The overall count of ports is high and as it's DIY based it's easy to modify and customize. Like stepper motors as an example, I'm sure for Apex you need to buy their overpriced set where with reef-pi and DIY based controller you can simply add a small module that's priced fair and use any stepper motor you want.

If you want everything to be 100% plug and play then this wouldn't be ideal. As an example the common optical and non-contact sensors that people use only come with a couple feet of cable, if you want to extend you need to break out the tools, Apex will have a custom sensor with long cable. That's why I made the sensor module with all the plugs so at least sensors plug in without modifying and the module can be located close to the source acting as an extension.

Reef-pi is a great program and very reliable, the UI is really the only thing lacking but it has all the main features you need within and if you have some programming skills there's almost no limits as it has a powerful API and will communicate with things like home assistant, the amazon version too I believe. There's also some advance charting programs that can integrate with reef-pi as well although all this is advanced and a persons on there own with this stuff, due to my knowledge I'm unable to help with this.
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Absolutely, its a concern to keep that reliable and working. I think your idea of a pre-fab adapter board is probably inevitable (and low cost), but I won't drown out this thread with more wild tangents, happy to jump elsewhere :-D

Give us more RoboTank goodness :)
Yeah I think so, soon I'm planning to make a small module that will plug directly into the top of the controller I2C headers and output differential pair. It'll fit on v1 and v2 as well. Then on my pca9685 expanders and soon ADS1015 expander will convert back to I2C and I'll have a better bus to expand further. I come across quite a few people who want 100 ports but I cringe every time an external I2C device is added.
 

AquaKey

New Member
View Badges
Joined
Jan 3, 2022
Messages
24
Reaction score
12
Location
Portland
Rating - 0%
0   0   0
Not sure if you want me to answer that, obviously there's no comparison, Robo-Tank wins every day of the week lol...

No in all seriousness if Apex saw me I don't think they would be too worried, they have team of people so I don't know if it can be compared. $200 sounds good but maybe you only get a few ports and need to spend another $500 to get anywhere. I've spent very little time looking at other controllers so I don't know much about Apex but it does have more features overall.

My controller is most suited for people who want to control a variety of equipment without spending too much. The overall count of ports is high and as it's DIY based it's easy to modify and customize. Like stepper motors as an example, I'm sure for Apex you need to buy their overpriced set where with reef-pi and DIY based controller you can simply add a small module that's priced fair and use any stepper motor you want.

If you want everything to be 100% plug and play then this wouldn't be ideal. As an example the common optical and non-contact sensors that people use only come with a couple feet of cable, if you want to extend you need to break out the tools, Apex will have a custom sensor with long cable. That's why I made the sensor module with all the plugs so at least sensors plug in without modifying and the module can be located close to the source acting as an extension.

Reef-pi is a great program and very reliable, the UI is really the only thing lacking but it has all the main features you need within and if you have some programming skills there's almost no limits as it has a powerful API and will communicate with things like home assistant, the amazon version too I believe. There's also some advance charting programs that can integrate with reef-pi as well although all this is advanced and a persons on there own with this stuff, due to my knowledge I'm unable to help with this.
Definitely drawn to diy/custom setup since I want to add and extend functionality. Pretty comfortable with programming/SW side but not so much on the HW side. I could likely build basic circuits which sounds like is all that's needed to interface with robo tank.

Really want to get into reef pi but have gone back and forth because of being a relative novice on building circuits and not much experience soldering. Sounds like robo tank basically takes care of most of the HW side?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,950
Reaction score
3,351
Location
Sacramento, CA area
Rating - 0%
0   0   0
Yeah I think so, soon I'm planning to make a small module that will plug directly into the top of the controller I2C headers and output differential pair. It'll fit on v1 and v2 as well. Then on my pca9685 expanders and soon ADS1015 expander will convert back to I2C and I'll have a better bus to expand further. I come across quite a few people who want 100 ports but I cringe every time an external I2C device is added.

Goes without saying, watch out for address conflicts on I2C. There are I2C muxers to work around that, but that adds a whole other level of complexity in selecting which bus stub to use in a driver.

Differential transceivers like the PCA9615 absolutely can run the bus much longer distances, within limits. Interested to see some installs with oodles of bus length :)
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Definitely drawn to diy/custom setup since I want to add and extend functionality. Pretty comfortable with programming/SW side but not so much on the HW side. I could likely build basic circuits which sounds like is all that's needed to interface with robo tank.

Really want to get into reef pi but have gone back and forth because of being a relative novice on building circuits and not much experience soldering. Sounds like robo tank basically takes care of most of the HW side?
It sounding like you could enjoy this then. Typically the controller doesn't need any external circuits the circuits come in if you want to repurpose ports but I have a variety of extensions to keep it clean and solder free if more sensor ports etc are required. If you let me know what you want to controller I can see.
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
A little update, I made up a mounting and cooling system for the controller. The mounting bracket is the same for all 3 pieces of the controller, there's 2 rails mounted on the lid and a plate that gets mounted on the wall which you can slide it in and out of. There's two sets of rails available, 2mm tall or 16mm tall if a cooling fan is used for a Raspberry Pi 3 or 4. For the tall rails I have 14mm screws so it's very solid overall.

The highly technical cooling system is a fan screwed to the lid which sits directly over the Pi, I went with a 50mm x 50mm x 10mm. Thicker fans can be used just need to print taller rails.

I ran some heat tests on a Raspberry Pi 3, I mounted a DS18B20 temperature sensor directly under the Pi so the cooling fan isn't blowing on it and I get a reading where the least air flow is. I also used the following SSH command on the Pi to get the core temperature. vcgencmd measure_temp

Without a fan the case temperature got up to 41.9c or 107.4f, the Pi core temp got up to 59.6c or 139.3f. With the 12v fan running full speed the case temp dropped to 23.6c or 74.5f and the core temp dropped to 33.2c or 91.8f. The room temp was about 22.2c or 72f.

This is the controller being slide into the bracket, it goes up to the top of the rails however like this it works as a nice stand.
CAM03112-optimized.jpg


Now it's slide all the way into place.

CAM03110-optimized.jpg

CAM03120-optimized.jpg

CAM03108-optimized.jpg

There's a hole in the lid to get the fan cable inside and a socket available to plug it in. The voltage output of the fan can be adjusted with reef-pi so it's possible to slow the fan down however not all fans like under voltage.

CAM03122-optimized.jpg


These are the short rails if no fan is required, Pi Zero or Zero 2 don't need it.

CAM03135-optimized.jpg


CAM03137-optimized.jpg

CAM03144-optimized.jpg

CAM03149-optimized.jpg


The controller is balanced on the bracket, if you tip the controller down at the front it wants to return to this position.

CAM03107-optimized.jpg
 

Tankkeepers

Valuable Member
View Badges
Joined
Sep 27, 2020
Messages
1,746
Reaction score
1,536
Location
47906
Rating - 0%
0   0   0
So some might wonder what the heck happened to the 2.0 I just released, I know hey... First sorry to anyone who feels wronged if they got 2.0, the hardest part doing this is updates even though I'm excited about them I know not everyone is but it needs to happen for the long term. v1 and v2 controller will continue to be compatible with any new extensions I come out with.

I did like the v2 boards however I hated assembling them and there was no way it was going to work long term so I started designing this one. On my bench tests it works just as good or slightly better than v2. I basically split everything into 3 pieces as I can get a lot more factory assembled. Personally I prefer an all-in-one board which is why I screwed up on 2.0 but overall it makes more sense to have module based system. The last few weeks as I've been migrating and selling these I've been telling customers and the large majority prefer the modules so that was a nice surprise and hopefully the general thought. Let me know what you think is better in the polls, all-in-one or modular controller?

This does keeps costs down vs one large controller board and this is and always will be the main goal. It also adds extra isolation on the DC ports which keeps noise spikes down on the main controller and sensor extension. With the modular design it's cheaper for users to get involved and the system is more tailored to their needs and going forward I have plans for other extensions so having these 3 extra port plugs will be useful.

Here is the main controller, it still has 41 ports however 20 ports have been moved to three RJ45 ethernet sockets which the extensions plug into or a person can branch out how they like. If a person uses the wrong RJ45 for an extension no damage will occur, it just won't work.
  • Fully isolated pH circuit on-board
  • Two independent DS18B20 1-wire sensor ports
  • Automatic fish feeder port
  • 5v I2C Port for expanders and other devices
  • 2 hardware-based backup float switch ports for AC Power Bar 1, Outlet 1 and 2.
  • 12-bit PWM signals
  • Real Time Clock with CR1220 battery backup
  • Internal 12v/24v speed controllable cooling fan port
  • Efficient 5v regulator system to power Pi protected with resettable fuse
  • 12v - 24v DC input with short circuit protection and efficient reverse polarity protection
main_controller_labelled.jpg


These are the ports through the accessory plugs.
  • AC Power Bar 1 DB9 Plug - 8 GPIO I/O's + Ground + optional 5v or 12v
  • AC Power Bar 2 DB9 Plug - 8 GPIO I/O's + Ground + optional 5v or 12v
  • Sensor Extension RJ45 Plug - 6 GPIO Inputs / Outputs + Ground + 5v
  • Equipment Extension RJ45 Plug - 7 Outputs - 0-5v PWM Signals + Ground
  • Equipment Extension RJ45 Plug - 7 Outputs - 0-5v PWM Signals + Ground

CAM02835-optimized.jpg
CAM02933-optimized2.jpg



The next piece is the deluxe sensor extension. It has 6 ports, each ports has 3 plugs that can be used. There's a jumper for each port that you set to the plug type you want, it's only possible to set one plug active at any given time. I did this to keep it as plug and play as possible, it works with optical sensors, non-contact sensors, DS18B20 temperature sensors and other Arduino style water sensors. Flow meters are also possible but it's advanced as it requires some coding related setup. When you connect a DS18B20 sensor you need to add the corresponding GPIO to the /boot/config.txt file as it'll run as a separate 1-wire bus. With this extension and main controller you can run eight 1-wire buses.

The green universal screw terminal sockets have a jumper above them to set it to use a pullup or pulldown resistor so its compatible with more sensor types.

You can use this as is without the main controller, simply connect it to 6 GPIO's on the Pi along with +5v and Ground and your set. You can run as many as these as GPIO pins you have available. The RJ45 input socket has LEDs built in which light up when power is connected.

v3-Sensor-Module.jpg

CAM03001-optimized2.jpg
CAM02997-optimized.jpg
CAM03068-optimized.jpg



The 3rd piece I'm calling the equipment extension. This has six speed controllable 12v-24v DC ports good for 4 amps each, 50w @ 12v or 100w @ 24v, or 5 amps overall. Each DC port has it's own hardware-based emergency backup port which works with float switches or any other type of on/off switch. The idea of these is a method to stop power to the port no matter what the Raspberry Pi or reef-pi says. They're also good for disabling equipment when water levels raise or drop or stopping equipment easily for maintenance.

It also has an 8 channel 0-5v PWM converter, this will convert 0-5v PWM to either a 0-10v PWM, 0-5v Analog or 0-10v Analog signal, you can select 1 of the 4 signal types using the dip switches. You can access the signal from the pluggable screw terminal connectors or use the 3.5mm sockets on the side. There's 4 sockets each with 2 signals, one on tip and Ring 1 when using TRRS plug. In the picture you'll see some labeling mistakes on faceplate, I now have the fixed version. The LED's in the RJ45's light up as well when powered up. As I had more space I also added two extra TVS diodes on the DC port mosfets across the gate and drain and source. It also has the flyback diode to protect from inductive loads.

You can use this without the main controller however you can't connect it directly to the Pi, at least not the 8 auxiliary ports, these require a 0-5v PWM input so you would need to have a PCA9685 to run it. You can connect the DC port inputs directly to GPIO pins on the Pi however you'll lose the speed control and they will just be on/off.

dc_led_ports.jpg

CAM02963-optimized2.jpg
CAM03073-optimized.jpg
CAM02969-optimized.jpg
CAM02916-optimized.jpg


Here's the post going over the mounting brackets and cooling for Raspberry Pi 3 or 4.

These are very cool
 

reyokonova

Community Member
View Badges
Joined
Aug 13, 2021
Messages
35
Reaction score
120
Location
Gainesville
Rating - 0%
0   0   0
how far out are you on releasing the 3rd gen im looking to buy a system soon and looking at yours vs apex i dont mind diy stuff but i do want the moniter orp and salinity like the apex
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
how far out are you on releasing the 3rd gen im looking to buy a system soon and looking at yours vs apex i dont mind diy stuff but i do want the moniter orp and salinity like the apex
Sorry I was away for the long weekend, I am selling the 3rd gen boards seen in this thread. Monitoring ORP shouldn't be too difficult using the Atlas ORP circuit, reef-pi will read it ok but you will need to run the code Atlas provides to do calibration, here's a link to the circuit, on the right side of the page you can see the documents, there's a file explaining how the circuit works and some code they provide. The 2nd link is the board the circuit mounts on so it's necessary too. This connects to the external I2C port on the controller.



Atlas also has a circuit for conductivity, it will output conductivity, TDS, salinity and specific gravity in that order. I think these are all basically the same as one probe is all you need but reef-pi will only see the conductivity reading and discard the rest, at least that's how I understand it but I've not personally tested it. I'm still not totally convinced reef-pi won't have an issue with this circuit due to the extra data though, something tells me it could have a parsing issue as it's not expecting 4 pieces of incoming data using the pH driver so you would have to consider it a little risky. If that is a problem it would still be possible to use with reef-pi but it gets complicated as you need to run the Atlas code in the background along side reef-pi so it can read the circuit. The idea is Atlas program reads the circuits, then writes the data to 4 different text files that you can then tell reef-pi to read, this however does require you to edit the Atlas code so it can write the data to files. Here's the link to if it you wanted to investigate.

 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
how far out are you on releasing the 3rd gen im looking to buy a system soon and looking at yours vs apex i dont mind diy stuff but i do want the moniter orp and salinity like the apex
If I remember correctly, the atlas code was in Python, so if you need any help with the implementation proposed by @robsworld78 , let me know.
 

Cheesus

Active Member
View Badges
Joined
Jan 30, 2020
Messages
210
Reaction score
143
Location
Oklahoma City
Rating - 0%
0   0   0
Was not sure what thread to post in, I added a non-contact water sensor, and I am trying to set it up to alert when my Kalk container is low. Not sure what I am missing.
 
Last edited:

More than just hot air: Is there a Pufferfish in your aquarium?

  • There is currently a pufferfish in my aquarium.

    Votes: 30 17.0%
  • There is not currently a pufferfish in my aquarium, but I have kept one in the past.

    Votes: 30 17.0%
  • There has never been a pufferfish in my aquarium, but I plan to keep one in the future.

    Votes: 32 18.2%
  • I have no plans to keep a pufferfish in my aquarium.

    Votes: 76 43.2%
  • Other.

    Votes: 8 4.5%
Back
Top