Automatic Voltage Regulator (AVR) using PIC16f72

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Tue Dec 04, 2012 7:58 pm

I have tested the hardware removing the 3.3uf cap after the 10k series resistor and adding a 1uf can at AN0, no improvement
found.
Strange..Can you just test the ADC pin voltage when the PIC IC is not in the circuit and I guess that's only possible if you have used IC base for PIC..I guess you have used that. I can't understand why changing AC voltage makes things non-linear in a voltage divider!!
Have you checked voltage immediately after bridge? Is that change linearly or not? I might then think about sense transformer.. :?
These users thanked the author Enamul for the post:
s.k.sahoo (Wed Dec 05, 2012 6:23 am)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Wed Dec 05, 2012 7:51 am

Dear Mr Enamul,

Good Morning. Thanks for the study the circuit and a nice reply.
You have written " Can you just test the ADC pin voltage when the PIC IC is not in the circuit "
Yes, i have measured the voltage at different points without the Chip, the Data table is attached for your
observation.

" Have you checked voltage immediately after bridge? ?"
Yes, pl find the data in attached table.

" Is that change linearly or not "
No, it is not linear.

As per my knowledge, we have to study the filter caps behavior after the bridge rectifier,
when the rectified voltage is at it's min value the value of the cap for a average Dc voltage will be not equal to
the rectified voltage is at it's max value. What do you say. Can we get a linear changes ? I don't know.

If we can measure ac voltage or the any parameter of the ac voltage at adc, i think the problem will be solved.

Sorry to say, we have spent a lot of time on this 2nd design, we have to close it as soon as possible.

Thanks
With best regards
sks
Attachments
Measured_Voltage.jpg
Measured_Voltage.jpg (48.42 KiB) Viewed 2928 times
These users thanked the author s.k.sahoo for the post:
Enamul (Wed Dec 05, 2012 8:49 am)
Rating: 5.88%
 

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Wed Dec 05, 2012 9:04 am

