Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2nd Generation Robo-Tank
#1
Hi everyone, I've been quietly working on an update the last couple months. I started adding more features but was running into trouble because the code was getting sloppy as there has been lots of changes since I started this and the Mega 2560 was basically at its limits for communicating reliably, so I decided to start over.

I started with the hardware and redesigned the controller board, the most notable is the expansion hub has been incorporated into the controller as 98% of customers get it with the controller and allows the Mega 2560 to be eliminated. The system now uses 2 Arduino Due's, one for the display and one for the controller.

Based on different feedback I also added support for 4 more dosing pumps bringing the total to 8, 4 ports for flow meters, onboard signal converters for 8 of the 16 LED channels and ch15 + ch16 of the LED's can be used to control DC cooling fans. These 2 channels have a MOSFET that can be used by changing a jumper, each channel can support 3amps. The USB connectors have been replaced with 4 pin pluggable screw terminal connectors which are really nice to work with and require no soldering. This brings the total number of ports to 68.

[Image: terminal%20connector.jpg]

The controller is 3 boards, the main board and two connector boards that have a patch cable soldered to them which plugs in the main board. All the plugs fit in one location and can't be reversed so there will be no confusion. The next batch of boards will have the patch cables nicely wrapped with heat shrink so it looks cleaner, I didn't have enough for this one.

[Image: DSCN5210-Optimized.JPG]

The kit will come with patch cables made up for connecting the power bar (relay module) to the controller. Using these its plug and play for the power bar, the only wiring you need to do is the AC side of the outlets. The patch cables use D-SUB 15pin Female connectors so a VGA cable can be used to connect the power bar to the controller. These will also have more heat shrink to clean them up. The main power bar with the 12v DC power supply would power up the controller using a power cord and the 2nd optional power bar would be powered up using the VGA cable.

[Image: DSCN5236-Optimized.JPG]

I've got the new hardware as you can see and everything checks out good, now I'm in the process of re-writing the software. The new code is Object Oriented Programming, this means it will be more flexible for adding better features and more equipment. It'll also run faster and chances of hidden bugs is greatly lowered. For those who like to customize it for themselves, it'll be easier and the code will have comments in the sketch. I'm starting with everything the controller currently has then I'll start changing and adding different options. I currently have the lighting, outlets and schedules working.

Because of all the changes, I'm sorry to say I won't be upgrading the original controller anymore. If anyone has the controller and wants the new features you will need to upgrade to the new controller board. The original display board will still work but does need a few jumpers added to the circuit board. 

In the future I plan to have an I2C add-on which can be connected internally, this would be used to add more equipment or sensors. The nice thing with the new connectors is most of them can be used for two pieces of equipment or sensors as most have a spare pin available. All the boards have spare connections which would plug into the add-on so you could use the connectors already available. 

[Image: Boards_Explained.jpg]
Reply to top
#2
Looking good :) When i get my kit tomorrow (Monday 10/17) i make new topic/thread on gallery section and upload some pics of this new kit and how i put everything in places :) And by the way those dc-fan control ports was great surprise. I planned to put my cooling fans to 12v power source and control it on and off by relays, but controlling them steppless / seamless is always better :)
Reply to top
#3
Sounds good, I like pictures. :) You can probably connect 3 or 4 fans per channel, the ground of each fan goes in the terminal for that channel and you run 12v or whatever voltage the fan is to the hot wire coming from the fan.
Reply to top
#4
Hi Rob,
Will you sell it like first one? Several kits, choice. Without screen, arduino, without soldering, etc...
On next up date, is there more than 2 meals? I prefere having 3 or 4 automatic feeding a day.
Il i have this new kit on futur, i will keep the usb plugs anyway, because, il i understand... Il i want to unplug a sensor it's more simple, without open the controller.
Last idea, and what if storm would start also by oursleeves or at random?
And as usually... Great job!!
Dom.
Reply to top
#5
Hi Dom, thanks... I will be selling the board only kit, if you want to update contact me before placing your order.
At some point I do plan to add more feedings per day, this is all software related.
The new connectors plug in like the USB connectors, you don't need to open the box. Only difference is no soldering. :)
After I get the new software finished I do want to improve the storm, being random is one of them.
I'm trying to finish assembling the first batch of boards, then its full throttle with code as I'll have nothing to distract me.
Reply to top
#6
Wow, Rob.
That looks really good. Much more sensible than the old pin header and usb port misusing design. Also distributed systems are fucking hard, glad to see you are simplifying the architecture.

