Need Circuit Design -- Cheap...

Apr 17, 2009 128 Replies

This seems to work: JF

Hi John, I am in no position to doubt your work if it will work or not and am willing to take a shot at it. I re-drew the schematic in Visio and posted it as jpeg at teh following link:

formatting link

What I need you to check is if I got the pin connections on the LM393 correct from your drawing and the data sheet, I added the pin numbers it looked to me that they should be, could you verify that they are correct and let me know if I mixed any of them up. Also in the picture is the 7555, and LM393 from the spec sheets, as well as links to them, I want to make sure I get the right parts.

I put the DS7000 on my frec counter and it is 3Hz flash rate or 6Hz depending on how it counted them. So what would the values for Rt and Ct be for that flash rate. The duty cycle appears to be 50% on/off and I am not sure my other meter was right but it said it was on for 25ms and off for 25ms, but my meter gets real flakey a low frequency. Actually the freq counter is not the best below 20Hz either...

No matter it appears to be a very low frequency, so if you could suggest some values to start at I can play with it on my proto-board and see if I can get it to work.

Again, thanks for all your help. I am looking forward to trying it out as soon as I can get the values for Rt and Ct, if you could give me the formual you use to determine them, then if I have the frequency way off I I can re-calc them without bothering you.

Hi John, Sorry to bug you again on this, I am getting ready to order the parts and noticed that I had drawn in the + & - on U1B backwards. I left the pin labels I had added exactly the same, could you please look as see if I have the pins connected right per your drawning.

This is the link to my converted ASCII drawing of your in to a Visio drawing. It looks to me like the + and - are reversed from your drawing and I am not sure if that is intentional, that is, those are the + & - pins and where you want me to hook them to, or if they are backwards from the pin labels I gave them:

formatting link

This is the link to the datasheet on the LM393 (even though it says in the link LM193)

formatting link

I will make sure to order a few of them incase I fry them, but would like to at least start with what you think are the correct pins / connection point in the drawing.

I also still need the values for Rt and Ct based on a 3Hz and 6Hz flashing rate. (I am not sure how the freq counter counted them so it is either 3Hz or 6Hz)

Thanks again.

Hi Jim, Here is the sequence / if / then....

  1. Power on the Security System (DS7000) This only happens very rarely, it is usually powered on and has a battery back up. In any even I don't care what the circuit I am looking for does.

If it starts up firing off Relay 1 turning the cams on that is OK, if it start up firing off Realy 2 turning the cams off that is ok also, I will get it to the right sync point.

So lets assume it has been powered up and by luck it triggered the Cam Off relay, then all is good, the system always starts up Disarmed.

Now the real sequence: (System is on and is not Armed)

  1. Armed LED Off -- Close NO Relay 2 for 1/4 second, then opens.

  1. I Arm the System, the Armed LED comes ON

  2. Close NO Relay 1 for about a 1/4 second and then opens.

  1. The Armed LED will be on solid until the alarm is triggered.

  2. I DisArm the system and the Armed LED goes OFF and stays off.

  1. Relay 2 CLoses for about 1/4 second and then opens.

That will be the most common sequence, we arm it when we leave the house we disarm it when we return.

The other sequence that could happen is pretty much the same as the first, but I'll show the sequence here:

  1. Armed LED Off -- Close NO Relay 2 for 1/4 second, then opens.

  1. I Arm the System, the Armed LED comes ON

  2. Close NO Relay 1 for about a 1/4 second and then opens.

  1. The Armed LED will be on solid until the alarm is triggered.

  2. The Alarm is triggered and the ARMED LED flashes at 3Hz.

  1. Nothing should happen with NO Relay 1 or NO Relay 2.

  2. I DisArm the system and the Armed LED goes OFF and stays off.

  1. NO Relay 2 CLoses for about 1/4 second and then opens.

Those are the only two sequences possible.

Hope this helps.

Thanks

Did all traffic on this thread stop because it bored people or because the syggested circuit will not work? I don't want to order all the parts if this is just some kind of bad joke...

BTW -- I do have 1.2mV and 1.9VDC if I take the signal from the two LED pins instead of between the LED and ground... (1.2mV = LED Off,

1.9VDC Led On.)

Thanks

[snip]

But that's differential... inconvenient.

Can't you get directly to the driver pin, then it'd be 0V -> 3.3V

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine Sometimes I even put it in the food

