Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A Microcontroller based Analogue Waveforms Analyzer Project

Status
Not open for further replies.

km

New Member

:eek: Hi, I am currently doing my final semester project and hope to get some help from here. The purpose of my project is to design, built and test a low-cost electronic system that will analyze the characteristic of analogue waveforms. It must able to measure the frequency, mean value, rms value, peak-to-peak voltage and duty cycle of an analogue waveform.The processed results can be selectively displayed on a LCD screen. The electronic system will be implemented primarily through the use of an analogue circuitry (that will make sure the input voltage falls between 0 to 5V), an A/D converter, a PIC16F84 micro-controller, and a LCD Alphanumeric 20X4.
:arrow:
Is it possible to display the results for large input voltage range? ( i.e. -240V-240V) :roll:

What additional components OR any circuits do I need to in order to build this project :?:

I am not allowed to use a built-in ADC PIC in this project, so which type of ADC chip is suitable for me? :idea:

Is there any website that related to my project and where can I find the programming code for my PIC for this project?

Thank you very much!!~ Your help will be truly appreciated :wink:
 
Re: A Microcontroller based Analogue Waveforms Analyzer Proj

km said:
Is it possible to display the results for a bigger voltage range? ( i.e. -240V-240V) :roll:

Yes, you just need to use a resistive attenuator on the front end to give the voltage you need. If you want to display positive and negative, as well as just positive, probably the easiest way is to use an opamp on the input, fed from a split supply. Feed the output of the opamp through a resistor to the input of the A2D, and connect an identical resistor from the input of the A2D to the positive reference - this will give half scale reading at zero volts in, full scale readng at maximum positive in, and zero reading at maximum negative in.

What additional components OR any circuits do I need to in order to build this project :?:

I am not allowed to use a built-in ADC PIC in this project, so which type of ADC chip is suitable for me? :idea:

Pretty well anything would do, you don't need to get carried away with high resolution - an eight bit A2D gives better than 0.5% resolution - which will be more than the rest of the circuit.

Using a PIC with inbuilt 10 bit A2D would make life nice and easy, it's a pity you can't do that!.

How about using a PIC 12F675 (8 pin FLASH PIC with 10 bit A2D) as an A2D? - would that be allowed? - treat it just as an A2D and feed to your 16F84 for the display and calculations.

Is there any website that related to my project and where I can find the programming code for my PIC for this project?

My tutorials show how to drive an LCD and keys, you might find them helpful - also one shows how to connect to an I2C A2D, but that's probably not your best solution!.

Update:

Just remembered something I forgot, you will need a low-pass filter on the input stage, it's vital that your sampling rate is higher then the maximum incoming frequency - at least double, preferably more!. Otherwise you get anti-aliasing distortion which will complete ruin any readings.

I would also suggest your biggest problem is going to be calculating RMS values, this is likely to take a fair amount of maths.
 
Re: A Microcontroller based Analogue Waveforms Analyzer Proj

Nigel Goodwin said:
km said:
Is it possible to display the results for a bigger voltage range? ( i.e. -240V-240V) :roll:

Yes, you just need to use a resistive attenuator on the front end to give the voltage you need. If you want to display positive and negative, as well as just positive, probably the easiest way is to use an opamp on the input, fed from a split supply. Feed the output of the opamp through a resistor to the input of the A2D, and connect an identical resistor from the input of the A2D to the positive reference - this will give half scale reading at zero volts in, full scale readng at maximum positive in, and zero reading at maximum negative in.

What additional components OR any circuits do I need to in order to build this project :?:

I am not allowed to use a built-in ADC PIC in this project, so which type of ADC chip is suitable for me? :idea:

Pretty well anything would do, you don't need to get carried away with high resolution - an eight bit A2D gives better than 0.5% resolution - which will be more than the rest of the circuit.

Using a PIC with inbuilt 10 bit A2D would make life nice and easy, it's a pity you can't do that!.

How about using a PIC 12F675 (8 pin FLASH PIC with 10 bit A2D) as an A2D? - would that be allowed? - treat it just as an A2D and feed to your 16F84 for the display and calculations.

Is there any website that related to my project and where I can find the programming code for my PIC for this project?

My tutorials show how to drive an LCD and keys, you might find them helpful - also one shows how to connect to an I2C A2D, but that's probably not your best solution!.

Update:

