Logged in users > User Diaries

UNO resetable timer pgm

(1/3) > >>

Bruce S:
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) }  }  }

Bruce S:
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.
 

Bruce S:
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
 

OperaHouse:
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:
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

Navigation

[0] Message Index

[#] Next page

Go to full version