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

ronv

Joined Nov 12, 2008
3,770
Take a look at this one. I did not set the time on the 555 so you would need to change that.

If you want to try a potential fix try adding a pull up from the base of Q2 to +5. Say 1k
And a pull down of about 4.7k on the base of Q5 to ground.
 

Attachments

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Thanks for the circuit sample, Ron. Certainly less cluttered than mine! I especially like the prospect of having the Fill/Stop switch run the pump directly, instead of through the timer. I'll have to weigh that against using the single, push-to-make momentary switch I'm using for it currently. The way it is now, a press and release causes an actual cancel of a timed pumping cycle that was started by the water-level Hall, as well as seeming to the user to be running the pump directly for as long as the button is held in. But the clutter to accomplish that as an alternate trigger and RC time for the 2 timers is sure messy, at least the way I did it.

I will also try out your suggestions for the pull-up/downs on my existing Q2 and Q5. In particular, the pull-up for Q2 would help ensure the Add Water timer isn't as likely to get a trigger unless it's coming from the Hall dedicated to that task. That type of unwanted trigger has been my main issue (I will be testing out Eric's 7805 filtering suggestions tomorrow). I haven't seen anything to indicate that the 2 timers (Q5 and Q6) are being turned on accidentally, but better to add a pull-down to there just to be sure. Great suggestions, thanks!

-Mark
 

ronv

Joined Nov 12, 2008
3,770
Thanks for the circuit sample, Ron. Certainly less cluttered than mine! I especially like the prospect of having the Fill/Stop switch run the pump directly, instead of through the timer. I'll have to weigh that against using the single, push-to-make momentary switch I'm using for it currently. The way it is now, a press and release causes an actual cancel of a timed pumping cycle that was started by the water-level Hall, as well as seeming to the user to be running the pump directly for as long as the button is held in. But the clutter to accomplish that as an alternate trigger and RC time for the 2 timers is sure messy, at least the way I did it.

I will also try out your suggestions for the pull-up/downs on my existing Q2 and Q5. In particular, the pull-up for Q2 would help ensure the Add Water timer isn't as likely to get a trigger unless it's coming from the Hall dedicated to that task. That type of unwanted trigger has been my main issue (I will be testing out Eric's 7805 filtering suggestions tomorrow). I haven't seen anything to indicate that the 2 timers (Q5 and Q6) are being turned on accidentally, but better to add a pull-down to there just to be sure. Great suggestions, thanks!

-Mark
Hi mark,
I think the manual on/reset works the same. When the button is released it resets the timer.
I did forget the stuck magnet though. So it you decide to build it we should fix that.

MCU88, no real reason for using the schottky diodes except maybe for D5. It clamps the reset pin from going above +12. Most ICs have ESD diodes to ground and Vcc, but nothing good ever happens when you try to put much thru them. By using the schottky it turns on before the ESD diode. I get lazy and just use one at the top of the list for the simulations.
 

Søren

Joined Sep 2, 2006
472
[...] 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 [...]
External dial missing for now, but if you're willing to give up a single LED (perhaps change one of the other LEDs to steady/flashing for two indications), a potentiometer, a resistor and a cap will give you that - or move to a controller with more pins, but what's the fun in that ;)

Timed cycles and the rest are decided by the programmer (you) and new functionality can be a few lines of code, when she changes her mind (sadly it'll only work on the controller - if only humans were that easy to handle).

The LEDs has got their own board, as I imagine them placed together, but not necessarily right next to controller (the switch could be put there as well if needed).

A diode like D3 should be placed right at the pump/solenoid terminals.

PDF:
http://forum.allaboutcircuits.com/a...9/?temp_hash=64c21d083772423899c98f1430293293
or:
View attachment WaterArtCtrl.pdf
Not sure which of the above two links will work (none, one or both), but if none, I hope a friendly soul will tell me what I should have done :)

Regards
Søren
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
Søren,

Thank you very much! This is excellent; getting me over the hurdle of a circuit design to support the PIC and my I/O needs so that I can l jump right in to learning the programming. Exactly what I was hoping for.

If I may, I’d like to ask you 2 follow-up questions:
  1. How to add the safety feature of being able to shut off the pump if it continues to run due to the low-water floating magnet getting stuck and keeping its Hall active? Is this as simple as programmatically starting an internal timer to kill the pump output if the low-water Hall has stayed active (low) for >some amount of time?
  2. Can you recommend software for me to take a look at for programming and simulating the PIC? Basic and inexpensive would be a good starting point. ;)
Also, please correct me if I have misunderstood you:
  • >> A diode like D3 should be placed right at the pump/solenoid terminals.
    • I understand this to mean: Add another diode across the terminals of the pump/solenoid as a flyback.
  • >> […]but if you're willing to give up a single LED[…]
    • I understand this to mean that one of same pins you are using as an output to light an LED could instead be used as an input for a potentiometer. That my programming would decide if the pin would be an input or an output.
By the way, both of the links you provided worked fine and did the same thing, which was to give me a Save-As prompt for the file attachment.

Thanks again,
Mark
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
ronv,

I double-checked how I built your circuit in my simulator, but I still couldn't get the momentary switch to stop the pump (running via 555 cycle) upon release without changing the capacitor C4 from a .1uF to a 6.8uF. Lower values charged too quickly to hold the 555's reset low for long enough to actually reset it. The 555's output voltage drops <1 volt for an instant, but essentially it kept the pump running.

A 4.7uF worked most of the time, but too often the 555 output would drop to 0v for about 0.1 seconds and then it would jump back up to 11.7v again. A 3.3uF caused the same 0.1 second drop to the output, but would never get the 555 to stop completely like the 4.7uF did. A 2.2uF resulted in about a 0.05 second drop to 0v on the output, and so on as C4's values got smaller.

