Maker Pro
Maker Pro

Building a time delay relay circuit with 555 timer

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
So im looking at building a 555 time delay circuit. (Diagram of circuit will be attached below.)
Im trying to make sure that this will be what I need but I want to make sure that this would have a 12v output?

Im needing the output to be connected to a small relay that will trip when activated.
In order to get thr circuit to trip I need to add a photocell in thie circuit so that when I light source is cut off from the cell, then the 555 will activate the relay for the amount of time I have it working for.

Any thoughts?


 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Yup, I have some thoughts. That circuit, while interesting, won't work. Tell us what relay hold time you want and what photocell you're using.

BTW, a photocell (LDR) will work but a PhotoTransistor is a much better choice for this circuit.

Chris
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
"PhotoTransistor is a much better choice for this circuit." Why ??????????????????????
When the input impedance of pin 2 is 10M.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
They're cheaper and much faster. But most of all because 'I' like them!!!!!!!!!!!!!!!!!!!!!!!!!!!! :p
BTW, what's the 1M for between Thld & Dchg? After all he's not building a 50-50 duty cycle oscillator.
555PhotoQTggr.JPG

Chris

EDIT: After reviewing my post I felt it needed more and larger exclamation points. :rolleyes:
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Hey! @irishluck What's with the 555 analog POS timer, when you can do the same thing at lower power with a 6-pin PIC10F206 and use either a phototransistor OR an LDR? This is the 21st Century and the Digital Age, folks. Get with the program! (pun intended) :D
 

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
Here's what I'm trying to do.

I made a laser fence project and I'm trying to improve the design.
Currently I use an Arduino chip with a photocell shield.

Basically when the laser is broke from the photocell, the arduino chip trips a relay on for about 25 seconds. Im using a 12v input and I guess I can use any type of output, just have to find a relay with the correct voltage. But 12v would be easiest.

But its a little expensive to be honest. The arduino is about $30 and the shield another $15 not including shipping. So its a little over $50 for one setup.

I wanna use a cheaper alternative method that is much lighter on the wallet.
So I figured a 555 timer would do the trick. I've played with them a little bit.

But if you guys have even a better alternative that would work? I'm open for ideas! I just need a diagram so I can build it.

Unfortunately I don't know what kind of photocell to use for this due to the fact that the photocell on the arduino shield was always provided with the circuit.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I happen to have some PIC10F206 μP chips handy, so I could try to program one for you. Might be awhile though, because I have other things to do... like finish my now-going-on-twelve years bathroom remodeling project.

If you are interested in learning how to program PICs you need to purchase a PIKkit 3 from Microchip or Digi-Key. Avoid the Asian copies you find on Ebay and similar sites. Buy only the real deal. Download the MPLAB X IDE (Integrated Development Environment) from here and install it on your PC. Spend the next few weeks learning how to use it. Download the datasheet for the PIC10F200, -202, -204, -206 processors and study it. This is just about the simplest μP that Microchip makes. It only has four I/O lines, power, and ground pins. You don't actually NEED a PIC microprocessor to use MPLAB. Just tell it what you PLAN to use and then use the MPLAB simulator to emulate it.

You may have to make some measurements on either an LDR or a photo-transistor to see what kind of signal conditioning (if any) might be required. Just about any device should work if illuminated by a laser beam. You should mount it recessed inside a tube painted black on the inside, so it doesn't respond (much) to ambient light. I assume you are in Great Britain, so I don't know where you go get hobby electronic parts. But just about any photo-transistor will do. And LDRs aren't very particular either. Maybe buy one of each and see which one works best. If your laser is not emitting a visible wavelength, you may need to find a photo-transistor that responds to the wavelength it does emit.

What is the distance from the laser to the light sensor? What wavelength is the laser? Are you using a lens to collimate the laser beam? How big is the laser spot when it falls on the light sensor? Answers to these questions will help you determine what light sensor you need.

Cost of the PIC approach is small. Less than a buck for the PIC, a few cents for a socket, a dollar or two for a reed relay with a 5 V coil, and a whatever a small protoboard to solder components to costs. You use a 5 V supply to power the PIC and the reed relay coil. If you are using 12 V to run the Arduino, this needs to be reduced to 5 V by connecting it to a three-terminal voltage regulator like an LM7805.

In the meantime, just to get you up and running, try @CDRIVE circuit or @Colin Mitchell circuit. I will get back with you later with a schematic and a program for the PIC.

Hop
 

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
I live in missouri lol

I get alot my electronic parts from Mouser or Digikey.

PIC's are something Ill get to learn in school next year as well.
I know those can be some handy IC chips

