Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Robo-Tank v5.0 is Ready
Nothing else, just need to upload the change and it'll take effect.
Reply to top
I just got home. Im going to change the ATO code now but I just realized that one of my t5 lights isn't on. The symbol for the display connection is red. I restarted just the display by clicking and holding the the upper left and it wouldn't boot up so I unplugged and replugged the display cord. It still wouldn't boot so I unplugged and replugged the controller power. The display then booted and the T5 turned on. I went under log and one of my two t5s came on at noon the other doesn't show turning on at noon even though both are set to turn on at noon and off at 6pm.
Reply to top
Hmm, that's another new one, haven't seen/heard that either. What happened at 6pm? I have 4 outlets set to turn on at noon, they all did, and at 6pm I had a light schedule start which happened and all 4 outlets turned off. I don't know what to think, what do you all have connected to the controller?
Reply to top
Unfortunately the relays didn't turn off again. I got resume and they shut off.

I just happened to think. The three relays that aren't turning off at 6 are all on relay bar 2. Is there something in the code that could be off that it isn't turning them off with the schedule but it will when I got resume?
Reply to top
There's only one piece of code that is used everywhere to turn outlets on/off, so if it works with resume it'll work with anything else. Also I setup my outlets to match yours and everything on power bar 2 turned off at 6pm. I just put together a sketch to copy all your settings into a sketch so I can upload to mine and monitor. Upload this to your display then open the Arduino IDE serial monitor, and at the bottom of monitor uncheck the "autoscroll" option. This takes about a minute to run, you'll know it's finished because it's not printing to the serial monitor anymore.

When finished copy everything into a text file or Arduino sketch and save as display, then do the same to the controller.

When you finish you can upload v5.04 again, none of your settings will change so after uploading 5.04 you're back to where you started.


Just to clarify, the outlets remain on and the display also says outlets are on?


Attached Files
.zip   Backup_V5.zip (Size: 10.98 KB / Downloads: 34)
Reply to top
Hello Rob
Did you compile the displayscetch for the sainsmart display to solve my problem?
Reply to top
Ah sorry Roland, I forgot about that. My monitor is already to full of screens but I will put something together in a couple hours and send it to your email.
Reply to top
Please see attached for the sketches.  Yes, when it is still on, the display is saying its still on.


Attached Files
.zip   INOs4ROB.zip (Size: 40.53 KB / Downloads: 3)
Reply to top
My board is Gen 3, rev b., Software 5.01
Issue: ATO

Posting this here, for other awareness.  

I double checked my ATO last night and have the same issue I have been discussing with Rob.  I will post a follow-up once I update my software.   I plan to completely wipe my SD cards before I load 5.04.  The link below was very similar to what I am experiencing.  However, I do have the pull-down resistors on my board, and I measure 5.8K across the ATO resistor on board.

Something New:  When I push Sync on the display there is no response.  Even after I reboot the controller and display.  Not sure it matters, but I found this odd.

Refresher on my Situation
- The ATO pump will run any time the Backup is Closed(5V signal).  Regardless of the Main Float position and the ATO timer has no impact.  I have ATO timeout  set to 10 seconds.
- The controller always shows ATO Open Float on the display.
- The Pump will turn on anytime a Backup 5V signal is received, and only shuts off when Bkup is open circuit.  
- The ATO GUI for the timer, working mode, test mode, and schedule interval has no impact on running the pump
- Both Main(port 6) and Backup(port 7) floats are functioning correctly and toggle open and closed
- The Main Float, I can measure 0V and ~5V all the way to Pin A6 on the controller board
- There are no burnt marks on the control board.


https://www.robo-tank.ca/forum/Thread-AT...=ATO+water
Reply to top
(02-28-2019, 04:24 AM)aquaalgae Wrote: Please see attached for the sketches.  Yes, when it is still on, the display is saying its still on.

Thanks I'll go over and load them up.

(02-28-2019, 10:32 AM)Mike F Wrote: My board is Gen 3, rev b., Software 5.01
Issue: ATO

Posting this here, for other awareness.  

