CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Intruder detect with PIC, any idea ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ALFA 705



Joined: 03 Jun 2005
Posts: 9

View user's profile Send private message

Intruder detect with PIC, any idea ?
PostPosted: Tue Aug 30, 2005 10:20 am     Reply with quote

Hi, Smile

I'n using 18F8722 and it works in a box. In this project I need to implement an "intruder detect". In other words,
If one cover is removed the PIC has to be able to detect it even if power supply is "OFF".
Of course, no action when power is OFF but when the PIC goes "ON" again, has to detect that cover was removed and attached again.

Do you have an idea, please ?
I would like to avoid to use a battery por this purpose. Sad
I hope you can undestand my poor English.

Thank you.

ALFA 705
valemike
Guest







PostPosted: Tue Aug 30, 2005 10:43 am     Reply with quote

I think your PIC needs to be sleeping, and wake up on interrupt, with the interrupt hooked up to a switch that closes when you lift the cover.

You'll need a small battery at least though.

Perhaps maybe the switch in the cover should turn on power to your PIC! So if someone tries to open it up, then it provides power to the PIC. So in your main program, then check this switch upon POR.
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Re: Intruder detect with PIC, any idea ?
PostPosted: Tue Aug 30, 2005 12:25 pm     Reply with quote

ALFA 705 wrote:
I would like to avoid to use a battery por this purpose. Sad


It's digfficult tot avoid the battery. What standby time are you expecting?

If you know that when the box will be opened, it's internals will be exposed to light (especially sunlight), you could put solar cells into your box, and power the PIC from them. When the box is closed, the PIC is powered down. When the box is opened, the PIC powers up from the pannels. You avoid the use of the battery, and you solve the detection problem. Use a LF series low power PIC.
ALFA 705



Joined: 03 Jun 2005
Posts: 9

View user's profile Send private message

PostPosted: Tue Aug 30, 2005 1:24 pm     Reply with quote

I'm using 18LF8722 at 3.3V.
Solar panels, good idea but It can't secure that works (poor light...). Also, the cost is an important aspect of this project Sad

The expecting time is too large. Weeks... maybe months
The product could be inactive in warehouse for long time.

I know that it's too dificult to resolve it without a little battery.

Thank you for you quick reply ! Smile

More ideas ?

ALFA 705
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Aug 30, 2005 1:43 pm     Reply with quote

How about something more mechanical? How about a rotary switch that is spring loaded but held cocked by the lid. When the lid is removed the spring spins the switch. An intruder would know something happened, but without knowing where the switch started there would be no way to reset it and avoid detection. The PIC wakes up sometime later, compares the switch position to what it used to be, and knows something suspicous happened!
And then there are electro-mechanical variants. A mousetrap hits a piezo element generating an electrical signal, a spring loaded magnet moves through a coil, etc.
Of course you would need some sort of a key to hold the spring cocked during assembly. The key could be withdrawn through a small hole under a sticker. Or the key could be a bit of mothball that would dissappear on its own after a period of time.
Tell us more about your application and we can give you better ideas.
_________________
The search for better is endless. Instead simply find very good and get the job done.
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Aug 30, 2005 6:23 pm     Reply with quote

How about a Tamper Evident sticker that you stick onto the box's seams. If the customer removes the sticker, it will leave the imprint "VOID IF REMOVED".

Sort of like our license plate state stickers. It falls apart if you try to move it around.

Or why don't you use a padlock!? Cool
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Aug 30, 2005 6:39 pm     Reply with quote

MikeValencia wrote:
Or why don't you use a padlock!? Cool

But seriously, the problem of powering something forever without a battery have not been solved for the general case yet. If you solve it, you have a chance to become quite rich.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 30, 2005 9:40 pm     Reply with quote

Not sure why you don't want to use a battery, but you probably wouldn't want a super cap either. You could charge the super cap and not have a discharge path except through a switch connected to the box. The voltage of the cap could be read from the micro. If discharged, then the case was opened. Not sure how long the cap could retain a charge. You can do the math.
ALFA 705



