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