As I will take your advice and Go ahead and buy a couple of those chips and download that program and study how to use these.

I do need to get something working in like the next week though, would one of those circuits work for now that other users have posted on this thread for testing?
 
Last edited:

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
Yup, I have some thoughts. That circuit, while interesting, won't work. Tell us what relay hold time you want and what photocell you're using.

BTW, a photocell (LDR) will work but a PhotoTransistor is a much better choice for this circuit.

Chris


Im looking for around a 12-20 second relay hold time.

The laser I am using is a 660nm red diode. Powered at about 165mA.
It depends on the distance. anywhere from 50ft to 100ft. But the laser diode reaches it just fine and the lens I use is adjustable as far as the alignment goes.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Make sure the PICs you purchase are in plastic dual-inline packages (PDIPs) so you can handle them. The first ones I bought are SO-23 and almost impossible to work with.
You will also need the PICkit 3 Programmer to download programs to whichever PICs you use.

I would get whatever clear plastic photo-transistor you can find at Radio Shack, solder some stranded insulated wire to the its leads, add shrink tubing, then insert it in a three to six inch long copper tube of appropriate diameter. You could also use PVC but it needs to be small enough for a snug fit and painted black. You can use a nine-volt battery and a ten thousand ohm resistor connected in series with the emitter and collector of the photo-transistor to test the laser alignment and sensitivity. I think most of the RS photo-transistors are NPN types, so the + terminal of the battery connects to the collector, the resistor goes between the - terminal of the battery and the emitter. Measure the voltage drop across the photo-transistor with and without laser illumination. If the photo-transistor saturates when illuminated you are in business. No signal conditioning required.

You are living in the "show me" state, so you will have to actually do what I described in the above paragraph.:D
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
If you're going to go the PIC rout let me introduce you to PICAXE. Talk about low stress and blazing fast learning curve! All the programming software is Free and so is the PDF Help files. Heck, if you have a real Serial Port on your PC you can construct the simple programming hardware yourself. For that matter, if you only have USB ports but have a USB/Serial(RS232) converter dongle, you're still good to go because the PDFs include a simple programmer circuit (a couple of resistors & a diode) schematic for you.

Picaxe also sell various peripherals, including a project board that includes a 08M2 Picaxe, and an on-board relay. Look through the offerings. Most of their project boards also include the programming circuitry.

If you're in a rush I'll provide the code for you. All you'll have to do is copy and paste it into the Picaxe (Programmer/Interpreter/Simulator) window.

I've had this discussion here more times than I can remember. My opinions about Picaxe vs ANY other MCU, including Arduinos hasn't changed from my opinion in 2012 (joined EP) and long before I came aboard at EP. They're absolutely the most painless uC to learn & use on the market. It doesn't take months, weeks or even days to run your first program. Most people are running a program in a couple of hours. If you run the samples they provide it will be in terms of minutes!

Yes, I'm a PICAXE advocate because the creators developed something with 'KISS' as their key design goal and also because I love them! ;)

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
It's not that I don't like LDRs. It's just that they respond to ambient light. They're used widely in outdoor lighting control using sunlight or lack of it for control. This is something you want to avoid.

BTW, are you sure you need a relay? What are you turning on and off?

Chris
 

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
Im pretty sure i need a relay. When the laser light is broken and trips a relay for about 20 seconds and turns on a water pump.

It's not that I don't like LDRs. It's just that they respond to ambient light. They're used widely in outdoor lighting control using sunlight or lack of it for control. This is something you want to avoid.

BTW, are you sure you need a relay? What are you turning on and off?

Chris
 

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
You guys all seem like your a bunch of smart guys, so ive got a question for you.

Ive been trying to see if the technogy even exist but havent found anything at all about this yet.

Im trying to find a thermal sensor of sorts that can detect a heat signature and also follow that hear signature.

Does that type of technology exist?
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
... Im trying to find a thermal sensor of sorts that can detect a heat signature and also follow that hear signature.

Does that type of technology exist?
Yes. It has existed for quite some time under various names using various sensors. Some common names are thermal imaging and forward-looking infra-red (FLIR). The technology is based on detecting and measuring infrared radiation near 15 μm wavelength. This happens to correspond to the peak of the blackbody emission spectrum for objects near 300K, which is approximately room temperature.

There is an atmospheric transmission "window" in the 8 to 12 μm as well as the 3 to 5 μm infrared band that makes thermal imaging detectors practical. In the 1970s we used detectors cooled with liquid nitrogen, HgCdTe (mercury-cadmium-telluride) detectors to detect infrared radiation in the 8 to 12 μm band and indium antimonide (InSb) detectors for 3 to 5 μm.