Just one question. Do you think this simple timer circuit will be more accurate than your frequency counter (I guess more expensive one) at low frequency of a few Hz?

I will pit together a more cohesive description this weekend, I can get to the driver pin, it is either 3V or 5 V, never 0 when measured between the LED pin and circuit ground. It is 5V when the LED is Off and 3V when the LED is ON on one pin, and always 5V on the other pin.

It is confusing to me as both LED pins when measured to Circuit Ground have 5VDC on them when the LED is off, when the LED is on one of the pins stays at 5V and the other drops to 3V, so I assumed the one that was always at 5 V was the supply and the other that leades to the microcontroller was being given a path to ground when the microcontroller turned it on....

I will try to pull more information tohether, I know one pin goes to the microcontroller through a resister, I have not traced where the other pin goes, I had assumed it a common 5V supply.

Will get back.

The only thing I need to timmer circuit to do is close one or the other relays for about 1/4 second, the accuracy can be from

100ms-500ms, it is just simulating a person pushing a remote control On/Off Button. The 6Hz is about the flash reate of the LED that I need to ignore, not count or measure, just if the LED is flashing, ignore it.

In usenet, we post things this way:

or "oscillate it"

If you cannot be sure of the frequency, or the circuit to lock into the given frequency, what's the point of selecting the components?

[snip]

As I pointed out in an earlier post, LM193,393,339 type comparators are only valid for one input at least 1.5V below the positive rail.

So a 4V reference won't work.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine Sometimes I even put it in the food

[snip]

My point...

+5V o | | ---- \\ / \\/ LED ---- | |

Hi Jim, I tore it apart again and this time traced the control pin on the LED to the uC, and now have a clean 0V or 5VDC signal to use, thanks for that, I should have thought to look deeper...

so now the "+" is where I am tapped in for all readings:

uC----+---->|----R----GND

I have another post where I put in all of the details I have now and hoepfully they fill in the gaps of information, I has links to pictures of the entire project so there is a context, the timning relationship between the LED ON/OFF (0VDC / 5VDC), and the actions of the 2 relays, as well as the schematic provided before which I suspect may need some tweeks now with the full information...

Thanks for your input so far and I top you look at my reply with all the details and comment.

Hopefully you will find my last post a little better on the details, I just had it in my head it was not hard and after the questions and such it became clear that I was not giving the details needed for someone to help. I know have the voltages, frequency, and sequence of events in a number of pictures and I think the needed details now that it can be answered.

Thanks, my full post will be after these replies...

Hi Jim, This time I think I have the details together a little better, and have included three links to the relevent parts, at least I hope so, it took a few of those questions to see I needed to give better details to get a better answer, I think I have those now, so here it is:

I have three attachments to help put the entire picture together. One is the timing in relations to events, that is, the LED coming on, going off, and what I need the relays to do for each of the 3 possible conditions, LED ON, LED OFF, LED Flashing, in a timing layout.

I also traced the LED pin back and found the one to the microcontroller, so I now have a signal that is either 0VDC, 5VDC, or a 3Hz pulsing square wave between 0VDC and 5VDC. I suspect that is the signal to use to use.

formatting link
Shows all of the X-10 parts, and the Relay Control I need to make, this I think helps see what I am trying to do, which is basically only power on the camera system when the Alarm System is Armed, that is all taken care of with X-10 modules, the relay control is to trigger one of the X-10 modules.

formatting link
Shows the order of events, the voltages of the control signal to command the relays, when I want each rely to come on and for how long. It also shows in the Top half, the events if the alarm is never set-off while armed, the bottom half shows the details of what happens if the alarm is set off while armed, and again shows what I want each relay to do, when, and for how long.

I would have sent scope pictures but the pulse rate was too slow to get a meaningful picture, I would have had to send a mpeg, but it did show about a 3Hz square wave that was even 0V and 5VDC in pulse width for the 3Hz.

formatting link
Is the circuit that was posted on here that was said to do what I needed, but then that seemed to come under debate since I did not really supply enough informationto answer the question properly.

If there is any information I am missing please let me know!

Thanks

[snip]

[snip]

Try....

formatting link

CAUTION: If the flash rate isn't approximately 50%-50% some tweaks may be necessary to keep the ripple inside the 1/3 - 2/3 trip points of the LM555C.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine Sometimes I even put it in the food

