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: 814 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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.. :?
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

Post by s.k.sahoo »

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 11088 times

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

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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 394 times
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

Post by s.k.sahoo »

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: 814 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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.
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

Post by s.k.sahoo »

Dear Mr Enamul,

Please see the attached code.

Thanks
sks
Attachments
6-RELAY_CROSS_LOGIC_V1.04.fcf
(32.02 KiB) Downloaded 360 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

Post by s.k.sahoo »

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
(21.63 KiB) Downloaded 5761 times

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

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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 349 times
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

Post by s.k.sahoo »

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

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

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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.
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

Post by s.k.sahoo »

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

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

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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).
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

Post by s.k.sahoo »

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 11025 times

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

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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 291 times
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

Post by s.k.sahoo »

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: 814 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by Enamul »

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.
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

Post by s.k.sahoo »

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

Post by partho »

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: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by kersing »

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Automatic Voltage Regulator (AVR) using PIC16f72

Post by medelec35 »

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.
Martin

Post Reply