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.

[PIC] ac bulb intensity control by zero crossing with out flickering

Status
Not open for further replies.

bhoobalan

Member level 1
Member level 1
Joined
Dec 28, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
280
Hi friends,
I want to control the 25w bulb intensity, i am using pic16f877a controller xc8 compiler and also i have attached my code with circuit diagram.
For controlling the AC voltage we need to fine zero crossing, this is done by code through interrupt.
In my code i have used two switch for incrementing and decrementing the intensity,
but i am not getting any output using the switch?
How to rectify this error and also if there is any mistake in my code means let me know?

Thank you in advance

I am waiting for your reply
 

Attachments

  • ac lamp intensity control.png
    ac lamp intensity control.png
    35.4 KB · Views: 187
  • ac lamp intensity control.txt
    1.8 KB · Views: 193

Hi friends,
I want to control the 25w bulb intensity, i am using pic16f877a controller xc8 compiler and also i have attached my code with circuit diagram.
For controlling the AC voltage we need to fine zero crossing, this is done by code through interrupt.
In my code i have used two switch for incrementing and decrementing the intensity,
but i am not getting any output using the switch?
How to rectify this error and also if there is any mistake in my code means let me know?

Thank you in advance

I am waiting for your reply

First, I have not done a detailed analysis of your code, but some debug methods may help in identifying the issue.
1. Is the circuit going though the loop, to check this add two LEDs wit resistors to some unused outputs such that they flash up/or down when the buttons are pressed.

2. Can you debug 'k', what range is it going through?

3. Add a test output in the interrupt such that a line toggles on each interupt and view this on the scope.

In your code, after you do the test for max and min, you also inc or dec 'k' so that it will exceed your set limits, the inc/dec part should be done prior to setting k to min or max.

These will help you in debugging the issue.

As a note, I did something similar many years ago and bulb intensity is not very linear with the delay time, so once the circuit is functional you may need to investigate applying a look up table to replace the delay with the value of 'k'.
Hope this helps.
 
follow this

https://www.edaboard.com/threads/305540/

this may help

- - - Updated - - -

follow this

https://www.edaboard.com/threads/305540/

this may help

- - - Updated - - -

follow this

https://www.edaboard.com/threads/305540/

this may help

- - - Updated - - -

follow this

https://www.edaboard.com/threads/305540/

this may help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top