Reading signals from coaxial BNC plug using arduino

Hi,

I bought an amplifying circuit to amplify some sensor output from the same supplier.

The circuit has the output in a BNC plug.

I will attach two pictures of the board.

The output voltage is less than 5v, i tested it.

I connected the wires to pin 13 in arduino (from the center wire) and GND in arduino (from the outer conductor).
My question is how to read this output?

I tried this, but all the output is just zeros


void setup() {
    Serial.begin(9600);

}
 
void loop() {
   Serial.print(digitalRead(13));
   delay(100);
}

Edit: If i use the multimeter on the two wires coming from the BNC, i will get some voltage (1-1.5v), the weird thing is that i cannot read anything in Arduino. I'm sure i connected it wrong the coding is wrong, i just never used this sort of plug with Arduino before, usually, i just use straight data output from sensors.

1 Like

What is the sensor? Does it have an analog or digital output?

The sensor is an electrochemical fuel cell, its output is in current, it basically reacts to a substance in the air and produces current. However, the output needs to be amplified

Oi! So the sensor outputs an analog signal of some unknown spec. Instead of using a digital pin to read an analog signal try using an analog pin to see if there is enough signal to be detected, read, and displayed.

See File|Examples|03.Analog for some hints on using the analog pins.

I see, so this kind of signal is considered analog.

I just tried it in clean air and i get numbers like 246-243-248-245

does this indicate that it is reading the sensor?

Because if i just read the same analog pin without plugging the wire into it i will get something like 263-261

also, is it correct to plug the ground ?

Post your code.

Looks like the sensor is being read. While the sensor is running pull the pin from the analog input does it change? If so the sensor is being read.

The ground from the sensor must be connected to the ground of the MCU you are using.

Yes but not much though, just from a 240 range to a 260 range.

Anyway, here is the code. and here is a picture of the connection


void setup() {
    Serial.begin(9600);

}
 
void loop() {
  Serial.println("from sensor");
   Serial.println(analogRead(A0));
   delay(1000);

}

Could be working without knowing the specs of the sensor. If the wire going to A0 is grounded does the values, go to 0? If it does and then when the wire is put back other values are displayed, without knowing the specs of the sensor, I'd say it could be working.

BTW: Thos 9V batteries will not work very well in a project. What is the voltage requirements of the sensor? If its a 5V sensor and you supply 9V to it, do you think the sensor will continue to work?

The Uno has a 5V output, and ground, why not use them to power the sensor, which now may be broken from being run on 9V.

Without a spec sheet on the sensor, further speculation is just that, speculation.

Don't think so, there's a small linear regulator on that board. If it outputs 3.3V then the 5V from the Arduino could be used as input.

Are you sure the output is a continuos voltage? Or is a variable, impulsive or alternate? Have you a oscilloscope to check it? If don't, you can try to use your pc with VisualAnalizer.
However, first check you arduino setup. Place a trimmer as input instead the sensor and check if Arduino can read it. If yes, the problem should be the signal output from your sensor. If this it, you can try to filter it with a RC filter, using a 1000 Ohm resistor and a 47 microF condensator (if impulsive signal) or with a Schotcky diode plus a resistor and a condesator (if alternate signal). Warning, check always the input voltage and be sure to do not exceed 5V, or 1,1V if you will use the analogReference() to modify the reference voltage of comparator.

That poor man has had to witness so many mutilations of his last name; I bet he often felt sorry for not having "Jones" for a last name.

Here is a link for the sensor datasheet and here is one for the amplifier circuit

In short words, the amplifier circuit needs a 9v supply, not written in the datasheet but written in the website where i bought it it says: They provide output of up to 3.75V with a 9V supply (not included).

I didn't connect the 9v to the Arduino at all, it just goes to the amplifier.

All that i know about this sensor is that it produces current upon reacting with ethanol, the current is so little so it needs to be aplified, this board i bought should do the job, the problem is i have a very limited knowledge in electronics that i don't know how to read the signal fron the BNC plug. So far i saw numbers changing when connecting it to the analog and reading it so i'm hoping this means it works, tomorrow i will try to subject it to ethanol and see if the numbers make any sense. Please share if you have any advice.

Im guessing those numbers you were seeing was the amplified result of the sensor reacting with elements in the ambient air, and outputting a slight voltage that is being read.

The BNC connector is just 2 wire connections basically, it is just a convenient connector to connect 2 things together.

When you test it with ethanol it should give you a higher reading.

If it does give a higher voltage on your analog pin with ethanol, and sits around that 300 range without ethanol, that little bit of detected voltage could be ambient air detection, or could just be some electrical noise generated by the amplifier circuit

Hi Khamis98,
What is the exact name of the circuit at second picture. I could not find it.

Thanks

1 Like

It is the conditioning circuit from DartSensors

Here is the link
https://www.dart-sensors.com/products/accessories/interface-circuit-board/

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.