4-20 mA signal measurement with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 54

  • @isidoromaich7226
    @isidoromaich7226 3 ปีที่แล้ว +2

    I always have read about the 4-20mA protocol here and there but I knew nothing about it... now I know, thanks

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      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.

  • @fiedler6185
    @fiedler6185 6 หลายเดือนก่อน

    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?

    • @CuriousScientist
      @CuriousScientist  6 หลายเดือนก่อน

      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!

  • @timoteomeccanicatecnologia
    @timoteomeccanicatecnologia 2 ปีที่แล้ว +1

    Hi. What library did you use to write the values on this display? I can't print float variable on my oled. Thanks.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      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.

    • @timoteomeccanicatecnologia
      @timoteomeccanicatecnologia 2 ปีที่แล้ว +1

      @@CuriousScientist thanks! I'll check it out!

  • @emrekasm8638
    @emrekasm8638 2 ปีที่แล้ว

    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

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      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.

  • @smferreiro2610
    @smferreiro2610 2 ปีที่แล้ว

    Worked like charm!
    Thank you!

  • @arctytyz
    @arctytyz ปีที่แล้ว

    Very cool and clean code !

  • @JelloPal
    @JelloPal 2 ปีที่แล้ว

    Hi mate. Very well explained. What is the easiest way to add isolation to the circuit?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      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.

  • @darraghross4310
    @darraghross4310 3 ปีที่แล้ว

    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.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      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.

    • @Nine_883
      @Nine_883 10 หลายเดือนก่อน

      @@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.

  • @omaral-gallab7735
    @omaral-gallab7735 ปีที่แล้ว

    nice, sir, please, how can i use Arduino nano to get a micro amp? and where is the diagram of circuit. thanks

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! What do you mean by micro amp? Have you tried using Google?

  • @mimoa21
    @mimoa21 ปีที่แล้ว

    Hi. Is it possible to measure frequency of the signal with this device?

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! Sure, you can measure frequency with an Arduino. But there are limitations.

  • @JelloPal
    @JelloPal 2 ปีที่แล้ว

    Very nice video! But how to isolate them? If having 4 analogues

  • @carloscosta362
    @carloscosta362 2 ปีที่แล้ว +1

    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

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      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.

    • @carloscosta362
      @carloscosta362 2 ปีที่แล้ว

      @@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
      @CuriousScientist  2 ปีที่แล้ว +1

      Why don't you just test it? :)

    • @carloscosta362
      @carloscosta362 2 ปีที่แล้ว +1

      @@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.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Thanks, I will continue. Btw, the code you showed will probably not work properly.

  • @Stannis24
    @Stannis24 2 ปีที่แล้ว

    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!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hi! Have you checked my website? There's a link in the description of the video.

  • @semakzl4524
    @semakzl4524 3 ปีที่แล้ว

    Can we do this method to receive measurement data from industry sensor which has 4-20mA output without using rs232 or rs485 serial protohol?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      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.

    • @semakzl4524
      @semakzl4524 3 ปีที่แล้ว +1

      @@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. :)))

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      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.

    • @semakzl4524
      @semakzl4524 3 ปีที่แล้ว

      @@CuriousScientist You are really the best I'll search what you said thank you so much for all your answers.