How can I prevent 555 from being triggered accidentally by Hall sensor? (transients suspected)

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Hi. Thanks in advance for any help. This is my first post on this excellent site.

My circuit gets triggered unexpectedly, and definitely in conjunction with solenoids, compressors and/or heating elements energizing in other equipment plugged into the same outlet. Otherwise, the circuit works exactly as desired on almost all other AC circuits I’ve tried it on. I have tried to resolve this by filtering immediately across the 12v DC power supply, using a SA12AG TVS Diode, plus a 1uF cap and a .1uF cap. This has helped, but not eliminated the unwanted triggers. There are actually 2 timers in use; a 556, where the output of one of the 555’s controls the Reset pin on the other. I have attached a simulator image of the circuit, in its powered-on-and-ready state, and another one where it is being called on to pump water. My simulator doesn't have Hall sensors, so I'm just using SPST switches.

Power ON.PNG Water Wanted and Being Added.PNG
The circuit design is to control a 12v water pump and 12v solenoid water valve for a period of time. The water goes into a reservoir and then drains down through a water-sculpture. A sensor in the reservoir triggers the timer to pump the water back up again. Here are some explanations to help answer questions about the circuit design:

1. 12 volts is used for the water pump and solenoid valve. This comes from a 2-amp wall wart, which provides more than enough current at full load. All other circuitry is 5 volts, from a 7805 voltage regulator positioned immediately after the TVS diode and 2 filter caps. An additional .1uF filter cap is used immediately on the regulator’s output. The regulator is used to ensure that the 556 input remains steady regardless of the motor and solenoid. There are also more filter caps on the 556, as per suggestions I found here on this site.

2. The purpose of the 2nd 555 (Timer 2) is to power the pump and solenoid for a period of time; about 1 minute. It is triggered by an omnidirectional, non-latching Hall Effect sensor pulling the Trigger (pin 8) low. Its Reset pin (10) goes high on the output from Timer 1. The output pin enables an IRF530 MOSFET that provides ground to the pump and solenoid; water flows.

3. The purpose of the 1st 555 (Timer 1) is to enable Timer 2 for the same 1 minute (plus an extra 10 seconds) as a failsafe. It ensures that the pump doesn’t continue pumping water if something goes wrong, like the Hall sensor getting stuck low (it reads a floating magnet that might decide not to float). It is triggered by the low from the same Hall sensor. However, this happens via an edge-trigger to prevent a potential stuck-low Hall sensor from keeping Timer 2 triggered and pumping.

4. In addition to water being pumped by the Hall sensor reading the floating magnet, the user can press a momentary switch (Fill/Stop) to manually run or stop the pump. It engages a separate RC timing circuit, having a delay so short that effectively the pump turns off as soon as the Fill/Stop switch is released.

5. Because the 2 timers must work independently to accomplish the failsafe, yet be enabled simultaneously by the Fill/Stop switch, there are a few 2N3904 and 2N3906 transistors that enable or disable things. Also, there are LEDs to indicate Ready, Want Water, Adding Water and Timer 1 Enabled (failsafe). There is also a 2nd Hall sensor that stays low as long as the water tank’s cover is properly in place, or causes the lighting of a Cover Off LED and disabling Timer 1 and the Ready light if the cover is not in place.

Hopefully, that’s enough description to help make sense of the attached circuit diagram. I’m sure the pros know of much better ways to accomplish all of this, but it’s been about 30 years since I had any electronics training and so it’s plainly old school. I’m very open to any and all suggestions about the overall design.

But the main reason for the post is that there are 2 problematic symptoms I need help solving:

1. Problem 1 – The “Want Water (yellow)” LED comes on, and the circuit is effectively locked up. This happens without the floating magnet causing the Hall sensor to go low. And if the magnet were to try to make the Hall sensor go low, no triggering of either timer would happen (as far as I can tell). The situation can be corrected either by power-cycling the circuit, or by pressing and releasing the Fill/Stop switch.

a. I cannot duplicate this intermittent problem at-will. However, it happens only when my circuit is plugged into an outlet that is on a circuit shared with other appliances: toaster oven, coffee maker and possibly the hot/cold office water cooler. I have not yet had a chance to try and isolate which one(s) might be the culprit, but regardless, my circuit needs to be able to handle this, if in fact the problem is electrical noise/transients/etc.​

2. Problem 2 – The circuit starts pumping water even though the floating magnet is nowhere near the Hall sensor. I have been able to duplicate this problem, somewhat at-will, again using the shared AC circuit, by unplugging and then re-plugging the other appliances. In particular, the Keurig coffee maker often initiates this unwanted triggering immediately upon being plugged in to the same outlet as my circuit. It sounds like it has its own internal solenoid that energizes as soon as it’s plugged it, whether or not the power switch is turned on.

