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.

Fan regulator Using PIC16F628?

Status
Not open for further replies.

UroBoros

Advanced Member level 2
Advanced Member level 2
Joined
May 5, 2004
Messages
642
Helped
19
Reputation
38
Reaction score
8
Trophy points
1,298
Location
Cochin - India
www.uroborostech.in
Activity points
6,463
fan regulator circuit

Hai

I am doing a remote fan regulator using PIC16F628.


How the PWM module in PIC can be used to controll the speed of a ceiling fan?

Or else what method can be used to control the Speed .

Using a commercial TV RC5 remote control I will send command to the unit mounted in the switch board. the unit can recieve my commands and switch on the electrical devices using a triac.

But how to control the speed using pwm in PIC .What should be the period for PWm ?.My AC is 50Hz

I have seen circuits in which PIC is driven without a transformer for power supply, bridge and some droping resitor arrangement. Please share some information for doing that so that my unit can be fitted inside the switch box without a transformer.

Also how to detect the firing point for triac for noisless operation of Fan?

Thanks
Picstudent
 

remote controlled fan regulator

For Fan Motor Speed Control with the use of Triac,
https://www.spelektroniikka.fi/kuvat/triacd.pdf

For transformerless power supply,
https://www.electronics-lab.com/projects/power/022/

WARNING! Transformerless power supply has no electrical isolation

Since you wish not to include a bridge rectifier, you can use a full-wave rectifier (2 diodes). In anyway, you will still need a rectifier.

Unlike DC motor control which is very straightforward, you are going to control a ceiling fan, i.e. a AC motor, therefore one possible way of using PWM to control your ceiling is to control the on/off of the triac.

To turn on the triac, turn on it's gate.
To turn if off, short the anode and cathode using a transistor switch, a relay or a opto-coupler.

Mohan, "Power Electronics" is a good book on power electrical/electronic control.
This book will tell you more on the firing angle, phase control and detection.

For you to read, digest and understand is easier than for me to explain.
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
fan regulator using triac

Picstudent said:
Hai

I am doing a remote fan regulator using PIC16F628.


How the PWM module in PIC can be used to controll the speed of a ceiling fan?

Or else what method can be used to control the Speed .

Using a commercial TV RC5 remote control I will send command to the unit mounted in the switch board. the unit can recieve my commands and switch on the electrical devices using a triac.

But how to control the speed using pwm in PIC .What should be the period for PWm ?.My AC is 50Hz

I have seen circuits in which PIC is driven without a transformer for power supply, bridge and some droping resitor arrangement. Please share some information for doing that so that my unit can be fitted inside the switch box without a transformer.

Also how to detect the firing point for triac for noisless operation of Fan?

Thanks
Picstudent


check this post
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
fan regulator connection

hai

Thanks a lot.I think this will solve my issue.

But one question. Can we safely use the same dimming method to control the speed of a ceiling fan? Or should any other strategy required?

Thanks again

Picstudent
 

remote control fan regulator

few days ago i submitted a project to my uni , its an industrial motor controller which controlled centrally , connected thru rs-485.

i used one pic16f628a for firing the triac, isolated by a random phase optoisolator for speed controll, which is based on firing angle technique. i first measured the one half cycle duration then used and ZCD snd started the delay after tat (percentage of the half cycle) the fire the triac, its a noisless system because as long as u fire rythmicly it worsk just fine i tried upto 5hp motor with my design

here are two pictures, sorry for the quality i dont hav a good camera at the moment

regards
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
ac fan regulator

