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.

Vref on 3.3V PIC18LF

Status
Not open for further replies.
The maximum voltage on any pin is Vdd. Why can't you use a voltage divider?

Mike.
 
No, you can't use a Vref higher than Vdd (or at least not more than 0.7V higher, the datasheet gives the exact details).

But why would you want to anyway?, either use the 3.3V (which I presume is accurate enough?), or a 2.5V precision reference IC. Assuming you want to read 0-5V, a simple resistive attenuator on the input is all you require - but bear in mind the minimum source impedance requirements.
 
Thanks for the replies.

On the sensor datasheet it says: Output resistive load, minimum 200K, and max is infinity. Sensor output is between 0.5V and 4.5V.

So with a 5V input to a devider with a 1K and a 2K resistors the output will be 3.33V, but how do I work out the impedance, and the sensor output says 200K minimum?

Please see the attached screenshot of the datasheet.

Thanks,
 

Attachments

  • data.JPG
    data.JPG
    121.9 KB · Views: 208
No, you can't use a Vref higher than Vdd (or at least not more than 0.7V higher, the datasheet gives the exact details).

But why would you want to anyway?, either use the 3.3V (which I presume is accurate enough?), or a 2.5V precision reference IC. Assuming you want to read 0-5V, a simple resistive attenuator on the input is all you require - but bear in mind the minimum source impedance requirements.

The sensor has a 2.5V Vref output that I can connect to the ADC Vref, but how would I use that? The sensor output is 0-5V, with 2.5V at zero state. Do you mean I should drop the output from the sensor to give 0-2.5V and the use the 2.5V Vref?

Instead of having an op-amp buffer, can I put a small cap just before the AN input pin? To keep weight down I would prefer 2x resistors + 1x small cap rather than an op-amp circuit).

Edit to add: Just using a 3.3V swing on a 5V referenced ADC is not goin to be accurate enough.

Thanks,
 
Last edited:
You can simply use an attenuator to drop 0-5V to 0-2.5V, with no loss of accuracy - but it's all dependent on impedances - which is why my tutorial uses opamps as buffers.
 
You can simply use an attenuator to drop 0-5V to 0-2.5V, with no loss of accuracy - but it's all dependent on impedances - which is why my tutorial uses opamps as buffers.

Thanks Nigel!
I attached the datasheet for the device I am going to use, do you think I will be able to get away without using the op-amps to buffer the analog signal? (the important electrical specs are on page 5). Another spec: the max capacitive load is 100pf... the PIC ADC loads a 25pf cap, so I should be in spec on that one.
 

Attachments

  • B- MLX90609 Gyro.pdf
    539.8 KB · Views: 246
You just need to use an opamp as a buffer (no gain), use the 2.5V reference you already have in the chip, and two equal value resistors as an attenuator feeding the input of the opamp - I would suggest using a couple of 1% 220K resistors, so you're well above the chips load requirements.

So on the top part of my circuit make R1 and R5 220K, remove R3, and make P1 a wire link.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top