Very simple timer circuit

Dippy

Moderator
"So Dippy, do you agree I should put a big resistor where I currently had the 47n?"
- yes, as Martin says above in Post 37.

"And for the cap between the +V/0V pins, is the size and type important?"
- yes, that's why I suggested you read up on it. A good start would be searching on this Forum for decoupling...
Here is some more general information. Please read it as it'll save me 30 minutes of typing :)
http://focus.ti.com/lit/an/sloa069/sloa069.pdf

(Save a copy, it really is a good reminder and written by someone with a sense of humour and a grasp of what goes on in the real world :) )

Markings?
A 47nF = u047 = 473.
Disc/Lumpy Ceramics are usually marked 473 = 47 x 10^3 picoFarads.

The whole point of decoupling is , like I said before, to 'divert' (or 'bypass') the noise away from the chip. In this case, we effectively, divert/bypass some of it down to ground.
How much is diverted depends on value, construction and type. Read up on dielectrics and capacitor type performance related to frequency. Read Manufacturer's Data Sheets.

100nF (104) should be fine for this circuit.
In some noisy/RF circuits people parallel a few caps together. Smaller caps will have a better HF performance (in addition to good dielectric choice).
Anyway, big subject. You'll learn a lot if you have a gentle read of good source material. I'm puffed out now.
 

TCLynx

Member
Oh thanks for the link, I'll be doing some reading;).

<That is one of the challenges for some of us, just finding the right reading material to help us learn without having to spend hours searching and reading not so useful material first before we find what we really do need to read but then are out of computer time till another day.>

And that bit you wrote about the small helping better against HF noise etc, definitely makes sense to me (I'm an Audio person by training.)

I do thank you all for your help and patience. My major hobby the past few years has been Aquaponics and I only occasionally dip into electronics when I have a specific objective I need to meet. Anyway, if anyone is interested in Aquaponics (the whole raising fish and growing veggies combination, aquaculture crossed with hydroponics) and would like some help, I will happily assist as I've gotten fairly good at Aquaponics design.:p

But anyway, once I get a chance to put it all together and test it out, I'll be back to share the results and final diagrams and such.
 

Dippy

Moderator
Excellent.

Yes, finding good source material is difficult especially when everyone posts all sorts of stuff on any subject and Google tells you ALL about it. Aaargh.

I guess this is one advantage of doing related subjects at college/Uni - with a bit of luck you'll still have some text books or, at least, know where to find it.

Ec might find you something. He's a Big Fact Hunt person.
 

TCLynx

Member
LOL, been a while since college.

Hum, I wonder if I still have any of my non theatre or recording books though. I did take a basic electronics class early on in college I think (getting hard to remember.)

Started reading the PDF you linked me to. I doubt I'm likely to have too much problem in this particular application with "noise" disrupting it but it will be using a AC to DC power adapter and the relay can cause a little. so by what I'm reading perhaps using an electrolytic and something like a .01u might be appropriate though the way that paper talks, it seems that not using anything would be more appropriate if I don't actually know what the noise frequency is.

I've got some little tiny shiny blue ones which say 103 on them. I think that is .01 uf ? is that any better than the 100n?
 

TCLynx

Member
Well I got my package of new chips and hooked up the timer on the bread board and it is working.

I made a minor mod to my original methods but it doesn't really change anything. It is set up with the relay normally closed so if there is a malfunction to the timer, the pump will default on. So the program is actually now set so the output in use goes low and I have a pause loop for the amount of time I want it to stay low (or pump stay on) and then go high and a pause loop to keep it that way for the amount of time I want.

Incredibly simple but it's a start. Gives me something to build on.

So who can direct me to some good reading on how to layout the circuit board to build this a bit more perm than the bread board I currently have it running on? I've got a few of the little radio shack general purpose printed circuit boards on hand. One package is a pair of 1 1/2" square boards with individual contacts around each hole, the other board is the one with a couple of rows down the center that are all connected together and then tripples out either side of that then some individual rows of holes then the outside two rows on either side are in pairs.

I'm sure I'll figure it out on my own but having a good read of something with tips and tricks for figuring out layout would probably save me from the most common mistakes.

I think I'll keep the relay itself physically off the board unless some one has reasons for me to keep it on board.
 

eclectic

Moderator
snip

So who can direct me to some good reading on how to layout the circuit board to build this a bit more perm than the bread board I currently have it running on? I've got a few of the little radio shack general purpose printed circuit boards on hand. One package is a pair of 1 1/2" square boards with individual contacts around each hole, the other board is the one with a couple of rows down the center that are all connected together and then tripples out either side of that then some individual rows of holes then the outside two rows on either side are in pairs.
Can you post a link to the boards please?
Then folks can get a picture of the layout.

e
 

eclectic

Moderator
@TCLynx

Thanks. That'll help a lot.

Now, is there a full schematic available please?

Or have I not been looking correctly. :)

