After a month or so of testing the touchpad, i decided to re-design it completely. The paired-keys do not work it the keys are covered with a material thicker than 2mm. Moreover, the wires of the touchpad add parasitic capacitance to the capacitance sensor. The problem with this parasitic capacitance is that it is not constant. If i stand close to the door, the capacitance is increased!
Therefore, i completely changed the design. I will use 2 PIC microcontrollers, one will be inside the door and it will be responsible to do all the chores, and the other will be mounted on the touchpad PCB. This PIC will only decode a touch and encode it into BCD code. The code is then transmitted through the wires to the internal microcontroller for further processing. The touchpad can operate as a stand-alone circuit, so i made a dedicated page in which i explain in details how it works:
I received also the housing of the touched. I gave it to my good friend Polidorou to paint it. Here is what i received back:
Perfect finish. I had to do some minor modifications though...
First of all, i had to make holes for the screws
Also, 2 small holes for the wires of the photocell
This is the photocell that i will use
And this is how the housing will look like
The purpose of the photocell is this: The photocell is connected to the PIC A/D module. If the light is bellow a certain level, then the blue backlit will operate, otherwise the backlit is turned off to save power. And here is how the backlit is made:
I will use 4 of these blue SMD wide-beam LEDs
I made 4 pockets on the smoked acrylic glass for the LEDs
I used this mini torch to burn the pockets and make them transparent
This is the acrylic glass from the backside, with the opaque sticker
I made the same pockets on the touchpad PCB
Then i removed the cover from the double-sided duct tape
The PCB is now fixed firmly on the back side of the acrylic glass
Here is the result:
The backlit is off
The backlit is on
Although the light is not evenly spread across the surface, i still like the result.
@Julian Oh that. Its a piece of metallic tube. I put the wire inside to perform the U around the servo and then i press this tube with a pair of pliers.
Sorry,to be more precise I meant the wire which is attached to your servo to unlock and lock the door. There is something like a piece of tape holding them together, looks really solid! May i know what did you use for to hold the 2 pieces of wire together?
@Peter If the backlit gets external power, it is then safe to power the PIC from the PIC - It is a common method for power saving (you can completely switch off one PIC).
@Giorgos Lazaridis
Going through your schematics, the keypad (without the LED backlit) is powered from the main PIC, or am i missing something? Even going through the code you have the RB5 port set as KeypadSupply. I know that the PIC16F1937 can work with very low current, I'm just trying to confirm if i need an external power pin on the keypad. (The backlit is already powered externaly in my design)
@Peter Oh you mean the ports! Yes correct. RC2 is the pwm. You cannot power the keypad directly from a PIC. The PIC can provide 20mA, the LEDs alone need 20mA. So do not try it.
I understand the color coding for the RC servos, i just wanted to confirm the connector layout on your project. In the code the PWM pin is connected to register C2, which means that the D registers and the relay are used for power, is that correct?
Also is it safe to power the keypad directly from the PIC via the B5 pin without a transistor?
At 21 April 2013, 14:04:31 user Peter wrote: [reply @ Peter]
@Giorgos Lazaridis @Giorgos Lazaridis
Thank you for your replies, I'm trying to expand this project a bit with an LCD and other periferals. However that relay's got me a bit perplexed, still does tbh. Also I haven't seen the 100uH inductor on the photos. If im correct a 0.5A inductor should be enough, right?
Hello, Your work is interessant. I have well test the same capacitive
keyboard like your. Now I would like to test the
communication with a PC by rs232. But I do not sometimes happen to
find this program for the keyboard on your site. Could you help me to
find it? Thank you.
@Said Tahsin DANE maybe some sort of internal locking mechanism like a bar? I've never thought of a locking mechanism. I want to be able to walk into my house if the keylock fails...
Hi!
Great project. We want to make an electronic door for our hackerspace in Istanbul, Turkey. We are lokking for something that actually locks the door. In your case, the system only pulls the thing at the top, right? It does not actually fully lock or unlock the door.
How can we do that for more security? What would be your suggestions. Thank you.
At 5 August 2012, 12:08:50 user jack wrote: [reply @ jack]
can be mounted on a suitcase that was active before a servant to come out the door and after it opens?
@Giorgos Nak a solenoid would work as well, but the problem is that you want the "tongue" of the locker to remain open for 3 seconds so that you have time to open the door. This means that the solenoid must be always powered for these 3 seconds, something that does not happen with the motor. The breaking power of the gears is enough to hold the tongue in the opened position. So, the motor works for a few miliseconds to pull the tongue and then you remove the power for as long as you want, until again the power is connected to release the tongue. This is for me a good solution. For better power consumption i would get a better servo with smaller motor.
But think about this: every time you open the door, the servo draws 200mA for 1 sec to open another 150mA (less torque needed) for 1 sec to close, a total of 350mA for 1 second. A typical (non-alkaline) battery can provide 1200mAh. This means that the 4 batteries (6V @ 1200mA) can open and close the servo about 12.000 times (theoretically). I use 4 alkaline batteries.
Goodmorning!
I really thank you for the prompt reply.
I tried also to manufacture something similar, and I used a DC motor (with gearing to transfer the movement). The current that the motor draws is 150mA approx. So, you would also propose something different than the servo or the DC motor to create the wanted movement?
@Giorgos Nak
I had measured the current of the servo and it was around 200mA (if i remember correct). An estimation with many educative guesses was that the batteries will hold more than 1 year with normal operation (12 openings per day, every day). There are better products than the cheap servo i used of course, but not a simple DC motor because the servo has the built-in controller for the positioning.
The best 3 points for limiting the power consumption are the sleep mode of the PIC (16uA standby-current), the mechanical switch to wake up the PIC (so no more standby current is required) and the latching relay to power the servo only when moving.
Great job!!!
I write to you some thoughts that came up seeing the videos.
1. Have you measured the mA that the servo draws and also the power consumption during the movement?
2. Which could be in your opinion an estimated lifetime of the batteries with a normal use?
3. A simply DC motor (of course using a gearing to reduce speed) could be maybe less power \"hungry\" than the servo?
@shobdy no this is not correct. check this out:
http://pcbheaven.com/circuitpages/10_buttons_touch_pad_bcd_output/
the touchpad is exactly this, only that i have add the resistors and the transistor for the leds. That page will help you. I use these channels:
1-2-4-5-6-7-8-9-10-12
which correspond to these buttons respectively:
5-2-3-6-9-10-8-7-4-1
OK, after going through the ASM with my limited knowledge the best I could figure out is:
Pin 34 (Cap_check_Ch_1) is hooked to touch pad 1
Pin 35 (Cap_check_Ch_2) is hooked to touch pad 2
Pin 37 (Cap_check_Ch_3) is hooked to touch pad 3
Pin 38 (Cap_check_Ch_4) is hooked to touch pad 4
Pin 06 (Cap_check_Ch_5) is hooked to touch pad 5
Pin 07 (Cap_check_Ch_6) is hooked to touch pad 6
Pin 19 (Cap_check_Ch_7) is hooked to touch pad 7
Pin 20 (Cap_check_Ch_8) is hooked to touch pad 8
Pin 21 (Cap_check_Ch_9) is hooked to touch pad 9
Pin 27 (Cap_check_Ch_10) is hooked to touch pad 10
I thought I just about had the keypad figured out when I noticed that the pins on the PIC didn't make sense to me. It looks like (from looking at your printouts of the front and back of the PCB):
Pin 37 is hooked to touch pad 1
Pin 35 is hooked to touch pad 2
Pin 27 is hooked to touch pad 3
Pin 38 is hooked to touch pad 4
Pin 34 is hooked to touch pad 5
Pin 21 is hooked to touch pad 6
Pin 06 is hooked to touch pad 7
Pin 19 is hooked to touch pad 8
Pin 20 is hooked to touch pad 9
Pin 07 is hooked to touch pad 0
Is this correct? I may be able to go through the ASM and figure it out before you respond but it is always better to ask the designer if you can :)
@shobdy correct, these are 2 more LEDs to show the status, the red and green LEDs. I do not use them any more, you can totally omit them. I do have though a connector in case that....
The VLED is not part of the PCB. It is a wire that goes directly onto a transistor. The transistor is on the air, it is not soldered anywhere. When i decided to add backlit, i had already the PCB made, and i did not make a new. (http://pcbheaven.com/projectpages/images/servoactuateddoorkeylockhack_1309163657.jpg)
As for the resistors, any value between 220 and 6K8 will do. I used 6K8 because the PIC can work with a little current. But i stated 220, because it is the lowest limit that someone can use without damaging the PIC from over current if something goes bad, like short-circuiting the wires or pacing them at +5v.
To me it looks like X3-1, X3-2, X4-1, and X4-2 are not really used on the newest version of the doorlock. It looks like it ran two different LEDS in the earlier version. Is it OK to omit that part of the circuit or is it used for something else I am unaware of?
Next part is to clarify something for me. It looks like you soldered 6 wires to the keypad. Your schematic shows 7. Did you solder the VLED somewhere else on your pcb?
The last thing for today is while studying the photos I noticed a few differenced in resistor values. Example is the for you added to the keypad for protection look like they are 6k8. Yet on the schematics you have them down as 220. Which is correct?
Will probably ask more tomorrow. I have started ordering parts to get this going. Wish me luck and thanks for answering all my questions.
@shobdy correct, the leds goes to the emitter. They are all connected in parallel with a limiting resistor.
For the 7th pin: The keypad gets power NOT from the +4.5V on the board. Instead, the PIC on the controller provides power from one pin to the board outside, just to save more power. When the PIC on the controller goes to sleep, the PIC on the touchpad gets absolutely no power, so draws 0 current. But the pin cannot provide enough current for the leds, so i need more current therefore i have one extra line. That other line is the VLED.
About the relay: 15-2 and 16-1 are the SET and RESET, 9-12 is the Normal Open contact for the servo power.
SG1 is the buzzer. It is a simple 5V buzzer.
One more point: Notice in the close image of the touchpad: I have connect the ground wire to the "hatched area" of the PCB, this is something that you need to do as well. Also, i have connect the bottom side hatched area with the top-side hatched area together, so both areas around the keys are grounded.
At 30 September 2011, 21:25:38 user shobdy wrote: [reply @ shobdy]
Thanks for the answers; I have had some training on assembly language years ago and have been trying to brush up on it recently;
The LED's for lighting the keypad, in the schematic I am creating, are hooked to the emitter of the transistor you labeled as Q1 on the keypad schematic; this it correct? The 4 LEDs you used, were they in parellel or serial?
The 7 pin connector you have. Why is there a LED power on the 7th pin if it isn't hooked up on the other end? Can I do away with that and just make the connector a 6 pin also?
Why did you label the VLED seperate from the other power sources? It is 4.5 volts like the rest; couldn't I just tie it in with the others?
Another question I have is about the latching relay. I can't find the one you used so I am going to adapt one from ebay to do it. What I need to know is: on the doorlock schematic, pins 1 and 16 of the relay, are they the ones that enable the relay? pins 2 and 15 disable the relay? and pins 10 and 12 run the servo? or do the first 4 mentioned pins do something else?
SG1, it is just a piezo buzzer? anything you can tell me about it that will help me find a replacement?
I am sorry that I am hitting you with these question but I am trying to re-create your work with different parts and I am not sure of my modding skills yet.
Any and all answers are appreciated and welcomed as they further my knowledge.
@shobdy VLED is the voltage for the LED indeed. The transistor T1 (bc548) is a last minute add. The emitter of the transistor should have the LEDs (which are not shown in the schematic - my bad). The thing is that the LEDs along with the transistor and the resistor are NOT in my prototype, i soldered them directly on the air. SO you need to keep that in mind.
Also, as you may notice, the 2 connector which connect the controller with the keypad are not consient, one has 7 pins and the other 6. So be careful when you connect them. Do you know anything about PIC programming and assembly? That will help you.
C3 and C4 are 0.1 uF ceramic capacitor and D1 is 1N4007 diode or any 1A shottky barrier diode (better use a shottky diode).
At 29 September 2011, 2:01:27 user shobdy wrote: [reply @ shobdy]
I wanted to say that your project looks awesome. I would like to try and do it but I am having a bit of a time following your schematics. The keypad schematic wasn't bad except I am not sure what the to lead called "VLED" go to. Are they supposed to hooked to the LED's you lit your keypad with? I don't see LED's anywhere in your schematic. On the other schematic I see that there are a few parts that are not labeled. Examples are: C3, C4, D1, The transistor in the bottom left corner. Did you create a part's list? Sorry to hit you with all these questions. I am excited about trying to build this and don't want to screw it up!
hye i'm really interested with this project.can U tell & show me the detail about the programming that U use to to operate the PIC here.I'm really not know how to create the programming.And also can U show the detail of circuit layout?please....
At 8 July 2011, 23:25:07 user Wade wrote: [reply @ Wade]
Wow. This is awesome. The tech editor at Instructables.com, my boss, put my onto this project and I've got to thank both of you! This is brilliant.
We're actually running a contest right now that this project would qualify for, if you're up for putting the instructions onto Instructables.com. You could win a bus pirate (http://dangerousprototypes.com/docs/Bus_Pirate) and a hundred bucks just for joining and adding this to the contest. Could be cool.
Let me know if you're interested. This is exactly the kind of project that benefits from the step by step format of Instructables.
@Stefan i strongly suggest you use different capacitance channel for each button. Use 10 channels and not 5 as i did. The paired method does not work very good when a 4mm plexiglass is between the buttons. I look forward to see photos from your project. Good luck.
@Fung i am really not sure what i will do with them. One will be used for the backlit. But i really like minimal sizes. This of course has to do with each one's taste.
At 22 April 2011, 5:25:04 user Fung wrote: [reply @ Fung]
For those LED indicators, they looked so small, may be 8mm or even 10mm type more suitable?
It is an optical scanner. The previous ones are two scanners from Authentec. I found them on devices I bought from ebay. The problem is that they don't have an integrated processor on board, so I have to write the software.
It should not be too hard, I found some linux users who wrote the application and they say it works, so perhaps I 'll try to migrate the code from the C linux environment to a ARM7 or ARM9. I am too lazy to build the board though.
No I don't have a blog or a site, I am too lazy for that, perhaps when I finish (it won't be until the next couple of months) I will give all the material to you and you can host it here if you like.
@Vasilis Kostelidis i think this is laser scanner, or is it capacitance? And which one you had before? Will you upload your creation afterwards? Do you have a site or blog?
I was planning of doing something similar, but instead of a keypad I want to use a fingerprint scanner.
I recently bought two sensors but the documentation sucks and I think that I will go with the sparkfun sensor: http://www.sparkfun.com/products/8839
They don't have it on stock now but I am waiting.
The reason I did not implemented it, is because I could not find an electronic lock or cylinder, but you explained it so nice that even I think that I can do it.
@Panagiotis there is no trick in hiding inside the door, nor you need any ingenious way to do it. I just happen to know exactly how these doors are made (i used to work in a factory that makes doors). And i know, that, if you keep things thin (under 20mm), you can put almost anything inside. That is why i kept the PCB and the batteries thin.
"i will have more serious problems to solve than this, namely the hurricane katrina that is right above my house :D"
Ha ha ha ha....Thank God Greece is safe from hurricanes!!!Well i'll be waiting news...Also i would like to thank you for your useful instructions about the servo because i didn't know that you can make these calculations to calculate the torgue!!!!!!! :-)
" i post detail documentation about my hacks, no tricks hidden ;) "
I didn't mean that you will hide something,but it will be a tricky-(smart) way the way you will put it in the door!!! :-)
Hi panagioti. Regarding the waking of the PIC, i have include already a case that the PIC will only wake if the pull switch is continuously activated for 250mSec, exactly for this reason (the wind). Moreover, the door has rubber sealing which act as spring and prevents it from hitting and making noise from the wind. Because of these two, if the PIC ever wakes due to air, i will have more serious problems to solve than this, namely the hurricane katrina that is right above my house :D
Regarding the servos, 1.6 Kg-cm is very good torque. But after making this hack, i began testing all the door locks to see how "hard" the spring is. What i've found is that there are keylocks with very hard spring, as well as others with very soft. Luckily, the one that my door had is somewhere in the middle, and the servo can easily pull it back. Here is your calculation: Your servo can pull 1.6 kilos with a lever of 1cm. But there is no need to use a whole cm as lever. I used about 6mm, so the servo can pull about 1.6 times more weight (1/0.6) which is 2.56 kilos, far enough to overcome any spring.
Regarding the video now, as always, i post detail documentation about my hacks, no tricks hidden ;)
When you finish it please post a video of how you placed it into the door... that is going to be a little tricky.Also i would like to mention you something about the wakening of the pic,(if you have\\\'t consider it yet).I think that you must find another way of wakening up the pic.Everytime that the wind blows you will have a wakening of the pic so i don\\\'t know if these contacts are the best solution to wake up the pic.
(for energy saving and only)
Yeasterday i bought a pack of 9g servo and in the description was saying that have 1,6kg/cm.Is this value ok to pull the \\\"tongue\\\" of the keylock?
yes Fung, there are like a million different uses for the inductors. As a matter of fact, you could somehow consider inductors like the opposite of capacitors. They are used in filters, smoothing applications, PWM power supplies and many more.
Regarding the buzzer, the limiting resistor is mainly to protect the transistor, as it is selected to operate in saturation. So, no matter how small you make it, you will see no difference. You could try to change the duty cycle of the signal, but i have never test it that deep.
At 22 February 2011, 12:43:55 user Fung wrote: [reply @ Fung]
Is there any applications for an inductor other than driving a motor?
And, for the part of amplifying the buzzer, what value should be chosen for the base limiting resistor if I want to rise up a few tones for it?
PS: I have mails sent to your mailbox but no replies received, please help because I still have no solutions yet.