In a long-past job, we had to add a power conditioner (like an ONEAC) to stop point-of-sale terminal lock-up problems when there were refrigerators on the same circuit. Assuming that the problem I need to solve is power-related, I am hoping for an inexpensive and simple solution that I can incorporate into my circuit design. Or maybe an alternative would be to require that the low from the Hall sensor be longer in duration (1-2 seconds) in order to trigger the two timers?

Thanks for any and all suggestions and for your patience in reading this; I hope the lengthy description helps.
-Mark
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Mark,
I would say a primary cause of the erratic triggering is the 7805 regulator and its lack of adequate decoupling on the input and output voltages.
Add a 1N4001 diode in series with the 7805 input from the 12V input also add at least a 470uF capacitor on the input and output pins of the 7805.

The diode on the 7805 0V pin to 0V should be either removed and a direct connection made to 0V or add a 470R from the 7805 output to the 7805, 0v pin.

E
 

MCU88

Joined Mar 12, 2015
358
Hello...

At first glance your circuit looks a bit overdone / overcomplicated. Are you sure you need all those parts? Why do you have an diode in the path of the GND pin of the regulator?
 

Alec_t

Joined Sep 17, 2013
14,280
As the 12V supply is mains-derived, the AC loads being switched are likely causing power brown-outs sufficient to prevent the 7805 regulator working and so dropping the 555 supply enough to cause a reset/trigger. Eric's suggested use of a series diode plus large cap should help to keep the supply up.
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Eric/MCU88: Thank you for the suggestions and questions. I will add the decoupling to the 7805 and see if that does the trick. Simulator results are at the end of this post.

Alec_t: Thank you very much also. I just saw your reply as I was about to send my reply to Eric and MCU88. Your comment is also important and I’ll insert something up here about that. Originally, I wasn’t using the 7805 but found (or believed) that erratic behavior could be the result of too much load and noise when running the 12v pump motor and solenoid. My thinking was that the 7805 would output a steady 5v whether the pump had pulled the 12v line down or not, as long as there would always be something reasonable above 5v getting to the regulator for input. And the same would hold true for the 110v AC supplying the power supply. Essentially, I thought it smarter to not have to count on a stable 12v to keep the components happy. And thus my conclusion about extra triggers had been, extra voltage/spikes/transients coming in on the AC mains, not a lack of voltage as you suggest. As you will read below, at one time I did have a 220uF cap on the 12v line to supply power in the instance of brown-outs, but removed it due to the simulator blowing it up if I turned the power switch on & off repeatedly. Nothing ever blew up on the breadboard, but I had a dozen double-sided PCBs made up for the circuit because it all has to fit into a small space in the base of the sculpture. With that cost in mind, I simply couldn’t second-guess the simulator telling me that things would fry. I sure wish one of you guys lived next door to me to tell me when to trust or not trust the simulator. J I have added Eric’s suggestions of a 470uF cap from the input to the output of the 7805 (pins 3 to 1 on the schematic) and a series diode and have those simulator results at the end of this reply.

Regarding the diode on the ground pin of the 7805, I added it to stop the simulator from blowing up the regulator due to back current if the power switch (SW4) was turned off while the pump was running. More on that general topic will probably shed more light on the "over-complicated" comment, which I think is spot-on and I'd love more input.

I'll say that the overdone aspect can be broken down into 2 categories: Things added to stop the simulator from blowing parts up from back-current; and Things added to stop erratic results in the simulator under my "test" conditions ("what if the user does this, or that?" combinations of switches/sensors flipping on or off). Added to these is my very limited skill - I tend to add stuff to solve real or perceived problems. I simply don't have the skill or experience to let me ignore explosions in the simulator.

Back-current explosions: The diode on Gnd of the regulator is one example. Others are the diodes on the blue and red LEDs (DL1/Ready and DL3/Lid Off). I also used to have a 220uF electrolytic in parallel with the 12v filtering caps (C1 and C2), following suggestions of providing a source of power to offset power supply fluctuations. But... frequent explosions when the power switch was turned off, whether or not the pump was running.

Erratic test results: The 2N3906/Q2 was added because of “extra” triggering of Timer 2 when I went directly from the “Want Water” Hall sensor SW1 to the trigger (pin 8). In particular, it would always trigger and turn the pump on just by turning on the power.

Too many parts in general: I would prefer way fewer parts, and if I knew anything about PICs I’d go that way probably; maybe for the next project. That aside, I think that most everything else is in there to solve a functional need, but may not be the best method of doing so: I need a back-up method to stop the pump if the floating magnet gets stuck and keeps calling for water. I need a button for the user to be able to manually pump the water, or to stop a timed pumping cycle. I need a missing cover to prevent water from pumping.

