MK125 Hysteresis

Hi

I’ve read all the posts and wonder if you could clarify the solution to the problem of the circuit switching on and of a number of times as the external light dims / increases. I believe this is called the hysteresis effect. I have come across what appear to be 3 solutions in the various posts:-

  1. Increase C3 to increase the delay
  2. Increase R4 to increase the delay
  3. Put a 100K + resister between pins 12 & 14 of the IC

Q. Am I correct in my understanding that any of these will work?

Also, if so, will they work together or would they cancel each other out e.g. Would increasing C3 & R4 at the same time increase the delay or would it go back to normal. This is probably very basic but I’m not sure. (I think it’d increase the delay.)

I’m trying to make the switch operate only once as the sun sets, and again only once as the sunrises. I tried 2) but the circuit stopped working altogether (possibly my soldering). It worked as normal when I put R4 back to normal so I’m trying 3) now just waiting for the sun to set.

Thanks

Jeff

What you are trying to do is impossible with this circuit.
Hysteresis is just a couple of seconds. Stretching it further will make the circuit unreliable.

Hi

But that is what is says on the Kit. Quote :- Switch on at dusk, turn off at dawn, fully automatic. Wide range adjustable sensitivity. Delay circuit avoids cycling …etc

It doesn’t say "Switch on and off and on and off and on at dusk, and off and on and off and on and off at dawn.

I had assumed that the “Delay circuit avoids cycling” was supposed to stop this “flicking” on / off. If not what does it mean? there are 3 threads I picked up on in the forum which seem to be discussing the same problem.

On the thread MK125 17th March 2009 [url]Mk125] it says:-

You can increase hysteresis by adding a resistor from the output to the non-inverting input (+) of the op-amp.
Sorry, no values, please experiment (e.g. 100K)

On the thread MK125 Light sensitive switch 8th March 2007 [url]Mk 125] it says:-

You could in increase the value of R4. Please experiment with different values.

On the thread MK125 Light Sensitive Switch (schemerschakelaar) Fri Jan 05, 2007 11:09 pm [url]MK125 Light Sensitive Switch (schemerschakelaar)] it says:-

Just remove C3 (100uF). For stabilty reasons you can mount a 100nF capacitor for C3, but remove the ELCO first.

This is for removing the delay so by inference increasing C3 should increase the delay.

In reading the posters comments I think they were having the same problem as me, and therefore these posts above were possible solutions. My thinking was that if the delay were increased then the light may have just got a bit lighter then started to get darker again before the circuit fired. If the delay were long enough all the light / dark fluctuations around the switch point would be over so it would only fire once.

Not understanding electronics in any great detail I thought that perhaps the capacitor C3 was discharging through R4 once the light sensor reached the switch point. Only when it had discharged to some predetermined level would the relay fire. Therefore if the capacitor value was increased it should take longer to discharge, similarly if R4 was increased it would also take longer. Thus it may have been possible to extend the delay enough to get past the tipping point.

Hopefully this is true and you misunderstood my first post, please advise.

If it really won’t work then I’ll have to think of something else. (Sorry for the length of Post)

Regards

Jeff

I’m sorry, you’ve got me confused.
I thought you wanted one pulse at dawn and one pulse at dusk (that is impossible).
Basically, the best way to increase the hysteresis is to increase C3 value.

Thanks I’ll try that. I realise now that I didn’t make myself clear.

I’ve got the pulse sorted with an add-on circuit which just gives a pulse each time the relay on the MK125 flips

Thanks for the advice

Regards

Jeff

I’m having a similar problem with this mini kit. I have it set up so that the relay turns an LED clock display off when it is dark (so I can get to sleep!). However, on a morning the display will turn on for 10-20 seconds then turn off and back on and just keep cycling untill I adjust the trimmer. Once the trimmer has been changed, the new setting is ok for the light level to de-activate the relay, but not suitable for the ‘dusk’ conditions. Original C3 hysteresis capacitor has been used also.

So, my questions:

  1. How to solve this
  2. Is there an equation to calculate hysteresis/time delay
  3. Could someone verbally describe how the circuit works
  4. Is it possible to build an auxiliary delay circuit

thanks in advance

C

Hi

I’ve today changed the C3 capacitor to 470µF but at dusk it still cycled twice. I’m going to try 4700µF next. I haven’t yet seen what happens at dawn (& will probably be asleep).

I’d be surprised if yours just “keeps cycling” forever, if you leave it long enough surely it would stop when the light increased sufficiently? I’m also surprised that it doesn’t happen at night as well. Is the LDR near the LED display could that be influencing the action?

You could use the relay to perhaps start a 555 timer circuit to open / close a further relay for the period whilst the hysteresis effect is happening. There are many circuits on the web. I’m conisering that but hoping upping the capacitor value will do the trick.

