Author Topic: UNO resetable timer pgm  (Read 5208 times)

0 Members and 1 Guest are viewing this topic.

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
UNO resetable timer pgm
« on: September 12, 2016, 01:54:48 PM »
Following Operahoue , DamonHD and many many others far more knowledgeable than I , AND  For those interested in these sort of things.
I've decided to stay with the UNO while I get my feet wet.


This first post does ramble on,,, BUT it's also a place keeper for my thoughts.

Below is my starting program , some thoughts on what and why and hopefuls.
I know it's crude, but it does seem to work, it's hard to watch a LED on for two hours then off a hour, but I didn't see any errors when I ran the code.

I will begin testing the code further by testing the timer intervals. I need a millisecond conversion that get to 2 hours, waits 1 hour runs the fan(s) 2 hours waits again 1 hour then runs the fan(s) 2 hours then waits 16 hours , then repeats. IF I it takes too long OR the code gets too deep, I can merely let the timers run the fans for 2 hours , certainly won't hurt the plants :-).

The peppers do not need bees to pollinate, they are open pollinated and the fans do this perfectly, along with keeping humidity levels in check.

I've also read that it is very possible to have more than one timer and relay stuff going on at the same time I.E. the Lights on for 8 hours then off 16 , and the Fan(s) running at the intervals I wrote about above.
So,,, I'll be working with getting that to work too,,, hopefully.
Fan(s) will be FET controlled with power being supplied by the smallish NiCAD battery pack I've selected for this project.
Knowing that 12Vdc fans can run nicely on 9Vdc, I'll be making use of that or a cute little circuit program that allows me to control the rate of fan speed too.

int led = 13;
unsigned long timer; // the timer
unsigned long INTERVAL = 1000; // the repeat interval 120000 (120mins (2hours))

