How to control AC device using microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by Parth786, Sep 29, 2017.

  1. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    Hi
    How to control AC device using 8051. For example I have two devices. Device 1 work on 240 AC and Device 2 work on 30 AC. First I want to control Device 2 using 8051 MCU. I am looking information about driver module. I did google search and I found that we will use relay and other electronic components but I don't have idea how to do it. whats I need to make driver module to operate 30 AC device ?
    upload_2017-9-29_10-42-21.png
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    6,616
    1,021
    30Vac and current ?
    Use relay or low Rds and high current MOSFET to control device2 30Vac/I.
     
  3. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    I don't have specific device in mind. I just wanted to learn how do we control AC device using MCU. Once I get Idea I will think about specific device

    lets assume following specification

    Specification for AC device
    Voltage = 30 V AC
    Current = 4 Amp AC
    There are many relay and mosfet available in market. so How to pick right one for device 2 ?
     
  4. Picbuster

    Well-Known Member

    Dec 2, 2013
    892
    117
    Use a frequency inverter price 120$ approx. ( eq high end Hitachi but cheaper brands available see internet)
    input 4- 20mA or 0-5V produce 0-100% speed left/right 0-5V
    rush in current control, slow start all available.

    Extreme simple to couple it with you MCU.
    no way you can build one cheaper.
    Picbuster
     
  5. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    Thanks for your offer But I don't want to buy it. I want to learn how do we make circuit. and how do we select components for circuit?
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    6,616
    1,021
    Use relay is more easier for simple AC control, but if you want to learn how to using uC signal to control low AC device (as 30 Vac) with N MOSFET then you can see -- Using two Mosfets for AC.

    If you want to make the circuit simply then choosing the Vgs has logic level as 4.5V.
     
    Parth786 likes this.
  7. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    I want to use Relay. I am familiar with 5v dc and 12 v Dc relay. I want to learn how to using uC signal to control AC device

    8051 --- Relay --- AC device (30 v AC)

    I don't think that one relay is enough to drive 30 AC device. I think I need to add additional circuitry. correct me if I am wrong. I have never design circuit for AC device. So I don't have any idea. I have only read that we can do it using relay and mosfet. so I just want make circuit. Please help me to build circuit.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    18,330
    5,793
    You don't need a circuit. A single device will do it. It is called a Solid State Relay or SSR.

    [​IMG]

    [​IMG]
    [​IMG]

    https://www.sparkfun.com/products/13015

    • logic level low voltage input 3-32VDC
    • controls 24 - 380VAC @ 40A (DC voltage SSR also available)
    • zero-crossing switching
    • optical isolation
     
    Parth786 likes this.
  9. simozz

    Member

    Jul 23, 2017
    99
    26
    So it's impossible to give you a solution if you don't know what you want to do.. :confused:
    If you just want to turn on and off a 30 Vac load the solution could be a relay driven with a transistor.
    If you want to modulate the load power using PWM, you will not use a relay of course.
    The solution depends on what you want/have to do.
    Also, forgive relays if you need fast switching..
    simozz
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    6,616
    1,021
    The Ic of bjt will be limited by R1 with hFE=10, and it is also limited the current of relay coil.
    The bjt I would prefer the 2SC1384(1A).

    You can find the contact current of relay is 10A or more, and the contact voltage is 36 Vdc or 45 Vac or more, if you could find a 5V relay have the similar contact voltage/current then it is ok, the Vgs = 4.5V logic level of N MOSFET is better.

    8051ToRelayDriverUsingNPNBjtAndNMOSFET_ScottWang.png
     
  11. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    I understood. MCU will control Relay and Relay will control ac device. Does it means relay take 5 dc signal from mcu and supply 240 ac signal 240 ac signal to light bulb ?
    upload_2017-9-29_20-10-20.png
     
  12. MrChips

    Moderator

    Oct 2, 2009
    18,330
    5,793
    No. Does that make any sense? Think about it.

    380V x 40A = 15kW

    Where are you going to get that amount of power?
     
  13. Parth786

    Thread Starter Active Member

    Jun 19, 2017
    642
    45
    No That can not possible. Relay can enable or disable ac device. I need to supply 240 AC to light bulb. Three pins of relay will connect to MCU and Two pins of Relay will connect to light bulb.
    upload_2017-9-29_21-11-36.png
     
    Last edited: Sep 29, 2017
  14. MrChips

    Moderator

    Oct 2, 2009
    18,330
    5,793
    No.

    There are only four pins to the relay.

    3 - 4 are connected to your microcontroller (8051)
    1 - 2 are your switched output - you supply your own power to the light bulb.

    1 - 240VAC LINE
    2 - light bulb
    (make your own connection from light bulb back to NEUTRAL)

    3 - +5V MCU supply voltage
    4 - MCU open-collector output (sink to GND).
     
    Parth786 likes this.
Loading...