Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

Who's good with 555 Timers?

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Basically, I need a timer circuit to go with my Ozone generator that fires it for 5 seconds in every 60..

Ideas?
 
Last edited:





Not to sure but I guess -

one Astable running at 60 seconds output high , 5 seconds low driving a monostable 555 timer that goes high for 5 seconds
 
Last edited:
You can do it with just the 555 timer, but they don't perform well at low frequencies because of leakage currents. I would test it out and see if it works this way, I don't know how significantly the timing is effected by leakage currents at that frequency.

If you need it to be exact the way I would do it is with a high frequency 555 timer, and a cascaded ripple counters with an AND gate to get the right duty cycle.

That or use a small microcontroller.
 
Example circuits? or a link to a suitable ebay item :D
 
It really depends on your required timing accuracy.

If you don't need accurate timing at all (as I suspect you don't) you can get by with this pretty inexpensively and easily. However, like ARG points out the leakage currents become a problem. Last I tested 555's myself I couldn't get stable timing on anything slower than about 10seconds. This is because 555's work based on an RC time constant and you need large values of R or C (or both) to get long periods. Having such long periods means low discharge currents, you literally run into the noise floor since your currents are so low.

Honestly the easiest and cheapest method is probably just throwing a microcontroller at it. Any flavor of arduino/attiny could pull it off rather well.

(p.s. if you really want to make it interesting you can devote an arduino and an ozone sensor at it and have it maintain a certain level of ozone or simply run until that level of ozone is reached. MQ131 I2C sensor + arduino UNO.)
 
Is there any reason it has to be 5s on 55s off? Why not 1s on 11s off for example?
 
Honestly the easiest and cheapest method is probably just throwing a microcontroller at it.

Was my thought too. Microcontrollers have their own oscillators too saving parts. Plus a ton of other stuff. I've got over 15K lines of code in one project using one microcontroller. And they're only a few bucks. Personally, I use Microchip PICs for no other reason than that's what I ran across ~15 years ago. Probably wouldn't be more than a couple dozen lines of code.

EDIT: However, if you want to use a 555 with the originally stated requirements, I can send you a schematic.
 
Last edited:
Yeah, grab a cheapo knock off Arduino and write a simple loop.

It may be a few dollars more, but it's going to save a lot of time in assembling a circuit with timers.
 
Thanks for the suggestions.

@ Sig & ARG , I have NO experience with micro's , none. I wouldn't even know where to begin. Also, there is going to be a lot of static inside the enclosure, something a micro might strongly disagree with I suspect.

@Cyp , I chose that cycle to give the ozone time to dissipate.

Ped
 
This site provides a schematic and calculates values for the components. I plugged in firing every 60 seconds and it includes in its calculations a duty cycle of 91.7% (=11/12). The output may be inverted from what you want which can be fixed a number of ways based on your design, e.g. by adding an inverter to the output for positive logic - HIGH causes ozone production, using a negative edge to trigger the production of ozone, or using negative logic where a LOW causes ozone production.
 
If you can id say go down the Arduino rout , I used one for time laps , 10 minuets off 1 second on to trigger camera .

using the on-board 16Mhz crystal gave it pretty good accuracy .

For you to get it working , you need something like a Arduino pro mini 5V and 5V FTDI ( USB to serial ) and Arduino software ( free download )
or even better a Arduino mini ( has onbard USB so no need for extra FTDI )

Your code would be very simple ,
 
Last edited:
Last edited:
That relay is good for 100k operations. If you run it at 11S:1S you have two operations every 12sec, 10 operations per minute; expected lifetime is 10k minutes... that's just shy of one week.

Here's the datasheet. http://datasheet.octopart.com/LEG-12F-Rayex-datasheet-36985587.pdf

In reality it will likely continue to work longer just with more and more contact wear. It's cheap and easy but the cost is in lifetime.

I'm sure any of us can write up the program and draw up a wiring diagram for you if you decide to give the Arduino method a go. As far as actually putting it together it is as simple as plugging the arduino (I say UNO because it's the easiest to use for beginners and one of the cheapest at $10) to your PC, starting the arduino software, copying and pasting the code we send you into the window, and hitting upload. (in reality you need to go into settings and tell the software you're using an UNO, and what com port it is plugged into too). Unplug the arduino, plug some wires into the pins we tell you to use, connect those wires to the G and S pins of the chosen moset. Connect your DC neg wire from your ozone box to the mosfet's D pin. Connect mosfet S pin to your power supply negative, connect the power supply positive to your ozone box's pos wire and call it a day. You can power the arduino from any 5v or 7-15V dc power supply.
 
Hey if anyone wants to whip up the code, I'm more than happy to buy an Arduino.
 
I just modified the example code for a blinking an LED to 5 seconds on, 55 off.

Code:
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://www.arduino.cc

  This example code is in the public domain.

  modified 8 May 2014
  by Scott Fitzgerald
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(5000);              // wait for 5 seconds
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(55000);              // wait for 55 seconds
}
 
Here's a different version. This one doesn't use the delay() command which essentially locks up the entire arduino while it is waiting for the time to elapse. Instead this keeps track of the milliseconds which have passed, and automatically corrects for overflow errors which would result when continuously powered for almost two months. Timing accuracy is improved over using delay(), and it includes a once-per-second blink of the built in LED to let you know the unit is still operating correctly which could be useful in electrically noisy environments.

Code:
/* Ped's Ozone Timer
 *  Written by Matt "Sigurthr" Giordano
 *  2016/1/23
 *  www.SigurthrEnterprises@blogspot.com
 *  SigurthrEnterprises@gmail.com
 *  This code only works when timeperiod > Ontime.
*/
unsigned long blinkerMillis = 0;
unsigned long currentMillis = 0;
unsigned long previousMillis = 0;
unsigned long highMillis = 0;
int ontime;
int timeperiod;
unsigned long onmillis;
unsigned long offmillis;

void setup() {
  pinMode(3, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(3, LOW);
  digitalWrite(13, LOW);
  ontime = 5;           // time in seconds to be ON
  timeperiod = 60;         // time in seconds to be ON + OFF
  onmillis = 1000 * ontime;
  offmillis = 1000 * timeperiod;
}

void loop() {
  currentMillis = millis();
  if (currentMillis >= blinkerMillis + 1000){
    blinkerMillis = currentMillis;
    digitalWrite(13, HIGH); 
  }
  if (currentMillis >= previousMillis + offmillis) {
    previousMillis = currentMillis;
    highMillis = currentMillis;
    digitalWrite(3, HIGH);
  }
  if (currentMillis >= highMillis + onmillis){
    digitalWrite(3, LOW);
  }
  if (currentMillis >= blinkerMillis + 150){
    digitalWrite(13, LOW); 
  }
  if (currentMillis < previousMillis){
    previousMillis = 0;    
  }
  if (currentMillis < blinkerMillis){
    blinkerMillis = 0;
  }
  if (currentMillis < highMillis){
    highMillis = 0;
  }
}

Output signal is to be taken from Digital Pin 3. I tested this on my own arduino to make sure it works as expected.
 
Last edited:





Back
Top