Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 19:00 05 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Maximite random lockups

Author Message
BrianP
Senior Member

Joined: 30/03/2017
Location: Australia
Posts: 292
Posted: 02:19pm 12 Jun 2017
Copy link to clipboard 
Print this post

Hi all
The Maximite door lock project mentioned a while ago has been working now for quite a few weeks, basically working beautifully.

BUT

Every so often (maybe once a week - quite random) the Maximite locks up requiring a power off restart. There is a watchdog timer in the code so the issue shouldn't be a program error.

My gut feeling is that perhaps a power spike is the cause (hard to test for) or maybe an earth loop scenario between the Maximite power & the laptop end.

The hardware setup is a s follows:

1. Colour Maximite mounted inside the building adjacent to the external keypad (roughly 20cm of ribbon cable between the two)

2. Power 12v from a remote battery backed PSU fed to the power connector on the Maximite (shouln't be an issue here).

3. Serial comms to an Internet connected laptop approx. 30m away (using 2 transistora to invert / convert from RS232 to TTL for the Maximite. (The laptop uses a USB RS232 serial converter.) Baud rate is only 9600.

4. Maximite driving an isolating relay which provides the interface to the door lock mechanism.

Because the problem is random & not reproducible it is slowly driving me (more) nuts, as we have to do a site attendance to reset the power to the Maximite at the most inconvenient times (Murphy of course).

Anybody have any clues / suggestions?

Regards

Brian P.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 05:17pm 12 Jun 2017
Copy link to clipboard 
Print this post

I would suspect the 10uF Vcap capacitor. Replace it with a 47uF tant or better still a 10uF ceramic (surface mount).

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 05:59pm 12 Jun 2017
Copy link to clipboard 
Print this post

I would consider opto-isolators in the serial line. Big earth loops are not good.

You could also put in a relay on the power supply controlled via a 555 or picaxe to do the power off reset automatically. Finding and eliminating the cause is preferred but Murphy rules states that once you have the reset installed, the cause of the problem will disappear so it will never get used.

Jim



VK7JH
MMedit   MMBasic Help
 
BrianP
Senior Member

Joined: 30/03/2017
Location: Australia
Posts: 292
Posted: 06:32pm 12 Jun 2017
Copy link to clipboard 
Print this post

@Geoffg - good point as the Maximite is now a few years old. Will try this.

@TassyJim - another good point as the building is a 3phase installation & goodness knows what earth currents might be floating around depending on circuit loading etc. & the subsequent voltage drops in the neutral conductors.
I thought about the auto reset but I agree with you that it is far better to find & fix the problem than to implement a kludge.
I should be able to use any old opto to toggle the RX / TX lines?

Thanks both of you for the replies - I'll post back when I've had a chance to implement both suggestions.

B
 
VK2MCT
Senior Member

Joined: 30/03/2012
Location: Australia
Posts: 120
Posted: 09:03pm 12 Jun 2017
Copy link to clipboard 
Print this post

Hi Brian,

If inclined:

Please describe the power supply, regs and where electros and other caps are placed.
Distance from PSU to mite ?

How much current does the latch draw, approx, and where does it get it's power from ?
Is the latch momentary - only for actual entry / exit ? Back EMF suppression ?

Any big motors (Aircon/saws etc) around or fluros. Or does the mite only lockup when people aren't present (hall closed) ?

John B

 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 09:44pm 12 Jun 2017
Copy link to clipboard 
Print this post

If you don't suss it, you could impliment an external watchdog/reset circuit based around a counter and a monostable.

You have to re-trigger it every few seconds or it fires and asserts a reset to the uM.

I have done this on stuff in the past where I have had lockups and never found the culprit (not uM though, watchdog always works for me).

favourite was a 4017 with 555 timer as it's clock and a 4047 to generate the pulse on count 10. If you clock it at ~1Hz (easy with a 555) then you have 9 seconds in which to assert a rest to the 4017 and if you don't the moment it counts to 10 you get your reset. So in your code, have a timer going off at 3 second intervals which pulses the reset pin of the 4017 and if it doesn't happen... bingo. You could do this with a standalone 555 but they are a bit fickle and the timing can drift a lot and is difficult to get long periods accurately with short reset pulses.

A PITA but simple, reliable, *cheap* and really easy to integrate.Edited by CaptainBoing 2017-06-14
 
BrianP
Senior Member

Joined: 30/03/2017
Location: Australia
Posts: 292
Posted: 02:10pm 13 Jun 2017
Copy link to clipboard 
Print this post

@VK2MCT - the 12v power supply is approx. 5m from the Maximite with a gel battery across the output - should be fairly stable I would think.
The Maximite can cope with anything from 7-18v with its 5v & 3.3v regs.

The door latch is part of its own self-contained controller, TTL logic controlled so back EMF shouldn't be an issue. In any case the Maximite is isolated from this by a relay (N/C = locked) so there is no direct connection to this external foreign device (the door).

There is a fairly large 3phase aircon unit, but not close. Haven't been able to determine at what point the lockups occur (people present) due to the random nature - still analysing the on-going log file to try & pin this down.

@CaptainBoing - Yes, I had mentally considered a 555 based reset mechanism to do just this, however would prefer to find / fix the actual cause. This will be the last-ditch method though - as TassyJim says - Murphy will dictate that once you have a fix in place the original problem will magically disappear

I like TassyJim's suggestion of opto-isolating the serial line, having had experience with earth loop problems in this building (audio related - I now use A/D & D/A converter boxes when sending audio from one end of the building to the other - inbuilt opto-isolation - works a treat).

Geoff's suggestion of the Vcap will be tried also - knowing how touchy this can be.

The journey continues...

B
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 03:14pm 13 Jun 2017
Copy link to clipboard 
Print this post

Does the serial line need to be connected continuously ? I would disconnect
that and see if it is ok
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 06:38pm 13 Jun 2017
Copy link to clipboard 
Print this post

Brian, just as a way of working out when the lock up may be happening, you could set an interrupt to write the date & time to a file on the SD card every 10 minutes or so (not forgetting to close the file each time ) You can then read the file when the system has reset to find the last time/date written.
GM
 
BrianP
Senior Member

Joined: 30/03/2017
Location: Australia
Posts: 292
Posted: 10:41pm 14 Jun 2017
Copy link to clipboard 
Print this post

@chronic - the serial line is the only means of remote communication to see if things are still alive. The remote laptop has a Teraterm log window open saving the Maximite entry log to a text file; we can remotely via TeamViewer access this & if required view the status of the door lock or manually lock or unlock the door. Remotely checking if this communication is working is our current way of determining things are OK.

If we disconnect the serial line we lose this monitoring & control option - currently we haven't had a hiccup for nearly 2 weeks so I don't really know how long we would need to be disconnected for the test. It seems Murphy knows we're watching!

@OA47 - Could do this. Another way might be to get the program to add a timestamped "tick" entry to the entry logging array every so often so this would automatically appear in the remote Teraterm log. Would make the log much larger of course.

Will have to pull the Maximite out of service anyway to implement Geoff's & Jim's suggestions, so could make program mods then. Just waiting for a lull in the workload...

B
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024