Fluctuation in BNC Output

43 views
Skip to first unread message

Neuron Signaling Lab

unread,
May 5, 2025, 1:50:48 AMMay 5
to FEDforum
Dear all,

I am planning to use the FED3 during an in vivo calcium epiflourescence experiment, and having the FED3 pellet information synced with the scope is essential for conducting event based analysis of neural activity. As such I have connected the BNC output of the FED3 to the GPIO input to the scope and added different duration pulses for left, right, and pellet events, an example which is show below. However, one thing I have observed in the test recordings were that even though the correct pulse durations of the low BNC signal were being logged, after each event there is a period of noise where the output signal seems to fluctuate randomly. Is there a known cause/remedy for this?

    // TTL pulse on LEFT poke
    digitalWrite(BNC_OUT, LOW);
    delay(15);  // 15 ms for LEFT
    digitalWrite(BNC_OUT, HIGH);

fed3_noise.png

Matt Gaidica

unread,
May 5, 2025, 6:04:17 AMMay 5
to FEDforum

This is potentially a hardware issue. 

  1. Is the noise signature the exact same every time or different? Can you provide multiple traces with the entire x-axis/timestamps?
  2. Have you tried an alternative scope?
  3. Have you tried probing the A0 (BNC_OUT) pin directly on the Arduino board itself inside the FED (see below)?
It is strange that you have sharp edges though, but knowing if the noise pattern is identical each time would help. You should also provide the entire sketch/code. pinMode(BNC_OUT, OUTPUT) should be called in FED3.begin() but it might be worth trying to do that explicitly before your digitalWrite to see if it's toggling in a high-impedance/input state.
Pinouts.png

Zane Andrews

unread,
May 5, 2025, 9:24:32 PMMay 5
to Matt Gaidica, FEDforum
Hi All - just following on from Matt’s comment 

You should use fed3.BNC(x,y) in arduino for TTL Pulses where x is length of pulse in ms and y is number of pulses.

Heres an example of what we use in a PR task….We use a TDT photometry system so we define what the number of pulses mean in the TDT software.

In the example below - 

1 pulse = active unrewarded poke
2 pulses = active rewarded poke - this actually 2x fed3.BNC(45,1); one under logLeftPoke and one under ConditionedStimulus but this happens so fast that 2 pulses occur in the detection window (200ms) so its actually just read as 2 pulses.
3 = pellet retrieval
5 = inactive

4 is nothing in this example but we use the same format across other programs where 4 pulses is defined.

Hope this helps.

Cheers
Zane


if (fed3.FEDmode == 4) {
fed3.sessiontype = "ProgRatio"; //The text in "sessiontype" will appear on the screen and in the logfile
if (fed3.Left) { //If left poke is triggered and pellet is not in the well
fed3.logLeftPoke(); //Log left poke
fed3.BNC(45, 1); //Deliver 1 pulse
fed3.Click(); //Click
poke_num++; //store this new poke number as current poke number.
if (poke_num == pokes_required) { //check to see if the mouse has acheived the correct number of pokes in order to receive the pellet
fed3.ConditionedStimulus(); //Deliver conditioned stimulus (tone and lights)
fed3.BNC(45, 1); //Deliver 1 pulse
fed3.Feed(); //Deliver pellet
fed3.BNC(45, 3); //Deliver 3 pulses
pokes_required +=2; // Progressive ratio is 1, 3, 5, 7,
fed3.FR = pokes_required;
poke_num = 0; //reset poke_num back to 0 for the next trial
}
}
if (fed3.Right) { //If right poke is triggered and pellet is not in the well
fed3.logRightPoke();
fed3.BNC(30, 5); //Deliver 5 pulses

On 5 May 2025, at 8:04 pm, Matt Gaidica <ma...@gaidi.ca> wrote:

This is potentially a hardware issue. 

  1. Is the noise signature the exact same every time or different? Can you provide multiple traces with the entire x-axis/timestamps?
  2. Have you tried an alternative scope?
  3. Have you tried probing the A0 (BNC_OUT) pin directly on the Arduino board itself inside the FED (see below)?
It is strange that you have sharp edges though, but knowing if the noise pattern is identical each time would help. You should also provide the entire sketch/code. pinMode(BNC_OUT, OUTPUT) should be called in FED3.begin() but it might be worth trying to do that explicitly before your digitalWrite to see if it's toggling in a high-impedance/input state.
<Pinouts.png>
On Monday, May 5, 2025 at 1:50:48 AM UTC-4 neuro...@gmail.com wrote:
Dear all,

I am planning to use the FED3 during an in vivo calcium epiflourescence experiment, and having the FED3 pellet information synced with the scope is essential for conducting event based analysis of neural activity. As such I have connected the BNC output of the FED3 to the GPIO input to the scope and added different duration pulses for left, right, and pellet events, an example which is show below. However, one thing I have observed in the test recordings were that even though the correct pulse durations of the low BNC signal were being logged, after each event there is a period of noise where the output signal seems to fluctuate randomly. Is there a known cause/remedy for this?

    // TTL pulse on LEFT poke
    digitalWrite(BNC_OUT, LOW);
    delay(15);  // 15 ms for LEFT
    digitalWrite(BNC_OUT, HIGH);


-- 
You received this message because you are subscribed to the Google Groups "FEDforum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedforum+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fedforum/158bd199-fb88-487d-a9ce-ad4613d31f48n%40googlegroups.com.
<Pinouts.png>

Reply all
Reply to author
Forward
0 new messages