Joined: 03 Jun 2005
Posts: 9

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 1:08 am     Reply with quote

I try to explain a little more the project.

A PCB with PIC and another components are inside of aluminium box. The box has three lids; two on side and one on top.
The intruder detection only has to be in one of them (lateral).
If power supply (12VDC) is removed from the equipment and the lid is removed, the system has to be able to detect it and send a missage to general quarters with GPRS module (this module is not only for this purpose).

The "Tamper Evident sticker" is not a valid solution, It has to be reversible and works again Wink

This idea of use a super cap is the same that I thought. I have to do the math but I'm not sure about that...

The first idea was to find a component like a "magnetic detect" with "memory" or "latch" (Hall efect or something like that).

I think this is an interesant case for resolve...

Again, thank you and sorry for my English.

ALFA 705
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 31, 2005 1:37 am     Reply with quote

ALFA 705 wrote:
... send a missage to general quarters with GPRS module ...

You'll need power to make the transmission. How many Watts are we talking here?

My suggestion would be to take a Ni-chemistry battery pack. If you use it sparingly, it will last for a long time during warehousing and shipping.

Alternatively - use am anti-tamper fuse. That way the user will call himself and confess. Smile
Guest








PostPosted: Wed Aug 31, 2005 3:53 am     Reply with quote

Kender,

the GPRS tranmision only will be done when power supply goes up again. Not when lid is removed.
The system only has to be able to "memorize" the event and works later (when power "on").
The only power needed is only for "memorize" de event.


ALFA 705
Ttelmah
Guest







PostPosted: Wed Aug 31, 2005 4:49 am     Reply with quote

Simple facts:
The PIC cannot do anything without power.
Neither can any other form of 'electronic' ciruit.
Power requirements though can be _tiny_. Look at a digital watch. This has an oscillator running all the time, yet runs for years on a tiny cell.
I'd suggest a CMOS flip-flop, and a switch on the cover. The flip-flop, will have it's reset line operated by the PIC (when this is running), but store the event when the cover switch is operated. The output should have a tri-state buffer, again controllable by the PIC, so no output will be generated when the processor is 'off', to keep consumption to an absolute minimum.
For more information, the CMOS circuitry could even include a counter.
A circuit like this, would typically run for close to the shelf life of a small battery. Something like a CR1216, would give typically 5 to 8 years life operating this.
You would need to ensure that the 'clear' line is not operated by the PIC, till after it has enabled the tri-state buffer, and read the data stored. You could even use a rechargeable battery so that it is recharged when the unit is powered, but the operational life may not improve by much, and this adds more circuitry, since the actual 'design life' of the battery may be reached...

Best Wishes
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Aug 31, 2005 6:18 am     Reply with quote

A simpler way would be to have the intrusion detect switch being a "make on release". This powers the PIC from a small CRxxx battery. The first thing the PIC does on power up is detect if it has been powered up via the intrusion switch operation (as opposed to a normal power up) in which case it will turn on a FET in parallel to the switch to keep power to the PIC while it performs some housekeeping such as writing its alarm status to EEPROM, turns off the FET and goes to sleep.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 7:41 am     Reply with quote

You could charge a supercap when you have power. When a panel is removed a magnetic reed switch (SPDT type) drains the supercap quickly. When the power returns the PIC checks the voltage on the supercap to see if it is still charged, then recharges it if required. The supercap only has to feed leakage current while the power is off.
_________________
The search for better is endless. Instead simply find very good and get the job done.
ALFA 705



Joined: 03 Jun 2005
Posts: 9

View user's profile Send private message

PostPosted: Fri Sep 02, 2005 10:13 am     Reply with quote

Probability, I'll use a power-cap. I think it can be a good choice.
I'll test it in short time.

Thank you !! Smile

Regards.

ALFA 705
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group