Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extra safety for dosing pumps...
#1
With the possibility for dosing more times a day and even at night the thought of something going wrong with the dosing pumps scared me a little.
Of course a hardware failure couls occur but I was thinking:
is it possible to monitor the dosing pump output and intervene when dosing "hangs"...

Reply to top
#2
Hi Arne, yes I hear you. One thing you might try is running a pump manually and while its running power down the controller completely, then power it up again and the pump shouldn't be running. With that said, the last update I added a watchdog timer, this monitors the Arduino main loop. The Arduino runs in a constant loop over and over and everytime the loop runs (takes a couple milliseconds) it resets the watchdog timer. If the timer doesn't get reset within 15 seconds the Arduino restarts. So if something was to hang the controller the maximum time the dosing pump would run is 15 seconds.

I do have plans to add logs for all the equipment, for the dosing pumps I'll probably have it show the time the pump ran and how long it ran for.

If you can think of something else that might help I can think about adding it.
Reply to top
#3
I have to go out for an 1 1/2 hour now Rob, I will get back to you when I'm home again...

Reply to top
#4
Hi Rob,

It is great you already implemented the watchdog... ;-)
What I mean, and you see this also in medical dosing, that no matter what, the dosing pump cannot run longer then XXX seconds.
I'm not a programmer but when I think about this, I think of an extra monitor on the dosing pump output, completely separated from the scheduler/timer or whatever...

Reply to top
#5
I'll think about it more and see if I can add a backup, this is how its setup and has changed over time. Obviously the Arduino on the controller turns the dosing pumps on/off, in the main loop that runs over and over, its always going through code to shut down the dosing pumps. When a pump starts up a flag is set so the controller knows its running and the timer to turn it off begins. The code to turn off the code sees the flag was set and shuts down the pump when the timer expires. So basically the controller is always trying to turn them off and if it happens to lock up while a pump is running the Arduino should restart stopping the pumps.
Reply to top
#6
Okay Rob, that already sound great to me.
You're the expert so I leave it up to you to decide whether it would bring something or not... ;-)

Reply to top
#7
I am confident the pumps won't keep running especially with the watchdog. Only reason it wouldn't stop is if controller locked up but watchdog should solve that. I'm always thinking of ways to improve the code, if I think of something I'll definitely make changes.
Reply to top
#8
Good to hear that Rob, thanks !

Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dosing Schedule Arne 36 31,180 01-21-2017, 01:42 AM
Last Post: Rob F
  More dosing pumps Arne 5 5,469 08-19-2016, 09:28 PM
Last Post: Rob F

Forum Jump:

Current time: 03-29-2024, 04:24 AM