Thanks for the hard works and nice post.
Sorry to say, we have spent a lot of time on this 2nd design, we have to close it as soon as possible.
I think the same and result is much improved than the earlier tables you posted..we can deal rest of the issues in program. I want to finalize the code. I will want one more table and that's final for this version. Please have a look in the program and the ac voltages we have used for relay on and off...it would be good if you can post ac voltage versus ADC value. I will code accordingly to avoid problem in Relay switching.
Thanks for the effort you made.
Attachments
DATA+AVR.fcf
(9 KiB) Downloaded 135 times
These users thanked the author Enamul for the post:
s.k.sahoo (Wed Dec 05, 2012 5:35 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Wed Dec 05, 2012 5:44 pm

Dear Mr Enamul,

Thanks for your help to finalize the project. Sorry, if i could have hurt you in my last post.
You are also working hard in this project to finalize.

You have written " it would be good if you can post ac voltage versus ADC value "

Is it the INPUT AC voltage at Relay switching points and the AN0 voltage of the PIC chip at that point of time after burning the attached code?
Pl clarify, so i will proceed.

Thanks again your great help.
With best regards
sks

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Wed Dec 05, 2012 6:00 pm

I didn't have any negative impact. I do feel like you to finalize asap.
Is it the INPUT AC voltage at Relay switching points and the AN0 voltage of the PIC chip at that point of time after burning the attached code? Pl clarify, so i will proceed.
Yes, the INPUT AC voltage at Relay switching points...you don't need to look at bridge output or ADC input (with last modified ckt..keep that as it is)..Just for each AC switching voltage using the code I have posted please post the ADC value so that I can change switching point in the code.
These users thanked the author Enamul for the post:
s.k.sahoo (Wed Dec 05, 2012 6:29 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Wed Dec 05, 2012 6:33 pm

Dear Mr Enamul,

Please see the attached code.

Thanks
sks
Attachments
6-RELAY_CROSS_LOGIC_V1.04.fcf
(32.02 KiB) Downloaded 119 times

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Thu Dec 06, 2012 6:35 am

Dear Mr Enamul,

Good Morning. Please find the ADC reading at different AC voltage Chart attached.

Thanks
With best regards
sks
Attachments
Result_AC_ADC.PNG
Result_AC_ADC.PNG (21.63 KiB) Viewed 2900 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Thu Dec 06, 2012 11:22 am

HI SKS,

I have manged to modify the code according to the table you post. Can you please check now the relay switching?
Attachments
6-RELAY_CROSS_LOGIC_V1.05.fcf
(33.57 KiB) Downloaded 126 times
These users thanked the author Enamul for the post:
s.k.sahoo (Fri Dec 07, 2012 6:19 am)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Fri Dec 07, 2012 6:45 am

Dear Mr Enamul,

Good Morning. Thanks a lot for finalizing the projects. I specially thanks YOU (Mr Enamul) for helping me and
thanks MM team for rating this thread, I guess they must be watching us,
i was expecting some comments on our project from Mr Benj and others any way thanks everybody.

I have checked the code on my hardware, its working fine.
I really appreciate the last idea of yours, it worked well.
We have to fine tune the Relay switching points a little. I am trying to do that, i will post the result when its complete.

Thanks
With best regards
sks
These users thanked the author s.k.sahoo for the post:
Enamul (Fri Dec 07, 2012 10:31 am)
Rating: 5.88%
 

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Fri Dec 07, 2012 9:24 am

Dear Mr SKS
Good Morning! You are most welcome :)
It's great to know that the trick worked. We have managed to sort the issue. It's all possible because of your constant support and R&D.
These users thanked the author Enamul for the post:
s.k.sahoo (Fri Dec 07, 2012 12:39 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Fri Dec 07, 2012 1:30 pm

Dear Mr Enamul,

Good evening.
If you will not mind, I want to address you as Mr Choudhury, will you mind ?
You have written your comments in last post, " We have managed to sort the issue. "
No, you have solved the issue, i have done little.

" It's all possible because of your constant support and R&D. "
All great people, a good human being always praise others.
Yes, i have worked with you, but this couldn't possible without your support, efforts and help.

After 5 years in Embedded field (of course part time), i could complete 3 commercial products
with your great support.
Sorry to say, Right now i don't have funds to upgrade my Flowcode,
I am trying to arrange funds, when it is ready, i must and will upgrade. I am telling this, because
This wonderful software Flowcode has helped me to develop my designs.

I am very much hopeful, i will get support from you and from MM Team in future.
No words to thank you.

Thanks
With best wishes
sks
These users thanked the author s.k.sahoo for the post:
Enamul (Fri Dec 07, 2012 1:40 pm)
Rating: 5.88%
 

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Fri Dec 07, 2012 1:49 pm

Hello Mr Shahoo,
If you will not mind, I want to address you as Mr Choudhury, will you mind ?
My close friends call me as Enamul but officially people call me Chowdhury as that is my surname. You can go for that.
I am developing products for my company in the back home from UK with this great piece of software. Things become very easy and development time reduces to great deal because of the software. But in any development we can't do anything without proper support. I believe this is done with your nice support. I love to help people and you are among those who deserve help.

No doubt if I knew about Flowcode 9 years back I guess my company would be the leading Electronics company in Bangladesh. Still we have lot s of things to do. Recently we have participated in a bid with 8 foreign companies and we are the only company from Bangladesh. They have selected 4 and now only we and one other foreign company are survived in the trial. I don't want to mention other company's name but they are world famous and renowned in the M2M field. Still we are there because I think being local and Flowcode (the boss).
These users thanked the author Enamul for the post:
s.k.sahoo (Fri Dec 07, 2012 6:31 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Fri Dec 07, 2012 7:31 pm

Dear Mr Chowdhury,

Thanks for allowing me to address you as Mr Chowdhury.
I am attaching Relay switching point and adc value on LCD chart table to fine tune the code.

Thanks
With best regards
sks
Attachments
Relay SW Points ADC Value.jpg
Relay SW Points ADC Value.jpg (55.86 KiB) Viewed 2865 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Fri Dec 07, 2012 7:45 pm

Thanks SKS. Here is the tuned code for your AVR. Hope that it will satisfy your requirement..
Attachments
6-RELAY_CROSS_LOGIC_V1.06.fcf
(33.52 KiB) Downloaded 129 times
These users thanked the author Enamul for the post:
s.k.sahoo (Fri Dec 07, 2012 8:18 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Sun Dec 09, 2012 4:56 pm

Dear Mr Enamul,

Thanks for the code. I am sorry for late reply. It worked well.
My 2nd model is ready for testing, with in a day or two i am going to test.
Can i replace Relays with TRIAC, if i add zero crossing ?
How to implement. Pl help.

Thanks
With best regards
sks

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 811 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby Enamul » Sun Dec 09, 2012 5:37 pm

Yes. that's possible. Please open a new thread for that changing title like "AVR using TRIAC". Here is one link..
http://homemadecircuitsandschematics.bl ... olled.html
Please read the paper I have sent.
These users thanked the author Enamul for the post:
s.k.sahoo (Sun Dec 09, 2012 5:45 pm)
Rating: 5.88%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

s.k.sahoo
Posts: 147
Joined: Sun Sep 16, 2012 3:02 am
Has thanked: 144 times
Been thanked: 7 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby s.k.sahoo » Fri Dec 14, 2012 6:51 pm

Hello

This relay control AVR is working all right.
I do thanks Mr Enamul, Flowcode Forum, Team for the support and help for completing this project
I thanks every one who took interest to watch this topic.
Without Flowcode and Mr Enamul, this project was impossible for me at one point of time, this design
has reduced the hardware cost.

Thanks every one
sks

partho
Posts: 1
Joined: Sun Apr 22, 2018 1:00 pm
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby partho » Sun Apr 22, 2018 1:25 pm

Dear All,

I downloaded .fcf file but can not open it. please can any one give me suggestion to open that file please.

Regards
Partho

kersing
Valued Contributor
Valued Contributor
Posts: 1790
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 474 times
Been thanked: 989 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby kersing » Sun Apr 22, 2018 3:37 pm

partho wrote:I downloaded .fcf file but can not open it. please can any one give me suggestion to open that file please.


Which version of Flowcode are you using?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 7624
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2156 times
Been thanked: 3010 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Postby medelec35 » Sun Apr 22, 2018 3:38 pm

Hi Partho,
Welcome to Matrixtsl forums.
You have not given us enough information.
You mentioned file are you referring to

Code: Select all

6-RELAY_CROSS_LOGIC_V1.06.fcf

Also what version of Flowocode are you trying to open the fcf file with?
I just opened the file mentioned with Flowcode V7 and no issues with opening or compiling.
Please give more details if requiring help.


Martin

Edit: Sorry for repeated information,
kersing and I posted at a similar time.
If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Martin