I double checked my ATO last night and have the same issue I have been discussing with Rob.  I will post a follow-up once I update my software.   I plan to completely wipe my SD cards before I load 5.04.  The link below was very similar to what I am experiencing.  However, I do have the pull-down resistors on my board, and I measure 5.8K across the ATO resistor on board.

Something New:  When I push Sync on the display there is no response.  Even after I reboot the controller and display.  Not sure it matters, but I found this odd.

Refresher on my Situation
- The ATO pump will run any time the Backup is Closed(5V signal).  Regardless of the Main Float position and the ATO timer has no impact.  I have ATO timeout  set to 10 seconds.
- The controller always shows ATO Open Float on the display.
- The Pump will turn on anytime a Backup 5V signal is received, and only shuts off when Bkup is open circuit.  
- The ATO GUI for the timer, working mode, test mode, and schedule interval has no impact on running the pump
- Both Main(port 6) and Backup(port 7) floats are functioning correctly and toggle open and closed
- The Main Float, I can measure 0V and ~5V all the way to Pin A6 on the controller board
- There are no burnt marks on the control board.


https://www.robo-tank.ca/forum/Thread-AT...=ATO+water

Hi Mike, the sync hasn't been added that's why it doesn't respond. 

Last night I noticed on my display, I have the ATO sensor showing up on my right side of home page, that the float was changing from opened to closed on its own which I never noticed before. I looked on the board I'm using for playing and it didn't have a pull down resistor so I thought hmm it was working so I printed the true analog value to the serial monitor and instead of 0 which is 0.0v I was getting 1 which is 0.0048 volts. Now on this case it's likely happening because no pull down resistor, surprised it actually goes so low.

Now back in 5.01 in the code I had it so if analog value == 0 stop ato. That means if that analog value doesn't go down to 0 the pump won't stop, sound familiar. 

The funny thing is when I change the ATO code in last update I thought instead of have if == 0 I will put if <= 2 just in case some scenario and then last night that's exactly what happened to me. 

Now because you do have a pull down resistor it should definitely be a 0 but maybe not, so try the following when you update to 5.04. 

Before uploading display sketch go to the ato.h tab, you will have to use the drop down menu at the end of the tabs as there's too many to view. Then go to line 156 and you'll see the following.


Code:
//    Serial.print(F("_sensorValue:        ")); for (int t = 0; t < 21; t++){Serial.print(_sensorValue[t]); Serial.print(F(","));} Serial.println(F(""));
 
Remove the // from the beginning and upload the sketch. Then open the serial monitor and every second you'll see a line of values for the ATO's, the first number is ato 1. It should be 1023 or close to when closed and 0 when open. 

With all that said it still makes no sense why the pump doesn't stop with the ATO timeout, is the icon turning red?
Reply to top
(02-28-2019, 10:32 AM)Mike F Wrote: - The Main Float, I can measure 0V and ~5V all the way to Pin A6 on the controller board

Forgot about this one, I think probably a typo but main ATO is on A5 but what caught my eye is you say you get 5v directly at Arduino, it should only be 3.3v, there's a voltage divider that drops the 5v from float to 3.3v for Due.
Reply to top
(02-28-2019, 04:24 AM)aquaalgae Wrote: Please see attached for the sketches.  Yes, when it is still on, the display is saying its still on.

Well I loaded up your settings on my test controller and after it started up everything was in the correct state. At noon all the 5 outlets came on and I just watched the clock tick past 6:00pm, and can you believe only outlet 5 bar 1 turned off. That makes me happy, now I can dig in and see what's causing that.
Reply to top
Ah! You got the same thing!
I was worried you wouldn't so I reinstalled Arduino on my computer and redid the controller from scratch this evening. I will hold off on trying anything else until you figure it out.
Reply to top
I was also a little worried what would happen and if they turn off what do I say next. Hopefully this won't take long but it's not going to be as easy as I would like. Right after that I changed the clock back to 5:59 so I could repeat but this time they all shut off. I then set on for all to 5:59 and off at 6:00 and it did what it should so I'm going to have to let time take its coarse to know if its really fixed. Would it be correct to say you can expect this behavior every day or does it work the odd time?
Reply to top
If I remember correctly, it has happened every day.
Reply to top
That sounds right, I think I know what is going on, hoping to have an update tomorrow.
Reply to top
(03-01-2019, 07:38 PM)aquaalgae Wrote: If I remember correctly, it has happened every day.

