====== Hardware setup ====== A Philips LUXEON Rebel [[http://uk.mouser.com/ProductDetail/Philips-Lumileds/LXM2-PH01-0070/?qs=7Vwje68bFtPAxmH5btegoA== | LXM2-PH01-0070]] is glued to a microscope slide which in turn is mounted below the dish holder beneath the objective. Two crocodile clips are used to connect the legs to a BNC cable, which is fed through to the Arduino and connected via a further two crocodile clips. Standard colour conventions have been adhered to, such that the red clip connects to the LED's anode. The LED will easily take 350 mA, making it ridiculously bright. However, the Arduino will not safely supply this much current. The recommended maximum continuous current output for an Arduino pin is 20 mA, but we should be able to get away with just connecting a 220 Ω resistor in series as the LED itself has a 'resistance' of ~10 Ω and the output is pulsed. We then switched to a thorlabs 617nm LED powered by a Thorlabs cube. The Arduino controls the cube. The LED is connected by a SMA-to-SMA fibre to a World Precision Instruments In-Line optic filter holder (56200 SMA). The filter holder houses a 620/10 Thorlabs filter. A SMA-to flat cleave (bare) fibre optic connects the filter holder to the bath (the bare end in the dish). All the fibre optic cables were ordered from Thorlabs. === LED spectral issues === Contrary to the suggestion on the data sheet, the LUXEON Rebel LED outputs some green light as well as red, causing the LED flashing to show up on the green channel, despite the dichroic. A [[http://www.thorlabs.de/thorproduct.cfm?partnumber=FEL0600 | FEL0600]] longpass filter from Thorlabs should block everything below 582 nm, while letting through everything above 600 nm, solving the problem. === Wiring diagram === *----------* *-----------* *-----------* ¦ Computer ¦ ¦ Arduino ¦ ¦ LED ¦ ¦----------¦ ¦-----------¦ ¦-----------¦ ¦ (USB) ¦ ---[USB]--- ¦ (USB) ¦ ¦ ¦ ¦ ¦ ¦ (Pin 3) ¦ ---[BNC]--- Resistor ---[Wire]--- ¦ (Anode) ¦ ¦ ¦ ¦ (Pin GND) ¦ --------------[BNC]-------------- ¦ (Cathode) ¦ *----------* *-----------* *-----------* ====== Arduino code ====== Simple scripts for controlling the Arduino are available from https://bitbucket.org/jefferislab/chrimson-led-control/. The sequence information is defined in the code that is uploaded to the Arduino, which is automatically executed after the upload is complete. The Arduino will wait until it receives a newline character over the serial connection before starting the illumination sequence. Once the sequence is complete, it can be restarted by sending another newline character. In order to change the illumination sequence, new code must be uploaded to the Arduino. === Simple patterns === ''ChRimson_LED_repeated_sequence.ino'' produces a sequence based on a user-set on duration, pulse frequency and total duration, such as: I / AU Λ 255 •¦ ¦__ __ __ __ ¦ | | | | | | | 128 •¦ | | | | | | | ¦ | | | | | | | ¦ | | | | | | | 0 •*--*------*--*------*--*------*--*---------> t / ms • • • • • • • • • 0 10 20 30 40 50 60 70 80 This would be produced by editing the first five lines to read as: // Edit these to represent your desired stimulation sequence int onDur = 6; // in milliseconds int freq = 50; // in Hertz int totalDur = 80; // in milliseconds int intensity = 190; // max = 255, off = 0 === Advanced patterns === For more complicated patterns, ''ChRimson_LED_sequence.ino'' can be used to produce a sequence of illuminations based on user-set durations and intensities, such as: I / AU Λ 255 •¦ ¦ ____ ¦ | | _ 128 •¦ | | _______ | | ¦ | | | |_______| | ¦ | |__________| | 0 •*----*---------------------------------*---> t / ms • • • • • • • • • 0 10 20 30 40 50 60 70 80 This would be produced by editing the first three lines to read as: // Edit these to represent your desired stimulation sequence int durations[] = { 10, 10, 22, 16, 16, 4}; // in milliseconds int levels[] = { 0, 190, 45, 115, 80, 160, 0}; // max intensity = 255, off = 0