TTL out?

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TTL out?
#1
Hi,
so by reading the other posts am I correct to assume that there is no way to send a TTL out from the PulsePal to another device? I would like to send a TTL to my NeuroNexus Smartbox, every time I elicit a pulse to move my piezo bender which stimulates the whisker of a mouse. Eventually we would like to use such a TTL to trigger the recording of a 2 photon microscope. So I guess this would not work?
Any information about this would be greatly appreciated.

Greetings,
Dymphie Suchanek
Reply
#2
Hi Dymphie,


If you have an output channel you're not already using, you can configure a 1ms TTL pulse by setting:

Phase1Duration to 1ms
Phase1Voltage to 5V (or 3.3V if the smartbox input is not 5V tolerant)
PulseTrainDuration to 1ms

Each time that output channel is triggered, it will then deliver a single TTL pulse to the smartbox.

I hope this helps!

-Josh
Reply
#3
(05-05-2018, 01:17 AM)Sjdibb Wrote: Hi Dymphie,


If you have an output channel you're not already using, you can configure a 1ms TTL pulse by setting:

Phase1Duration to 1ms
Phase1Voltage to 5V (or 3.3V if the smartbox input is not 5V tolerant)
PulseTrainDuration to 1ms

Each time that output channel is triggered, it will then deliver a single TTL pulse to the smartbox.

I hope this helps!

-Josh

Hi Josh,
are the ProgramPulsePalParams that you mentioned placed in the same Matlab script? I assume they are.  Below is my script and the way it is now, it does run my 10 ramp pulses but no TTL pulse is elicited in the second output channel.

%Parameters for pulse:
Ramp_duration = 0.02;%sec
Hold_duration = 0.01;%sec
Inter_stimulus_duration = 0.5;%sec
Sampling_frequency = 2000;%Hz
Total_Duration_all_pulses = 5.5;%sec will give 5.5sec/0.55(duration of one pulse+Inter_stimulus_duraton)= 10 pulses; 11sec will give 11/0.55 = 20 pulses
Maximal_amplitude_Volts = 0.6;
%**************************************************************************

MyPulse = [0:Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):Maximal_amplitude_Volts ones(1,Sampling_frequency*Hold_duration)*Maximal_amplitude_Volts Maximal_amplitude_Volts:-Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):0 zeros(1,Sampling_frequency*Inter_stimulus_duration)];%20ms(40 ticks),10ms (20 ticks), 20ms (40 ticks),500 ms (1000 ticks)
% Sampling rate of 2 kHz
SendCustomWaveform(1,1/Sampling_frequency,MyPulse);%2 kHz

%Actual Ramp pulse
ProgramPulsePalParam(1,'CustomTrainID',1);
ProgramPulsePalParam(1,'PulseTrainDuration',Total_Duration_all_pulses);%Last parameter in seconds
ProgramPulsePalParam(1,'CustomTrainLoop',1);%Last parameter whether to loop or not 1 means yes loop
TriggerPulsePal('1');

%TTL on Output channel 2
ProgramPulsePalParam(2,'Phase1Duration',0.001);
ProgramPulsePalParam(2,'Phase1Voltage',5);
ProgramPulsePalParam(2,'PulseTrainDuration',0.001);

Regards,
Dymphie
Reply
#4
(05-07-2018, 09:03 PM)dsuchan Wrote:
(05-05-2018, 01:17 AM)Sjdibb Wrote: Hi Dymphie,


If you have an output channel you're not already using, you can configure a 1ms TTL pulse by setting:

Phase1Duration to 1ms
Phase1Voltage to 5V (or 3.3V if the smartbox input is not 5V tolerant)
PulseTrainDuration to 1ms

Each time that output channel is triggered, it will then deliver a single TTL pulse to the smartbox.

I hope this helps!

-Josh

Hi Josh,
are the ProgramPulsePalParams that you mentioned placed in the same Matlab script? I assume they are.  Below is my script and the way it is now, it does run my 10 ramp pulses but no TTL pulse is elicited in the second output channel.

%Parameters for pulse:
Ramp_duration = 0.02;%sec
Hold_duration = 0.01;%sec
Inter_stimulus_duration = 0.5;%sec
Sampling_frequency = 2000;%Hz
Total_Duration_all_pulses = 5.5;%sec will give 5.5sec/0.55(duration of one pulse+Inter_stimulus_duraton)= 10 pulses; 11sec will give 11/0.55 = 20 pulses
Maximal_amplitude_Volts = 0.6;
%**************************************************************************

MyPulse = [0:Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):Maximal_amplitude_Volts ones(1,Sampling_frequency*Hold_duration)*Maximal_amplitude_Volts Maximal_amplitude_Volts:-Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):0 zeros(1,Sampling_frequency*Inter_stimulus_duration)];%20ms(40 ticks),10ms (20 ticks), 20ms (40 ticks),500 ms (1000 ticks)
% Sampling rate of 2 kHz
SendCustomWaveform(1,1/Sampling_frequency,MyPulse);%2 kHz

%Actual Ramp pulse
ProgramPulsePalParam(1,'CustomTrainID',1);
ProgramPulsePalParam(1,'PulseTrainDuration',Total_Duration_all_pulses);%Last parameter in seconds
ProgramPulsePalParam(1,'CustomTrainLoop',1);%Last parameter whether to loop or not 1 means yes loop
TriggerPulsePal('1');

%TTL on Output channel 2
ProgramPulsePalParam(2,'Phase1Duration',0.001);
ProgramPulsePalParam(2,'Phase1Voltage',5);
ProgramPulsePalParam(2,'PulseTrainDuration',0.001);

Regards,
Dymphie

Hi,
figured it out myself. It seems that the order was wrong. Now it is as follows and it works wonderfully.

%Parameters for pulse:
Ramp_duration = 0.02;%sec
Hold_duration = 0.01;%sec
Inter_stimulus_duration = 0.5;%sec
Sampling_frequency = 2000;%Hz
Total_Duration_all_pulses = 5.5;%sec will give 5.5sec/0.55(duration of one pulse+Inter_stimulus_duraton)= 10 pulses; 11sec will give 11/0.55 = 20 pulses
Maximal_amplitude_Volts = 0.6;
%**************************************************************************
MyPulse = [0:Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):Maximal_amplitude_Volts ones(1,Sampling_frequency*Hold_duration)*Maximal_amplitude_Volts Maximal_amplitude_Volts:-Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):0 zeros(1,Sampling_frequency*Inter_stimulus_duration)];%20ms(40 ticks),10ms (20 ticks), 20ms (40 ticks),500 ms (1000 ticks)
% Sampling rate of 2 kHz
SendCustomWaveform(1,1/Sampling_frequency,MyPulse);%2 kHz

%TTL on Output channel 2
ProgramPulsePalParam(2,'Phase1Duration',0.001);
ProgramPulsePalParam(2,'Phase1Voltage',5);
ProgramPulsePalParam(2,'PulseTrainDuration',0.001);
TriggerPulsePal([2]);

%Actual Ramp pulse
ProgramPulsePalParam(1,'CustomTrainID',1);
ProgramPulsePalParam(1,'PulseTrainDuration',Total_Duration_all_pulses);%Last parameter in seconds
ProgramPulsePalParam(1,'CustomTrainLoop',1);%Last parameter whether to loop or not 1 means yes loop
TriggerPulsePal([1]);

Greetings,

Dymphie
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)