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.

pwm dout with pic 18F4520

Status
Not open for further replies.

srjth.m1

Full Member level 3
Joined
Aug 6, 2012
Messages
157
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Location
India
Activity points
2,126
i have a circuit whenever a.c fails dc should get activated (like a ups)am using IRF9540N,how this possible with the pwm signals of mcu?how can i set pwm duty cycles
 

No,when ever A.c fails that time power will get from a battery
 

Not ups,but similar circuit...i want to know only how this particular switching occurs by using pwm,i mean when main power fails it should get power from a battery,i have told like ups because when a.c off the battery of ups will start working automatically like that
 

While the PIC does contain a hardware PWM module, you can not use it to generate PWM signals at frequencies as low as 50 Hz. You can use the PIC Timer1 and the compare module for PWM. You can also make use of the interrupt.
 

my voltage is maximum 20 it wont need 50hz i think
 

Then why do you need PWM? You can just use a relay to switch on your battery of 20v when ac fails. step down your ac to 5v ac and convert it to dc and give it to mcu. if that pin is high then it means ac is present, if ac fails that pin goes low, so mcu will operate the relay and swirch on the battery.
 

You need to detect presence or absence of mains. Rectify the AC to DC and feed it into an optocoupler. Make sure you use a current limiting resistor. Use the transistor side of the optocoupler for the rest of the circuit.

Instead of rectifying the AC, you may feed the AC to an optocoupler such as TLP620. That's the first part of your required circuit- mains detection.

Hope this helps.
Tahmid.
 

Then why do you need PWM? You can just use a relay to switch on your battery of 20v when ac fails. step down your ac to 5v ac and convert it to dc and give it to mcu. if that pin is high then it means ac is present, if ac fails that pin goes low, so mcu will operate the relay and swirch on the battery.

i need to charge the battery when mains ON is it possible while using relay?
 

Yes you can use another relay to connect to charging circuit when there is ac mains available.
 

am trying to reduce the circuit that's why asking is it possible with the same with pwm?
 

instead of using 2 relays if am using a IRF9540N and pwm signal is controlling it,my designer given such a hardware part actually
 

What you are saying is quite confusing. Can you show a block diagram to clarify what it is that you need?
 

I think he want to avoid general usage of relay. PIC sense is there AC power, if there is AC then PIC drive MosFETs for inverter, in case of AC power outage PIC start to drive MosFETs of inverter. I'm right?

In such scenario, design should have protection and some kind of hysteresis when AC power is back, to prevent linking of both systems together.
 
Last edited:

I think he want to avoid general usage of relay. PIC sense is there AC power, if there is AC then PIC drive MosFETs for inverter, in case of AC power outage PIC start to drive MosFETs of inverter. I'm I right?

Upon clarification of this, we can continue.
 

I must say heavyhearted that circuit in PWM.BMP file is very bad.

You should add µC, inverter parts, AC detecting section,...

;-)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top