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.

op-amp output to 16F876A

Status
Not open for further replies.

Benjermin

New Member
Hi everyone,

I am currently try to contruct a circuit which microchip will read the value from ADC.

I have connect an op-amp (MC1458) to the ADC (RA0) of the 16F876A. I found that the output voltage of the op-amp when disconnect and connect to the chip was different.

The output voltage when it is connected to chip is very low (mV) compare to the output when not connect to the chip.

Can anyone pls tell me what i need to do to fix this problem?

THANKS
 
Hi everyone,

I am currently try to contruct a circuit which microchip will read the value from ADC.

I have connect an op-amp (MC1458) to the ADC (RA0) of the 16F876A. I found that the output voltage of the op-amp when disconnect and connect to the chip was different.

The output voltage when it is connected to chip is very low (mV) compare to the output when not connect to the chip.

Can anyone pls tell me what i need to do to fix this problem?

THANKS

hi,:)
Are you sure you have configured the AN0 pin to be an analog input and not a digital output.?
 
Certainly sounds like input impedence issue. You likely have that input configured as a digital in or out, and maybe even an internal pullup/down, which will sink your low-current opamp voltage. Like the other guy said, be sure you are configured as an analog in, and apply the voltage AFTER PIC has initialized and configured itself.
 
here is the circuit diagram that i connect at breadboard
the ouput voltage of the MC1458 when i not connect and disconect from PIC is different, is there any mistake at the circuit?

other than that, my PIC cant read negative voltage, any idea to solve this problem?
 

Attachments

  • diagram.doc
    62 KB · Views: 395
That diagram has the thermocouple connected to ground!!

Also, if the output voltage from the opamp is negative then that will be a problem.

Mike.
 
do u have any suggestion for me to modify my circuit so that it can work?

hi,
The PIC crystal wiring also looks wrong, is it wired that way or is it a drawing error.?

Do you have circuit diagram you could post, a block diagram isn't much use.:)
 
i will draw another diagram to replace the voltage inverter and the op-amp

about the crystal, the connection of the crystal to capacitor and a resistor i found it from the data sheet of the PIC16F876 but the value of the resistor i just simply put to 640ohm.

i also have try to exclude the resistor that connect to crystal, but it is still having the same problem.
 
i will draw another diagram to replace the voltage inverter and the op-amp

about the crystal, the connection of the crystal to capacitor and a resistor i found it from the data sheet of the PIC16F876 but the value of the resistor i just simply put to 640ohm.

i also have try to exclude the resistor that connect to crystal, but it is still having the same problem.

hi,
Look at this image,taken from the 16F876 datasheet, its not the same as your crystal wiring.
 

Attachments

  • esp01 Nov. 25.gif
    esp01 Nov. 25.gif
    10.7 KB · Views: 244
sorry that i accidentally draw the position inverted, the diagram i have added the diagram of the voltage inverter.

Pls help me to check is there any mistake about the circuit i draw.

Thanks.
 

Attachments

  • diagram[2].doc
    71 KB · Views: 224
sorry that i accidentally draw the position inverted, the diagram i have added the diagram of the voltage inverter.

Pls help me to check is there any mistake about the circuit i draw.

Thanks.

hi,
As Pommie points out the thermocouple is connected to 0V.
Do you have a datasheet for the thermo couple.?

The UART pins TX/RX are active low, so the leds will be ON when inactive.

If you are sending RS232 data to a PC , there is no 0V/Common line on the circuit.

There is also a cap missing from the MAX ic.

There are no PIC power decoupling caps on the circuit.
 
Last edited:
If you don't need to measure negative temperatures then you would be much better off using something like an AD595 with a single 5V supply. This will give you 0V for 0°C to 5V for 500°C. The circuit you have at the moment will be extremely inaccurate - if it can be made to work at all.

Mike.
 
i have connect the pin 5 of the RS232 to ground, about the missing cap at the MAX and PIC, can show me which pin am i need to connect the cap? or do u have any schematic diagram of connecting the thermocouple circuit?

is it my circuit now is not suitable to measure temperature below 0 Celcius? which part i need to modify inorder to make it work?
 
i have connect the pin 5 of the RS232 to ground, about the missing cap at the MAX and PIC, can show me which pin am i need to connect the cap? or do u have any schematic diagram of connecting the thermocouple circuit?

is it my circuit now is not suitable to measure temperature below 0 Celcius? which part i need to modify inorder to make it work?

Look at this dwg for the MAX connections.

Do you have a datasheet for the thermocouple that you could post.??

What range of temperatures do you want to measure.?
 

Attachments

  • MAX232caps.gif
    MAX232caps.gif
    20.5 KB · Views: 203
Hi Eric,

If you look on page 3 of the AD595 data sheet, it has a table with the outputs from the two types of thermocouple. With just 20mV at 500°C it is not a simple task to interface them with a Pic hence my suggestion of using an AD595. Knowing the required temperature range would be useful.

Mike.
 
Hi Eric,

If you look on page 3 of the AD595 data sheet, it has a table with the outputs from the two types of thermocouple. With just 20mV at 500°C it is not a simple task to interface them with a Pic hence my suggestion of using an AD595. Knowing the required temperature range would be useful.

Mike.

Morning Mike,
Totally agree, thermocouples can be painful overkill, especially with all the available semiconductor devices.
I use the LM34/35 for general purpose 'domestic' use.

We still dont know the OP's tempr range or environment.
 
the temperature range i wish is about -4 to 100 Celcius

the thermocouple type i use is a white wire and yellow wire connected together and the outer skin is brown. I think it is a J type thermocouple. I didnt have the data sheet but i have search from website the data sheet.

From my experiment on the thermocouple
after i boil the water and measured, the ouput voltage is only 2.3mV-2.6mV range
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top