15secs on, 45secs off - timer

SarverSystems

Supreme [H]ardness
Joined
Feb 9, 2002
Messages
7,408
I need a timer capable of running a bubble machine for 15 seconds then shutting off for 45 seconds, then turning back on for 15 seconds.

Running it 100% has waaaay too many bubbles. I am not interested in slowing the motor.

Ebay yielded nothing.
 
You could probably do this with a 555 timer circuit driving a relay to switch your load, but really my first choice for anything like this a probably a basic PIC or AVR ucontroller... By the time you calculate and source the couple of resistors and caps you need for the 555 to operate at your desired rate, I'd have my AVR already running ;)

For something pre-built, Google around for timer kits (perhaps with 'cyclic' or 'repeat' keywords) like this... These kits are often sold by many stores, so poke around for a store in your country / area.
 
Another recommendation for a PIC, just set up a basic delay subroutine. In the main program set the port running the machine high, increment a variable to the value 0x0F(15)(while running a delay every loop), do an arithmetic operation that sets the Z flag, jump forward, turn the port low, increment a variable to 0x02d(45), do arithmetic, set z flag, jump to beginning of program.

You can use a 555 timer, it'd just be an annoying as hell circuit to drive. PIc is much easier and when you're done with that you can make a cool robot.
 
I've got so lazy with ucontrollers, I don't even bother with asm unless there is some specific need - I paid my dues programming Z80 back in Sinclair days ;)

Bascom AVR is an awesome Basic compiler for AVR's with a free demo capable of programming 4kb parts, which is more than enough for small projects. Because it is compiled, it still outruns Basic Stamps and most PICs ;) You can build your own 'no parts' printer port programming interface, so really your only investment is a $1 chip (though I do recommend the 74245 or 74244 interface chip version - it is also cheap and easy to find, RatShack carries them).

Code:
Do

Port A.1 = 1
Wait 15
Port A.1 = 0
Wait 45

Loop

Done :)
 
One more vote for a 555 timer here. Two resistors, a capacitor, and the 555 chip itself. A 2Mohm resistor between VCC and DIS, a 1Mohm resistor between DIS and THR, and a capacitor between THR and GND. Tie pins 2 and 6, let the control voltage float, and pull reset high.

For calcs:
short time: 15 sec = R2 * C. Let's choose R2 = 1Mohm, so C = 15uF or thereabouts.

It doesn't sound like this application requires exact timing, so anything close to those values should work fine. Sure, a microcontroller or PIC or basic stamp would do the job, but if you have to buy/build a programmer, then program the chip, it seems like a lot of overkill for a very simple application.
 
One more vote for a 555 timer here. Two resistors, a capacitor, and the 555 chip itself. A 2Mohm resistor between VCC and DIS, a 1Mohm resistor between DIS and THR, and a capacitor between THR and GND. Tie pins 2 and 6, let the control voltage float, and pull reset high.

For calcs:
short time: 15 sec = R2 * C. Let's choose R2 = 1Mohm, so C = 15uF or thereabouts.

It doesn't sound like this application requires exact timing, so anything close to those values should work fine. Sure, a microcontroller or PIC or basic stamp would do the job, but if you have to buy/build a programmer, then program the chip, it seems like a lot of overkill for a very simple application.

Another vote for the 555... spot on. (I started doing the calculations until I realized you'd already done them...)
 
Another 555 timer vote. Here you go, with a parts list and calculated values:



One caveat: If you're using a 5V-coil relay, you may want to run the circuit off 6V to account for the ~1V of drop you'll get from the 555 output voltage and the PNP follower. If you're using a 12V relay, a 12VDC supply should be fine. Don't go above 15V or you'll blow the 555.

You *should* be able to get by with a 5VDC supply and a 5V relay if you use a CMOS 555 (LMC555, TLC555).

Yes you digital guys, you can do this with a microcontroller. But with the 555 approach, you can get all the parts required at Radio Shack, you don't need to program anything, you don't need to sneak a 7805 into the design anywhere, and it'll be cheaper.
 
Yes you digital guys, you can do this with a microcontroller. But with the 555 approach, you can get all the parts required at Radio Shack, you don't need to program anything, you don't need to sneak a 7805 into the design anywhere, and it'll be cheaper.
Blasphemey ! :)

