<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>
				<dc:language>en-gb</dc:language>
				<dc:date>2008-12-01T23:22:27-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10341.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>HI everyone,                      i am developping an application called " shorting mechine control " using 89c51.the key idea of this project is  controlling pneumatic valves(24volt input) using IO ports. the valve has to be switched on (i.e. it should get open)for a time of 1.5 milisecond when it gets a 5 volt signal from outside world. now the problem is :-1)  i want the valve to be controlled using PWM concept. and2) how do i design the driver ckt for the valve? valve responce time is 0.6msstop time :0.05 ms</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>Try the following logic:1. enable the external interrupt int0 and timer1 as a 16 bit timer.during the initialisation of the timer1, see that the TR1 bit (which starts the timer) is cleared.Here set the TH1/TL1 according to the following formula:if the time to turn ON the valve is T (in seconds),and crystal  frequency of the uC  is F (in Hz)then TH1/TL1  = ( 65,536  -  ( (F/12) x T)))2.Now  connect the external trigger voltage to the 8051 external interrupt. (inverted as the 8051interrupt senses only negative edge.) In the interrupt service routine, start  the timer1 (i.e. set the bit TR1) and turn on the valve through some port pin.After T seconds, the timer interrupt will occur. Now in the timer interrupt service routine, clear the TR1 bit , reload the TH1/TL1 values and turn OFf the relay.To compensate for the turn on delay (response time of the valve), add the delay to the required ON time. (For ur above values, T = 1.5+0.6 = 2.1 milliseconds. As for the interfacing the valve, if the valve consumes  a few milliamperes of current, then a simple NPN transistor like 2n2222/SL100 can be used to drive it but if the current is high use a high current driver like the ULN200X series buffer.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ pdi33, i am controlling 16 valves all together ,so i cant use interrupt logic here as all 32 io pins are used (16 for valves and 16 for input signal). therefor i have planed to use software delay with or without timer.will that be ok ....?and another thing is that  the valve which i have to controll is an electromegnetic valve which needs 24volt to get excited (to get open) and after excitement it needs only 5 volts to be at open possition or else it will get burnt. so i have planed to make use of PWM logic.(i.e.first ill excite the valve using 100% duty cycle and after that X% duty cycle (which will drop the voltage to 5 volt) )And would u please show me the driver ckt diagram for connecting valves(2 pin ,24volt electromagnetic valve)to get a cleare idea of valve  have a look on the attachment or the link  given here ...http://www.macvalves.com/bullet.pdf                                                          regards                                                                                  caze</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello caze,if you plan to do it in PWM, heres how it can be done :	change the output transistor according to your load. its always good to use optocoupler for isolation between micro side and load side all the bestArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>hi caze,o.k. now i understood the PWM requirement from ur second post. If ur micro is not being used for any other purpose, then u can simply poll continuously  the two input ports for any change and change the corresponding output port pin. But as far as the PWM is concerned , generating upto 16 PWM outputs from one uC is quite a challenge. But the silver lining is that u require only three states at ur output i.e. 0%,100% and 40% so i think it is just possible.... hmmmm. just give me a couple of days and i will give u the code once i simulate it and also explain the logic. Till then here is the logic i plan to use:define a bit in ur code say PWM_bit. Then using the internal timer, continuously swtich it on/off equivalent to 40% PWM output. Now, poll the inputs and once an input is detected, turn the corresponding output port bit ON for 1.5mS and after that  just copy the PWM_bit status to the port pin.This is just an idea and u require to solve some other issues while writing the code. So start out and let us see...Good luck.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi,         after a long search , i ve got IRFD014 power transistor ,  which has drain current  of ID= 1.7 AMP. can i use it .</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>just confirm whether ur logic is as shown in the figure below</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ pdi33,thanks for the reply. this is exactly what your last post (figure) says.i have written an assembly program (its prototype)to execute my project . have a look on this and give your suggestion.           org 0000h          sjmp 0030h          org 0030h          sjmp herehere: mov a,#0ffh          mov p0,a   //port 0 enable          mov p1,a  //port 1 enable          mov a,p0  //read port p0          mov b,p1  //read port p1          mov p2,a  //write to p2          mov p3,b  //write to p3          mov r0,#0ffh            acall dealy       //call dealy for PWM          sjmp heredelay:mov tmod,#01//intialize timer 0          mov tl0,#22h           mov th0,#3fh          setb tr0         // start timerloop: jnb tf0, loop             clr tr0          clr tf0,#00h          mov p2,#00h           mov p3,#00hloop4: mov tl0,#3fh           mov th0,#2eh           setb tr0loop2: jnb tf0,loop2           clr tr0           clr tf0           mov p2,a           mov p3,b           mov tl0,#0aeh           mov th0,#20h           setb tr0loop3: jnb tf0,loop3           clr tr0           clr tf0           djnz r0,loop4endnote : timer values are not yet calculated  . its an approx value.this program is working fine now ...but its so sad to say no boddy repplied for error in this program.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ Arun ,                   thanks for the help.this is exactly what i wanted.how to choose the value of R1 and R2 , and how about the transister bc337 in your diagram . how to choose them.and is there any 64 pins optocoupler available in the market.?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello pdi33,But the silver lining is that u require only three states at ur output i.e. 0%,100% and 40% so i think it is just possible.... if i am not wrong 40% of 24 volts is 9.6 volts, it should be 21% of 24volts which would give approx 5.08 V. caze:  R1 can be 330 ohms, R2 can 2.2K. BC337 is a 800mA, 40Volts one,  iam not sure of any 64 pin Opto in the market but you may have to use individual optos.since you are using all the 32 I/O pins there is no room for additional controls, you can simplify the design if you used 2 micros.Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi,     one more query..     do i need to connect a capacitor  between groung and vcc of microcontroller.and between ground and power supply of PCB. if it is so , what should be the values of the cap.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ arun,           the valve  which i am using is of 35 watt,1.43 amp. can i use BC 337  for the same. and how about my program which i have posted before.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>caze,1.43A is too high a current for a small  transistor like BC337. For that high a current u may have to use a power transistor like 2n3055 or mosfets like like he  IRFXX series. just verify that the transistor /mosfet u use has a greater switching frequency than ur output PWM frequency.As far as the capacitor is concerned, a 0.1uF cap across the uC is always recommended provided it is as close to the uC as possible. This is usually to eliminate the digital noise generated by the high frequency outputs of the uC. But in ur case that woud be hardly a problem as u are not using any analog ckt which may be affected so connecting the cap is only an option  and not neccesarily required. But if the grounds of the +24V supply to the valve and the supply of the uC are same (i.e. if both are derived from the same power source, then the supply of the uC must contain a fast acting capacitor which can reduce the voltage spike  the back emf of the valve coil generates when it is turned  On/OFF as the load is highly inductive and the voltage surge can disrupt the flw of the uC (especially if it is of Atmel make as the AT89XX series does not have a efficient inbuilt  EMI suppression like the phillips series of uCs ).</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>hello caze, No, you can't use a 800mA transi for a 1.5 amp job, it'll fry !  try a mosfet or a power transi like BDX seriesArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hi Caze,as a general rule of thumb, you have to use a device which can handle 3-4 times your actual load. your load is 1.4 amp and your switching device is 1.7 amp, and since your load is a electromag device there is bound to be spikes and EMI stuff, so  there should also be a protective diode across just like you have across a relay.   try using IRF540 or IRFZ44 ( price Rs.15-20)Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi , arun,            but the current rating of these devices are too high.its 28 amp for irf540 and 50 amp for irfz44. will it not burn the valve...and if u have little much time , i would like u to explain me the logic behind the "relationship between the seitching devices current and load current . And  their working too."  i hope these are no silly questions ..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>HI @ Arun,                    the very first post which u have posted me regarding optocoupler , In that the load is connected to the emiter. what if we connect it to the collector. is there any difference ? AND  is the value of R2 depends  transistor ,connected to coupler, if it is so , how to calculate it.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hi Caze,you can connect it that way, and you need R only in case of mosfet and not transistorit can be of 100k-1meg value. for R2 you can use 10k. but the current rating of these devices are too high.its 28 amp for irf540 and 50 amp for irfz44. will it not burn the valve...thats really silly, there is no harm in using a higher rated device, since you are using PWM there will be rapid Switching On and Off the Load which results in EMI and high voltage spikes across the load. by using  a higher rating you have two advantages:1) the mosfet or transi remains cool, no heat sink is required2) Mosfet/transis operates at a  safe limit may be you haven't noticed  the Thanks button, use it if the replies helped youArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>Caze,it's typical of inductive loads to draw a pull-in current of ~10 to 20 times the hold current.So the mosfet suggested by Arun is just apt.With inductive loads it's always wise to have some headroom.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi sashijoseph,                 would u please be more clear for your last post .i m unable to make sense of the last sentanse. and  also ""apt."""</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ arun,             my silly question was  not  that               i mean what i wantd to know is .."" Is there any procedure/rule/formula to determine the values of driver MOSFET depending on load.?""    Like  while  determining the GENERAL TRANSISTOR for a load  we do following1> transistor current must be greater then load current.2>transistor min. current gain must be 5 times the load crt. devided by max. IC crt.3>Rb=(Vc x Hfe)/(5 x Ic)   *Vc=IC supply voltage.or  Rb=(.2 x Rl x Hfe)</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi @ arun , i am so sorry for my last post.. i would't have post like that ..its was really a stupid thing done by me ..m so sory for that....</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>hi caze,you don't have to be too formal, i was just trying to emphasize  that some times these things are not mentioned in any text books and you have to rely on your experience and gut feeling.the mosfets i suggested are used extensively in all branded and unbranded Power Inverters and are available in plenty and they suit your task.and what is the progress in the projectArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>caze</dc:creator>
						<dc:subject></dc:subject>
						<description>hi  everyone ,                       my project is finished and its in final stage . thanks to everyone for their help and time...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello Caze, Congrats on completion of your project ! Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10341.html">
						<title>Re: shorting mechine control using AT89C51</title>
						<link>http://www.8051projects.net/forum-t10341.html</link>
						<dc:date>2008-12-01T23:22:27-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>Congrats caze  Do not forget to publish it here on 8051projects.net</description>
						</item>
				</rdf:RDF>