![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
nerdnicky
Joined: 02 Aug 2013 Posts: 13
|
help on triggering triac bt136 with 16f684 |
Posted: Tue Nov 05, 2013 12:25 pm |
|
|
hi everyone...
i am designing a voice controlled home automation system ...for that i need to use triac for dimming the bulbs ...the main problem is that i am not getting any sufficient material for triggering triacs.. i am totally geek about zero crossing time and all that so i am not able to write a program ....
should i use ccp capture module for zero crossing detection and then fire the triac gate with appropriate pulse... also i am not able to understand the pulse requirements at the gate of triac... eg. the current and voltage requirements as well as the duty cycle and frequency of the pulse.......
anyone interested in guiding me ??? |
|
![](templates/subSilver/images/spacer.gif) |
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Tue Nov 05, 2013 12:51 pm |
|
|
You are going to need to do a fair amount of research to understand how it all works - I would start by doing some research on dimmer circuits themselves (for AC - DC is different if you were running off batteries for example). Most dimmers use a RC delay along with a trigger diode (diac) to turn the triac on part way through the cycle - the RC delay determines that point. With a uC, you basically do the same thing - you detect where the cycle goes through zero and at some time after that, turn the triac on with a pulse from the processor. One thing you need to be extremely careful with if you are working with household power (or "mains" for those on the other side of the pond) is if you expect to have any connection to your processor, you need to make sure you have established isolation between the mains and your processor (there are a number of opto-isolated triac triggers out there). If you don't, you will either fry yourself or let the magic smoke out - neither of those is a good thing. Study how a basic dimmer works first then look into how to control it with a processor. Once you understand the hardware needed, you can start thinking about what code you need.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9173 Location: Greensville,Ontario
|
|
Posted: Tue Nov 05, 2013 2:49 pm |
|
|
Please be really, REALLY careful around the high voltage part !!!
OK, 120 might not kill you but will toss you off the chair, into the wall and that's when the hot soldering iron land onto you......
I've used the MOC3031 optocoupler for a couple+ decades. It's a zero crossing triac driver that only needs 5ma to turn it on. Used with a 2N6071C it makes a nice 'lamp control' circuit that is PIC driveable.
If possible, R&D with say 12 VAC instead of 120( or 240). The idea is the same, just a lot safer while testing !!
There's probably a zillion hit about your project, the 'trick' is to narrow down the responses to what will work for you.
hth
jay |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19365
|
|
Posted: Tue Nov 05, 2013 4:01 pm |
|
|
Very much agree. Remember also if you use a nice big 12v transformer to feed the test circuit, you can use car lamps as test loads. Makes it easy to see effects like flicker.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Tue Nov 05, 2013 7:34 pm |
|
|
Those of us that learned electronics back in the days of tubes also learned a healthy respect for voltage (only had to get knocked off the chair a couple of times when you touched the plate cap before you learned). Younger generation with this 5v (or less) stuff ain't had the thrill of picking yourself back up off the floor Nothing like the stored 400v on a cap to get your attention.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19365
|
|
Posted: Wed Nov 06, 2013 2:09 am |
|
|
True.
Off topic, but a hopefully 'pointed' story.
My Uncle was involved with Radar, in WWII.
At first the original Chain Home stations. The valves on these, were a couple of feet high, and used something really silly EHT. They were not like normal valves you could dismantle them, and pump them down again, so replace things like the heaters separately.
When working on the kit, you had a 'discharger handle' (other people who have worked with similar voltages since will know about these). You turn everything off, then hook the end of this over the HT wire at some point. It has a ground connection, and a large resistive path to discharge the line without creating a spark. You have an insulated handle to hold, with a nice long insulated rod between this and the hook. It was hung beside the door, so you could discharge stuff before going closer.
After a little while, the first Wren's were posted on station.
A short time afterwards, one of the engineers was carried out of the building with his arm paralysed 'up' in the position where you held the handle. What had happened, is that the Wren's had been told to clean, and not to go into the high voltage areas (marked). The handle though was outside the area. So they had cleaned and _polished_ the rod. He had gone to discharge the kit, and the voltage had travelled down the rod, and through him....
Fortunately he survived. Knocked out, Burns on his hand. He had been trained, and you always stand on your right foot, and hold the discharger with your right hand, with the other in your pocket. This way the shock travels down the right side of the body, and misses the heart.
Obviously orders then went to the Wren's _not_ to touch the handle....
Anyone intending to work with anything over perhaps 50v, really ought to do a basic high voltage safety course. In this case, the training saved the engineer. Such courses are not expensive (especially when you consider what their final value may be....).
So, not PIC, but advice to anyone of the posters here who are thinking of doing a design involving mains.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|