-
Notifications
You must be signed in to change notification settings - Fork 2
44. Trigger box
A trigger box that sends and receives trigger signals from USB. It can also send (TTL) triggers to MagVenture TMS amplifers via a DB9 interface.
The circuit below shows the schematics of a trigger box using Arduino Nano.
The trigger box can receive or send triggers. It blinks "blue" lights when sends one trigger. It blinks "green" lights when receives one triggers. Each trigger was set with a duration of 10 ms.
A toggle switch can bridge the received triggers to outputs.
NOTE: Tigger manually outputs were set to have debounce time of 1 second.
This script with this function is a Matlab App sending and receiving triggers.
NOTE: In this App, "output" refers to the outputs from a computer and the "input" refers to inputs toward a computer.
To use this App.
- Call
trigger_box
in Matlab. (Make sure your path includes the two Matlab files listed above). - Connect the trigger box with USB
- Choose the port. At Mac, it is like
cu.usbserial-xxxxxx
. - Turn on the port by clicking the switch "On". If a green light shows up, the program is ready to work.
- To send triggers (TTL outputs), press the
X
button. A counter and a timer shows the output triggers. TheR
button resets the counter and trigger. - Received triggers (TTL intputs) will be automatically logged in the counter and timer at
TTL input
row. TheR
button resets the counter and trigger.