void setup() {
  pinMode(led, OUTPUT); // initialize LED output
  timer = millis(); // start timer }

void loop() {
  if ((millis()-timer) > INTERVAL) {
    // timed out
    timer += INTERVAL;// reset timer by moving it along to the next interval of 60000
    //    toggle led
    if (digitalRead(led)) { digitalWrite(led, LOW); // turn the LED off by making the voltage LOW }
else {
      digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) }  }  }
A kind word often goes unsaid BUT never goes unheard

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #1 on: September 13, 2016, 12:43:52 PM »
Pictures tell a ton to the viewer.
To that end , I'm including pictures of my stuff, including the plants that I hope survive the coming St Louis, MO winter weather. 
This is our love child. It is a hybridized pepper that looks meaner than it has turned out to be.
 
A kind word often goes unsaid BUT never goes unheard

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #2 on: September 17, 2016, 05:07:59 PM »
short quick update before we head over to the Science Center where they're having a (FREE) exhibit of farm to table , which happens to have an auqaponics setup as well. Fish and ALL.


These fans were selected for my Hydro_P area , each is 12Vdc 0.49A tied in parallel.
As it is there might be too much breeze . BUT better to much than too little and have mold or mildew worries.
More on setup later.
Cheers
Bruce S
 
A kind word often goes unsaid BUT never goes unheard

OperaHouse

  • Hero Member
  • *****
  • Posts: 1308
  • Country: us
Re: UNO resetable timer pgm
« Reply #3 on: September 19, 2016, 01:45:26 PM »
I think fans are like speakers, you need a baffle around them otherwise they circulate back to themselves.  My chest fridge has a fan in it since getting a new chest freezer.  The older one had the cooling coils around the top ridge.  The new one they are much lower.  Without the fan everything freezes.  My house system turns on in the morning and that is an interesting time software wise.  I was wondering why the system wasn't turning on sooner and found the control panel was drawing 170ma.  I went looking around for leaking caps and discovered the fridge fan was running off the 9V regulator, that drew 120ma.  I want to get a bunch of fans to bring fresh air into the house.  These could run when the voltage on the battery indicates a full charge.  Nice NANO project.  The 36V string heats the water when there is excess.  The 12V random mismatched panels don't do much when there is excess.  I thought about a boost converter to make more hot water, but so far both tanks are going into high temp limits.  Fans are a good use of excess power that more people should use either in living space or roof areas. 

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #4 on: September 19, 2016, 04:06:31 PM »
OperaHouse;
I've not had problems with needing baffles , I used to worry about the air circulating around on itself.
I'll get pictures of the setup, once I'm at that point.
These fans are great! I "rescue "  them from being trashed with the out going computers. The Dell Optiplex G600 and G700 series are gold mines for them (2 in each computer, along with some huge heat sinks that are the fin over copper types.

This is my smallest fans setup. I removed our 120Vac whole house fan and replaced it with a 12Vdc 0.49A fans setup in a 4x3 arrangement. This is 1/2 the noise and seems to pull just as much air according to the attic venting system. Probably NOT. I have another HF panel that isn't up to snuff. It sits and charges a "free" NiCd bank that is the go between the panel and fans.

I had at one time thought about removing the battery bank and using a bank of 50V Caps. The panel will never have enough output to start this fan bank .
I am working on the second fan bank; I'll put a pic of it up here too.
This of course could segway into yet another Arduino project  :o ! SURE am glad I found those clones on Aliexpress for 2.40USD!! /ea
One you've already posted a working program for (ontfarmer's heater pgm)  ;D
A kind word often goes unsaid BUT never goes unheard

Mary B

  • Administrator
  • SuperHero Member
  • *****
  • Posts: 3169
Re: UNO resetable timer pgm
« Reply #5 on: September 19, 2016, 07:47:10 PM »
Those heatsinks are great for cooling large LED chips. I am using them on 7 watt ones.

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #6 on: September 20, 2016, 08:46:14 AM »
Mary B;
You are very correct! They have tons of uses. I've not built a big 7 watt unit yet. I'm still messing around with the Peltier deices.
I do have 1 lone 3 watt unit from Rich H that I might try one on tho.

Question? how warm does your get when you throttle them down to 2/3rds output ?

Cheers
Bruce S
A kind word often goes unsaid BUT never goes unheard

OperaHouse

  • Hero Member
  • *****
  • Posts: 1308
  • Country: us
Re: UNO resetable timer pgm
« Reply #7 on: September 20, 2016, 10:27:01 AM »
"The panel will never have enough output to start this fan bank ."

With a good capacitor bank the ontfarmer program will operate as a linear current booster for motors.  These converters are used for batteryless pumping stations.  It trades voltage at the panel for higher current the motor needs.

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #8 on: September 20, 2016, 11:01:45 AM »
That's something I would certainly be interested looking at.
Large Caps I think I still have and it's still pretty easy to grab 50V units and stack them.

As it stands, I can get banks of 7.4Vdc 8Ahr NiCDs for free and two of these will run a cute little 12V 100watt inverter for a "short" period of time and fully charged will run the 4 fans flat out for 6 hours before they begin so signs of slowing.


Thanks for the idea.
Bruce S
A kind word often goes unsaid BUT never goes unheard

Mary B

  • Administrator
  • SuperHero Member
  • *****
  • Posts: 3169
Re: UNO resetable timer pgm
« Reply #9 on: September 20, 2016, 08:58:02 PM »
Running the LED at 2/3 rated current dropped heat output a lot. With only a just noticeable dimming of output. But they do run HOT! I use a fan on the heatsink to move air.

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #10 on: September 21, 2016, 09:09:18 AM »
Mary B
Thanks for the update.
 I have been testing the peltiers with those big heat sinks and fans in a push pull setup by having fans I grabbed off a server that had gotten water damaged. They are the little 1 inch sq types. REAL fast but REAL noisy. They do help, but way too noisy for my liking.
I know the Pletiers can be a loosing battle but, they're are a nice distraction from "work". AND since the unit is for cooling beer , nothing gets lost  ::) or spoiled if it gets too warm.

Cheers
Bruce S
A kind word often goes unsaid BUT never goes unheard

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5370
  • Country: us
  • USA
Re: UNO resetable timer pgm
« Reply #11 on: September 21, 2016, 03:17:11 PM »
Here is a picture of the server fans I refer to.

I currently have 16 of these loud fans.  They certainly push some air around but WOW are they noisy.
My "other" project/idea is to snag Otzules' code for his Inverter cooling fans and see if I can use it to slow the fans down based on temp.
My other route is to merely write my own, as it's good "practice"

Cheers
Bruce S
A kind word often goes unsaid BUT never goes unheard

Mary B

  • Administrator
  • SuperHero Member
  • *****
  • Posts: 3169
Re: UNO resetable timer pgm
« Reply #12 on: September 21, 2016, 07:07:44 PM »
cut the fan voltage by 1/4 and the noise level will drop. Going by heatsink temp is a good plan too. There are computer case fan controllers that adjust fan speed based on temp too.