Also I'm very excited that you are re doing the software. I did not want to discourage you too much that is why I never said anything.
If you believed maintaining the old iAqua source tree might be feasible, you might actually try and succeed regardless. :)
Doing it over makes much more sense. :D I'm glad you are taking this route. In my opinion the old code was fundamentally unmaintainable. I think I might be glad to throw my existing setup away for this.
Let me bring up Opensource again. But that is your decision. ;)

I'm very exited.

PS: Having the relay section on the DE-15 VGA like port is really good for non-NA users which have larger plugs which will not fit in the same case.
This way I can build my robotank in the same case as you and Dodge up some relay box with our massive schuko style sockets.
(NEMA style plugs are absolutely horrendous in almost every way, except that they are so conveniently small :D )
Reply to top
#7
Thanks Tilman, yeah simpler is better and less to go wrong.

Re-doing the software is big, this is something I've been wanting to do for a while but where to start has always been the problem. Its a big job but needed to happen. As some said "Using an Object Oriented approach is an excellent choice .. less issues with code, easier to maintain and comment, makes it easier to debug, and keep the code tight and clean" sums it up. :)

I'm putting the different classes in their own file so if someone wants to change the lights for example they go to the LED file and all the code is there which isn't much compared to before. I will be adding comments this time so its easier for others to edit.

I guess I'm confused on opensource lol... Anyone who has the controller has the code and can edit it for their personal use, why would someone else want it if they don't have the hardware to match. :) If your friend has the controller and wants your changes you can give it to him as he has the original hardware to match. ;) If I start selling 10 a day it'll be officially open source. :)

The VGA ports are nice, it also removes all the AC from the controller which is good. The only downside is I've discovered not all SVGA are the same, I tested with one that came with my monitor and it had 10 wires end to end so it was perfect. I ordered a bunch and they only have 9 wires. :( Thankfully no damage but they don't work. The idea is the controller has 12v going in and 12v goes to each outlet box through the VGA cable so the relay board can be powered. A regulator is used which is included to bring the voltage down to 5v. Can't send 5v through the cable because under a load it drops to low.

Based on what I've read the older VGA cables have more wires but some new ones work as my monitor is new and its cable worked. They don't like to make it easy.
Reply to top
#8
Full ACK on the Object oriented idea.
I mean it's still the case that some schedules behave subtly different than others for me. Probably because the code is duplicated many times over and pin handling is done also with duplicated code and in a few dozend places in the code.
I did try to find why it's different but in the end decided it's not biting me often enough to bother me. :) (Sometimes the outputs are stuck in the wrong position. Probably related to feed mode and timers firing while in that mode. Or whatever. Whenever I see it I just reboot and it's good. Once it happened while I was on holidays and my filter was stangnant for however many days. That was a bit of a worry. But I have enough plants to probably sustain the aquarium without any tech for a while.)

Connectors are hard. Always.
I guess you could have made it a little easier for you if you had just use a shift register style serial port or anything of that sort of nature. (i2c IO expander perhaps)
You could even daisychain outlet bricks then.

Also, where I'm leaning towards is to use linux and all it's nice programing languages and a rasperry pi or beagle bone.
Cheap enough. And you will never have performance issues and solid flexible networking comes included.
But I don't see myself doing anything like that myself anytime soon. My dayjob is too similar and too exhausting right now.
Reply to top
#9
Sorry to hear you've experienced some issues, I wasn't aware. For the filter do you have the outlet schedule turned off and set to "Always On" that should keep it on all the time. That's how mine are and haven't turned off. It could be the outlet you're using, you're right about the duplicated code, different scenarios might show an error that won't happen setup a different way. The code is much simpler now and with classes if one outlet works they all will as you know.
Reply to top
#10
No worries. It's fine. It almost never happens.
The Filter schedule is always on. But the feed setting is off. I guess it happens there. Funny thing is the schedule state is then also off (IIRC). And the reset button is also not doing a thing. Power cycling the display module sets the state back to always on.
Reply to top
#11
Maybe try turning the feed setting schedule to on so its not trying to turn it off. When you say "reset button" do you mean the "resume button" on the home page? If so it should reset it. The button now does 3 things, a momentary press will resume the AC outlets out of manual mode, hold it for about a two seconds and controller will double beep and the light mode gets resumed. If you press and hold it for about 5-7 seconds the controller will beep, then a pause and a double beep, then you can release it and you'll hear another beep, this does a hard reset on everything and should act the same as restarting the display. I'm going to improve that and put more checks in place so things can't contradict each other. In 2-3 months the controller will be a whole lot better once I get my new ideas/user input added :)
Reply to top
#12
Yes I meant the resume button. But that is the thing. When it is in this state, the actual schedule has changed.
According to the software the outlet state is correct. Pressing resume does nothing. When I power cycle the schedule is back to always on.

But as I said. Never mind. It's not the right thread to discuss this anyway. :)
Maybe I find the time to analyse the problem a little more some day....

But I think the real solution is to not toggle the actual outlet in the schedule and feed mode (and heater mode) but effectively only set a layered soft state variable.
Reply to top
#13
The new software will definitely be better with more checks in place. In a couple months when I catch up I'll probably do a last update on the old software to solve that problem.
Reply to top
#14
Just thought I would update what's going on. I've been working hard on the new version and thanks to everyone for all the support. The new software is coming along nicely, currently the AC outlets, lights, dosing pumps, schedules, temperatures and now control for 4 heaters is working. I was able to add custom labels for the 8 dosing pumps, up to 13 characters long and it actually looks good. :)  To everyone who already has the new controller the software won't be much longer. 