**Results** - After adding the 470uF cap to the 7805’s input/output and the 1N4001 to the 7805 input, the circuit still works of course, but 2 things happen in the simulator.

1. The blue Ready LED flashes bright for an instant (~5v) when the power switch is turned on, then drops to a steady, lesser illumination (3.68v). Not a problem, just different. This does not happen without the 470uF cap.

2. If I toggle the power switch at ~1-second intervals, the 470uF cap blows up after several to a couple dozen toggles. The message is “Reverse voltage of n Volts exceeded maximum of 5v”, where n is somewhere around 7-10 volts. Or the 7805 blows up with “Current of n exceeded maximum of 1A”, where n is ~1.4A or higher. This all happens whether or not the pump is running, but it seems that slower and fewer toggles cause explosions when the pump is running. I cannot set the maximum reverse voltage of any component with this program (Circuit Wizard), and there is not a choice of 5v regulator with >1A current rating.

You may be reading this and wondering why I am concerned about someone playing with the power switch to this degree and destroying my work. I’m not, really, but my lack of skill and experience makes me want to be extra-sure about the circuit’s stability and the simulator is my only means of comfort. Please do not hesitate to say so if you think I am relying way too heavily on the simulator, or if I should switch to another one.

Thanks again, everybody!
 

ericgibbs

Joined Jan 29, 2010
18,766
Have you removed the diode from the 7805 Gnd pin to 0V.?
Also you can protect the 7805 from reverse voltages by connecting a 1N4001 in reverse parallel with the 7805.
 

Attachments

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Eric, sorry, I hadn't, but I just did and tried it. Either the 470uF cap or the 7805 - and usually both - blow up now after only a couple slow toggles of the power switch.

Also, I tried a reverse 1N4001 (D4) on the 7805, trying the input side and also the output side. No change. In fact, sometimes the entire circuit blows up with a message about unable to simulate due to numerous simulation errors. Here is a snippet of changes. New components are labeled *NEW*. No changes to the rest of the circuit. Are my changes as you intended?

Component Additions 1.PNG
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
All,

I separated most of the circuitry (see Picture 1 below) in order to follow and simulate the suggestions that have been made. The circuit behaves perfectly with the suggested decoupling of the 7805 and the added 470uF cap to buffer incoming voltage drops. I can toggle the power switch (SW1) all day long without causing any problems.

However, if there is any load applied to the circuit, as is of course the case with my normal circuit, the 7805 or other things start blowing up in the simulator. I can't understand why, and need your help, please. It's hard to trust the simulator's actions once I open the power switch. With its timing slowed way down, it shows current flowing backward through the 470uF cap, then into the input of the 7805 and out the Gnd of the 7805. Depending on whether I've opened the power switch (SW1) or the switch (SW2) for the load (lamp), either the 7805 or the lamp blows up with often huge excesses in maximum current or wattage error messages. Additionally, simply starting the simulator with both SW1 and SW2 in the closed position causes the lamp to blow up, although this is not the case if the simulator starts with either of the switches open.

Below are 4 pictures from the simulator to show this. When time permits, please offer opinions on whether I have incorrectly followed the suggestions given, or if the simulator appears to not be modeling the real world accurately. If it is thought to be the simulator at fault, I can go ahead and make the suggested changes to the physical circuit and ultimately have new boards built. It may be difficult to add the 470uF cap and the series 1N4001 diode for testing in the space available with the current design, but I will of course try.

Thanks again to all for the help,

Mark


upload_2015-3-19_14-13-0.png
upload_2015-3-19_14-15-18.png
upload_2015-3-19_14-25-49.png
upload_2015-3-19_14-29-39.png
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
That circuit is doomed to failure, use the the layout I posted, I have been using that circuit for over 30 years I have never experienced the failures your simulator is creating.
What is the name of your simulator program.?
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
It's Circuit Wizard from New Wave Concepts Ltd. It was around $250 USD. The most recent update several years old, although I've only had it for about a year. I chose it because it does 3 things in the same package: Design with simulation; Physical representation with simulation; and most importantly, Turn the design into Gerber and NC Drill files. The downsides are the lack of current components and not really enough flexibility with trace width and gaps, or with adding pads for connectors after it's done the physical layout for you and having them be included in the nets routing so that you can move them around to find optimal placement.

I would LOVE any suggestions for an alternative program that will let me design and simulate, and then auto-route traces and create Gerber and drill files. But this is more hobby than anything, so cost is an important factor. Thanks!

