-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hauke Mönck <moenck@zedat.fu-berlin.de>
- Loading branch information
Hauke Mönck
committed
Jul 19, 2016
0 parents
commit e140224
Showing
4 changed files
with
12,638 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# bb_irflash - Infrared LED flashing software and hardware | ||
|
||
---- | ||
## What is bb_irflash? | ||
|
||
bb_irflash is a software and hardware layout package. It contains the circuit and board layout for creating infrared flashing devices. | ||
|
||
## Software | ||
|
||
The software is C code written and tested for the Arduino Board Duemilanove. However, it should be easily adjusted to fit any arduino available on the market. | ||
|
||
## Hardware | ||
|
||
The hardware is designed to be triggered via signal current and powered with 12V. The design contains no protection mechanism whatsoever. So exchanging the resistors and/or LED's enables faster/slower flashing or constant lighting. | ||
|
||
The board dimensions are 23mmx51mm, single sided layout. Parts as described in the 'Parts' section enable flashing at 3 Hz and 20 ms duration. Designs come in EAGLE format. | ||
|
||
## Parts | ||
The SMD parts required for the boards are the following. | ||
|
||
2x [MOSFET 'AO4752'](http://www.digikey.com/product-detail/en/alpha-omega-semiconductor-inc/AO4752/785-1597-1-ND/3712546) | ||
|
||
2x [LED OSRAM 'SFH-4716S'](http://www.digikey.com/product-detail/en/osram-opto-semiconductors-inc/SFH-4716S/475-3045-1-ND/4360722) | ||
|
||
1x [Signal Amplifier 'LM358DT'](http://www.digikey.com/product-detail/en/stmicroelectronics/LM358DT/497-1591-1-ND/592083) | ||
|
||
8x [2.2Ohm Resistor 'CRM2512-JW-2R2ELF'](http://www.digikey.com/product-detail/en/bourns-inc/CRM2512-JW-2R2ELF/CRM2512-JW-2R2ELFCT-ND/3592989) | ||
|
||
3x [10kOhm Resistor 'RC0603JR-0710KL'](http://www.digikey.com/product-detail/en/yageo/RC0603JR-0710KL/311-10KGRCT-ND/729647) | ||
|
||
1x [120Ohm Resistor 'RC0603JR-07120RL'](http://www.digikey.com/product-detail/en/yageo/RC0603JR-07120RL/311-120GRCT-ND/729653) | ||
|
||
4x [2.2mF Capacitor 'JMK107BJ225KA-T'](http://www.digikey.com/product-detail/en/taiyo-yuden/JMK107BJ225KA-T/587-1254-1-ND/931031) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
#define CamPinA 3 | ||
#define CamPinB 9 | ||
#define LEDPinA1 5 | ||
#define LEDPinA2 6 | ||
#define LEDPinB1 10 | ||
#define LEDPinB2 11 | ||
#define FPS 3 | ||
//Flashing time is flash+camFlashOffset+Trigertime | ||
//Workflow: Flash on -> wait the offset -> trigger cam -> wait triggertime | ||
// -> untrigger cam -> wait flash -> Flash off | ||
#define flash 75 | ||
#define second 1000 | ||
|
||
// the setup function runs once when you press reset or power the board | ||
void setup() { | ||
pinMode(CamPinA, OUTPUT); | ||
pinMode(CamPinB, OUTPUT); | ||
pinMode(LEDPinA1, OUTPUT); | ||
pinMode(LEDPinB1, OUTPUT); | ||
pinMode(LEDPinA2, OUTPUT); | ||
pinMode(LEDPinB2, OUTPUT); | ||
} | ||
|
||
void triggerDual(int portCam, int portLED, int portLED2){ | ||
analogWrite(portCam,255); | ||
delay(5); | ||
analogWrite(portCam,0); | ||
|
||
delay(50); | ||
|
||
analogWrite(portLED,255); | ||
analogWrite(portLED2,255); | ||
delay(20); | ||
analogWrite(portLED,0); | ||
analogWrite(portLED2,0); | ||
} | ||
|
||
// the loop function runs over and over again forever | ||
void loop() { | ||
|
||
//E.g. we have two fps: flash at 0 cam A, 250 cam B, 500 cam A ... | ||
int halfFlash = second/FPS/2-flash; | ||
|
||
int i=0; | ||
for(i=0 ; i<FPS ; i++){ | ||
|
||
//LED for debug | ||
digitalWrite(13, HIGH); | ||
|
||
//flash camera A and wait half a frame | ||
triggerDual(CamPinA,LEDPinA1,LEDPinA2); | ||
digitalWrite(13, LOW); | ||
delay(halfFlash); | ||
triggerDual(CamPinB,LEDPinB1,LEDPinB2); | ||
delay(halfFlash); | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.