Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ac switching using 8051.

Status
Not open for further replies.

leoren_tm

Advanced Member level 1
Joined
Dec 19, 2005
Messages
466
Helped
11
Reputation
22
Reaction score
7
Trophy points
1,298
Activity points
4,305
transisator switching

hi. i want to design a circuit to control an appliances for on and off state, using 8051. can you suggest a good approach to solve the problem? as i read, using relay, would have some consideration on the noise it will create at turning it off..
as for the power supplies, ill just some res,cap,zdiode to feed my 7805..
thank you
 

ac in opto circuits

To avoid all problems you are considered of, use opto-coupled Solid-State-Relay, which can be directly driven from 8051-pin(s) ..
Here are some more details:
**broken link removed**

Rgds,
IanP
 

circuit switching using 8051

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 15 seconds:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 7 minutes:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 3 minutes:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR
 

solid state ac switching

would have some consideration on the noise it will create at turning it off..

I don't know what kind of noise you mean by that?


If you are talking about collapsing of magnetic filed of Coil at shutting off, you can place a diode for suppressing high voltage generated.
 

turn on a transistor using 8051

IanP said:
To avoid all problems you are considered of, use opto-coupled Solid-State-Relay, which can be directly driven from 8051-pin(s) ..
Here are some more details:
**broken link removed**