e
 

TCLynx

Member
Now you know I'm not asking anyone else to lay it out for me. I was really just looking for some tips. Like if some one knows of some site or pdf that is a good tutorial for laying out really simple circuit boards. I would love to read it.

Anyway, I'll have to go back and look at the previous diagram I uploaded as I've made some very minor changes or perhaps I'll just upload the latest update.

 
Last edited:

TCLynx

Member
Ok here is the updated diagram.

The red led I wasn't sure what the ratings were on that so I just used the suggested resistor value.
The Yellow led is a 3v 20mA item so I used a 470 ohm resistor there. And I know the yellow led will actually be on when the relay coil is energized and therefor turning off the item I have hooked up to the relay's NC connection, this is fine with me.

It all seems to be working

Hum now why isn't the image showing in the post?

Anyway there you go
 

Attachments

Last edited:

TCLynx

Member
I'd been hoping some one would show up and point me at some good resources to learn some of the basic rules for laying out simple circuit boards.

I'm good at soldering but It has been a very long time since I've done much of anything on circuit boards.

Anyway, since no one suggested any reading to me, I was doing some searching on my own and came across sites that had free software and stuff for drawing up designs to have custom circuit boards printed.:eek: now I find myself wanting to try it out. But no, first I really want to put this circuit together on a generic circuit board so I can get it running for a while to make sure it is sturdy for the purpose.

Anyone have any comments on BatchPCB?
 

Dippy

Moderator
"I'd been hoping some one would show up and point me at some good resources to learn some of the basic rules for laying out simple circuit boards"

- I was going to but then noticed you'd posted pictures of strip/veroboard. I don't use it. I only use PCB/CAD.

But general rules are.
1. Keep power away from signal.
2. Best to have separate ('star') lines for power and ground.
3. Nice fat power and ground.
4. Decoupling as close to chip as possible.
5. Use a bit of common sense.
6. Get someone else to do it for you.

I'm afraid 'best practice' will be compromised on stripboard.
 

TCLynx

Member
Thanks Dippy,
Yea I kinda figured that the "rules" would be hard to follow with the generic board but I also figured this circuit was soo darn simple that it probably doesn't matter that much either.

Ah well, I don't think I have anyone for number 6 (at least not anyone who can solder as well as I can close to hand that I could twist their arm to do it.)

another rule I came upon was that you want your ground and power traces somewhat balanced.
 

Dippy

Moderator
A simple circuit like this is no problem.
Just stuff it onto your stripboard and try it out.
Just use a little common sense - pretend you were a sensitive microP. Ask yourself how you'd like to be connected?

To test it I would breadboard it and have the relay section off-board. Then give it a good thrashing. I'm sure if you have worked out the worst case and done the calcs (have you?) and specced the components then all should be well.

There are a zillion CADs out there. Different people like different things. I hear that some strange people actually like Eagle :eek:.
Oh, it's free .. I thought there would be a sensible reason.
if you had EasyPC it has a built in calculator for track widths and many other things.
Yes, I KNOW you can find it on internet, but it's so much nicer to have it all in one place.


"another rule I came upon was that you want your ground and power traces somewhat balanced."
- I can only guess what it means.
I reckon I've been lucky with the 200+ PCBs I've designed over the last 10 years. ;)
Depending on the app I think there are dozens more important rules than that.

Martin and others could do that circuit in under an hour. So, if you write out a cheque for £100 then I'm sure you'll get a whole load of peeps for number 6.
 
Last edited:

TCLynx

Member
To test it I would breadboard it and have the relay section off-board. Then give it a good thrashing. I'm sure if you have worked out the worst case and done the calcs (have you?) and specced the components then all should be well.
I had it hooked up and running on the bread board all day yesterday (with the relay off the board.) Ran fine with the bigger load.

