ARDUINO photogate for HIGH SPEED photography

Today we're going tocombine the two and use the Arduino with a photo gate or also known as a photointerrupter to completely control the camera and flash for doing high-speedphotography now this photo gate I built myself it's just PVC pipe there is ainfrared LED on this side in a infrared transistor on this side now if you weregonna be doing water drops the tiger feat you probably wouldn't want this bigphoto gape at which you can do is get one of these and housing until picturehere in a moment of the closer this is just a photo interrupter too but it's asmall one and you just hold your eye dropper whatever you're using for makingyour water drops right above it and it just plugs in here it looks right up tothe Arduino no change in either programming the only difference betweenthese two is the gap between oh that's the only difference.

so what I have doneis a repurposed an old infrared remote control to completely control theArduino so I don't have to reach over push buttons and dials and I have itsetup so I can change how long between when it senses an object in the photogate for how long it takes before the flashes triggered dole for thedemonstration of this means I'm in the studio I don't want to be breaking glassor having water going all over so just further demonstrating homework. so I'mjust gonna use a rubber ball so nothing's gonna get what he will do hisfirst I'll just give you a quick demonstration of how it all works thenwe'll take the young Arduino over to the bed channels in the camera on it in along walk through the circuitry with you a little bit and let that go ahead andplay up the camera turn on the flight and also as you cansee I have a late here cuz when you normally do this you're gonna want theroom completely dark because I'm shooting a video I got here like to butit'll still work it just the pitchers that are taken when the lights are onboard. so I have is a satellite here which is also hoped to a relay also whenI start the process by pushing a button in Australia after a moment the labelshut off so gives you enough time between when you push the button tomaneuver you know when you drop it you can see the flash I actually have thedelay said 2012 would get the picture iPhone at this height the delay of about200 milliseconds worried about their in this also when I push the button on theremote it also triggers the camera and I haven't bowled mode and you can alsojust on the Arduino how long to keep the shutter open so let's say you know yougonna start take a picture and you don't do anything they became reducedtriggered by the shutter open and he but I'm not gonna trigger it and I have itset for about 10 seconds if I remember right and if nothing happens everythingcomes back on in the shutter closes but started again it goes out camera shutteropens I think they're pretty much so dumb we need to do give you justquick look at home or will do next is a line hope this put it over on the benchand zoom the camera in and we'll go through all the circuitry works and thenafter that we'll get on the computer and I'll give you run through on the coldknow this code the wiring schematic for everything and a list of the parts andwhere to get on with you don't have them all be on the website at the link belowso you can go there and you can copy and paste the code or also have a link onthere so you just don't know the sketch and just open it up in your Arduino IDEalright well see you in just a moment at the bench and we'll take a look at thecircuitry ok let's take a closer look at the circuitry know. how to start what Isaid in the video I show you a closer picture of the photo interrupter alittle one for using for like water drop photography in watercolor drop collisionphotography those are pretty cool pictures if you've never checked themout to a search online there's lots of MultiAir the only thing I haven't done this yetit took up some RCA plugs on here because that's what I did with the bigphoto get so that I can disconnect and hook this one up and cause you don'thave to change nothing with the program he just plug and unplug the other oneplug the other one in and you are good to go so well take a look here junk on there so we got is two cableshere and once for the camera once for the flash and I labeled a little tagshere begins they both use the same plug you don't want to accidentally clickedthe wrong one in the old camera went into the flash it won't hurt it juststart it'll trigger things backwards and actually flash would keep trigger andbecause the ball bowled with cheap goals for 10 seconds so label them if theyhave the same plug they got different plugs and you don't really have to worryabout it cables comes into the board right here.

 I got it probably endedit defensively don't pull out of the board I got me here are two opticalisolators here and these are almost identical to a photo gate goingdifferences they're sealed so that you can interrupt the being so what thisdoes is there is no physical connection between the camera no flash in youradrenal bored because when the power comes through comes through the resistor here and he'sa 23 year old resistors it turned the light on inside there in that opens thetransistor to allow the maximum moniker to flow through and that's how youtriggers the camera and flash it it's completely isolated so funny thinghappened to get a voltage spike or so damaged in a $1,000 camera and itwouldn't be too happy if that happened so you are gonna want to use these andthey are dirt cheap I got a package of 2009 think it was like three dollars andthere'll be a link on the website to find those if you don't have the next wegot the relay here and that just goes to plummet you plug your little late in andthen the other hand just plugs into the wall in that solely you have some latewhen you're working in automatically turns out laid off once you're ready totake a picture and that comes in here and I use the transistor on the boardhelped trigger it because depending on how much power you pulled the pin itselfsometimes trigger not always so what I did is used the pin to trigger thetransistor and ammonia amperage you get off the board the 50 power connector andthere is more than what you get off the pins the pins are like 20 million orsomething like that not that much so when the transistors just to win 2 very common anything similar any any in p.m. that's even remotelysimilar work and then I've got another transistor don't hear it what this onedoes turns the LED backlight on the display off like I said you don't wantany light when you're taking pictures because the light is what freezes actionthen that's the late from the flash so I just got another one here hooks up onthe back like cooked up there's a little jumper back there and you justdisconnect that in the hook up to the board to the transistor seek enteringthe turn the display off and on in the display is 16 character body to line andits cereal you are gonna wanna cereal because it only uses two pens on yourboard if you use the other one you're using I think it's something like 7repins you and you'd be running out of room on your board real quick as you cansee on the display here it has the delay deal and that's how long that it'll bebefore the photo gates triggered that's how long before the flashes triggeredbecause you want to give the item a little time to get down and brakersplashing water whatever you're trying to get a picture of before the flashgoes off and their desire to teach in with that is in fridge transistorthreshold the value has to drop I got it said about 800 right now so the valuedhave to drop below $104 total gate the trigger everything in the bold time withus is how long your shutters open it will the maximum amount of time yourshuttle stay open because once the cameras triggered flash goes off the fewmilliseconds leader the Charter automatically closes in if nothinghappens in that time since.

 we started the trigger if I get it said it see10,000 microseconds its ten seconds so it's nothing happened I can trigger now takes a second or two then relay turnslight on the back light goes off but if i dont Tripp Tripp the photo gate you'llsee here in just a moment it'll automatically just reset everythingcomeback done see their goals and then so you're not having to reach over twostyles push buttons I just repurpose old remote and in the sketch it's all inthere and hold me up this and we get to the computer I'll show you click on todo it it's super easy super easy any infrared remote to work and you justneed infrared receiver which is this item right here and I robbed this old Ithink it was a VCR TV VCR DVD player if you get a joke lonely girl and you won'tneed order one of these you can just use the one out of there is also the yum yumfor a transistor in the infrared LED I got out of the same VCRs in theinternals wear mechanisms movie uses optical sensing in there and you'll seein their super easy to spot near stool LEDs ones clear in Yonkers black andebony insiders no reason there'd be a normal led in there so that's the onlyone that you'll find that's all we got one more thing.

 I do have one push buttonon here he and I didn't bother setting up with the remote because you don't usevery often it's for setting up when you wanna know you just push and hold it fora second it pops up on the screen here your team monitor and what this is doinggreat knows its monitoring the value of the photo guy and I got the photo gatejust off the sides I'll put my hand in there and you can see the number drops 3800 take my hand out of there goes backup to bob up nine hundreds and this is just for monitoring so you can figureout what you know trigger level as in you set your threshold for the triggeryou want it just likely be 10 or 20 schools liter twenty below what yourmonitor shows you because you wanted to trigger really easy when some dropsdrops between there so i think thats about it on the circuit board itself home made these up myself I guess he hadsome ribbon cable out of the mold dumb. I think it was a fax machine ur scannerprinter one of the two I just put her hands on me and makesyour board doesn't flop all over it looks nice and super easy to make aslong as you know here good at soldering otherwise you're just using all yourregular jumper wires or does the flat board ones I use a lot on their designlike everything to look nice and soul with that will jump over under thecomputer you know bring up the sketch and run through it a little bit I gottago through every little detail in the sketch because it is heavily heavilycommented guess it's it's a long sketch but mainly on just gonna go over to holda program your remote to your program into the Arduino in its really easy Ibuilt right into the sketch just after you're done using it yetcommented back slashes you don't need to have the serialmonitor running into slows things down when you're using this good photographycuz you can running off the battery or I just simply great now.

 I gotta pluggedinto my laptop is a laptop sitting next to me sorry I'll see you in just asecond at the computer will bring up the the Scotsman go through ok so here's thesketch before we get into mapping the remotethere's just a couple things appear to go through first there's three librarieswe've got in here we've got hired at each know that once already included inyour Arduino IDE so you won't need to download that but you will need todownload this one right here liquid crystal i2c and you'll also needto download the IR remote God each the links for these will both be on the website just look at the description below click on the link will take you right tothe page for this project on my website you'll find all information on thesedownloads parts me headaches in a little more in-depth description writtendescription tutorial on how this works so we're gonna go ahead and renew scrolldown here and first of all we want to go to this line right here in the cerealthat begin and I got a comment to know so you just move there and we go down asthe other one this one here brit serial print the value of all uncommon that andin simply upload it to the board take a moment here going on with uploading start uploading right spot on here thisis where we want to stay here great here is one of the values from theremote and this is actually the one that starts sequence for taking the picture Doan here are all the codes for changingthe values no let me grab the remote here and you can see. I got the serialmonitor going over here so I'm just gonna push a button and other numbercomes up pushing different but different number will come up you know if I push abutton and hold it down everybody no matter what but might push once I holdit down a little first give you the value but then it gives you this valuehere that's repeated every button if you hold it don't get it seemed value soonce you figure that all you have to go through and you can see.

 I've got here'svalue here here it is again you'll have to change all of these ones that repeatvalue in all you gotta do is once you've uncommon to those two lines and thesketches just point the infrared remote that you're in for a receiver need breadboard just push a button you pressed up to three times to make sure I'm gettingthe code for the button I want and then to find out the repeat call just pushany button down hold known you get to repeat cold so what you do and I got acomment to this one here is for the delay the flash so this would be thebutton here if I was gonna increase the value so you pick a button on yourremote push it copy and paste it in overtime mine then you'll have to replace thisone this is just your repeat and you don't have to change anything with usbut numbers and stuff just leave that alone doesn't know what button youpreviously pushed so it goes to the re- p it knows which one to repeat that I gothere there is further decrease the flash too late and then we go down here hereis for the camera bold timer again there is the value in just pick you know whatbuttons are already using your mode this is super easy and you just have to gothrough the trigger value the threshold and just change the values through thepush-button ok yeah those are the only ones you gotta change everything else inthe sketch.

 I would leave it alone unless you really know what you're doing youknow you wanna play a role as a little experiment go ahead I have heavily comeinto everything so you should be able to figure out what it all does like thisone here all the other 12 plus or minus one this is the camera bulbs time when Ihave it set up to increase or decrease but half the second cause. I didn'treally see any need going it'll exact milliseconds but if you wanna changesyou know increase by second or decreases by second you know you just change thesenumbers are the plus and minus are there there isn't really anything else to goover in like they said I would leave the rest of the program alone you just haveto come in and change your your numbers here for the value there is moreinformation on all this on the link to the website blossom please check thatall and would appreciate this video like so what that we're gonna go ahead inthis tutorial I hope was helpful and if you get this bill to take some picturesgo ahead and submit them on Facebook page link for that will be in thedescription below till orders link to it on the website as well so thanks forjoining us here to see hot hope you have a great day