a timer that goes logic high or low every 15mins (hardware version)

Status
Not open for further replies.

ericgibbs

Joined Jan 29, 2010
21,452
sorry didn't see that post its bout 2x3 box
Hi tim,
In engineering, the Units designations are critical.
Is that 2*3 cms, or 2*3 inches or 2*3 ???

I am not trying to be picky, but helpful.

For the available space that can accommodate the circuit components being suggested, we need the volume measurements.
eg: the x, y, z dimensions of the available space/volume.

E
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Hi tim,
In engineering, the Units designations are critical.
Is that 2*3 cms, or 2*3 inches or 2*3 ???

I am not trying to be picky, but helpful.

For the available space that can accommodate the circuit components being suggested, we need the volume measurements.
eg: the x, y, z dimensions of the available space/volume.

E
thats 2x3 inches as for about 2 inches width, 3 inches long, 1 inch height a ttiny85 will fit
 

ericgibbs

Joined Jan 29, 2010
21,452
modifying the code as to what i posted in post 160
Hi tim,
By Code, I assume you mean a program that will execute the sequence as per your post 160.

Have you made up your mind which devices you intend using for the project ??????

E
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
just to be clear i am going to TRY to use a ttiny85 as I said I have programmer (ebay link one that i posted) and parts on order. i am wonder if the code that was posted can be modified to add a trigger pin ( logic high) once that is triggered that would start the timer? And has this function to be on a switch? Meaning if this switch is on only work with a trigger. if switch is off then timer every 15 mins? For that matter, have another pin monitor if it's logic high, no timer would start ( trigger or standard timer) in till that pin is a logic low.

thanks
 

BobTPH

Joined Jun 5, 2013
11,544
And has this function to be on a switch?
No. What is the source of the “timer off” signal? It could be a switch. Or not. Depends on what you are trying to do.

Also, you say trigger. Does that mean that once a high signal is seen, the timer output continues forever, or can it be turned off by making trigger goes low?
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Every 15-min timer would be on a switch if switch is on then timer every 15 mins unless the monitor pin detects a high then it will "hold" off in till the monitor is low. When the above switch is set to on, the timer can still be turned on when the trigger pin detects a high on it. also, making the timer be adjustable would be good to like 1-15 mins.

If the above switch is off, then timer is off unless the trigger pin detects a high. But during the "timer counting" if monitor pin detects a high then it will "hold" off in till the monitor is low.

edit add more info
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,544
So now there are two inputs, “trigger” and “monitor”. It is still not clear when the timer is runnng and when the output pulse is enabled.

You have two inputs and two actions. You need to make a table to show what happens in each case. Hint: there are four possible input states and four possible internal states:

Input states:

trigger low, monitor low
trigger low, monitor high
trigger high, monitor low
trigger high, monitor high

Internal states:

timer off, output disabled
timer off, output enabled
timer on, output disabled
timer on, output enabled

Your text descriptions have not clarified this, for me at least.
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
So now there are two inputs, “trigger” and “monitor”. It is still not clear when the timer is runnng and when the output pulse is enabled.

You have two inputs and two actions. You need to make a table to show what happens in each case. Hint: there are four possible input states and four possible internal states:

Input states:

trigger low, monitor low
trigger low, monitor high
trigger high, monitor low
trigger high, monitor high

Internal states:

timer off, output disabled
timer off, output enabled
timer on, output disabled
timer on, output enabled

Your text descriptions have not clarified this, for me at least.

sorry I don't know how else to explain it like I said in my posts I don't know programming so never mind just a 15-min timer and that code was posted when I get my programmer in I will need help setting it up so I can program the ttiny85 if I can't then I will have to do the hardware version as plan b..lol but thanks for trying to help
:)
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
The only way I can explain it is this way:

When timer switch is on. Then, when every 15 mins is up, it sends for 1 second a logic high (3- 5 volts) to output pin. During the timer cycle the monitor pin is wait/checking for logic high if/when this is detected then it will tell the timer to pause in till the monitor pin is low (off) once low (off) then the timer cycles continues where it was left off at.

If the timer switch is off, then the timer ( timer in this case means ONLY DOES THIS ONE TIME when 15 mins is up, it sends for 1 second a logic high (3- 5 volts) to output pin it only does this cycle when its triggered) is only started when the trigger pin detects a high on it. The monitor pin is still waiting/checking for a logic a high if/when this is detected then it will tell the timer to pause in till the monitor pin is low (off) once its off (low) timer continues where it was left off at.

logic low = off
logic high = on

when not in a logic high state ( on) its in a logic low state ( off)

i hope helps with the table you are wanting? sorry hard for me to explain this
:)
 
Last edited:

panic mode

Joined Oct 10, 2011
5,005
use one pin as an enable input. read it and when input has desired state run the code that makes pulses, else reset the output.

something like:

Code:
void loop() {
  if (digitalRead(0)){            // check input switch
    // run the 15 min blink code
  }
  else {
    digitalWrite(1, LOW);          // reset an output
  } 
}
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
use one pin as an enable input. read it and when input has desired state run the code that makes pulses, else reset the output.

something like:

Code:
void loop() {
  if (digitalRead(0)){            // check input switch
    // run the 15 min blink code
  }
  else {
    digitalWrite(1, LOW);          // reset an output
  }
}
i would assume this code will need to be added to the 15-min code? also, what pin number on the ttiny85 would be the output pin,etc?
 
Status
Not open for further replies.
Top