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.

negative values using adc

Status
Not open for further replies.
Hi elecLear78,
In your schematic in message 15 the 5 volt zener will limit the positive voltage to 5 volts. It will also clamp the maximum negative swing to about -0.7 volts. Are you sure that the sensor does give a meaningful reading below 0 volts ?
Les.
 
hi
yes my microcontroller board can read only between 0 to 5v. But the current sensor gives me from -4 to 4v. Hence iam trying to design an interface circuit. Did I answer you correctly or I did not properly understood your question.
 
If you have to use the circuit shown in the schematic in your message 15 (Which you say you cannot change.) between the sensor and the ADC input then it will prevent the voltage on its output from going more negative than -0.7 volts even when the sensor output is -4 volts. This is due to the way the zener will behave in the negative direction. (When I use the term ADC above I mean the input to the circuit which will enable the ADC on the micro to read + and - 5 volts.)
 
Hi,

Yes you must have the right circuit to start with or it will never work :)

The passive circuit we've been talking about now consists of 3 resistors, one for the input (R1), one for the 'stable' power source (R2), and one from the central node to ground (R3). Any other circuit wont work with the formulas because those formulas were developed with the aforementioned three resistor circuit in mind.

Also note that R1 (the input resistance) is the total input resistance, so if your sensor has any internal resistance like 1k then that has to be added to any external resistance for R1. So if the internal is 1k and the external is 1k then R1 has to be taken to be 2k in the formulas. The formulas were presented that way so that any internal resistance in the sensor could be compensated for as Eric was mentioning early in this thread.
If the internal resistance is very low (like 10 ohms) then you probably dont have to worry about it too much if using an external resistance of 1k for R1 for example, but included it in the formula anyway just to be sure.
 
What is the sensor? part number? supply voltage to sensor? There is not enough information in #15.

Example; the current sensor I am using, the outputs are 2.5V at 0 current. There are two outputs. With positive current the +output will go up and the -output will go down. At + one amp the outputs are (3&2)=+1v but at - one amp the outputs are (2&3)=-1V. There is really no negative voltage.
 
What is the sensor? part number? supply voltage to sensor? There is not enough information in #15.

Example; the current sensor I am using, the outputs are 2.5V at 0 current. There are two outputs. With positive current the +output will go up and the -output will go down. At + one amp the outputs are (3&2)=+1v but at - one amp the outputs are (2&3)=-1V. There is really no negative voltage.

Hi,

Yes good point. Many current sensors are like this, they put out 0 to 5v and that means 2.5v for a current of zero, and something between 0 and 2.5 for negative current and something between 2.5 and 5 for positive current.
If the current sensor really does put out -4 to 4v, then there is probably also a negative supply voltage available somewhere in the system unless it is a very special sensor.
 
Thankyou very much the circuit. I simulated the circuit and it is working fine. But few concerns raised by my colleagues before inserting the actual hardware.
a. you cannot simulate a sensor using power source. is it correct?
Not correct. If the sensor is the kind that puts out a range of voltages, like yours puts out -4V to +4V per its data sheet, then for simulation you can use a voltage source that goes from -4V to +4V and it will be a good simulation. If the data sheet specifies a source impedance for the sensor, then you can add that to simulation. Yours just said that as long as the load impedance was greater then 1.5K, then it could be considered a voltage source...
b. we cannot connect external power source across a sensor. we should only read voltage from sensor.
If you are talking about "biasing" the output of the sensor as in using the the +24V supply and the resistors to shift the signal from being centered at zeroV to +2V as in the two networks I posted, then that will not damage the sensor.

c. any current going inside the sensor will damage the sensor. since some current is flowing inside sensor it will damage. please help.
see above. same answer.

ct.gif

Looking at the data sheet, the sensor has an (opamp) buffered output, with adjustable gain and offset. It will not care if asked to drive an offset current of a couple of mA.

I see that it operates from +15V and -15V, so if you are going to build your own offset circuit, you should be using these supplies to shift the output; not the 24V supply which is likely very dirty...

I notice that the maker of the sensor can sell you one with a unidirectional output. Why not just buy the correct sensor from them in the first place? Also ask what is the range of "zero" and "gain" pots. It maybe that you can shift the output by just moving the pots.
 
Last edited:
I don't know how i have to say thanks for all the help extended. I will check with the supplier for the unidirectional sensor but i remember some time back him saying that unidirectional output can measure current in only one direction. In any case i will verify again with him and also about gain, offset.

ronsimpson
I have attached the data sheet in the message in 15 and specifically i am using the following part number HTA 400-S

Thanks once again for all for the time and patience.
 
Hi,

Usually you figure out what you need for the application first then go hunting for it. I you really do need bidirectional current measurement (which would be for battery drain AND charge monitoring, not just one or the other) then you need a bidirectional current sensor, it's as simple as that.
Good luck to you.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top