Hi Jim, From the timing chart on page 2 of the PDF this looks PERFECT!!!! Now if I may ask just a few, perhaps dumb questions?

1 - I take it I should tap in to my circuit between the uC and the LED where I found the clean 0VDC and 5VDC?

2 - What is the part labeled D2A1? Is that the LED in my Alarm System?

3 - What are the points with V in a circle? Do those just correspond to the the measurements on the second page of the PDF?

  1. Would the relay I use still be be the Hamlin HE721A0500 wired as such: (5DVC Coil voltage)

U4A---------+--------+ | |K Relay Coil --- | ^ | | GND GND

U5A---------+--------+ | |K Relay Coil --- | ^ | | GND GND

  1. If the flash rate is not 50% what are the parts that would need tweeking. Would that be C1 and C4? If so is there a formula I can use to determine the correct values, or just play with it until it is right?

  1. I noticed that C1 is an electrolytic and C4 is shown as not, should they both be electrolytics, they seem to be configured the same way in the schematic, hooked to the Threshold pin on the LM555C

  2. Whar exactly does your reference 1/3 - 2/3 mean, did you mean between the 2 LM555C's as in U1/Pin 3 and U3/Pin 3?

  1. For all the caps that are not electrolytics, are ceramics good or should I use something other type.

  2. Are 20% tolerance on the resistors ok or should I go for tighter,
1% / 5% etc?

That circuit looks so clean and simple, I can't wait to order the parts and try this out.

Many thanks for this, I will try to get the parts ASAP and breadboard this by next weekend.

I will let you know the results as soon as I get it wired!

Again, many thanks!!

Yes.

Parts DSTM1 and D2A1 are simulation elements. (So I could use a digital table to represent your incoming waveform.)

The actual circuit begins at the input to inverter 74HC04. Connect your logic signal here.

Those are called "markers" and DO corresponds to the measurement shown on the waveforms page.

What are the current requirements for those relays?

I'd probably buffer with an NPN, like this...

+5V o | +-------+ | | ) | ( --- RELAY COIL ---> ) / \\ DIODE ( --- | | | | +------+ | | 4.7K | / |/ RELAYSIG o--/\\/\\/\\/----| 2N3904 |\\ | \\>>

| | | GND

Voltage at point "TT1" is the average of the blinking voltage. At 50% duty cycle it will be +2.5V (with some ripple). If the duty cycle is like 60/40, I'll have to add some resistor/diode gimmicks to keep TT1 centered.

If you can get C1/1uF as non-electrolytic, do it.

555 Trip points are at 1/3 and 2/3 of supply. Grab a data sheet and learn about it.

Ceramic are best, if available.

Your biggest issue may be capacitor tolerances. R1 and R2 might be better as 1 1Meg pot plus a 510K resistor.

You are quite welcome.

Payment? In your original post you mentioned payment. When you are happy with the circuit, please make an appropriate donation to the American Cancer Society. Thanks!

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine Sometimes I even put it in the food
[snip]

You may not need this, if your blinking duty-cycle is 50%/50%, but if it's not, then one possible way to cope...

formatting link

(I also changed the logic to reduce package count.)

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine Sometimes I even put it in the food

Jim, I have redrawn your circuit with the actual physical parts and added the relay driver you suggested, I will also follow your advice on the other part substitutions to work out the kinks and study the data sheet, again as you suggested.

So now I am down to 2 questions, the latter I can really just try on my own, but while I have your ear:

  1. Can you please look at the schematic I have drawn from your schematic and let me know if it looks right? I think I have all of the connections to the right pins/parts.

formatting link

  1. I noticed when I was on Digi-Key looking specifically at the CD74HC002E and the CD74HC00E that they had parts that just had one gate in them, a lot smaller, the only two differences I noticed is they did not have the "HC" in the part number, and the mA was 32mA instead of 5mA, the input voltage / output voltage all were the same, can I use these smaller parts or should I use the exact ones you specified. The CD74HC04E also comes in a 2 gate model, same deal on the specs, all the same but the "HC" and the mA was higher.

I will put together the order today with the exact parts as well as the others, but just wondered if it would make a difference, they were all so inexpensive anyway my only interest was on saving space.

Again I really appreciate your help and as soon as it works there will be a check off to the American Cancer Society, which already happens to be one of my main charities, but I will donate it in your name.

Are you sure you don't want something for you own time, patience, and talent?

Thanks!

PS -- This is the k>>

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required