This is one of those situations where I don't know if I should be relying on what my simulator shows me or not. I simply don't have the skill or experience to know how completely to trust it. If you guys think a .1uF cap for C4 will reset the 555 just fine, I certainly have no reason to doubt you.

Thanks,
Mark

PS - Thanks for your explanation about the Schottky diodes. I found that very helpful.
 

ronv

Joined Nov 12, 2008
3,770
You know what. I think your simulator is correct. Mine will reset with any size pulse while the data sheet calls for at least 3 or 400 ns. Let me recheck.
 

Søren

Joined Sep 2, 2006
472
[...] the hurdle of a circuit design to support the PIC and my I/O needs so that I can l jump right in to learning the programming. Exactly what I was hoping for.
Great. Usually, the programming is the larger part of a µcontroller project and I seriously think µC schematics look boring and boxy, compared to discrete digital or analog schematics, but that's the price of progress I guess ;)


  1. How to add the safety feature of being able to shut off the pump if it continues to run due to the low-water floating magnet getting stuck and keeping its Hall active? Is this as simple as programmatically starting an internal timer to kill the pump output if the low-water Hall has stayed active (low) for >some amount of time?
  2. Can you recommend software for me to take a look at for programming and simulating the PIC? Basic and inexpensive would be a good starting point. ;)
If the magnet getting stuck is a likely scenario, I'd say it calls for a bit of (mechanical) redesign, as this method is usually very reliable. That said, a fail safe is always a comforting measure and depending on what's possible in terms of changing bits and bobs, there's several ways to attain this, but you nailed the best way I think.

As you outlined - when the pump starts, it fills the upper reservoir with a relatively repeatable speed, I'd imagine, so if it usually takes say 5 seconds to lift the magnet to a point where the Hall switch reverts to a "high" output, check after perhaps 8..10 seconds, if the magnet still senses a low water condition and if it does, kill the pump and flash some of the LEDs to signal the error to the user - perhaps make it deny further actions until the lid has been off and put back on (store an "error flag" in the EEPROM of the controller which isn't cleared until a "lid off-lid on" event has been detected, then repeated power cycling won't let it overfill.
Without installing a third Hall switch, this is probably how I'd cut it, as it's just a few lines of code, so takes no intervention on the existing mechanical bits.

Microchip, who makes PIC controllers, has got a free download with a compiler, a (sort of) sim etc. (which is a must have for PICs) and a C-compiler (limited to a certain code size in the free edition IIRC). There's a free Pascal-like compiler somewhere on the net and probably others - things change on a regular basis out there.
This is just stating that there's a variety of free compilers (and if you throw money at it, more exists as usual).
I can't recommend anything out of the blue, without knowing where you come from (programmatically speaking) - what suits one may disgust the next.
To burn your programs into a controller, you need a programming device (for PIC you won't find better than Microchips inexpensive and capable prototype programmers).

You also have to consider if you'd rather feel at home with Atmel µcontrollers (If you've done Assembly language on a PC, this might feel more like home) and there's several µcontroller families which each have their strengths and weaknesses.

Another point is, that if you have no plans for further work with µC's, the investment in a programming device and especially the time spent learning µC's might be prohibitive.


Also, please correct me if I have misunderstood you:
  • >> A diode like D3 should be placed right at the pump/solenoid terminals.
    • I understand this to mean: Add another diode across the terminals of the pump/solenoid as a flyback.
  • >> […]but if you're willing to give up a single LED[…]
    • I understand this to mean that one of same pins you are using as an output to light an LED could instead be used as an input for a potentiometer. That my programming would decide if the pin would be an input or an output.
Exactly how I meant with the diode. Transients should be dealt with as close to where they're generated, or they will give you grey hair in no time ;)

Yes, the I/O pins are controlled by a so called direction register, where each line can be set to input or output (and this can be changed at run time as well if needs be). Further, most of the pins have several functions of which you select what you need (again controlled by registers).
If you look at the schematic, you'll see that eg. pin 5 is marked with "GP2/AN2/T0CKI/INT/COUT"
GP2 means General Purpose I/O bit 2
AN2 is ANalog in (third A/D-C channel, as they start from 0)
T0CKI is Timer-0 clock Input
INT is external INTerrupt input
COUT is Comparator OUTput
This means that pin 5 can be any of the above, depending on how you set up the registers and the same goes for the rest, except for GP3 (pin4), which can be a general purpose input, but not an output.
Not just in and out in the same pin - more versatile than you ever imagined I'm sure :D

I'm not sure if I should urge you to download the datasheet, as it holds enough info to give most people a serious headache. It does show it all, but you have to flip back and forth whenever you're chasing a particular bit of info, mainly because of the different ways to use each pin.


Further, if you need more I/O pins, it's easy to just move to another PIC with eg. 12 or 16 I/O's.


By the way, both of the links you provided worked fine and did the same thing, which was to give me a Save-As prompt for the file attachment.
Thanks :) so they just looked ugly.


You probably have more questions when you've read this ;)
 

Thread Starter

marktstedman

Joined Jul 15, 2014
14
ronv & Søren,

Thank you both for the recent posts. They are extremely helpful and I will spend more time with them soon, as I work on redesigns of the existing board. I just added Eric's suggestions for better filtering and buffering of the incoming power to the existing board design -- so far, so good.

Just like with a new custom software app: First, make it work. Then do it the right way; clean up, consolidate, fortify.

Thanks again,
Mark
 
Top