I’m a new to this so can’t really help with technical matters. I just try different thing to see what effect they have then try something else dependent on the result.

Regards

Jeff

Hi

I’ve now changed the C3 capacitor to 4700µF (the largest they had @ Maplins) and it has stopped the cycling (at least tonight which is the first activation since I changed the cap). With the 470µF capacitor it cycled about every 30 seconds at the switch point. So if it were a linear progression then using a 10x cap would theoretically make it cycle every 5 mins but as it only ever cycled for ~ 2 1/2 mins I guess the light level has dropped enough for it to be passed the hysteresis point.

I am running the circuit at 6v having changed the supplied relay for a 6v one but I doubt that makes any difference. (Reason = the rest of the circuit I’m linking it to runs on 6v)

Hope this helps anyone else with the same problem.

Regards

Jeff

How many times did it cycle with the original 100uF capacitor? Mine is flicking like mad at the time of trigger, but only at dusk. At dawn all is fine, one click and it stays.

Mine cycled about 5 times. I am running at 6v using a different relay, and I have that onboard relay linked to a further relay circuit which just gives a momentary contact each time the relay on the board switches. I just needed a pulse to set off an existing circuit. It’s worked well ever since. I’m just setting up a battery back up so it continues even in a power failure though as it works I haven’t completed it yet (no incentive!!) :slight_smile:

I now have replaced the C3 with a 2200uF and all it does is delaying the response. My problem is when the electronic switches the relay at dawn in the state when the LED goes off (I think than the relay drops, i.e. does not draw current) it starts sort of flickering. I am running a 12V motor switched by the relay. I have replaced the original single pole relay with an equivalent double pole double throw. This way I can change the polarity for the motor and my chicken house door goes up and down and when each travel is complete a switch either end turns the motor off. I only have the problem in the morning. I now suspect that maybe the motor needs to be fed from a seperate battery, so it does not interfere with the electronic. Other than that I have no further idea. Maybe the Velleman-expert can give me some further pointers?

I am definatly no expert, but it could be that the power requirements of the motor is causing the instability.

I’d just try to keep both parts separate, that’s what I have done, mine is used to open and close the curtains. The motor for the curtains has a completely different supply as I had a problem with the circuit switching immediately the motor started. I think the voltage dropped below that which kept the relay active so it dropped out. If the relay was in the not active phase then it wouldn’t drop out which is why it may only happen on one change and not the other. Depending on how the relay has been wired I believe you can set the relay to come on or go off at dawn so which end of the day would depend on the exact wiring.

Definately the motor is the cause of troubles.
A possible solution is running the MK125 from a regulated source (e.g. 9VDC).
By doing that, small drops caused by the motor will not influence the op-amp trip point.

Hi, no, I am not an expert either. But I am glad you replied, because I woke up 5:00am this morning hoping to hear the chicken door opening, but nothing. I had another think and I came to the same conclusion. I think the when the light increases, the resistance in the LDR reduces, causing the capacitor C3 not to be charged any longer and C3 discharges via the R4 until it is below the voltage of the voltage set on pin 13 of the comparator. The voltage level is set via the adjustable resistor. Now, if the light increases and the voltage on pin 12 is equal or just less than on pin13, the relay switches, the motor comes on and I think the start of the motor causes the voltage of the whole system to drop that suddenly the voltage on pin 13 is now lower than pin 12 and causes the relay to switch the other way. The motor turns the other way closes my door, the door opens the end stop switch and the system normalises itself again, but the LDR still says it is light enough and the cycle starts again. Increasing the C3 has actually made the situation worse, since pin 12 is now held for longer on higher voltage, hence giving pin 12 no chance to drop below the voltage level of pin 13. I am saying all this because the switching rate which I experience seems to be different from yours. Mine is much faster, like a flicker. Not just switching every minute or so. It switches on a rate mechanical systems would react and therefore I think feeding the motor off the same source than the electronics is causing the problem. I am glad you indirectly confirmed that you have no problems with your set-up using motors but of different power sources.

For all who are interested, separating the motor’s power supply from the electronic’s supply sorted the problem out. My system works now perfectly.

I’m trying to design a light activated chicken door myself, would love to see your design.

No problem. Let me have your email and I send you some fotos. The Velleman MK125 works absolutely brilliant for me. cheers

Hi There,

I too am looking to build a auto door for my chooks would it be possible to send me the plans?

I cant seem to PM you from here…

Stu

Hi, I have a PDF document with all the information I have collected, but I can not see how I can upload it to this site. I can send it to you via email, just let me have your address. Plans are all copyright of course … :stuck_out_tongue:

that would be brilliant !!!

stuart at manicgamer dot net

many thanks for this…