More good news, I located someone who can print cases and I have to say better than expected. This means I'll be offering fully assembled, ready to plug in kits which would make a great Christmas gift. K05163   For those who don't use the outlets we have you can build the power bar and have the display and controller come assembled.

Here's a bunch of pictures of the controller and power bar. I'll post some pictures of the display case when I get one, this picture has the project box I cut up. And yes my tank isn't looking so hot lately, last few months algae started growing for no reason.

[Image: cases01.JPG]

Controller I will be printing labels for the ports
[Image: cases02.JPG]

[Image: cases03.JPG]

You can see I messed up on the side, I was able to cut the slot wider and glue in the piece where it should have been. :) Cases shipped wouldn't be like this.
[Image: cases04.JPG]

[Image: cases05.JPG]

[Image: cases06.JPG]

The wiring inside won't look as messy as there will be heat shrink covering the wires.
[Image: cases07.JPG]

The lid was printed in 2 pieces before the printer was updated, it will be one piece.
[Image: cases08.JPG]

Power Bar As you can see the case was printed in 2 pieces and glued together which actually worked well. The person printing the cases has since updated the printer to a larger size so it can now be printed in one piece, so imagine no seam in the middle. :)
[Image: cases09.JPG]

[Image: cases10.JPG]

[Image: cases11.JPG]

[Image: cases12.JPG]

[Image: cases13.JPG]

[Image: cases14.JPG]

Close Ups Showing Detail
[Image: cases15.JPG]

[Image: cases16.JPG]

[Image: cases17.JPG]

[Image: cases18.JPG]

He's upset cause I kept pushing him out of the way. :)
[Image: cases19.JPG]
Reply to top
#15
wow looks great love the cat
Reply to top
#16
Thanks, the cat felt left out so I had to take his picture to. :)
Reply to top
#17
[Image: Ports_Explained.jpg]
Reply to top
#18
Will this version be able to connect over WIFI ?
Reply to top
#19
(11-04-2016, 11:46 PM)Yov_ Wrote: Will this version be able to connect over WIFI ?

Hi Yov, no it has to be plugged into your router. One day I might have an addon but I think you can use a Wireless bridge to connect via WIFI.
Reply to top
#20
(11-05-2016, 12:57 AM)Rob F Wrote:
(11-04-2016, 11:46 PM)Yov_ Wrote: Will this version be able to connect over WIFI ?

Hi Yov, no it has to be plugged into your router. One day I might have an addon but I think you can use a Wireless bridge to connect via WIFI.

I use cheap (less than 10€) wireless bridge /wlan bridge, it is quite small so i put it to inside my controller box. I use small rj45 cable between controller and wlan bridge, and also take +12v from controller :) And now i have wlan connection to my controller. (you have to setup bridge before connect it to controller, like setup wlan ap / passwords etc)
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Robo-Tank 3rd Generation Hardware Rob F 42 35,664 06-24-2018, 07:14 PM
Last Post: Rob F

Forum Jump:

Current time: 04-28-2024, 08:24 AM