Bruxton Corporation SIDX sample program description, RaspberryPiGenerateTrigger.
You can use a Raspberry Pi to generate camera trigger signals for testing. The sample python program RaspberryPiGenerateTrigger.py generates an external trigger signal using a Raspberry Pi GPIO pin. The trigger timing is not precise, because the Raspberry Pi software timing is not precise. However, the Raspberry Pi is an inexpensive and convenient platform to use for experimenting with trigger signals.
The AcquireContinuous and AcquireEpisode scripts operates the camera in free-run trigger mode, that is, the camera runs as fast as possible. If you want to experiment with triggering the camera using an external signal, modify one of the scripts to set external trigger mode.
RaspberryPiGenerateTrigger.py is written assuming that you have an external inverting buffer for the trigger signal, so RaspberryPiGenerateTrigger treats GPIO output high as camera trigger input low. The Raspberry Pi uses 3.3V I/O and most cameras use 5V TTL-compatible signal levels. These signal levels are, in principle, compatible, but it is safest to use a buffer between them. For prototyping, you can easily assemble a buffer circuit on a solderless breadboard. Some hints:
Some construction notes for the circuit:
- The Texas Instruments SN74HCT14 Schmitt-trigger inverter is a convenient part to use as a buffer. The inputs are 3.3V-compatible and have hysteresis (Schmitt triggers) to avoid false triggering. The outputs are 5V TTL-compatible. There are many similar parts that will work as well, such as the Texas Instruments SN74ACT14 and SN74AHCT14 (the 'T' means TTL-compatible signal levels).
- Use an isolated DC-DC converter with 5V output as the power supply for the buffer. 12V power input is convenient. Suitable DC-DC converters include the XP Power IW1205 and ITW1205, the Murata NCS1S1205, and the TDK-Lambda CC1R5-1205.
- Do not connect TTL-level outputs to Raspberry Pi GPIO inputs, because the Raspberry Pi uses 3.3V logic signals, and may not tolerate 5V input.
- Use a pull-up resistor on the inverter input (e.g. 51k Ohms) to avoid triggering the camera when the Raspberry Pi GPIO initializes as an input.
- Use a series resistor on the inverter output of approximately 50 Ohms (e.g. 49.9 Ohms) to reduce ringing when connected to the 50 Ohm cable to the camera trigger input.
- Provide a minimum load for the DC-DC converter. For example, an LED with 270 to 1k Ohms in series across the output will draw 10mA (270 Ohms) to 3mA (1k Ohms).
- You are using an isolated DC-DC converter to avoid ground loop problems with the camera trigger input. Do not connect the ground across the DC-DC converter. That is, the DC-DC converter inputs are tied to the 12V power supply, the DC-DC converter outputs are connected to the inverter.
- Operate the Raspberry Pi through the Ethernet interface, not through the USB port or a serial port, because Ethernet is galvanically isolated. With this approach, the Raspberry Pi, the logic circuit, and the camera all operate on the ground of the camera trigger input. No ground loops can occur.
Copyright Bruxton Corporation