Showing posts with label door. Show all posts
Showing posts with label door. Show all posts

Friday, March 8, 2013

RoboDoor

Hello There!


Long time no post, though I had done many things, for a reason or another, I am addicted to RoboThing, I have RoboCar, RoboDoor, RoboGardener. Today I am gonna post about my RoboDoor!


The concept is simple, use an RFID tag to enter the room, an emergency entry should be implemented to prevent locking the door permanently (a UPS will be considered at a later stage)


So I started off with a Solenoid actuator which I got from Sparkfun for 15$, the solenoid is rated for 36v however, it works just fine at 12v.

I decided to use an ATX power supply to provide the 12v and 5v for my system.

I made some measurements and then cut some wood and fixed in the solenoid (Sparkfun 4-40 screws works amazingly)





One important thing here is that I should guarantee that I will not get locked outside my room, so there must be an emergency entry method if the microcontroller or RFID fails


Remember that later on, a UPS will be added at a later stage, so cutting power from the room circuit breaker will not work.

I decided to use a discrete "Discharge Circuit" where-in you hold the door handle for say 20 seconds which would discharge a capacitor and activate a relay contact to open and cut the power from the solenoid.


Drawn using Digi-Key SchemeIt


I added a Micro-switch which would activate when you fully press the door handle, the pot is set to give 5v, the capacitor charges very fast when you release the handle and discharges slowly through the 100Kohm and takes about 20 seconds to activate the output of the comparator which would cut the power from the solenoid.


Yes!! emergency entry works, now, next step is the RFID

I decided to use ID-12 RFID because it is mid-range and suitable for my need, I bought them from Sparkfun as well

I did some testing before adding up the RFID system, luckily, the tag reader can transmit and receive through the door which made things even awesomer :)

I first added a little indicator LED and a key switch



Then, I added the MCU circuit, I used ATmega328


The RFID module is awesome, you only need to connect up +5v, GND and you get the serial data outputed which you can read in your micrcontrollers



The output data is formatted as follows (details in datasheet)

STX,ASCII CODE,CHECK SUM,CR,LF,ETX

STX: Start of Text (0x02)
10 ASCII Char (5 Hex bytes) This is the unique tag ID
2 ASCII Char (1 Hex Byte) Check Sum of tag ID
CR: Carriage Return (0x0D)
LF: Line Feed (0x0A)
ETX: End of Text (0x03)

lookup the ASCII table to know more about STX, CR, LF, ETX

I did not bother about check sum as I really dont know what it is exactly, I just checked for the 12 char matching in my code


Adding a lil circle on the location of the RFID tag reader makes accessing the door easier as you dont have to scan your card through the entire door!




One thing still needed some work, which is the fact that I used a 5 second delay after reading and accepting the tag. After the 5 seconds, the lock will activate even if the door is open, which is bad!
If the solenoid is extended and someone tries to close the door, the solenoid could be damaged.
Therefore, a reed switch and a piece of magnet made things more organised.

The magnet will activate and close the contacts of the reed switch only when the door is closed.





Too many wires! needs some orgnizing


A final test on the system functionality


------------
Update:

I found that the solenoid becomes really hot after some time, therefore, a cooling was required

I used a 12v brushless fan (PC fan), it works great for keeping the solenoid clean


Note: I added a wire mesh for hand protection ;)


Here is the code on GitHub

End of Code



Saturday, December 3, 2011

Garage Door

Recently, we moved to another home, unfortunately (or fortunately) the garage door does not work, we open it manually currently, we requested the house owner to fix it but they said that they tried many times but failed, so what does this mean for an EE lover?

An awesomeness of course, a new toy to play with, a new game to reverse engineering :)

I tried the manual button, the motor does work but the door does not move, I tried assisting it by giving it a push but no hope, so apparently, the gears are broken/loose etc a mechanical problem in short.

not only that, but also, we do not have the remote controller, so apparently I'll have to hack it to put my own wireless connection, later..

now lets start playing:


The box:


Now I need to remove the bottom to reach the mechanical problem and fix it, I had to use a lot of force to open these two blots on bottom:


notice how the spanner got bended in the image below



What about this dried-sanded grease:






overview of the inside, 
top right is the motor with three wires (I don't have experience with motors, so your help is apperciated here, the motor has three wires two of them are connected the big cylinder you can see on the top left [I guess a cap??!] and there is a third wire)
What is this motor? which type? what are the three wires?
Is it a capacitor really? why it is there?

top left a capacitor (I guess)
below it is the transformer
and on bottom the PCB
Wireless chip on right side of PCB
Connection Header on top of PCB


The circuit 





started labeling some wires


I then used WD-40 and sprayed on the screws to remove the PCB (Along with the transformer which is soldered to the PCB)



Now I need to remove wires, so I took note of all connections and labeled wires



Before that, I decided to test it, found that the motor is actually rotating as well as the output shaft
so, I reconnected it up again, but again it does not work!!!

conclusion: the mechanical assembly is having a problem which I cannot fix

repairing attempt Failed!