Sometime in the mid 1970s, I experimented with un-cooled pyroelectric broadband infrared detectors, manufactured here in Ohio by Harshaw Chemical. Pyroelectric detectors were experimental at the time, and difficult to use because they depended on a temperature gradient to move a fixed charge around to produce a signal. Staring a fixed scene produced no output at all, no matter what its temperature. So, I placed a mechanical chopper wheel in front of one so it alternately "looked" at the back of the chopper wheel or (in between the blades) out into the room. An op-amp with an FET front-end converted the charge movement into a small current, which appeared as a small voltage at the op-amp output, a configuration commonly called a transimpedance converter or amplifier. Even so, I had to use a PAR (Princeton Applied Research) lock-in amplifier, synchronized to the chopper wheel interruption rate (about 100 Hz), and a long integration time on the order of ten or fifteen seconds to see any detectable change in the pyroelectric output when I allowed the detector to "see" my relatively hot body against the room-temperature background radiation. Still, without any lenses or optics whatsoever, this lash-up experiment was able to "see" people across the room, a distance of about thirty or forty feet, when they stood in a doorway. Of course, because of the long integration time required to produce a usable signal, they had to stand there for as long as a minute. Years later someone configured two pyroelectric elements side-by-side and connected them differentially, placing an array of Fresnel lenses in front of the detectors so each one saw the same scene from a slightly different point of view. Thus, when anything moved in the scene, slightly different images were presented to the two detectors and they produced a differential output as long as the object continued to move. Voila! The passive infra-red (PIR) motion detector was born. There are millions in use today, so it is pretty easy to obtain a pyroelectric detector element dirt cheap.

At about that same time era, a company in New England (a hot-bed of electro-optics development) developed a dual-band (3 to 5 and 8 to 12 μm) video camera that produced standard NTSC monochrome video using two detectors, HgCdTe for 8 to 12 μm, and InSb (indium antimonide) for 3 to 5 μm. This was accomplished by producing a raster-scanned image of the area the camera "saw" by using high-speed galvanometer mirrors. The horizontal scan occurred at just half the NTSC line rate, so each line was digitized, the pixel values stored in a shift register, and then read out twice to satisfy the NTSC timing requirements. You could select which infrared image you wanted to see with a switch. I developed a high-speed video switch that alternated the video output from the two infrared channels into a single video stream so you could see images from both infrared bands simultaneously, interlaced on the monitor screen. This could arguably be called the first example of multi-spectral imaging, but it didn't stop there. It went much farther. But that's another story...

The government (and others) routinely measure the infra-red heat signature of a lot of common objects to build up a catalog for automatic image processing and, in the case of weapon systems, automatic targeting and tracking controls. All this is made possible by the development of those itty, bitty, incredibly fast, computer chips and similar technologies that have evolved over the last fifty years to allow more advanced video games to be built. Aliens helped hardly at all.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hop, that was.............AWESOME!;)

Chris

Edit: Are you sure about the "Aliens" thing? :p
 

irishluck

Mar 12, 2014
57
Joined
Mar 12, 2014
Messages
57
Lol damn aliens.

Just the clarify though, I thought alot of these thermal sensors had to use sometype of reference point to follow a heat object?
Like some that Ive seen had used a red circle. Put a red circle on someones shirt and it would follow it around.

So your saying that the thing your talking about does not need something like that?

What im like to do is use a thermal sensor on some type of servo that would detect a heat signature at around 15-20ft and would follow it around 180*

Yes. It has existed for quite some time under various names using various sensors. Some common names are thermal imaging and forward-looking infra-red (FLIR). The technology is based on detecting and measuring infrared radiation near 15 μm wavelength. This happens to correspond to the peak of the blackbody emission spectrum for objects near 300K, which is approximately room temperature.

There is an atmospheric transmission "window" in the 8 to 12 μm as well as the 3 to 5 μm infrared band that makes thermal imaging detectors practical. In the 1970s we used detectors cooled with liquid nitrogen, HgCdTe (mercury-cadmium-telluride) detectors to detect infrared radiation in the 8 to 12 μm band and indium antimonide (InSb) detectors for 3 to 5 μm.