Rgds,
IanP
thank for that....now i have some limitation :(
i should use relay, for better isolation, because some said that, triac if busted may be consider as shorted.

and for power supply, to minimize cost, ill just use diode, to rectify then use zener to fix the voltage. may i ask, is that a safe implementation, safe for my 8051?

Added after 1 minutes:

kanand078 said:
hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 15 seconds:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 7 minutes:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

Added after 3 minutes:

hi

connect the ckt this way.
MC8051-ULN2803-O/E/N RELAY-CONTACTOR-MOTOR

thank you..but i think using just transisator would save part of pcb and cost.

Added after 8 minutes:

umery2k75 said:
would have some consideration on the noise it will create at turning it off..

I don't know what kind of noise you mean by that?


If you are talking about collapsing of magnetic filed of Coil at shutting off, you can place a diode for suppressing high voltage generated.


base on the solid state relay with zero crossing, the advantage is that you turn off the device at zero, in that less noise created on minimize. ex. turning off the device at 90degree.

is the diode enough to eliminate that?


and also, may i ask for some possible good layout practice on PCB? i would just use 1sided. in that also to minimize noise, 1layer for ground.....but cant afford this solution..
thank you.

Added after 4 hours 26 minutes:

umery2k75 said:
would have some consideration on the noise it will create at turning it off..

I don't know what kind of noise you mean by that?


If you are talking about collapsing of magnetic filed of Coil at shutting off, you can place a diode for suppressing high voltage generated.


base on the solid state relay with zero crossing, the advantage is that you turn off the device at zero, in that less noise created on minimize. ex. turning off the device at 90degree.

is the diode enough to eliminate that?


and also, may i ask for some possible good layout practice on PCB? i would just use 1sided. in that also to minimize noise, 1layer for ground.....but cant afford this solution..
thank you.
 

solid state relay input is from 8051

Opto relays offer number of advantages as described. Should the triac fail, the processor is still isolated by the opto circuit, so a good safe option. Downside is cost, cheaper to use a transistor and relay, but need careful layout to reduce electrical noise, both on the coil and switching side. Would advise the use of anti surge devices VDRs etc across contacts, as well as a coil diode.

Added after 6 minutes:

Don't need double sided PCB. All grounds to common point. Relay feed direct from psu or reg. Separate track from reg to logic, R/C decouple and lots of small decoupling caps spread around.
 

8051 and solid state relay

GrandAlf said:
Opto relays offer number of advantages as described. Should the triac fail, the processor is still isolated by the opto circuit, so a good safe option. Downside is cost, cheaper to use a transistor and relay, but need careful layout to reduce electrical noise, both on the coil and switching side. Would advise the use of anti surge devices VDRs etc across contacts, as well as a coil diode.

Added after 6 minutes:

Don't need double sided PCB. All grounds to common point. Relay feed direct from psu or reg. Separate track from reg to logic, R/C decouple and lots of small decoupling caps spread around.


about the grounding PCB....can you suggest a good practice? how will i layout my MCU, PSU.....how will i layout the VCC and GND of the components?....
i forgot what VDR mean....please educate me:|


thank you....


and i have this problem, after my prototype....when i turn on the unit....my MCU pins produce some continuous pulse at start-up..i mean...before it goes to operate at it should......

on the firmware, what i did is that...i made a 1second delay at start, in that..the result on start-up the relay turn-on for some time which it should NOT....as i said, i observe on the pins unwanted signals.....i operate the relay using transistor, with 2 pins to control it....which pin1 must be 0, and pin2 must be 1, to turn it on...but still relay turn on...
how can i solve the problem?
im using a transformerless psu, with capacitive type....and i have diode on relay, a 100uF on the MCU, an a voltage regulator.
 

switching of ac devices using 8051

VDR = Voltage dependent resistor (absorbs high voltage spikes)
Most important about grounds on pcbs, is that as far as possible, they should all go back to the psu input terminal. If you have ground tracks winding all over the place, due to the resistance, earths can be at slightly different potentials. This can cause various problems in both digital and analogue circuits etc.
You should be using one port to switch, not sure what you mean by using 2 ports?
Pretty much all MCU pins will go high during the reset period, if this i problem it needs to be designed out. Sometimes you can make the reset pulse short, so that it is not long enough to operate a relay or similar. depends on processor. Not sure what the continuous pulses are, maybe some sort of instability. or a programming error. Look like you need to do a little research. Hope this helps a bit.
 

switching mcs51

Most important about grounds on pcbs, is that as far as possible, they should all go back to the psu input terminal
you mean, looping back the GND trace to PSU?, cause what i did is, i made a polygon on the PSU, then another polygon on the MCU side...

If you have ground tracks winding all over the place, due to the resistance, earths can be at slightly different potentials. This can cause various problems in both digital and analogue circuits etc.
how can this be minimize? or elimanate, cause i saw working product, that the unit has 2 module, 1 for PSU and relay other is for the MCU, which is just connected by wires.
You should be using one port to switch, not sure what you mean by using 2 ports?
as you said, that MCU at start-up pins are high, i made the circuit controllable with 2 pins, 1 should be set to high and other to low to operate....if all high, relay would not be activated, if all low still it will not.
Sometimes you can make the reset pulse short, so that it is not long enough to operate a relay or similar. depends on processor
the value of capacitor and resistor on reset pin?

Not sure what the continuous pulses are, maybe some sort of instability. or a programming error. Look like you need to do a little research. Hope this helps a bit.
its helping me a BYTE :D
thank you
 

ac switching 8051

If you have separate boards feed power to each one direct from the psu, do not loop them. Reset is controlled by the cap size, make sure it is long enough to do a proper reset. Usually specified as 1u. I find 100n works ok on everything so far. I see what you are getting at by using 2 ports. Probably not the best solution to rely on state of outputs on power up. Using active low logic and an inverter would be better. Alternativley you could use an active low port to switch power via a transistor etc. Do this after a delay, when the processor has stabilised.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
ac switching through relay

i observe at the pins on power-up a stream of unwanted pulses...i just 1 interrupt, and that is timer int....using negative logic would still activate the relay because of the unwanted signal...im using some common reset, in which 8.2k res on the ground and 10uF on the +5, maybe as what you said...changing the cap value...ill try it...thank you

and also, i have some bad board layout :|

If you have separate boards feed power to each one direct from the psu, do not loop them
what i mean is that, the board for PSU, and the MCU part are just connected by wires...

i saw from other design that, they drill a hole on the PCB, that separate PSU and MCU part.... do you have some idea on why they do that?
 

Sorry I thought you had a board for the mcu separate from the relay board. My misunderstanding. Drilling holes/slots is often used for isolation between high and low voltage, wont affect operation. Most 8051 have just 1u to vcc, no resistor, 10u seems rather high. I assume your pulses is something to do with your initialize routine. Other than than that, no real ideas.
 

On mazidi book, he uses that configuration...which was not clearly stated why..or maybe i just mis it.
may i ask, how does capacitor size affect the MCU reset?
 

The larger the capacitor, the longer the reset pulse. If longer than really needed, it just delays startup, ports held high etc. Causes no other problems.
 

ah, so i must use a negative logic to turn on the relay, or a low value of capacitor on the reset pin, so that it will not drive my relay on ON state....ill try it..thank you soo much..now need to read book on PCB routing. :D
 

Outputs will always go high during the reset time. If its a very short period, it may not matter. Better though to use inverters or active low logic if it is going to be a problem.
 

For this condition i always use active low method
 

Depending upon your application, size issues, price issues, one of the easiest solutions is to use a Solid State Relay (SSR). They are very simple to use, and have the optoisolator and SCR/triac embedded in them. You will need to bolt it to a heat sink (piece of metal) to dissipate the heat. I'ved used the "hockey puck" style to switch on/off very large AC loads. There are 2 types of SSR's, one type will turn on immediately (for light dimming circuits), and the other type will wait until the next zero-crossing of the AC before it turns on (to minimize RF noise).

Yes, you can do it with descrete parts, but it just isn't woth your time, unless you are going to build a bazillion of them. If you need to do it, and you need it to work correctly, just use a SSR.

You may need a transistor to drive the SSR, but you need to look at the microprocessor datasheet and SSR datasheet to make the determination.

https://www.teledynerelays.com/industrialcommercial.asp

Added after 7 minutes:

Depending upon what you are driving, you might want to consider a true Relay instead of a Solid State Relay.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top