So now I'm gonna try and solder it up so I can let it run more long term (and have an easier time protecting it in a smaller box than the bread board would take.)


"another rule I came upon was that you want your ground and power traces somewhat balanced."
- I can only guess what it means.
I reckon I've been lucky with the 200+ PCBs I've designed over the last 10 years. ;)
Depending on the app I think there are dozens more important rules than that.
I'm sure there are, but it was one of the things I came across in my searching/reading. Showed an example with the +V going around the top of a board on a longer path than the 0V trace that just cut straight over from a chip to the ground connection. of course if I use the strip board, I would use the two long strips in the center for +V and 0V so they would be balanced.

Martin and others could do that circuit in under an hour. So, if you write out a cheque for £100 then I'm sure you'll get a whole load of peeps for number 6.
But isn't part of the whole fun of DIY projects, doing it yourself? Plus I'm too impatient to be sending checks across the pond and waiting for a finished project to come back to me.
 

TCLynx

Member
Well I think I managed it though I really need to work out a more elegant power input and mains out. The wall wart for the 12VDC power is so darn clunky and then I still need to get the mains power for the device I'm poerating via the relay.

I got it working but oh so clunky. Any suggestions for ways to improve that part of it would be greatly appreciated.
 

Dippy

Moderator
If you don't like wall-warts then design your own PSU. For this all you need is a suitable transformer and bridge and cap. Use a MOV(or similar) and fuse.

And tap off the Live/Line side for going through your relay.

I would avoid capacitive and buck PSUs unless you are really up-to-speed with non-isolated circuits.


The quality of your components , construction and wiring is in your hands.

Please, I beg, don't buy some cheap crap unknown relay. Get something good with all the right Approvals on it. Try and avoid something made in back streets of Beijing. Spend the extra pennies and get something proper.
If you are suffering Ebayitis then please see your doctor who will extract your Paypal by the roots.

And when you finally do it on a PCB keep in mind track spacing and track widths when you have mains volts on the board. There is oodles of info around if you look.

And I really can't be bothered with doom&gloom warnings about working with mains etc. etc. so take it as read... Good luck and check your insurance.
 

TCLynx

Member
I can say I've avoided e-bay for all this. (Though I can't guarantee that the sellers I've bought from do not also sell on e-bay) Mainly I want to find items that I am able to look up the specs on but I don't know much about what approvals are the "right" approvals.

Anyone have anything to say about ZETTLER relays? So how do you tell the ok stuff that is made in china from the crap out of the back streets of Beijing?

Anyway, anything I do for the time being is gonna stay pretty simple and I'll probably try to keep mains power off the control board completely but I would like to learn a bit more about putting together a more elegant power supply that could provide good power for the control board and have a split off to tie in the relay or perhaps a relay board.

I stumbled into this site with transformers that looked kinda nice
http://www.advancedcomponents.com/store/
If anyone wants to recommend other sites I might look at to learn more about transforms or bridges or other parts I would need for a power supply, please let me know.
 

Dippy

Moderator
Separating The Wheat From The Chaff

Arguably, the best way to determine the 'proper' makes is to look and see what the BIG Distributors sell.

Check out Farnell, DigiKey, RS Components, Mouser etc.
They will be very unlikely to stock crap.
A) They want to maintain a reputation.
B) They want to exist in 10 years time.
C) They don't want the expense of replacing under warranty and returns to manufacturer.
D) They have money to afford staff to visit and inspect manufacturer's and importers.

Obv this doesn't mean that the products are 100%, nothing is , regardless of place of manufacture.

You don't have to buy from any of them but it'll give you a guide.
And Farnell, DigiKey and RS Components have a fantastic array of online Data Sheets too - excellent resources to bookmark.
 

TCLynx

Member
cool, thanks. I've actually set up an account with Mouser so I can do a project list to help me see what the overall prices will come up to.

However, there are a few things that they don't seem to have a good variety of. Transformers and Relays of the size and operation range I'm interested in seem pretty light on the ground, but I've found some other sources of those that seem high enough quality.

Anyway, this project has been fun. I'll be back to make upgrades eventually. I have to get back to the real world of AV and lighting for corporate meetings though (gads I hate it but it pays ok.)

I'll probably be back to visit here later this fall, perhaps not much for the next couple months as I won't be home much.
 
Top