Arduino Serial Output

Hi! I am supposed to get a 20mA output when connecting this circuit to Arduino
And is this the correct coding?
void setup() {
Serial.begin(9600);
}
void loop() {
int currentValue = analogRead(A0);
Serial.println(currentValue);
}
image



I got this output in Arduino. Can somebody explain to me what's this?

Please provide a circuit diagram - no Fritzing!

What are the values of Rset and Rout?

@mikky12 please don't post multiple threads on the same problem. Ppl waste time here telling you the same thing you saw over there. Or vice versa.

THX

a7

From the uploaded image it looks like they're 100 and 10k Ohm, but still wonder what this cabling really is (DrDettrich asked a diagram and I endorse the request...).
It doesn't seem to me to be anyhow compliant with the above scheme, the formula, and the expected value of 20 mA (if Rset is 100 and Rout is the 10k, it gives 0.0101 mA, if Rset=10k and Rout=100 is still just 1.01 mA).
Waiting the OP to give more information.

This will mean 2V @ 20mA on Rout. Adding 1.2V minimal Vcc remain max. 1.8V on the load when everything is powered from a 5V output. I don't think that this is enough voltage for the receiver.

If the sketch measures Vout or Vset then the voltage seems to be about 100mV, just as expected from Rset = 10k.

Hi! I am supposed to get an output when connecting this circuit to Arduino. How do I get the output? Is the way I connect it correct? And is this the correct coding?
void setup() {
Serial.begin(9600);
}
void loop() {
int currentValue = analogRead(A0);
Serial.println(currentValue);
}
image

have a look at the LT3092 datasheets users guides etc
also arduino-based-milliohm-meter-lcd-display

Hi, @mikky12
You appear to have A0 and Gnd connected together.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, component names and pin labels.

What are you trying to measure and where from?
Current or voltage, we need to see a schematic.

Because your IC is mounted on a PCB we cannot make out what connections go where?

Is this a school/college/university project?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

I doubt it... It looks like you have connected A0 to GND.
image

I expect GND should be connected to GND of the LT3092.

Hi,
The device you are using is a current supply, you need to run that current into a load and measure the voltage across that load.

You could connect A0 to the junction of Rout and the OUT pin of the device.

Tom.. :smiley: :+1: :coffee: :australia:

I think you have connected A0 to ground.
Then the value printed will of course be zero.

What are you going to do with this current source.
From the resistor values I think I see (100k + 10 ohm) I calculate that you just have a 100mA load on the 5volt supply. Doing nothing than loading the supply.

If you connect A0 to OUT, then you should get an A/D value of about 240.
Leo..

oops my bad :sweat_smile: yep its for a school proj

so like this am i right?


i am supposed to get a 20mA output and now i got this

can u explain to me what this means?

oops my bad :sweat_smile: btw its a 20k and 10 ohm as i am supposed to get a 20mA output. i got this from the formula

Don't measure Rset, measure the 10 ohm output.

A fixed 10uA flows through Rset (see datasheet),
so if you use a 20k resistor, then the voltdrop across that resistor is 0.2volt (Ohm's law).
The chip forces that 0.2volt also across the 10 ohm Rout, resulting in 20mA (Ohm's law).
In your circuit you just dump that current to ground.

If you measure that 0.2volt across the 10 ohm resistor, then the 10-bit A/D of a 5volt-logic Uno will return in theory 0.2 / 5 * 1024 = 41. Practically it could differ, becasue of resistor and 5volt tolerances.
Leo..

Your two topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

Sorry, but your first picture showed this:
image

then you posted this badly connected GND:
image

and now you are trying with:
image

Are you randomly juggling with the cables without knowing what you're gonna do, and hoping we can understand what you get, even after most of us asked you to post a schematic diagram and/or what is that PCB above (and you never answered)?
C'm on, if you need help please help us to help you, and make things easier. Thanks.

See my #6.

Under regular conditions the voltage on Rset and Rout are the same. You adjust it using Rset.

But all that does not help in a current-loop Serial output.

If you don't understand what you should do, then here a suggestion:

Connect a load (10 Ohm) between Rout and GND and measure the voltage on that resistor. Which ADC reading and which voltage can you expect from a properly configured 20mA source?

@JCA34F @docdoc Rset is 20k and Rout is 10 ohms