I will say that I find a small qty of AVR's on hand can be just about anything you want it to be, eliminating the need to drive to the store to buy discrete ic's... so really I'm saving more in gas ;)

One caveat: If you're using a 5V-coil relay, you may want to run the circuit off 6V to account for the ~1V of drop you'll get from the 555 output voltage and the PNP follower. If you're using a 12V relay, a 12VDC supply should be fine. Don't go above 15V or you'll blow the 555.
Just curious, isn't it more common to use PNP for high-side switching, where the load is usually connected to the collector?

 
Blasphemey ! :)

I will say that I find a small qty of AVR's on hand can be just about anything you want it to be, eliminating the need to drive to the store to buy discrete ic's... so really I'm saving more in gas ;)
True enough. Though I'm out of spare AVR's right now so I'm in analog mode.

Just curious, isn't it more common to use PNP for high-side switching, where the load is usually connected to the collector?

That works too, but uses an extra resistor :D
 
I get free MCUs from Microchip due to being a student. :D Most 20 pin PIC (PIC16f690) are enough to feed my addiction, for now >.> You do begin to appreciate 1KB much more when you start working with MCUs :p

Dont get me wrong, i do love my 555 timers and 4017 decade counters. Although, MCUs made generating a random number and displaying it out onto a 7 segment display a hell of a lot easier than the analog mess i had :D

But yea, OP the above is more than enough to run your project. Good luck
 


So what do I need to modify to make it a variable time? Lets say for example, 15secs on still makes too many bubbles. Or maybe 45secs off is too long of a delay?
 
The duty cycle (ratio between on and off) is determined primarily by the ratio (of resistance) of the resistors.

The current complete cycle time for that circuit is one minute with a duty cycle of .75. With that link i provided, it has all the necessary formulas. But for all intensive purposes, you can just ask us and we'll modify it for you :D

If you want, you can always substitute one of the resistors for a potentiometer so you can make the circuit a little variable.
 
I need a timer capable of running a bubble machine for 15 seconds then shutting off for 45 seconds, then turning back on for 15 seconds.

Running it 100% has waaaay too many bubbles. I am not interested in slowing the motor.

Ebay yielded nothing.

See above.
 
I like the idea of using a pot. Can you explain which resister to swap out for a pot?

This would STILL make the cycle 1min in duration though, with the resistor acting as the time on? or time off?
 
The resistor between pins 7 and 2 is the one you would replace with a pot. If you use a 100k pot, you'll be able to adjust the timing from 1/4th of the time down to none of the time. The total cycle length will decrease, depending on how you have it adjusted--at one end, you'll have the full minute (15 on, 45 off), at the other end you'll have a 30-second cycle (30 on, 0 off).

It is possible to maintain a constant cycle time, but it's a bit more complicated (involves adding a couple of diodes) and I don't think it's necessary in this application.
 
what is a bubble machine?
Designed by Lawrence Welk, the Bubble Machine is an artistic device that creates spherical surface tension bodies that float through the air. This creates a visual representation of electrons passing through a dielectric substrate.
 
I like the idea of using a pot. Can you explain which resister to swap out for a pot?

This would STILL make the cycle 1min in duration though, with the resistor acting as the time on? or time off?
The 100K resistor by itself controls the on-time. With a 220uF capacitor, 100K is 15 seconds, 10K is 1.5 seconds.

The 200K series resistance plus the 100K resistance determines the off-time. 300K is 45 seconds with a 220uF capacitor.

To make it adjustable, the 100K part is the one to replace. However you don't want this resistance to go below 1K or you can damage the 555 - so replace it with a 100K pot and a 1-10K series resistor.
 
Here's another idea that I haven't seen anyone put out there yet...

Just create a counter with some SSI parts and logic gates... calculate the count at your clock frequency that gives you 15 sec and values up to that point drive a signal high, then the signal should be low till the count at the clock frequency is 45 sec, at which point you reset the counter. The signal can be fed into a relay to drive your bubble machine.
 
Back
Top