Just remembered something I forgot, you will need a low-pass filter on the input stage, it's vital that your sampling rate is higher then the maximum incoming frequency - at least double, preferably more!. Otherwise you get anti-aliasing distortion which will complete ruin any readings.

I would also suggest your biggest problem is going to be calculating RMS values, this is likely to take a fair amount of maths.

Use RMS to DC converter chip... LT and ADI make them and they are relatively inexpensive.
 
Thx again for replying my message! Nigel. There's some part that I not really understand. :(

you just need to use a resistive attenuator on the front end to give the voltage you need

Is it means that the resistive attenuator will step down the input voltage to 0-5V range?

If you want to display positive and negative, as well as just positive, probably the easiest way is to use an opamp on the input, fed from a split supply.

Why you said that I want to display positive and negative, as well as just positive.... ..... I don't really get what you mean :?

Using PIC 12F675 with a built in ADC is not allowed also.(since the condition clearly stated: No built-in ADC PIC allowed!!) I am planning to used TLC 548 A2D (8-bit resolution), is that good enough for my project :?:

Also, thanks for recommending your PIC tutorials, I will look through it!! :wink:
 
Re: A Microcontroller based Analogue Waveforms Analyzer Proj

km said:
Thx again for replying my message! Nigel. There's some part that I not really understand. :(

you just need to use a resistive attenuator on the front end to give the voltage you need

Is it means that the resistive attenuator will step down the input voltage to 0-5V range?

Yes, just a simple potential divider, two resistors.

If you want to display positive and negative, as well as just positive, probably the easiest way is to use an opamp on the input, fed from a split supply.

Why you said that I want to display positive and negative, as well as just positive.... ..... I don't really get what you mean :?

The A2D will read from 0V to 5V, assuming you are using the 5V rail as the positive reference. This may be what you want, but if you are feeding AC signals in, they are more likely to be from -2.5V to +2.5V, in which case you need to bias your A2D at 2.5V, so 0V in gives half scale, negative goes lower, and positive goes higher.

Using PIC 12F675 with a built in ADC is not allowed also.(since the condition clearly stated: No built-in ADC PIC allowed!!) I am planning to used TLC 548 A2D (8-bit resolution), is that good enough for my project :?:

Should be fine, 8 bits is plenty.
 
PICBasic Compiler

As a beginner of PIC Microcontroller, so I am not very familiar with it. I need a compiler for my project and I found out that there have different kinds of compiler. I have a PIC Microcontroller Project Book by JOHN IOVINE that used PICBasic standard Compiler. Is the compiler suitable for me? OR have a more better one :idea:
:arrow:
Is it a must to purchase the PICBasic standard Compiler?($99.95) OR I can download from the internet :?:
 
Re: PICBasic Compiler

km said:
As a beginner of PIC Microcontroller, so I am not very familiar with it. I need a compiler for my project and I found out that there have different kinds of compiler. I have a PIC Microcontroller Project Book by JOHN IOVINE that used PICBasic standard Compiler. Is the compiler suitable for me? OR have a more better one :idea:
:arrow:
Is it a must to purchase the PICBasic standard Compiler?($99.95) OR I can download from the internet :?:

You can download an assembler free from MicroChip, it's called MPASM and comes as part of MPLAB - you really need to have a reasonable understanding of assembler to use PIC's effectively. The 16F84 only has 35 assembler commands, so it's fairly easy to learn.

My tutorials already contain suitable code for a fair amount of your project, feel free to 'borrow' anything you need.
 
RMS to DC converter chip

Use RMS to DC converter chip... LT and ADI make them and they are relatively inexpensive.

I just realize that has such a chip that can computes the true rms value of any complex waveforms. Thanks Optikon for such an useful information 8)
:?:
Do you mean that what I need to do is just interface the RMS to DC converter chip with the PIC microcontroller in order to compute the RMS value?

:idea: Is using this chip is a better solution for computing the RMS value instead of writing a prgram as Nigel had said:"it likely to take a fair amount of maths."
 
Re: RMS to DC converter chip

km said:
Use RMS to DC converter chip... LT and ADI make them and they are relatively inexpensive.

I just realize that has such a chip that can computes the true rms value of any complex waveforms. Thanks Optikon for such a useful information 8)
:?:
Do you mean that what I need to do is just interface the RMS to DC converter chip with the PIC microcontroller in order to compute the RMS value?

