Now its time to start bringing this thing together.
Before you do this you will need to get the Arduino programming environment set up and test your Arduino board. Full instructions can be found on the Arduino Website for different computer platforms, if you need help with this then you can ask for help in the comments below
Once you have the software set up and you have successfully uploaded the blink demo to your Arduino you can get started assembling the controller prototype.
This section will give details how to put together the project on bread board, a solderless prototyping board which allows you to knock up circuits in next to no time and mess about changing things around until you are happy with it.
Now I will scare the hell out of you by showing you what the thing looks like..
This is exactly why Duemilanove and bread board IS NOT suited to a finished portable project LOL
Before we continue you will notice I have used a keypad instead of push buttons, you can get these from the same place as the LCD display for about 3 quid. I have used this because (a) I have one and (b) I am still waiting for delivery of push buttons. I will give details for connecting buttons instead of the keypad later.
Just in case you haven’t noticed yet, if you click the pictures you will get a larger view, and on the larger view there is an icon to view full size in the bottom right. The full size for this one is HUGE so you can see the details – you can click & drag it around the screen to see other parts
OK, it looks pretty complex but its really quite easy to set this up. Lets start off with an explanation of the bread board itself.
This is an empty bread board..
As you can see it has two rows of holes at the top, the holes in each of these rows are connected together and used as the +5v and ground connections. There are two more rows at the bottom which are just the same.
I will refer to either of the ground rows as GND and either of the +5V rows as +5V (scary huh)
The bread board also has 2 more groups of rows separated by a slot, if you look at the empty bread board you will see they are marked A-E above the slot and F-J below the slot.
These are connected the opposite way to the top and bottom rows, these rows are connected vertically in each column so in the first column of holes A-B-C-D-E are all connected together, and F-G-H-I-J are connected together and so on across the board. I have overlaid coloured lines on the photo to show how the holes are connected together in the board.
The columns of holes are also marked with numbers, if you check mine out you will see that the 3rd column from the left is marked 1 (well you wont because the pink line covers it) and then there is a number every 5 columns. Don’t ask me why they decided to make the 3rd column number 1 – it just complicates matters but we will get round that by not using the first two columns. So each hole can be described using its Row and Column, such as A-5, C-9, GND-14, +5V-22 etc.
Now we know how to refer to each hole in the bread board lets start connecting it all up, first thing we need to do is get the supply to the +5V and GND rows. Take a red jumper wire and plug it into the +5V pin on the Arduino then plug the other end into hole +5V-1, I have used the bottom +5V row but it does not matter if you use the top one. Next take a black jumper wire and connect it to either Arduino Ground Pin and GND-1. This brings our Arduino supply out to the bread board, but we want it on both the top 2 rows and the bottom 2 rows so take another red jumper from the top +5V-27 hole to the lower +5V-27 hole and a black jumper from upper to lower GND-27 holes.
If you are confused look carefully at the prototype photo and you will see where they are fitted.
The stage is now set so lets deal with the waiting LED. This LED will light up when the controller is waiting for the interval time to pass to let you know what it is doing and that the controller is NOT YET checking the sensors.
The LED is powered from the Arduino Digital pin 11 which we can switch from 0V to +5V in the program, so we take a jumper wire from that pin to A-1, I used a blue wire but it doesn’t matter what colour you use.
Next we put in a resistor between C-1 and C-3
Then the LED goes in, the LED has a long leg and a short leg – the long leg goes to A-3 and the short leg goes to GND-3 (the upper GND row)
You should be able to see this is now connected up the same as in the schematic, Arduino Digital Pin 11 is connected to one end of the resistor – the other end of the resistor is connected to one side of the LED – the other side of the LED is connected to ground. In the words of a well known UK advertising meerkat – Simples!
If you are with me so far then the rest of this is going to be easy as pie, if you are not then you need to go back and read it again until you follow it otherwise you are just going to get deeper and deeper in the brown stuff. If you need help then please feel free to ask in the comments at the bottom of this page and I will do my best to help you
The 4N35 opto isolators come next, these are 6 pin DIL ICs and have to be connected the correct way round. If you look carefully at the IC you will see a mark at one end, often a semi circular depression as in the following photo but sometimes it is just a spot near one end or corner.
If you position the IC with this mark or spot at the left with the rows of pins top and bottom the pins are numbered anti-clockwise starting with pin 1 at the lower left corner, the photo above should make this clear if I lost you there.
The two 4N35 IC’s need to be plugged into the bread board astride the slot in the middle, the first will have its pin 1 in bread board hole F-10 and its pin 6 in hole E-10. The second will have pin 1 in hole F-15, pin 6 in hole E-15. There should be 2 holes between the two IC’s as shown in the photo.
The output pins of these IC’s is pins 4 & 5, these two pins act like a switch which closes when the IC is ‘turned on’. Unlike a switch though they need to be connected the correct way round, this will become more of an issue later when I cover connecting a camera and/ or flash unit to the controller.
For now I am just going to use a couple of LED’s to ’simulate’ our camera & flash unit. Grab a red jumper wire and plug it into holes D-11 and E-20 and a black jumper into holes D-12 & E-21. Do the same thing for the second IC with a red jumper in holes D-16 & E-23 and a black in D-17 & E-24. This just moves our IC outputs a bit further over the board where we are going to stick the LED’s.
The first LED goes in A-20 and +5v-20 with the long lead in the +5v hole, the second LED goes in holes A-23 & +5v-23 again with the long lead in +5v. To complete this part of the circuit we need to take a ground signal to the IC pin 4’s, we do this with a black jumper from GND-21 to A-21 and a another from GND-24 to A-24.
If you trace this bit of circuit out you will see that +5v goes through the LED into pin 5 of the IC and ground is taken to pin 4. When the IC ‘turns on’ it completes the circuit and the LED will be connected from +5v down to ground and will light up like a very sparsely decorated Xmas tree. When we come to firing a camera or flash we will just connect it to pins 4 & 5 of the IC as we wont need any +5v or ground, this is just to give us a visual indication of what is happening when we test the circuit.
Now we have the output side connected, we need to make some connections to tell the IC when to turn on its output switch. This is going to be done with Digital Pins 13 & 12 on the Arduino so take a jumper wire from Arduino Digital 13 to hole G-10 and another from Digital 12 to G-15. You will also need black jumpers from holes G-11 to GND-11 and G-16 to GND-17 (there is no GND-16) to supply a ground signal to the IC’s inputs.
Now if Digital 13 is turned on in the program it will send out +5v to pin 1 of the first IC, this will make the IC turn on its output ’switch’ and in turn light up the LED. The same thing happens with the second IC & LED if Digital pin 12 is turned on.
If you who have Nikon DSLR’s and want to fire the camera by Infra red instead of hacking a wired remote release we need an infra red emitter hooking up. I forgot about this in the photo at the top of the post so you are not getting any visual clues on this one LOL
Connect a jumper wire from Arduino Digital Pin 8 to C-14, then connect the IR emitter short leg to GND-14 & long leg to A-14. That wasn’t very difficult to build an infra red remote control was it
The program will need to know when to turn these various digital pins on and off so we need to feed the signal from the sensors to it. Grab a couple of jumper wires and plug them into Digital Pins 10 & 9 on the Arduino, and stick the other ends in G-20 & G-24 respectively, these connections are to power the sensors and allow the program to turn them on and off (you don’t want to take a photo with an ugly red laser beam in it do you) Now using 2 more jumpers make connections between Arduino Analogue 3 & G-21 and Analogue 2 & G-25.
If when you made up your sensor you soldered a 3.5mm stereo jack plug on the end of the wire (as you were told to) you will need to solder some wires onto a stereo jack socket to connect to the bread board, I soldered jumper wires onto a jack socket so it will plug into the bread board (see the first photo) If you haven’t soldered the jack plug on you may be able to just tin the ends of the cores with a little solder and plug them directly into the bread board – the choice is yours.
Either way, the wire that goes to the band next to the jack plug body (or ground in the sensor) should be connected to GND-20, the one that goes to the middle band (or sensor signal out) goes to J-21 and the one from the tip of the jack plug (or sensor +5V) goes to J-20.
If you have 2 sensors ready, connect the second one the same way but use holes J-24, J25 & GND-24 then you can play with the dual sensor modes as well as 1 sensor mode
All that’s left to do now is connect up the LCD display and push buttons (or keypad if you bought one to play with) but unfortunately we have some soldering to do for this.
For the keypad you will need 7 pieces of wire about 150mm long, 6 of one colour and one of a different colour for easy identification. These wires should be soldered carefully to the keypad as shown in the photo below, yes I know my soldering looks like its been spat out of the back end of a pigeon so you may want to (a) use thinner wire than me and (b) take your time.
The other ends of these wires are going to be soldered onto a strip of 7 female breakaway headers. It would be better to use some molex type female connectors but I couldn’t find any and I had s*&t loads of breakaway headers so that’s what I used. Before soldering on the headers, slip a short piece (about 15mm) of heat shrink tubing over each wire so you can tidy up the connections after soldering.
The wires are soldered onto the breakaway header in the same order as on the keypad, as per the next photo.
That was easy enough, but if you don’t have a keypad you will need to connect up push buttons instead.
For that you will need 5 x 150mm long bits of wire (one in a different colour) and a few shorter bits – the length will depend how far apart you intend to mount the push buttons. It would be wise to mount the push buttons in the project box or something else if you don’t have a project box otherwise operating them is going to be a fiddly affair with a string of buttons dangling around on the end of wires.
Start off by soldering the 5 wires to the 7 pin strip of female breakaway header, the different coloured wire goes to the first pin then the other wires go to pins 2,3,5 & 7 (in other words, miss out pins 4 & 6 because we don’t need them. Once the header is soldered on, slip a 15mm bit of heat shrink tubing over each wire to cover the soldered joint then heat it up carefully with a lighter to shrink it in place – keep it moving all the time and don’t over do it with the heat.
Now you need to connect up the push buttons to the wires as shown in the following diagram, I will include a picture of the actual buttons connected up once they are delivered
Nearly there now, patience must you have young Jedi..
All you need now is a 4 pin length of male breakaway header, a 4 pin length of female breakaway header and 4 bits of wire about 200mm long to join them together (2 of each in 2 colours)
Solder two pieces of wire the same colour to the female header pins 1 & 2, then the other colour wires to pins 3 & 4. Slip 2 x 15mm pieces of heat shrink tubing on each wire then solder the other ends to the male breakaway header in the same positions.
On the back of the LCD display you will see a daughter board with 2 rows of header pins, one on the left with 4 pins and one on the lower edge with 7 pins. First plug the keypad (or push button) connector onto the 7 pin row with the different colour wire at the left. Then plug the other connector wire you just made onto the other connector, taking note which colour wire is connected to the top pin. Also while you are here, you will notice a small jumper link fitted to the board, pull it off the two pins and slip it back over JUST ONE so you don’t lose it, this sets the LCD into the I2c serial mode.
The end of the LCD connector wire with the male breakaway header pins soldered on needs to be plugged into holes A-5, A-6, A-7 and A-8 making sure that the colour which was at the top connection on the LCD is in hole A-8. Now take a red jumper wire from E-8 to +5V-8 and a black one from E-5 to GND-5.
Finally fit two more jumper wires, one from Arduino Analogue 5 to E-6 and the other from Arduino Analogue 4 to E-7.
Phew, that was a long journey but at least there is now light at the end of it
In the next part I will give you a links to download the program & LCD library, instructions on uploading it and attempt to explain how the controller works.
Tags: Arduino, DIY, Electronics, Photography












