Actually, I have never worked with the either. That's why I needed to simulate the current with the potmeter. But, I got an interesting question related to these 4-20 mA systems and I thought I could make a video on it because I could not find proper resources.
Sorry to be a late-comer to the party. And a rank Newbie at that, struggling to grasp Arduino use. Your video appears to sort out about 90% of the questions I have about reading a 4-20 mA loop pressure sensor, except that the simulation with a pot still requires 3 wires, and the sensor has only 2. .y sensor wants 24v, and the Arduino clearly doesn't. My understanding was they must share a common ground? Does that require some other Isolation of circuits?
Hi! There's no such thing as late coming here, I try to answer all comments, even if it is under an old video. The components should share common ground. Otherwise, it can happen that their ground (0 V) is slightly different which could lead to wrong readings. The ground does not need any insulation. The Arduino's max input voltage is 5 V. Pay attention to this!
Hi! It is in the code that I shared on my website. Also, printing float is always a mess with displays with Arduino. I have explained it in several videos how to solve it. Look for the dtostrf() function.
Thx for the video ! Whats the point of 100 ohm. what happens if i remove it and short cut there? just 250 or 220 ohm and just zener diode parallel to resistant The outputs stay the same without 100 ohm.just put zener and res. Parallel to another
Hi and thanks! Which part exactly are you interested in isolating? Do you want to isolate the whole circuit from the MCU? Or do you want to isolate the signal from the circuit? Maybe a simple 1:1 transformer could do the job.
Hi! Sorry but I don't make videos on request for free. You can simulate this by dropping different voltage values across a known resistor. You can use a DAC to control the voltage.
@@CuriousScientist It's not free. We are watching your content and that makes you money. You may know electronics, but you don't know much about business and circuit builder is a scam. Tinkercad is better a for Arduino and it's free.
Very very good explanantion. Thanks a lot for that. I used this, to connect a Industrial Position Transmitters to the arduino. In the for loop i change only the 5 millisecond delay with the millis() function like follows " if (millis() - range_t > 5) { for (int i = 0; i < 100; i++) { rawADCValue += analogRead(ADC_Pin); } range_t = millis(); } " and i realised decimal values displayed at the Oled are nearly stable using delay. Using the millis i have some fluttering at the decimal values displayed on the Oled. I am using the millis wrong for this case? How i can display stable values on the Oled using the millis()? Thanks
Hi and thanks! The code snippet you sent is not doing the same thing as my code. I added the delay *after* reading the ADC and not after finishing the for() loop... I added it because I wanted to let the ADC to settle after each reading to avoid funny values. Since the code is not time critical, I used the delay() instead of implementing the non-blocking millis(). 100 times 5 ms is still just half a second which is, I think a sufficient update frequency for the display. If the display is fluttering, then you might want to add the millis() part to the printLCD() function.
@@CuriousScientist you are right. But like follow it would be after the reading of the ADC? " for (int i = 0; i < 100; i++) //Do 100 readings { if (millis() - range_t > 5) { rawADCValue += analogRead(ADC_Pin); range_t = millis(); } } " In my code is time critical and i do not want tu use the blocking delay.
@@CuriousScientist Yes i will... :) After testing it , i will tell something. Again thanks a lot. Waiting for some more videos from you. Continue like this.
Hi and sorry for the inconvenience, I have a similar problem in which I want to measure a current between 0-50mA, accuracy 1mA, DC, same scenario, can you help me with a schematic? Thx!
Isn't that what I did here? If I understood your question correctly... The output is directly measured by an Arduino and the data can be forwarded to a computer via USB.
@@CuriousScientist Yes actually your video is almost relative with my question but my sensor which I'll use for my project is high level of precision to measure. So I didn't put it my mind, fortunately I've found rs232 laser measurement sensor. Btw you always answer my question when i ask thank you very much for this. :)))
I answer every single comment one by one. And based on the details of the question I reply with the same detail. If you need higher precision, just use an external 16-bit or 24-bit ADC to measure the voltage. But of course you have to make sure that your sensor can provide the signal in the required resolution as well.
I always have read about the 4-20mA protocol here and there but I knew nothing about it... now I know, thanks
Actually, I have never worked with the either. That's why I needed to simulate the current with the potmeter. But, I got an interesting question related to these 4-20 mA systems and I thought I could make a video on it because I could not find proper resources.
Sorry to be a late-comer to the party. And a rank Newbie at that, struggling to grasp Arduino use. Your video appears to sort out about 90% of the questions I have about reading a 4-20 mA loop pressure sensor, except that the simulation with a pot still requires 3 wires, and the sensor has only 2. .y sensor wants 24v, and the Arduino clearly doesn't. My understanding was they must share a common ground? Does that require some other Isolation of circuits?
Hi! There's no such thing as late coming here, I try to answer all comments, even if it is under an old video. The components should share common ground. Otherwise, it can happen that their ground (0 V) is slightly different which could lead to wrong readings. The ground does not need any insulation. The Arduino's max input voltage is 5 V. Pay attention to this!
Hi. What library did you use to write the values on this display? I can't print float variable on my oled. Thanks.
Hi! It is in the code that I shared on my website. Also, printing float is always a mess with displays with Arduino. I have explained it in several videos how to solve it. Look for the dtostrf() function.
@@CuriousScientist thanks! I'll check it out!
Thx for the video !
Whats the point of 100 ohm. what happens if i remove it and short cut there? just 250 or 220 ohm and just zener diode parallel to resistant
The outputs stay the same without 100 ohm.just put zener and res. Parallel to another
Hi! The 100 Ohm resistor is there to limit the current in conjunction with the Zener diode. It protects the input of the Arduino or AD-converter.
Worked like charm!
Thank you!
Glad to hear! You're welcome!
Very cool and clean code !
Thank you!
Hi mate. Very well explained. What is the easiest way to add isolation to the circuit?
Hi and thanks! Which part exactly are you interested in isolating? Do you want to isolate the whole circuit from the MCU? Or do you want to isolate the signal from the circuit? Maybe a simple 1:1 transformer could do the job.
Hey can you do a video on using an arduino to output a 4 to 20ma source and simulate. Such as what a fluke process meter would do.
Hi! Sorry but I don't make videos on request for free. You can simulate this by dropping different voltage values across a known resistor. You can use a DAC to control the voltage.
@@CuriousScientist It's not free. We are watching your content and that makes you money. You may know electronics, but you don't know much about business and circuit builder is a scam. Tinkercad is better a for Arduino and it's free.
nice, sir, please, how can i use Arduino nano to get a micro amp? and where is the diagram of circuit. thanks
Hi! What do you mean by micro amp? Have you tried using Google?
Hi. Is it possible to measure frequency of the signal with this device?
Hi! Sure, you can measure frequency with an Arduino. But there are limitations.
Very nice video! But how to isolate them? If having 4 analogues
I just answered you not so long ago...
Very very good explanantion. Thanks a lot for that. I used this, to connect a Industrial Position Transmitters to the arduino. In the for loop i change only the 5 millisecond delay with the millis() function like follows
" if (millis() - range_t > 5) {
for (int i = 0; i < 100; i++) {
rawADCValue += analogRead(ADC_Pin);
}
range_t = millis();
}
"
and i realised decimal values displayed at the Oled are nearly stable using delay. Using the millis i have some fluttering at the decimal values displayed on the Oled.
I am using the millis wrong for this case? How i can display stable values on the Oled using the millis()?
Thanks
Hi and thanks!
The code snippet you sent is not doing the same thing as my code. I added the delay *after* reading the ADC and not after finishing the for() loop... I added it because I wanted to let the ADC to settle after each reading to avoid funny values. Since the code is not time critical, I used the delay() instead of implementing the non-blocking millis(). 100 times 5 ms is still just half a second which is, I think a sufficient update frequency for the display. If the display is fluttering, then you might want to add the millis() part to the printLCD() function.
@@CuriousScientist you are right. But like follow it would be after the reading of the ADC?
"
for (int i = 0; i < 100; i++) //Do 100 readings
{
if (millis() - range_t > 5) {
rawADCValue += analogRead(ADC_Pin);
range_t = millis();
}
}
"
In my code is time critical and i do not want tu use the blocking delay.
Why don't you just test it? :)
@@CuriousScientist Yes i will... :) After testing it , i will tell something. Again thanks a lot. Waiting for some more videos from you. Continue like this.
Thanks, I will continue. Btw, the code you showed will probably not work properly.
Hi and sorry for the inconvenience, I have a similar problem in which I want to measure a current between 0-50mA, accuracy 1mA, DC, same scenario, can you help me with a schematic? Thx!
Hi! Have you checked my website? There's a link in the description of the video.
Can we do this method to receive measurement data from industry sensor which has 4-20mA output without using rs232 or rs485 serial protohol?
Isn't that what I did here? If I understood your question correctly... The output is directly measured by an Arduino and the data can be forwarded to a computer via USB.
@@CuriousScientist Yes actually your video is almost relative with my question but my sensor which I'll use for my project is high level of precision to measure. So I didn't put it my mind, fortunately I've found rs232 laser measurement sensor. Btw you always answer my question when i ask thank you very much for this. :)))
I answer every single comment one by one. And based on the details of the question I reply with the same detail.
If you need higher precision, just use an external 16-bit or 24-bit ADC to measure the voltage. But of course you have to make sure that your sensor can provide the signal in the required resolution as well.
@@CuriousScientist You are really the best I'll search what you said thank you so much for all your answers.