Page 1 of 1
Daily Controller Restart
Posted: Mon Oct 24, 2011 7:30 pm
by Rey
Hello everyone! I was wondering if there is a way to write a code to schedule a daily restart for the controller itself? I have this issue with my controller that I have to power down and power up every morning, because of wireless not working, wavemaker is stopped, or lights are on when they are supposed to be off.
Re: Daily Controller Restart
Posted: Mon Oct 24, 2011 7:55 pm
by rimai
Which board do you have selected under Tools->Boards?
Re: Daily Controller Restart
Posted: Mon Oct 24, 2011 8:16 pm
by Rey
It is "Reef Angel Controller"
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 4:11 am
by binder
I believe that board uses the standard bootloader. You would have to update your bootloader to enable the watchdog functionality (or get a replacement board/head unit). Then you could force a reset quite easily. I'm sure Roberto has suggestions or ideas for you.
curt
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 8:05 am
by rimai
Sorry, my internet was so bad yesteday that I gave up trying to connect to anything.
Yes, you need to upgrade the bootloader like Curt said.
http://forum.reefangel.com/viewtopic.php?f=2&t=113
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 8:46 am
by Rey
Here is another event for this morning. My wavemaker is shutdown, my lights are on. The readings on Client Suite is below. After resetting the controller, all readings are normal. I will try the recommendation and see what happens.

Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 9:07 am
by Rey
Which ISP am I suppose to use? I have;
AVR ISP
AVRIPS mkII
USBtinyISP
Parallel Programmer
Arduino as ISP
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 9:09 am
by rimai
The problem you are experiencing is due to the wavemaker pumps generating noise when they are turned on/off constantly.
Your relay box is one of the very early models that didn't have dampening components to minimize these spikes.
If you make them on instead of on/off in a cycle, it should take care of the causing issue. Otherwise, you can upgrade the bootloader and the controller will just fix itself should any problem happen.
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 9:10 am
by rimai
Rey wrote:Which ISP am I suppose to use? I have;
AVR ISP
AVRIPS mkII
USBtinyISP
Parallel Programmer
Arduino as ISP
Which one do you have?
These are external programmers that you need to buy from an online electronics store or build the parallel programmer yourself.
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 9:14 am
by Rey
I have niether. Which one is highly recommended?
Roberto wrote:Which one do you have?
These are external programmers that you need to buy from an online electronics store or build the parallel programmer yourself.
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 9:22 am
by rimai
I've only used USBTinyISP from adafruit.com and it's always worked great for me.
Re: Daily Controller Restart
Posted: Tue Oct 25, 2011 1:58 pm
by binder
rimai wrote:I've only used USBTinyISP from adafruit.com and it's always worked great for me.
I've got that one too. You have to solder it together though to get it to work. So if you are handy with a soldering iron, that would be fine for you.
I've also got the pocket avr from sparkfun and that works great for me too. It's only windows though.
curt