Sometime in the mid 1970s, I experimented with un-cooled pyroelectric broadband infrared detectors, manufactured here in Ohio by Harshaw Chemical. Pyroelectric detectors were experimental at the time, and difficult to use because they depended on a temperature gradient to move a fixed charge around to produce a signal. Staring a fixed scene produced no output at all, no matter what its temperature. So, I placed a mechanical chopper wheel in front of one so it alternately "looked" at the back of the chopper wheel or (in between the blades) out into the room. An op-amp with an FET front-end converted the charge movement into a small current, which appeared as a small voltage at the op-amp output, a configuration commonly called a transimpedance converter or amplifier. Even so, I had to use a PAR (Princeton Applied Research) lock-in amplifier, synchronized to the chopper wheel interruption rate (about 100 Hz), and a long integration time on the order of ten or fifteen seconds to see any detectable change in the pyroelectric output when I allowed the detector to "see" my relatively hot body against the room-temperature background radiation. Still, without any lenses or optics whatsoever, this lash-up experiment was able to "see" people across the room, a distance of about thirty or forty feet, when they stood in a doorway. Of course, because of the long integration time required to produce a usable signal, they had to stand there for as long as a minute. Years later someone configured two pyroelectric elements side-by-side and connected them differentially, placing an array of Fresnel lenses in front of the detectors so each one saw the same scene from a slightly different point of view. Thus, when anything moved in the scene, slightly different images were presented to the two detectors and they produced a differential output as long as the object continued to move. Voila! The passive infra-red (PIR) motion detector was born. There are millions in use today, so it is pretty easy to obtain a pyroelectric detector element dirt cheap.

At about that same time era, a company in New England (a hot-bed of electro-optics development) developed a dual-band (3 to 5 and 8 to 12 μm) video camera that produced standard NTSC monochrome video using two detectors, HgCdTe for 8 to 12 μm, and InSb (indium antimonide) for 3 to 5 μm. This was accomplished by producing a raster-scanned image of the area the camera "saw" by using high-speed galvanometer mirrors. The horizontal scan occurred at just half the NTSC line rate, so each line was digitized, the pixel values stored in a shift register, and then read out twice to satisfy the NTSC timing requirements. You could select which infrared image you wanted to see with a switch. I developed a high-speed video switch that alternated the video output from the two infrared channels into a single video stream so you could see images from both infrared bands simultaneously, interlaced on the monitor screen. This could arguably be called the first example of multi-spectral imaging, but it didn't stop there. It went much farther. But that's another story...

The government (and others) routinely measure the infra-red heat signature of a lot of common objects to build up a catalog for automatic image processing and, in the case of weapon systems, automatic targeting and tracking controls. All this is made possible by the development of those itty, bitty, incredibly fast, computer chips and similar technologies that have evolved over the last fifty years to allow more advanced video games to be built. Aliens helped hardly at all.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Lol damn aliens.

Just the clarify though, I thought alot of these thermal sensors had to use sometype of reference point to follow a heat object?
Like some that Ive seen had used a red circle. Put a red circle on someones shirt and it would follow it around.

So your saying that the thing your talking about does not need something like that?

What im like to do is use a thermal sensor on some type of servo that would detect a heat signature at around 15-20ft and would follow it around 180*
You are correct. The image processing software locates and identifies whatever you want to track. You are offered the opportunity to move a cursor in the image to select a different target if you don't like the target the machine picks for you. I had the opportunity to observe this target acquisition and tracking in action at a Texas Instruments facility in Dallas TX in the 1980s. It was intended to be part of the terminal guidance TV system built into the nose of the venerable AGM-65 Maverick air-to-ground missile, but we were offered a demo of one separated from the missile and aimed out an open window looking at a road perhaps a mile away. It had no trouble picking out vehicle traffic and tracking same. The end user, a foreign government in Europe, wanted to use this FLIR system to aim a large automatic weapon (probably a chain gun) with electric elevation and azimuth servos mounted to a gun turret on a fast boat. I think they wanted to interdict smugglers, but no one ever told me what they were up to. I was fascinated by TI's closed-loop cryogenic cooling system for the sensor array. This puppy had to spin up and cool the sensor to about 77K (liquid nitrogen temperature) like, right now! Much tougher problem than the CCD visible light imaging arrays that were used earlier. The AGM-65 is still in service today, although I hear it has been re-fitted with active laser target designators. That allows boots on the ground to "light up" a target and let the AGM-65 home in on it with close air support from A-10 Warthogs. It is my understanding that the AGM-65 is second only to the GAU8 30mm Gatling Gun in impressive performance.

So, yeah, image processing is quite sophisticated today. The mechanics and electro-optics necessary to build a tracker are not beyond the range of a hobbiest, but you should have very deep pockets and a year or two to spend on the project.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hop, stop that. You're getting me all excited! It's like reading Weapon Porn. :D

Chris
 
Top