PIC16F676 voltmeter

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: PIC16F676 voltmeter

Postby ABSF » Sat Feb 05, 2011 10:15 am

pic16 WROTE:how to make the voltmeter in the diagram much more accurate....
i want to make it more precision,before upload its video..


So, you mean your voltmeter is working NOW?

What was the problems that you've found?

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PIC16F676 voltmeter

Postby ABSF » Sat Feb 05, 2011 11:33 am

pic16 WROTE:
I think he means add a better ADC before interface it with MCU. MCU's ADC has limited capabilities. You can get some standalone ADC IC :D


then how the circiut look like?
how to connect it into the circiut? :|


Conventional ADC has an analog input as well as an input for reference voltage. The outputs are usually parallel, which means if you want a 12 bits adc, you need to connect 12 of your input port pins to the outputs of ADC e.g AD678. Modern ADC has serial outputs in SPI, so you only need a few pins to interface to the ADC e.g. MCP3208

http://www.microchip.com/wwwproducts/De ... e=en010534

Most pic has 10 bit ADC as standard. That means the input is sliced into 1024 pieces during sampling. Foe example, if you have an input of 5V, it would be divided by (2^10) 1024 ~ =5mV. Which means that the voltage has to vary +/- 5 mV before it can detect a change. SO if you're measuring 10V or 20V, then the tolerance (error) would be higher.

May be some of the high-end PIC has 12 or 16 bit ADCs. Your 16F676 has 8 channels of ADC each with 10 bit resolution. I am not sure if it is possible to cascade 2 channel of ADC and make it a higher resolution ADC sacrifying some speed. I will try to google to see if anyone has done it.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PIC16F676 voltmeter

Postby pic16 » Sat Feb 05, 2011 1:17 pm

Brian Griffin WROTE:
pic16 WROTE:
I think he means add a better ADC before interface it with MCU. MCU's ADC has limited capabilities. You can get some standalone ADC IC :D



then how the circiut look like?
how to connect it into the circiut? :|


1.) You need an external ADC IC, like 12 to 16 bits. And of course, a good, regulated voltage reference inside too.

2.) You need some isolators between the test terminals and the ADC to prevent frying the whole system if you accidently put too high voltages/currents.

3.) And a modification of program code too.



1.) did cytron here sell any ADC IC?
2.) may giving me a sample circuit of this?

i no idea about the 3.) :oops: :(
i'm poor in english and just an electronic hobbyist.
pic16
Amateur
 
Posts: 135
Joined: Tue Jan 04, 2011 2:28 pm
Location: Earth

Re: PIC16F676 voltmeter

Postby Brian Griffin » Sat Feb 05, 2011 1:25 pm

pic16 WROTE:
1.) did cytron here sell any ADC IC?
2.) may giving me a sample circuit of this?

i no idea about the 3.) :oops: :(


Eh, do you have your voltmeter working first? :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F676 voltmeter

Postby pic16 » Sat Feb 05, 2011 1:29 pm

ABSF WROTE:
pic16 WROTE:how to make the voltmeter in the diagram much more accurate....
i want to make it more precision,before upload its video..


So, you mean your voltmeter is working NOW?

What was the problems that you've found?

Allen



yes and no..
haha..
still got a lot a lot of problems

7 segment display sometime blinking, blinking with weird number
when it "normal", it give me uncorrent value each time...(i have to adjust 50k resistor each time :shock: )
and big error, maybe was the ADC thing as you guys said..
i'm poor in english and just an electronic hobbyist.
pic16
Amateur
 
Posts: 135
Joined: Tue Jan 04, 2011 2:28 pm
Location: Earth

Re: PIC16F676 voltmeter

Postby pic16 » Sat Feb 05, 2011 1:31 pm

Brian Griffin WROTE:
pic16 WROTE:
1.) did cytron here sell any ADC IC?
2.) may giving me a sample circuit of this?

i no idea about the 3.) :oops: :(


Eh, do you have your voltmeter working first? :)




sometime yes, sometime no
i'm poor in english and just an electronic hobbyist.
pic16
Amateur
 
Posts: 135
Joined: Tue Jan 04, 2011 2:28 pm
Location: Earth

Re: PIC16F676 voltmeter

Postby Brian Griffin » Sat Feb 05, 2011 1:41 pm

pic16 WROTE:sometime yes, sometime no


Cytron sells those ADC ICs, maybe, but you need to know how to interface them. They are using those SPI/I2C interfaces.

To increase the resolution of the voltmeter is never that easy. I checked around for a voltmeter - most of them are limited in terms of precision and resolution. You need to brew your own code on this one and improvise on the system. :mrgreen:
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F676 voltmeter

Postby pic16 » Sat Feb 05, 2011 5:12 pm

are there other way to make the voltmeter more accurate, except using ADC IC?
i'm poor in english and just an electronic hobbyist.
pic16
Amateur
 
Posts: 135
Joined: Tue Jan 04, 2011 2:28 pm
Location: Earth

Re: PIC16F676 voltmeter

Postby ABSF » Sat Feb 05, 2011 9:05 pm

pic16 WROTE:are there other way to make the voltmeter more accurate, except using ADC IC?


If you just want to get an reasonably accurate voltmeter, the cheaper way is to do it without mcu. Take a look at the chip ICL7107 (LED) and ICL7106 (LCD) datasheet here

http://www.escol.com.my/Datasheets_specs/ICL7106-7.pdf

Most of the conventional multi-meters including my SANWA meter are based on this chip. The chip is only 8.50 each and I have 2 of them in my drawer but I haven't make use of them yet. Your project must have some problem in your construction as it shouldnt display blinking and weird numbers. Are your segments a-g connected accordingly to the schematics? As I see the pin numbers used are not in running orders like your first project.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PIC16F676 voltmeter

Postby Brian Griffin » Sat Feb 05, 2011 9:34 pm

ABSF WROTE:
pic16 WROTE:are there other way to make the voltmeter more accurate, except using ADC IC?


If you just want to get an reasonably accurate voltmeter, the cheaper way is to do it without mcu. Take a look at the chip ICL7107 (LED) and ICL7106 (LCD) datasheet here

http://www.escol.com.my/Datasheets_specs/ICL7106-7.pdf

Most of the conventional multi-meters including my SANWA meter are based on this chip. The chip is only 8.50 each and I have 2 of them in my drawer but I haven't make use of them yet. Your project must have some problem in your construction as it shouldnt display blinking and weird numbers. Are your segments a-g connected accordingly to the schematics? As I see the pin numbers used are not in running orders like your first project.

Allen


Wow thanks for telling us about this chip. That has almost everything inside... even the seven segment drivers! :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

PreviousNext

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 4 guests

cron