Go Down

Topic: How to send a signal from Arduino to a device with female BNC plug? (Read 773 times) previous topic - next topic

123mike456lev

Hi all,
I'm new to Arduino and electronics in general, so please bare with me. I'm trying to setup a system where Arduino sends a TTL signal to a device that accepts a male BNC/coaxial cable. I'm trying to figure out how I can go from the Arduino pins to a coaxial cable/BNC plug. Am I correct that I could accomplish this by just stripping a coaxial cable (like this one: https://www.adafruit.com/product/2059), wiring one end to the Arduino, and wiring the other end to a BNC plug (like this one: https://www.adafruit.com/product/2888)? Please let me know if I left out any relevant info and thanks in advance for your help.

Paul_KD7HB

Are you wanting to make a permanent connection or a temporary connection? What frequency is involved? If the impedance of the two devices are important, you need to use an appropriate coax.

Temporary connections can be made with two pieces of wire. A small solid wire to go into the center of the connector and twist stranded wire around the outside of the BNC. Otherwise, go with what you are suggesting.

Paul

Paul__B

Of course, if it is temporary, this would do nicely!

Although the clips are rather clumsy.



Yeah, this one would be much better!  :smiley-cool:

MarkT

Hi all,
I'm new to Arduino and electronics in general, so please bare with me. I'm trying to setup a system where Arduino sends a TTL signal to a device that accepts a male BNC/coaxial cable. I'm trying to figure out how I can go from the Arduino pins to a coaxial cable/BNC plug. Am I correct that I could accomplish this by just stripping a coaxial cable (like this one: https://www.adafruit.com/product/2059), wiring one end to the Arduino, and wiring the other end to a BNC plug (like this one: https://www.adafruit.com/product/2888)? Please let me know if I left out any relevant info and thanks in advance for your help.
TTL signals don't work at 50 ohm unless a line driver IC is involved. Is the device terminated in 50 ohm?
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

123mike456lev

Thanks everyone for the helpful questions. I was actually hoping to make a permanent connection between the Arduino and coax cable, but of course the BNC plug connection should be detachable.

Regarding the frequency involved, unfortunately all I know is that the signal we're trying to send to the BNC/coax-accepting device is 30 Hz (alternating high/low TTL signal at every frame of a 30 fps video). So if I'm thinking about this correctly, I need to program my Arduino to send the information at a frequency that is significantly higher than 30 Hz, if I'm going to detect a 30 Hz signal with some precision? I suppose I also need to see what frequency the device that I'm sending the information to can accept...

Paul_KD7HB

Thanks everyone for the helpful questions. I was actually hoping to make a permanent connection between the Arduino and coax cable, but of course the BNC plug connection should be detachable.

Regarding the frequency involved, unfortunately all I know is that the signal we're trying to send to the BNC/coax-accepting device is 30 Hz (alternating high/low TTL signal at every frame of a 30 fps video). So if I'm thinking about this correctly, I need to program my Arduino to send the information at a frequency that is significantly higher than 30 Hz, if I'm going to detect a 30 Hz signal with some precision? I suppose I also need to see what frequency the device that I'm sending the information to can accept...
Here we go again with the old X-Y problem. What exactly are you trying to do? You have written all around the problem. Are you dealing with RS-170 video or are you dealing with TTL? Or are you adding a TTL signal to part of the RS-170 video signal?

Paul

zoomkat

"I suppose I also need to see what frequency the device that I'm sending the information to can accept..."

Yea, you need to figure out what you are trying to do.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

123mike456lev

What exactly are you trying to do?

OK, I see how mentioning the 30 fps video without any explanation makes things confusing.

I'm doing neuroscience research and I'm trying to sync two different recordings that are captured by separate computers. One of the recordings is essentially a 30 fps video of a rodent's behavior and the other is a recording of neural activity. The software that does the behavior recording is configured to send a string through a COM port at each frame of the video (i.e. 'u1' then 'd1' alternating on each frame), which I want to send to an Arduino. Then I want the Arduino to transmit alternating high/low TTL signals (based on the strings it's receiving) to the processor on the rig for the brain recording (which has a sampling rate of up to about 50 kHz, according to its product description) and for the TTL signals to be interpreted by the software that does the brain recording. The goal is to time-lock the recordings and make sure that the occasional dropped frame on the video recording doesn't de-sync the two recordings.