For test purposes you will need a small transformer (or a resistor, bridge and an optocoupler, example 4N25) to create isolated zero-crossing reference ..
If you go for a small transformer (5-6Vac) connect a bridge to recify voltage and this will give you 100Hz. From this signal you will need to creat short pulses as clos to 0V as possible. This can be done by connecting a npn transistor to this signal (base resistor ≈10kΩ) and getting almost square wave at its collector. This signal can be fed to PIC microcontroller as reference for phase angle calculations ..
Once you have this reference you can continue testing this circuit using isolated PIC circuit (assuming that you use MOC to provide isolation from the triac's gate) ..
Regards,
IanP
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
ac motor speed control pic 16f628

hai

Thanks IANP . I will make arrangements like that.

In the meantime I will draw a schematic of my proposed (or rather my prototype )hardware which should fix into a switchboard in a bedroom and will control the lights and fan. from a remote control.

the scematic will give you a better idea of what I am doing.

Thanks a lot


Picstudent

Added after 1 hours 54 minutes:

hai


this is the schematic of my(Not mine ! proposed, lol) fan speed controller and light switch.

it has 4 lights on off fesility and a single fan speed control by a remote.


Ideas and sugessions for programe logic as well as debugging are requested.

Thanks to all

Picstudent
 

how to connect ceiling fan regulator?

You obviously haven't included section to control fan to this schematic ..
I would make some changes to the circuit that delivers reference of zero-crossing to the PIC.
The 9V zener diode (D2) can be connected directly to the bridge, so at that point you will have 100Hz "square" pulses, then add another diode between the bridge and the smoothing capacitor (C4). Connect a transistor (same as I mentioned before) to the bridge/zener diode point and connect its collector to PIC's RA2.
And, remove R1 and R2 from the circuit.

From what I have seen in the dimmer.zip there was a dim.doc file which contains assembly code. Have you checked that?

Regards,
IanP
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
how to connect fan regulator

IanP said:
If you go for a small transformer (5-6Vac) connect a bridge to recify voltage and this will give you 100Hz. From this signal you will need to creat short pulses as clos to 0V as possible. This can be done by connecting a npn transistor to this signal (base resistor ≈10kΩ) and getting almost square wave at its collector. This signal can be fed to PIC microcontroller as reference for phase angle calculations ..
Once you have this reference you can continue testing this circuit using isolated PIC circuit (assuming that you use MOC to provide isolation from the triac's gate) ..
Regards,
IanP

Hai

if we use this method, in my schematic only one input of pic is directly connected via a droping resistor to AC . Then we will get only positive going pulses only.(Am I right?) Then how we detect the negative start of the signal?

Thanks
picstudent

Added after 3 minutes:

IanP said:
You obviously haven't included section to control fan to this schematic ..

Regards,
IanP


Nothing missed. only that triac in the center of 5 triacs control the fan from the remote controll


Thanks
 

fan regulator

This shouldn't be a problem because after rectifying bridge the frequency is doubled: 100Hz, so you need only one pin ..
I think you sent this post while I was sending mine ..
Regards,
IanP
 
remote fan regulator

Picstudent said:
hai

Thanks IANP . I will make arrangements like that.

In the meantime I will draw a schematic of my proposed (or rather my prototype )hardware which should fix into a switchboard in a bedroom and will control the lights and fan. from a remote control.

the scematic will give you a better idea of what I am doing.

Thanks a lot


Picstudent

Added after 1 hours 54 minutes:

hai


this is the schematic of my(Not mine ! proposed, lol) fan speed controller and light switch.

it has 4 lights on off fesility and a single fan speed control by a remote.


Ideas and sugessions for programe logic as well as debugging are requested.

Thanks to all

Picstudent

hi

here is remote control based lamp dimmer and fan controller just read out every thing carefully also source code added for your own changing hope this will help you
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
introdution to fan regulator using triac

Hai

I have made the transistor arrangement like IanP pointed out for detecting Zero crossing and now i am getting exactly one spike high in RA2 pin of micro. It doesnt look like a squire wave but a sharp spike exactly every 10Ms. in Scope it looks like a faded vertical line every 10ms.

Can we wait for a high in this input pin RA2 and decide it as a zero crossing ?

Then wait for the firing delay and trigger?


Thanks again


Picstudent
 

fan regulator circuit using power device

If you change the time basis on the oscilloscope you will see that this spike is in fact a pulse of certain time. In your case the narrower the better as it will more accurately define the "zero-crossing". So now you have it .. and it can be used as your zero-crossing reference for both situations: positive-negative and negative-positive change ..

.. and then wait for the firing delay and trigger ..

Regards,
IanP
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
fan regulator circuit

IanP said:
If you change the time basis on the oscilloscope you will see that this spike is in fact a pulse of certain time. In your case the narrower the better as it will more accurately define the "zero-crossing". So now you have it .. and it can be used as your zero-crossing reference for both situations: positive-negative and negative-positive change ..

.. and then wait for the firing delay and trigger ..

Regards,
IanP

Hai

How can we make the pulse narrower as you mentioned?

1. If we made this transistor arrangemnt in our final AC circuit also ,it will creat extra load on AC droping circuit. So I am afraid more problems and more footprints and more cost. (What is Your view?) Can we expect the same pulses (10Ms) in the original circuit which I have posted,ie RA2 directly connected to AC line via a dropping resistor? Or it will pulse only on 20Ms? (I feel by that arrangent also 10ms pulse because of bridge.Am i right?)

2. the original hardware connects the IR receiver to RA3.(Not interupt driven)

I am also planning to do the same like that because the RC5 decoding programe I am having and femiler is not interupt driven .(Polling the pin)

So how can we manage the IR polling and triac firing in a coexistant and effective way?
Thanks again

Picstudent
 

ac fan speed regulators

I think the width of this pulse is narrow enough to treat its falling edge as a "mark".
If you fired the triac exactly at this point you will have full voltage cycle (100%).

I would encourage you to use interrupts simply because there will be situations when both inputs will try to attract attention of the PIC and you will have to arbitrary service one and loose the other one, while using interrupts will at least set some flags which can be used later to service the other input. In microcontrollers a couple of microseconds of delay is nothing comparing with 10ms ..

Regards,
IanP
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
remote controlled fan regulator circuit schematic

yes

I have converted it to 8 pin PIC .

it can control 2 lights on and off,plus fan speed control.

Fits into the plastic case of a ROMA modular regulator. 4cm*4cm*4cm.

can be reduced to better size with smd components.Next revision

The product is under field testing and will be launched on May.

picstudent
 

working of remote controlled fan regulator

Any chance we might have a peek into the technical details ?
 

ceiling fan control using pwm technique

you can use a optocoupler triac driver(MOC3021) for driving triac
 

    UroBoros

    Points: 2
    Helpful Answer Positive Rating
motor controlled by pic16f628

I did not ask how to drive a Triac. I asked Picstudent if we might have a peek into the technical details.

Please don't just post to increase points.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top