News:

Let's find out together what makes a PIC Tick!

Main Menu

Something Else

Started by Fanie, Jun 21, 2023, 08:07 PM

Previous topic - Next topic

Fanie

Electric Door Lock (Pic-less)
For anyone interested, here is an electric remote lock for a door.
Key locks can be picked, hence using a code hopping remote is a lot more secure.
The lock uses an automotive striker motor which drives a couple of 12mm metal pins in or out of the the pane.

The door open/close sensor is a NO reed switch which is activated with a magnet when the door is pushed close.

If the door is closed, the reed is closed and the 2k2 resistor draws about 5mA from the 12V.

When the remote activates the Open (Oop) relay, the motor pulls the pins and the door can be opened by hand.  The remote allows about 1 second for the door to be opened.  You can hear the striker unlocking the door.

If the door is not opened, like when the remote is accidentally pressed, the door will lock itself again, essential, otherwise the door will be unlocked.
The self re-lock happens because when the remote activates the open relay, the 1000uF cap is rapidly discharged through the diode.  When the open relay closes, the 1000uF cap then powers the lock (Sluit) relay which locks the door.

If the door is opened, the reed goes open and the 1000uF cap is discharged by the 2k2 resistor.
If the door is then closed again, the reed closes and locks the door again by the cap charging up through the lock relay.
The 2R2 10W WW resistor is there to extend the striker motor's life.

This locking mechanism is in my front door for more than 20 years.  I did have a pic board in there to do basically the same, with a buzzer that warns every minute or so when the door is left open.  I suspect water got in the board (the wife has a flower pot above it), I couldn't find another board or the code for it between the hundreds of codes, so I decided to replace with the more robust electro mechanical setup.

Fanie

#41
How to make a remote remote gate opener.

You need an old phone, its charger, a microphone amplifier and a pic board of course. 
Not all my projects are without pics  ;D

The above gets mounted in a box to filter most environmental noise out.  Hopefully you have 12V from a solar system and that powers your board as well as the phone's charger that is permanently connected.

You program the phone to play a pre-recorded frequency or frequencies when you call the number as a ringtone.  This way you can make he access secure.

The microphone amplifier play to the pic, and you use the counter command to read the frequency or frequencies played by the phone.
No other ringtone or tune will compare, and your pic will not respond or some idiot blowing his 400 dB air horn at the gate will not open.
The pic switch a relay to open the gate (or whatever).  This can even be a water pump at a remote location, as long as there is phone reception.

The pic never answers the phone, so there are no call costs.

You can be anywhere in the world (so to speak) and open the gate for whatever purpose, ie the girl next door comes in to clean the place, your buddy wants to borrow your lawn mower so his wife can mow their lawn...
You can also add someone else's number with the same ringtone to give them access.
All they do is call the number and the gate opens.  Better let the wife have access too.

I made this opener for a friend who lived in a leisure resort.  Every house owner was added to the phone so they have access.  Visitors phone their host and he calls the gate so they can enter.

Fanie

#42
The EEPROM saga with the 16F684 was for this project. 
It is a cookie machine for my friend's small bakery.
The dough is pressed through a form that feeds onto a small conveyer belt where it gets cut to length. 
All that remains is to scoop the cookie off the conveyer and place it in a pan.
The small stepper drives the belt, it has a gear which drives the mechanism that cut the dough to length.  The whole concoction was 3D printed and screwed together.
Kondensmelk2.jpg

The control panel with control switches and indication of the steppers feed frequency.
I used the Sound2 command to run each motor at the correct speed.
The press speed is 42 Hz to feed the dough at the exact ratio for the conveyer at 300Hz.
Too fast and the dough deforms, too slow and the dough stretches and break.
The down switch riding the piston down until it starts pressing the dough out is 6000Hz, and when the bottom limit switch is pressed, the piston is driven up at 8000Hz and stopped when it reaches the high limit.
Only with a stepper motor that you can run accurately from such low speed (42Hz) to high speed (8kHz).  And Les's fantastic commands.
Kondensmelk3.jpg

And this is Phillip filling the pans up. About 26 pans filled in around 15 minutes.
Kondensmelk4.jpg

580 cookies in 15 minutes is about 1.5 second per cookie.

pjdenyer

Hi Fanie, it's amazing what you can do with a 3d printer and some electronics.

Fanie

I don't know how we got by without it.
The 3D printing is awesome, whenever you need an enclosure, part, fitting... whatever, you draw it and print it.

JonW

Love it.  Automation gives consistency to the end product; I like the Human in the process; gives it that homemade touch.  He doesn't look like he eats that many, he is pretty thin  ;D

Fanie

#46
Ah yes, Phillip is a small guy, but very capable with some things.  A good hunter too.

He is however not technical, if he takes a screw driver in his hand, everyone around flinch.

Years ago he called me, something wrong with his car's starter.  I said take it out, we get an overall kit for it and we will have it working in an hour or two.  He arrived here, very proud of his achievement, with the alternator  ;D

Fanie

#47
Cool  Module !

Have a look at the MP3-TF-16P module.
You insert a pre-recorded u-SD card, and by sinking with a certain resistor value on one of two input pins with ie a switch, it will  play that number MP3.

So say you have a PIR switch the module, say MP3 track 1, it will play that audio message saying "Hugo, bel die polisie, hier is groot moeilikheid, Maandag is julle uit-ge-sit !"

On jewtube search for "Hugo bel die polisie" since you don't believe me ;)
When you hear this message, you will know which PIR set it off.

Same with PIR no2, it can play something like "the neighbour's wife is in the pool again".

And so on.  On your alarm, you don't have to go and look which area was triggered, you can listen what your own message plays.

You can even pre-record instructions for doing something, like How to program in Positron Pic Basic.  Button 1 is to connect the LED, 2 is the next step to flash the LED, and so on.

It also features a few functions, like repeat all, pause and next.

There is much more to it -the data sheet is here
https://make.net.za/wp-content/datasheets/MP3-TF-16P.pdf

Hugo, bel die polisie, hier is groot moeilikheid, Maandag is julle uit-ge-sit translated is
Hugo, phone the police, here is big trouble, Monday you are expelled.

Fanie

#48
Some of you probably saw the recent PAUL vs TYSON (58) fight.
Paul's next opponent apparently is Clint Eastwood (94).
(Only in Sick Africa  ::) )

And two African dances you most likely have not seen
Zaouli - Ivory Coast
Kumpo Dance
Have a look on the tube

Fanie

Of course Les had the foresight back in the day when he was developing the pic basic, to know that some day in the future, some luni was going to use the Sound2 command to run stepper motors for a cookie machine eh !  8)

Re the 3D printing.  A LED holder is a cent's worth of material.  Off  late the price for one LED holder here jumped to R14.00 (oh and plus 15% vat) - and the "vat" does not add value - which is ridiculous.
So now I just print my own and can be in various colours too. To make it sit firmly in it's hole, I just touch it both sides and at the ring end to keep the LED in - with a solder iron tip, which I dedicated for plastic works.