Cooking Hacks Forum
https://www.cooking-hacks.com/forum/

Help On 4-20 mA Current Loop
https://www.cooking-hacks.com/forum/viewtopic.php?f=20&t=19584
Page 1 of 1

Author:  januarfa [ Tue Jun 18, 2019 1:50 am ]
Post subject:  Help On 4-20 mA Current Loop

Hello,

I've buy 4-20 mA Current Loop, but when I try for the first time, there's seems to be not working. I cant upload my code on it.

Please help

Author:  libelium-dev [ Tue Jun 18, 2019 6:47 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

Hi,

You're using the board with Waspmote or Arduino?

Which code are you trying to upload? Which error do you get?

Regards

Author:  januarfa [ Tue Jun 18, 2019 7:44 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

libelium-dev wrote:
Hi,

You're using the board with Waspmote or Arduino?

Which code are you trying to upload? Which error do you get?

Regards


Im using arduino UNO, using code written on https://www.cooking-hacks.com/documenta ... l-galileo/

There's no signal correspond this sensor

Author:  libelium-dev [ Tue Jun 18, 2019 8:07 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

Please share with us a screenshot of the error.

Do you download the libraries linked in the tutorial?

Regards

Author:  januarfa [ Fri Jun 21, 2019 5:56 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

libelium-dev wrote:
Please share with us a screenshot of the error.

Do you download the libraries linked in the tutorial?

Regards


hello

here is my connection scheme :
Image

and here is the result on arduino
Image

eventually Ive buy another module, and I check the other one it sign good result but not this module

Author:  libelium-dev [ Fri Jun 21, 2019 6:41 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

Hi,

We can't see the images. Please use a free service like dropbox, google drive, imageshack, etc. to share the images with us.

Did you connect a 4-20mA sensor to the board? Count you please share the datasheet with us?

Regards

Author:  januarfa [ Sat Jun 22, 2019 12:28 pm ]
Post subject:  Re: Help On 4-20 mA Current Loop

libelium-dev wrote:
Hi,

We can't see the images. Please use a free service like dropbox, google drive, imageshack, etc. to share the images with us.

Did you connect a 4-20mA sensor to the board? Count you please share the datasheet with us?

Regards


hello

here is my connection scheme :
Image

and here is the result on arduino
Image

eventually Ive buy another module, and I check the other one it sign good result but not this module

Author:  libelium-dev [ Mon Jun 24, 2019 9:24 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

Hi,

Could you please share the datasheet of the sensor with us?

Did you try to connect the sensor to another channel? The wire between v- and channel- isn't needed.

Also please test the sensor using the basic examples codes to avid a bug in your code
Code:
/*
 *  Explanation: This sketch shows how to use the most important
 *  features of the 4-20mA current loop board in Arduino. This
 *  standard is used to transmit information of sensor over long
 *  distances. Arduino uses analog inputs for reading the sensor
 *  values.
 *
 *  Copyright (C) 2014 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 *  Version:          0.1
 *  Design:           David Gascon
 *  Implementation:   Ahmad Saad
 */

// Include this library for using current loop functions.
#include <currentLoop.h>

#define CHANNEL CHANNEL1

void setup()
{
 
  // Switch ON the 24V DC-DC converter
  sensorBoard.ON();

  // Inits the Serial for viewing data in the serial monitor
  Serial.begin(115200);
  delay(100);
  Serial.println("Arduino 4-20mA board switched ON...");
}


void loop()
{
  // Get the sensor value in int format (0-1023)
  int value = sensorBoard.readChannel(CHANNEL);
  Serial.print("Int value read from channel 1 : ");
  Serial.println(value);

  // Get the sensor value as a voltage in Volts
  float voltage = sensorBoard.readVoltage(CHANNEL);
  Serial.print("Voltage value rad from channel 1 : ");
  Serial.print(voltage);
  Serial.println("V");

  // Get the sensor value as a curren in mA
  float current = sensorBoard.readCurrent(CHANNEL);
  Serial.print("Current value read from channel 1 : ");
  Serial.print(current);
  Serial.println("mA");


  Serial.println("***************************************");
  Serial.print("\n");

  delay(2000);
}


Regards

Author:  januarfa [ Fri Jun 28, 2019 5:43 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

libelium-dev wrote:
Hi,

Could you please share the datasheet of the sensor with us?

Did you try to connect the sensor to another channel? The wire between v- and channel- isn't needed.

Also please test the sensor using the basic examples codes to avid a bug in your code
Code:
/*
 *  Explanation: This sketch shows how to use the most important
 *  features of the 4-20mA current loop board in Arduino. This
 *  standard is used to transmit information of sensor over long
 *  distances. Arduino uses analog inputs for reading the sensor
 *  values.
 *
 *  Copyright (C) 2014 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 *  Version:          0.1
 *  Design:           David Gascon
 *  Implementation:   Ahmad Saad
 */

// Include this library for using current loop functions.
#include <currentLoop.h>

#define CHANNEL CHANNEL1

void setup()
{
 
  // Switch ON the 24V DC-DC converter
  sensorBoard.ON();

  // Inits the Serial for viewing data in the serial monitor
  Serial.begin(115200);
  delay(100);
  Serial.println("Arduino 4-20mA board switched ON...");
}


void loop()
{
  // Get the sensor value in int format (0-1023)
  int value = sensorBoard.readChannel(CHANNEL);
  Serial.print("Int value read from channel 1 : ");
  Serial.println(value);

  // Get the sensor value as a voltage in Volts
  float voltage = sensorBoard.readVoltage(CHANNEL);
  Serial.print("Voltage value rad from channel 1 : ");
  Serial.print(voltage);
  Serial.println("V");

  // Get the sensor value as a curren in mA
  float current = sensorBoard.readCurrent(CHANNEL);
  Serial.print("Current value read from channel 1 : ");
  Serial.print(current);
  Serial.println("mA");


  Serial.println("***************************************");
  Serial.print("\n");

  delay(2000);
}


Regards



Yes Im using this code but seems not working, Im able to upload this code, but every channel result 0

Author:  libelium-dev [ Fri Jun 28, 2019 6:54 am ]
Post subject:  Re: Help On 4-20 mA Current Loop

Hi,

Did you try to connect the sensor to another socket?

Could you please share the datasheet of your sensor with us? We will check if it is compatible with the board.

Do you have another 4-20mA board? Could you confirm that the other 4-20mA board can read the sensor? If so, please fill the RMA form and our tech support team will contact you to solve the issue.
https://www.libelium.com/contact/#rma

Regards

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/