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 generation with pic micro controller

Status
Not open for further replies.

venuselectronics

Member level 2
Joined
Mar 23, 2010
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,648
dear sir,

i made one circuit for my regular use

it is like this,

i generate triangular wave form of 50 hz, after detecting zero crossing, i mean at

every zero crossing , ramp amplitude comes down to zero level, than it will charged linearaly up to set value,

than after this ramp is inverted and that inverted waveform is compared

with applied dc level ,either it is generated from 4 to 20 mA or from 0 to 10 v

,so opamp output is pwm , its pulsewidth varies with applied dc voltage from

4 to 20 mA, this pwm signal i am giving to random firing opto coupler,which drives

output scr,thus i am getting variable o/p voltage


i have modified this ckt for inductive load ,where i am using pulse transformer

instead of optocoupler, to drive pulse transformer i generate frequenct of 2

khz,after giving this frequency to AND gate ,o/p is modulated, which i am applying

to pulse transformer primary, and i am getting good result with inductive load


i want to convert this circuit with micro controller based,

can any body give me schematic where i will apply varible dc voltage to

particular pin, and get modulated output , i also want tto o/p voltage and

current on display, if possible i also want to control o/p voltage and current

through feedback

i think every body may have under stood the matter, cicuit is very large

i will post it if necessary

please provide me schematic and source code for the same

i want to use pic 16f877a , please provide me explanation for source code

venus electronics
 

Pic 16f877a has its own PWM generator .. you can control it by the following code written on mikroc,

void main
{
TRISC=0;
pwm_init=25000;
pwm_change_duty=150; // for example
pwm_start();
}


you can replace the "150" with any duty cycle you want from 0 to 255.

to intefrace this PWM to the inductive load ; you can use H-bridge instead of the transformer .. you can use L298 dual h-bridge.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top