Ok so I sent you some updated sketches for display and controller. If you aren't running the exact settings you sent me can you first upload the backup sketches you sent me, I prefer that just so we know it's fixed, I'm going upload yours again to run as well. Let it run for a few days or until your comfortable its fixed then you can remove all those other test schedules you setup. 

Just so you and others understand I will explain. There's a section of code that creates a list and translates all the schedules into unix time format and sorts them so the next is first in line. It then marks the next time stamp and the ID for that schedule. Then when the schedule actually runs it will look for that ID it marked in the list of schedules (should be first) and once found triggers the schedule actions. At the end of this is checks if the next schedule in line has the same time stamp, as in multiple schedules set for the same time, if the next schedule in list is a match it runs as well, this continues until the schedule time stamp is different and then it looks at all the schedules again and gets the next time stamp and ID.

Now I believe the problem was at some point the schedules were being auto sorted as that can happen via 2 other functions that can run depending on other settings or actions. That means the schedules weren't in the expected order on the list so the next time stamp didn't match and why the first schedule, outlet 5, only and always turned off, it was found using the marked ID.

I can't say 100% that will fix the issue because I didn't actually track down when the auto sorted was happening but it definitely could happen so either way this was a bug and 95% confident the cause of your issue. 

That's why I haven't posted an updated yet for download as I want to run for a couple days myself to make sure its fixed.

I also happened to notice there was a problem when you viewed the outlet schedules. You have them sorted by ID descending and you probably saw on page 1 ID 8 and 7 are the last two schedules but when you went to page 2 you see ID 8 and 7 at the top. Because of that the touch didn't line up and was off by 2 rows. That's been fixed so you can now sort away. Just to clarify the sorting on display has no effect on the controller list.

Aquaalgae I also want to thank-you for your patience, I should have asked for your settings a week ago.


If you upload your backups first there's no way to know when it finishes so let it run for 7 minutes before uploading v5.05.
Reply to top
I did redo everything so I used the files I sent you to go back to what I had before. It did show the writing and verifying but I left it for 7 minutes anyway. I'll let you know how things go. Thank you!

Also, I don't know if this has anything to do with anything, but I've noticed that on the controller sketch (but not the display sketch), this shows up at the bottom just prior to it writing to the arduino:


In file included from Controller.ino:80:0:
C:\Users\DaveElise\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.5\libraries\Wire/Wire.h: In member function 'void probes::readCircuit(byte, int)':
C:\Users\DaveElise\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.5\libraries\Wire/Wire.h:51:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int, int)
uint8_t requestFrom(int, int, int);
^
C:\Users\DaveElise\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.5\libraries\Wire/Wire.h:48:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)
uint8_t requestFrom(uint8_t, uint8_t, uint8_t);
^
Reply to top
That message is normal, it comes from the wire library. Glad you waited 7 minutes for each sketch to run. After verifying the sketch starts to run on the Due and takes about 5 minutes to update all the eeprom locations, that's why you have to wait.

I wasn't around at 6 to see all the outlets turn off but they are off so feeling good about it, I assume yours turned off as well?
Reply to top
Yeah, I wasn't around either, but they were off. I'll pay more attention to it today to verify.
Reply to top


Possibly Related Threads...
Thread Author Replies Views Last Post
  Robo-Tank v5.13 is Ready Rob F 61 1,424 Yesterday, 12:30 AM
Last Post: Rob F
  Robo-Tank v5.12 is Ready Rob F 34 899 04-30-2019, 12:35 PM
Last Post: fietsenrex
  Robo-Tank v5.10 is Ready Rob F 157 3,166 04-18-2019, 10:43 PM
Last Post: Rob F
  Robo-Tank Isolated PH Circuit Rob F 49 2,304 04-12-2019, 05:47 PM
Last Post: Rob F

Forum Jump:

Current time: 06-20-2019, 11:43 AM