Im making a project where i use a 3,3V MCU and i wan't to use a analog input.
What i did was use a 150ohm resistor to get to 3V and a 10K in series with the mcu for
current limiting.
When i messure the voltage i get 0,0 - 1,06 volt at 10% output of my PLC and after that nothing more happens, so if i put my output to 100% i still get 1,06V
What is your ADC's Vref setting? Most probably you have set it to Vref=1.1V (internal reference voltage, atmega328) then the result at 100% (1.06V) would be ok..
Try to use 50ohm resistor, or, 150ohm and ADC's Vref set to VCC (3V3).
The voltage was measured with a voltmeter not with the MCU I can give you my ADC settings but it is a STM32F4 (my program needs a little more than my arduino could give)
.. if you measure voltage directly accross the 150ohm resistor connected into the current loop with a voltmeter with internal impedance ~10Meg, then the conclusion is simple: your PLC cannot provide 20mA current at 100%..
what's the point of that. You clearly do not know how much current is supposed to be flowing. When you design a system and then botch the results because you cannot get what you wish, there really is no point in carrying on. Your first course of action is to establish the range of your "0-20mA" current source so's you can make sense of what is actually meant to be producing it. For example, is your sensor faulty, is your transducer (PLC) faulty or is your test meter faulty.
I know that it needs to be fixed but I need more time than I have right now.
I was thinking maybe someone could have a suggestion, I will carry on measuring when I can clear the time, but for today it needs to work like this.... If you have any suggestions please post, thanks for the responses.
I take it the 150 ohm resistor is the load on your signal source (PLC ?) and is connected between the source output terminal and the ground (GND) of the source device. With 20mA output this must generate 3 volts across it (if it really is 150 ohms and 20mA). You connect (via the 10k resistor if you wish but not strictly necessary) the source output terminal to your arduino input terminal and connect the arduino GND to the source GND. The arduino will now see the 0-20mA source output as a 0-3volt input.
If you cannot get 3 volts across the 150 ohms then either you do not have 20mA flowing through it and/or your 150 ohm resistor is something else, or your test meter is faulty.
.. there could be a voltage limitation with the current source - so basically one have to use a smaller resistor, otherwise when the loop current creates a higher voltage than for example 1.06V on it, it limits the current.. Maybe the linear region for the current loop is defined for much smaller termination resistors (thus you get smaller voltage and you need to amplify it). For example 53ohm will saturate to 1.06V @ 20mA. Never worked with PLC, though..
PS: quick g...ling shows the industrial loops use up to 50ohm termination (otherwise 50-750ohms). Reading the PLC manual may definately help, I would say
I have to meassure the current but that's why I posted this... I have a meter that somehow just gives 0,02mA. I checked but couldn't find a fuse (only for the 10A) so that's why I got stuck... But sinds this is the first time for me that I convert this signal to an MCU I just placed a resistor like you guys explained and didn't think of the size (I think it's 1/2Watt by the size of it) so could this be the problem?
You could open the meter and place a copper jumper where the fuse belongs, if only temporary, and always start out on the 10 amp first and make sure its not too much for the smaller setting
i don't know if somebody made a mistake wiring the electric board, but when i take the supposedly voltage output i get 0 - 24mA on my resistor but still it reaches this at 1/3 from my output... so i don't know if this is right :~
Why are you loading your PLC with a 150ohm resistor. If it's designed to give an output, perhaps it is a high impedance system so only designed to give a voltage (not a current). What happens to the output range when you remove the 150ohms resistor.
it is a siemens s7-314 and it does have the current output => Common - voltage - current
and if i remove the resistor i get 11,6 and 11,7 volt on voltage and current
It is just not working, whatever i connect it just has to much noise anyway.
I think this plc just doesn't like this method. I think an standard signal converter will be my best option,
what do you think?