I'm going to fix my circuit and try your layout now. I had misunderstood your directions in Post #2 but it makes sense now that I'm paying more attention. I'll let you know what the simulator does with it. It should without saying that my faith is in you, not the simulator.

Mark
 

Alec_t

Joined Sep 17, 2013
14,280
I have added Eric’s suggestions of a 470uF cap from the input to the output of the 7805 (pins 3 to 1 on the schematic)
That's not what Eric suggested. The cap should go from the input to ground; not across the regulator. A reverse-biased diode should go across the regulator.
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Hi Eric,

It works great using your layout in the simulator, which seems very happy (it popped up a message congratulating me on finally getting advice from people who know what they're doing). I'll give it a try in the real world and see how it handles the power.

Thank you very much, and also thanks to Alec_t and MCU88 for the suggestions and insightful questions. If anyone would like to comment on not overly-expensive alternative programs for me to look at for design, simulation and trace routing, I'd love the input.

Thanks again,
Mark
 

Dodgydave

Joined Jun 22, 2012
11,284
Firstly your circuit looks a mess, start by doing block diagrams of what you need it to do and what sensors you need,

is it just switching a pump on and off when the tank fills up, and off when empty.?
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Dodgydave,

Thanks for your interest in helping. Below is a basic picture of what the thing is and is used for. I was asked by a friend to come up with a way to recirculate a timed amount of water that would liven up a sculpture displayed in her office. Ideally, she would be able to vary the cycle-on time with a control knob. Pretty simple stuff, but this is not what I do for work, so my circuit design is both inelegant and messy. I already have a pcb for it that does what I need, but it was being falsely triggered to start a pumping cycle. The posters above were very helpful with that.

I would be very interested in your thoughts on a more simplistic and reliable design. However, it does need to be a timed cycle, easy to vary with an external dial. I don't quite get that, but she has her reasons for it. It also needs a way to run the pump at-will or to stop a cycle, as well as to know that the cover is in place so it doesn't flood the office. I think I've included everything in the picture below. Ideally, it would be centered around a programmable controller, in the same type of way as robotics hobbyists control motors and sensor inputs. My profession is software engineering, so a programmable type of solution is probably more up my alley that what I've created thus far. But many, many years ago I took an electronics course, and...

Thanks for any suggestions you can offer.
-Mark

upload_2015-3-19_18-20-43.png
 

ronv

Joined Nov 12, 2008
3,770
See if I understand correctly.

If the hall is sensed turn on the pump for 1 min.
OR if the button is held down turn on pump.
IF the button is released stop the pump.

Do you have a link to the hall sensor.
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Ronv: You are correct, plus it needs to NOT pump unless the upper Hall detects the magnet attached to the cover. The cover acts as the attachment point for the incoming water line, so without this check, water could pump all over the floor if the cover was off. The particular Hall sensor I am using is a Honeywell SS451A. The Mouser link is: http://www.mouser.com/Search/ProductDetail.aspx?R=SS451Avirtualkey67810000virtualkey785-SS451A

Dodgydave: Both the upper and lower Hall sensors are identical. The upper one needs to see the magnet in order to allow the pump circuit to operate; the lower one serves to trigger a "low water" condition that starts the timed pumping cycle. I used reed switches earlier on, both glass and plastic-cased, but found that they were too easily damaged. The drawing I posted is more functional than physically accurate. There are some very tight clearances and the reed switches (and their connecting wires) got squished. So I had a few very thin PCBs made up that provide a few features that are working out very nicely: Easy solder-mount of these Hall sensors in the exact locations they need to be in to align with the magnets; The traces between the Halls replace the comparatively bulky wires that I had used previously; An easy soldering point to connect the 4-conductor cable that goes to the control box (+5v, Gnd, Out-Upper and Out-Lower). A flex cable and SMT versions of the Halls would have been my ideal choice, but the flex cables were too expensive in small quantities. The thin PCB works well enough.


As you both have probably seen from my complete circuit, posted at the beginning of the thread, it is messy and overkill. But it gives me the functionality I need and want, including a means of turning off the 555 that runs the pump in the event that the floating magnet doesn't rise with the water level. You are right, Dodgy, necessity IS the mother of invention -- there was a flood early on.

The existing circuit, messy though it may be, is solving the problem for this one instance, other than getting falsely triggered, which I think I now have good answers for. My friend thinks that others will like this water sculpture thing she has, which means that I will probably have to build more control boxes. Knowing that almost any other way of designing my circuit would be an improvement, my hope is for circuit ideas that reduce the mess and unneeded complexity, and increase the reliability. The reed switch suggestion was a great one -- I wish I could have keep using them. That first design was oh-so-much less cluttered! But then came the inevitable, "Can you make it do this/that/the other thing?"

Thanks again for your help!
Mark
 
Top