It goes between the incoming signal and the A2D in the PIC, so all the PIC reads is the RMS value of the incoming signal (as a DC voltage). To read anything else from the signal you would need a separate feed to the PIC before the converter.

:idea: Is using this chip is a better solution for computing the RMS value instead of writing a prgram as Nigel had said:"it likely to take a fair amount of maths."

If all you want is an RMS reading it makes life a LOT! easier.
 
MPASM Assembler

I have already install the MPASM Assembler. Do I need to install MPLAB as well :roll:

Thanks for recommended me this software! :wink:

UPDATE :!:

I have decideded to use PIC 16F84A. Will it make any differences to my project? (i.e. the assembler commands)
 
Re: MPASM Assembler

km said:
I have already install the MPASM Assembler. Do I need to install MPLAB as well :roll:

Thanks for recommended me this software! :wink:

I have decideded to use PIC 16F84A. Will it make any differences to my project? (i.e. the assembler commands)

You only need MPLAB if you want to use it, personally I just use a text editor and MPASM.

The 16F84A should be fine, but (as usual) I would advise using the 16F628 rather than the obselete 16F84 series. It also has the major advantage of having an internal 4MHz oscillator, which gives you 16 available I/O pins - if you need that many. You can also use an external oscillator, which makes it almost identical to the 16F84 - you just need to disable the internal comparators - this is done in all of my tutorials.

Anyway, the 16F84A is fine, but the 16F628 is better - but it might make no difference for you!.
 
PIC 16F628 vs PIC 16F628A

(As usual), Thanks for your advice!! Nigel :wink:

Please consider using device PIC 16F628A from www.microchip.com

I have checked out the PIC 16F628 at microchip.com. Is PIC 16F628A is an upgraded version of PIC 16F628 :roll:
 
Re: PIC 16F628 vs PIC 16F628A

km said:
(As usual), Thanks for your advice!! Nigel :wink:

Please consider using device PIC 16F628A from www.microchip.com

I have checked out the PIC 16F628 at microchip.com. Is PIC 16F628A is an upgraded version of PIC 16F628 :roll:

The 16F628A is a FLASH version of the 16F628, which uses EEPROM technology. As their programming requirements are different, a lot of programmers won't program the 16F628A - including WinPicProg - but I'll be updating it when I get time.
 
The 16F628A is a FLASH version of the 16F628, which uses EEPROM technology. As their programming requirements are different, a lot of programmers won't program the 16F628A - including WinPicProg - but I'll be updating it when I get time

what technology does the 16F628 use. and if your programmer wont work, can u recommend a good programmer for the 16F628A which will work with the P16PRO40 hardware.[/quote]
 
samcheetah said:
The 16F628A is a FLASH version of the 16F628, which uses EEPROM technology. As their programming requirements are different, a lot of programmers won't program the 16F628A - including WinPicProg - but I'll be updating it when I get time

what technology does the 16F628 use. and if your programmer wont work, can u recommend a good programmer for the 16F628A which will work with the P16PRO40 hardware.
[/quote]

As I already mentioned (and you actually quoted!) the 16F628 uses EEPROM technology. I haven't tried any other software, but I seem to remember that someone mentioned that ICProg works with the 628A.
 
As I already mentioned (and you actually quoted!) the 16F628 uses EEPROM technology. I haven't tried any other software, but I seem to remember that someone mentioned that ICProg works with the 628A.

im sorry im so dumb i didnt read the post carefully.

okay so the 628 uses EEPROM technology and the 628A uses flash.

will Ozipic programmer work with the 628A? or is there only a need for changes in the software.
 
PIC Programming Languages

Hi Nigel 8)

I want to ask that which programming languages is a better option for me to program my PIC chip :?:

I have found out that Basic language is more easier to learn and master than either assembly or C language. Should I use Basic :roll:

Thank You!! :wink:
 
Re: PIC Programming Languages

km said:
Hi Nigel 8)

I wanted to ask that which programming languages is a better option for me to program my PIC chip :?:

I have found out that Basic language is more easier to learn and master than either assembly or C language. Should I use Basic :roll:

Thank You!! :wink:

I would advise learning assembler, even if you eventually decide to use BASIC or C a knowledge of assembler is vital to make the best use of a PIC.

PIC assembler only has 35 commands (and many of those are rarely used), so it's not too hard to learn.
 
Status
Not open for further replies.

Latest threads

Back
Top