Paul_KD7HB

OK, I see how mentioning the 30 fps video without any explanation makes things confusing.

I'm doing neuroscience research and I'm trying to sync two different recordings that are captured by separate computers. One of the recordings is essentially a 30 fps video of a rodent's behavior and the other is a recording of neural activity. The software that does the behavior recording is configured to send a string through a COM port at each frame of the video (i.e. 'u1' then 'd1' alternating on each frame), which I want to send to an Arduino. Then I want the Arduino to transmit alternating high/low TTL signals (based on the strings it's receiving) to the processor on the rig for the brain recording (which has a sampling rate of up to about 50 kHz, according to its product description) and for the TTL signals to be interpreted by the software that does the brain recording. The goal is to time-lock the recordings and make sure that the occasional dropped frame on the video recording doesn't de-sync the two recordings.
Let me see if I understand this a bit better. The "video" is just noise to your project and we don't care to know more.

What we now need explained is what is the "string" that is sent through a COM port. There must be more to the "string" than just "u1" then "d1". Does it ALWAYS send just two characters? If so, we only care that we receive 2 characters, any two characters.

But what are alternating high/low TTL signals based on the strings? Do we somehow tie the "u1" and d1 to the digital write of a 1 or a 0 to a pin. If true, how accurate does the timing need to be?

Paul

123mike456lev

Let me see if I understand this a bit better. The "video" is just noise to your project and we don't care to know more.

What we now need explained is what is the "string" that is sent through a COM port. There must be more to the "string" than just "u1" then "d1". Does it ALWAYS send just two characters? If so, we only care that we receive 2 characters, any two characters.

But what are alternating high/low TTL signals based on the strings? Do we somehow tie the "u1" and d1 to the digital write of a 1 or a 0 to a pin. If true, how accurate does the timing need to be?

Paul
That's right, we don't really care about the content of the video at this stage, we're just trying to transfer a timestamp for each frame of the video over to the brain recording software. I do believe that the strings being sent will always be two characters. And yes, the alternating high/low TTL signals are based on the strings. For example, receiving a 'u1' string would tell the Arduino to send high TTL via the connection from output #1... afterward, the Arduino will receive a 'd1' string, set the TTL to low, and so on and so forth. As for how accurate the timing needs to be, I would hope that the difference in time between when the string is sent to the Arduino and when the TTL is received by the brain recording software is less than a millisecond or so, but somewhat longer offsets (up to 1/100 of a second or so) could be tolerated.

Paul_KD7HB

Got it!

Which Arduino are you going to use? Your first programming will be to be able to accurately read the two bytes of characters being sent. There are lots of examples. Probably will be using the software serial mechanism so you can display what is received on the PC. To do the program you need to know the Baud rate and other parameters of the serial data.

Paul.

zoomkat

So you are sending an electrical pulse into the video feed going to the video capture device to act as a sync marker? How will this appear in the captured video?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Paul_KD7HB

So you are sending an electrical pulse into the video feed going to the video capture device to act as a sync marker? How will this appear in the captured video?
My understanding is the electrical signal goes to the same device that is doing the recording. It is not on the video line/wire, itself, but on separate wire.

Paul

123mike456lev

Got it!

Which Arduino are you going to use? Your first programming will be to be able to accurately read the two bytes of characters being sent. There are lots of examples. Probably will be using the software serial mechanism so you can display what is received on the PC. To do the program you need to know the Baud rate and other parameters of the serial data.

Paul.

Glad we got that cleared up! I'm thinking of going with something simple like the Arduino Uno Rev3 since, as far as I can tell, it's sufficient for what I'm trying to do. Luckily I have some example code to work off of, so hopefully the programming part will go smoothly.


So you are sending an electrical pulse into the video feed going to the video capture device to act as a sync marker? How will this appear in the captured video?
Paul is correct on this one- the brain recording is actually not a video, it's just some analog signals. The goal is to record timestamps for each frame of the behavior video recording on the brain recording timeline. The actual brain recording data and the TTLs received by the brain recording software will be treated as separate "channels" on the brain recording software.

Go Up