Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

[PIC] speed control of dc motor 2220v

Yacer

Newbie
Joined
May 11, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
Hello everyone,
I want to carry out a project in which i can control a DC motor (220 v) using pic 16f876a
This project is based on the following steps below:
First off, i started by applying the method of detecting zero crossing with my pic, employing a bridge rectifier, a zener diode as voltage regulator,optocoupler for the hardware portion of zero cross detection.
The bridge rectifier rectifies this AC voltage to DC (knowing that the frequency is 50hz),
but since there is no bulk smoothing capacitor, the output is not pure DC.
The pic16F877a detects the zero crossing using the RB0/INT external interrupt function
My pic16F876a is coded to enable the external interrupt.
An interrupt is generated upon the falling edge of RB0.
This what will make my pic16f876a generates the PWM signal
Now i want to make this PWM signal variable using a variable delay (i don't
want to use a timer, just a simple instructions to avoid abstraction, by implementing vdelay in my code)
in order to control and vary continuously my DC motor speed (either to increase or decrease its speed)
This requires the calculation of my rectified sinusoidal signal average value
along the full period of the DC signal (here i want to calculate each time the
average value in a small part of the full period) by implementing integral operation.
I will use two pushbuttons connected to my pic16f876a for incrementing or decrementing the motor speed.
So would you please help me find the right code using mikroc pro for pic ?

Sincerely,
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,443
Helped
3,938
Reputation
7,874
Reaction score
3,812
Trophy points
113
Activity points
115,656
Hi,

I can't follow this textual description.
Why not posting a schematic?

Klaus
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,443
Helped
3,938
Reputation
7,874
Reaction score
3,812
Trophy points
113
Activity points
115,656
Hi,

All I can get is a low resolution picture. Impossible to see details.
Please try the "insert image" on top of the editir window. Icon with a tree...

Klaus
 

Yacer

Newbie
Joined
May 11, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
Hi,

All I can get is a low resolution picture. Impossible to see details.
Please try the "insert image" on top of the editir window. Icon with a tree...

Klaus
Hi back,

Alright, get it
What about now ?
PFE.JPG
 

dick_freebird

Advanced Member level 5
Joined
Mar 4, 2008
Messages
6,760
Helped
1,991
Reputation
3,986
Reaction score
1,815
Trophy points
1,393
Location
USA
Activity points
54,207
I think you can do this easier if you go to SCR
voltage / speed control. Then your only control
interest is the position of the firing pulse, which
can be put through a pulse xfmr for isolation.
 

Yacer

Newbie
Joined
May 11, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
Thank you for your suggestion, but
In my case, i'm supposed to find out a solution concerning this circuit
 

Aussie Susan

Advanced Member level 4
Joined
Jan 5, 2015
Messages
1,159
Helped
360
Reputation
720
Reaction score
356
Trophy points
83
Activity points
12,573
The first hit on a Goole search gave me the circuit (very similar to the front end of yours) for a PIC16f877A (a very similar device to yours) with code for doing the zero crossing detection. (I'm not giving you the link because this is obviously an assignment that you are supposed to learn from, not just blindly copy.)
Get that working and then move to the PWM part. There are a very large number of PWM examples out there.
Of course what you are probably supposed to do is to download the data sheet for the PIC16F876and work things out for yourself - that would give you the greatest understanding which you can then use for the next assignment which probably assumes you have learned the basic principles from this one.
susan
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,645
Helped
843
Reputation
1,690
Reaction score
819
Trophy points
1,393
Activity points
17,751
The schematic has a fatal flaw. You cannot, will not, drive with PWM the Mosfet's gate with the circuit as shown.

Again, you need to research Mosfet gate drives. But as Aussie Susan mentioned, this is something you have to research yourself.
 

Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top