N+(2) Aquarium Controller
#41
Posted 07 December 2012 - 06:21 PM
I used this tutorial for the power strip and everything is working very nicely. I can control 4 of the 8 plugs on the power strip currently, and another relay board would let me control the other 4 if I need to.
My only real concern is the relay shield is rated for 70W per unit, and my lights are just over 100W per plug (2 plugs / 4 lights). It's working, but I'm wondering what issues (if any) it will cause down the road.
#42
Posted 07 December 2012 - 06:22 PM
#43
Posted 08 December 2012 - 01:42 AM
If you can get your hands on a switched rack power supply for a decent price, I'd highly recommend wiring it up like this http://hydra-reef.com/wiki/Relays
- H07R0D likes this
#44
Posted 14 December 2012 - 04:01 PM
#46
Posted 06 January 2013 - 11:49 AM
I was having issues with running out of memory on my N+ (Running 4.1) very quickly, so I've had to trim/optimize some of the code and unfortunately abandon the ability to load plugins from the SD card. I've also consolidated down to 1 assembly for maximum memory optimization. Right now I have about 8-10kb free.
I've put my version based on H07R0D's code up on bitbucket (I prefer it over github)
https://bitbucket.or...wise-controller
It currently has an issue where the scheduled tasks randomly stop after about 30mins, which I think is something to do with garbage collection - but it's getting there. Fixed!
I'm using a 74HC595 and SPI to control the 8 channels on my relay. This means it only needs 4 pins to work - 3 for clock/latch/data & 1 to control the output enable functionality of the 74HC595 (this makes sure all the relays are turned off during boot up).
This also means you can add as many relays as you want just by adding another 74HC595!
Temperature is still done by DS1820's and you can theoretically add as many as you want on the OneWire bus.
pH is using serial with the Atlas Scientific stamp. One known issue here, the temperature adjustment uses the last temperature reading, which isn't necessarily the water temp. There is now a config option to put in the ROM ID of the temperature sensor.
Rough schematic - I don't have it wired up exactly this way, but I tried to make it easier to understand in a drawing
#47
Posted 01 February 2013 - 08:15 PM
Finally got the webserver up and running.
Handles POST properly, and responds to all ajax calls.
Now I can turn on/off the relays through the web front end!
Just have to figure out how to reboot the netduino on Config file Save. I want the browser to sit and wait until the netduino has rebooted, but I have no idea what needs doing on the webserver side to accomplish that.
#48
Posted 02 February 2013 - 06:25 PM
Hey, I just stumbled upon this project and saw that it is using NeonMika.Webserver.
I have to admit, I've just read the first post and not the whole thread, but it sounds pretty cool.
I am far away from being a web programmer, and I work with sockets just from time to time when I need them in my spare time projects.
So could you tell me: What do you do exactly? Upload a file to the N+2, save it. Then you want to reboot the Netduino and when it's rebootet you want the page (which is stored on the N+2) to refresh? Hmmm...
Greets, Markus
- H07R0D likes this
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#49
Posted 02 February 2013 - 11:05 PM
Finally got the webserver up and running.
Handles POST properly, and responds to all ajax calls.
Now I can turn on/off the relays through the web front end!
Just have to figure out how to reboot the netduino on Config file Save. I want the browser to sit and wait until the netduino has rebooted, but I have no idea what needs doing on the webserver side to accomplish that.
Home routers do this when you select the option to reboot them from the WebUI - they just use a javascript timer that waits 2 mins and then redirects/refreshes the page.
You could also do it with an ajax long poll
#50
Posted 03 February 2013 - 05:13 PM
Wow Impressive!!!
I'm building a Hydroponic controller similar in contruction.
I went down a difernt road, wanted it simple so you can copy it easy, and besides I have limited programing abilities.
Tried the stamp thing didnt like them, they are somwhat inacurate, and are really bear bones. I didnt like the Idea I would be tied to a computer for readings no screen either. So I went with the mini hanna controllers, they are like a little over a $100 but give you a display contolls buttons and a built in relay, a bit of a steel if you think about what you get for them.Took me like a year to get them going right, they need masive deboucing error correction ect. almost gave up untill I talked to somone using them and gave me the code that I needed that acually works. Relays I'm using optical you can get a bank of 8 for like 14$ you cant build them that cheep.Dosing pumps are the mini peristaltic not cheep, Need to think about a GUI now as it all works great. Its a lot more complicated then you would think, as you would probably know. Looking forward to see what your finished product looks like.
Thanks
#51
Posted 04 February 2013 - 01:03 PM
Hey, I just stumbled upon this project and saw that it is using NeonMika.Webserver.
I have to admit, I've just read the first post and not the whole thread, but it sounds pretty cool.
I am far away from being a web programmer, and I work with sockets just from time to time when I need them in my spare time projects.
So could you tell me: What do you do exactly? Upload a file to the N+2, save it. Then you want to reboot the Netduino and when it's rebootet you want the page (which is stored on the N+2) to refresh? Hmmm...
Greets, Markus
Wanted to say thanks for the great code, it's made my system much easier to use.
I'm POSTing the config.js file back down to the netduino after it's been modified in browser.
When the file gets saved, I want to be able to tell the Netduino to restart, thus reloading the modified config file.
#52
Posted 04 February 2013 - 01:09 PM
Home routers do this when you select the option to reboot them from the WebUI - they just use a javascript timer that waits 2 mins and then redirects/refreshes the page.
You could also do it with an ajax long poll
Currently, all my interactive calls go down to the netduino via ajax, and I've attached a couple listeners for ajaxStart and ajaxStop to pop the "Please wait" visuals.
Ideally I would love to be able to reboot the netduino and send a 200_OK once the server is back up. That way, the ajaxStop catches the restart. Not sure if I can do it that way though.
#53
Posted 04 February 2013 - 09:49 PM
#54
Posted 05 February 2013 - 10:51 AM
I would also suggest to upload the file via POST, then restart (with the Webserver, you can just write a XMLRespone which restarts the Netduino) your N+2.
On the client side, after uploading the file I would start checking the "reachability" of the netduino in a loop, ergo does a request to the netduino ip throw an exception or something like that. (sorry, don't really know javascript)
The first time no exception is thrown you know that the netduino is rebootet.
So the netduino starts rebooting...
Client starts a loop (running as long as the requests thrown an exception)
First time no exception is thrown, reload the page.
I hope it was understandable what I've written
Greets, Markus
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#56
Posted 08 February 2013 - 07:50 PM
looks great strent!
I'm curious how your relay shield works, as mine eventually has Vac running through it, so how did you get a db9 port to handle 115V? (or whatever your Vac is over there, I noticed a different plug profile).
#57
Posted 08 February 2013 - 10:06 PM
We have 220-240v vac
The relays in the sr-8 are pre-wired to the hot line. See in the third photo, the wires go in to the pcb.
The board comes hard wired for US. I had to de-solder, put crimp connectors on the wires and replace the sockets.
The db9 port is used to trigger the relays.
Pin 5 is 12v and then you ground another pin to trigger the relay. I'm using NPN transistors to control the 12v grounding for each relay.
Edit: Here's my test circuit
This circuit is using a push button to test individual relays.
Now that I need 12v, I am using a 12v DC power brick as input. I then use a 9v regulator to power the netduino via the VIN pin
If I get too much noise from the relays, I'll look at putting in 2 x quad opto-isolators
#58
Posted 11 February 2013 - 03:19 AM
I need a little help guys.
What should I try first?
I would like to start putting the controller together.
#59
Posted 11 February 2013 - 03:54 AM
http://adafruit.com/products/381 <-- would this temp sensor work on a Salt water tank?
#60
Posted 11 February 2013 - 04:35 AM
I need a little help guys.
What should I try first?
I would like to start putting the controller together.
Temperature is a good start, then pH
Also tagged with one or more of these keywords: N+2, aquarium, webserver, scheduler, plugin, json, html, POST
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
Why do I have to reboot my device to change the IP address?Started by cSharper, 31 Jul 2015 webserver, ip, netduino, change and 1 more... |
|
|||
General →
Project Showcase →
Netduino SchedulerStarted by vicero, 24 Jun 2015 scheduler |
|
|||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
N+2, I2C, write to registerStarted by JBkey, 09 Feb 2015 N+2, I2C |
|
|||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
Issues Reading Stream from HttpWebResponseStarted by Christopher Gilmore, 04 Jan 2015 HttpWebResponse, Stream and 3 more... |
|
|||
Answered
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
N+2 stability issue, stops working after some hoursStarted by MLA44, 10 Dec 2014 stability, dies, n+2 and 3 more... |
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users