Design Challenge:

Relay Controlled Camera Flash

Design Challenge:

Relay Controlled Camera Flash


In this design challenge, we will use a relay to control the flash circuit found in a disposable camera. Specifically, we will modify the circuit built in the Relay Controlled LEDs project. If you are unfamiliar with relays, it is recommended you review them by following the red tab on the right.

The primary motivation for this design challenge is to use the relay from the parts kit to its full potential. In the aforementioned project, the relay was used to activate one of two LEDs at 3.3V. While this task provided a simple way to introduce relays, the relay was seriously over qualified for the job. Normally, devices that require very low current and voltage (like LEDs) are driven directly with the chipKIT™ or by using a transistor. Typically, the purpose of a relay is to control high power circuits. The relay from the parts kit was designed to handle high voltages, so we will use it to trigger a 330V flash circuit from a disposable camera. On top of controlling the flash, we will also devise a means of safely measuring the voltage of the flash capacitor with our chipKIT board. Keeping track of the flash capacitor's voltage will make it possible to automatically trigger the flash circuit once the capacitor has a high enough charge.

Design Challenge Risks

Before moving on, it is important to note that there are some risks associated with this project. It is our goal to educate you about these risks and safely walk you through how to handle them. If at any point you are uncomfortable with any of the risks associated with the project, then do not proceed with the design challenge. This project is entirely voluntary and we are not liable for any damages that may ensue. That being said, the risks are not so great that they will spell certain doom. As long as you are careful, considerate, and take the proper precautions, this design challenge should be perfectly safe!

The primary risks in this project stem from the high voltages that occur in the disposable camera's flash circuit. The disposable camera we will be working with can generate 330V. During the flash discharge, parts of the circuit can very briefly reach 1000 to 2000V. Considering the fact that household plugs output 120V, this may sound life threatening for a person, but it is not. The disposable camera voltages are being stepped up by a 1.5V battery. This means that there is very little current behind the voltage, so it is far less dangerous than a wall socket. The real risk is touching the circuit in the wrong place or at the wrong time and getting a shock.

The high voltages actually pose the greatest risk to your components and chipKIT board. The voltages of the flash circuit are easily high enough to damage most of the components found in the parts kit. Even the relay is only rated to handle 250V AC at 5A and 30V DC. Since the camera's circuit operates at 330V, we will be exceeding the recommended limitations for the relay. This will not destroy the relay but it may wear it out faster than normal. This isn't a huge concern considering that the relay is designed to work at 100,000 times its rated load. When working with the high voltage, the thing you should be concerned with most (after your own safety) is the safety of the chipKIT board. The 330V seen in the flash circuit is more than enough to damage your chipKIT board and can possibly damage your computer if your chipKIT board is connected via USB. As long as the board is electrically isolated from the 330V flash circuit, you should be perfectly safe. If anything goes wrong, the components which provide the electrical isolation should take the brunt of the damage, leaving your chipKIT unscathed. To provide electrical isolation, we will use an optocoupler, which will be discussed in detail later.


Qty Description Typical Image Schematic Symbol Breadboard Image
1   HCNR200 optocoupler

(not included in parts kit)
1 TCA037DP Opamp
1 Relay (SPDT)
1 N-FET Transistor
1 100 nF Capacitor
1 Button
1 100K Ω Resistor

(not included in parts kit)
1 10K Ω Resistor
1 220 Ω Resistor
6 Alligator wires

(not included in parts kit)
1 Kodak® disposable camera

(not included in parts kit)
1 Small flat head screwdriver

(not included in parts kit)
1 Small Needle-nose pliers

(not included in parts kit)
1 Battery Pack
1 AA battery

(not included in parts kit)

Inventory Note

Some parts required for this design challenge are not included in the starter kit and must be purchased elsewhere. You should be able to buy common parts like resistors, extra wires, screwdrivers, and batteries at local stores. For more specific electronic components, like the optocoupler IC, you can buy online from a distrubutor of your choosing.

Obtaining Disposable Cameras

Out of all the extra parts you need, the most crucial will be the disposable camera. You can buy a new disposable camera at most stores for around five to ten dollars. You may also be able to find used disposable cameras for free. Places that develop film will often keep discarded camera shells in a box that they will dispose of later. If you go and ask, a lot of the time they will let you take whatever you want from the box for free. Checking for cameras at the right store is important. Some places that develop film actually ship the disposable cameras to other locations to be developed, or they keep the old disposable cameras and repackage them for re-sale.

No matter how you obtain a disposable camera, it is important to get the correct brand. Different brands of cameras will have different flash circuits inside of them. Flash circuits found in some brands are more difficult to work with or have unlabeled components making them riskier to use. There are also a lot of brand “clones”, which means two cameras may have been based on the same design but deviate from one another in a few small ways. Below is a guide for picking the correct type of camera which illustrates some of the different brands and clones you might encounter.

Disposable Camera Guide

Fujifilm® Cameras:

There are a lot of different types of disposable camera flash circuits. This section will get you familiar with some of the flash circuits you might encounter. One very common brand of disposable cameras is the Fujifilm brand. Two Fujifilm-style cameras and their flash circuits are pictured below in Fig. 1.

Figure 1. Fujifilm-style cameras.

Notice that green camera on the left is explicitly labeled as a Fujifilm brand, while the black camera on the right is labeled as a Walgreens® brand. Despite their superficial differences, both of these cameras contain nearly identical Fujifilm flash circuits. For this design challenge, it is recommended that you steer clear of Fujifilm-style circuits.

Brands to Avoid for this Project:

The main disadvantage of these circuits is that their capacitors are unlabeled, so we don't know what voltage they normally charge to. If these are the only flash circuits you can get your hands on, they should work as long as they have a charging LED (more about this later). However, there is a catch; since the sketch introduced later in the project was designed to estimate the voltage of a very specific type of Kodak flash circuit, using a different circuit could yield incorrect voltage estimations. This would simply cause the chipKIT to try to trigger the flash at the wrong time. Theoretically, you could fix this by measuring the capacitor's voltage (with a high voltage rated digital multimeter) and tweaking the sketch code until it triggers properly.

Kodak Cameras:

The next most common brand of disposable camera is Kodak. This is the brand of camera you want to aim for. Typically, their capacitors are labeled and their flash circuits are easy to work with. There are a couple types of Kodak flash circuits you could encounter: the Green circuit (Fig. 2), the Kodak clone (Fig. 3), the Red circuit (Fig. 4), and the Gold circuit (Fig. 5).

Figure 2. Green Kodak flash circuit.
Figure 3. Kodak brand clone.

Figure 4. Red Kodak flash circuit.
Figure 5. Gold Kodak flash circuit.

The majority of the cameras shown above will work well for this project. However, keep in mind each of type flash circuit varies in slightly different ways. Some have different capacitance values which could throw off the chipKIT's voltage estimations. Furthermore, some circuits (specifically the circuit in Fig. 5.) have a neon charging bulb rather than a charging LED. Avoid camera circuits with charging bulbs like the one shown in Fig. 5. When picking a flash circuit, the charging LED is the #1 most important feature to look for. This is due to how the voltage measurement circuit is designed to operate (more on this later). For this project, it is recommended that you use the Green circuit shown in Fig. 2. This type of flash circuit is what the project was originally designed around so it will work best. Bear in mind that the color of the circuit does not necessarily indicate the type of flash circuit you have. You should try to find the circuit's ID number and match it up with this guide. Sometimes the ID numbers can be hard to spot, so refer to the figures for their general locations. Each flash circuit's ID numbers and other general characteristics are listed below.

Green Kodak Circuit:

  • ID Number: 2J6406
  • Depicted in: Figure 2
  • Flash Capacitor: 80µF, 330 V
  • Charging LED: Yes
  • Laminated Charging Switch: Yes
  • Automatic Recharge: No
  • Flickable Flash Trigger: No

Kodak Brand Clone:

  • ID Number: (not needed)
  • Depicted in: Figure 3
  • Flash Capacitor: 100µF, 330 V
  • Charging LED: Yes
  • Laminated Charging Switch: No
  • Automatic Recharge: Yes
  • Flickable Flash Trigger: Yes

Red Kodak Circuit:

  • ID Number: 3J1501
  • Depicted in: Figure 4
  • Flash Capacitor: 160µF, 330 V
  • Charging LED: Yes
  • Laminated Charging Switch: Yes
  • Automatic Recharge: Yes
  • Flickable Flash Trigger: No

Gold Kodak Circuit:

  • ID Number: 2E9427
  • Depicted in: Figure 5
  • Flash Capacitor: 120µF, 330 V
  • Charging LED: No (has Neon charging bulb)
  • Laminated Charging Switch: Yes
  • Automatic Recharge: Yes
  • Flickable Flash Trigger: No

Step 1: Safely Disassemble the Camera

Now that you know where to get a disposable camera and what type to look for, we can go over how to safely disassemble one. When obtaining used camera shells from a store, it is important to remember that although the film has been removed, the batteries have not. This means some of the cameras will actually be charged and ready to flash when you get them. DO NOT try to disassemble a charged camera. Check to make sure the camera is safe before you try to open it.

How to Check if a Camera is Safe for Disassembly:

Identifying when a camera is charged can be tricky, and you might think that the charge light would indicate if the camera's capacitor has any charge. This, however, is not always the case. Sometimes the capacitor in the camera will only be partially charged, meaning the charge light won't be active. You cannot discharge a partially charged capacitor by simply pressing the shutter button. The flash capacitor must be at least 200V (the typical minimum voltage for the flash bulb to trigger) before it will release any of its energy. If the capacitor is below 200V, activating the shutter button will not dissipate any charge. To ensure the camera is safe to disassemble, do one of the following:

  1. Charge and trigger the camera flash:

    If you can get the camera to charge and then flash by pressing the shutter button you will dissipate most of the capacitor's stored energy. Doing this will typically drop the capacitor's voltage to around 40 – 50V. After you have activated the flash, let the camera sit for about an hour. Over this time the voltage in the capacitor should decrease to very low levels.

  2. Wait for the capacitor to naturally lose it charge:

    If you cannot get the camera to charge and flash, then it would be best to just let it sit for a while. If you wait for a few hours, or even a day, all of the capacitor's stored energy should be gone.

Once you have deemed the camera safe, you can begin disassembling it. During disassembly you should always treat the camera as though it is charged. Sometimes the charge button can unintentionally be activated during disassembly, so be careful. Below is a good video that demonstrates how to disassemble a Kodak brand camera and obtain their flash circuits. Before you watch the video, you should read through the safety tips provided below.

Youtube video from user Toreador418.

Saftey Tips:

  1. Don't be reckless about forcing the camera open! If you are too forceful you risk breaking the flash circuit inside or having your hand slip in the wrong place and getting shocked.
  2. When you open the camera, the first thing you should do is try to remove the battery (if the battery is safely and easily accessible). This will prevent the possibility of any unintentional charging.
  3. NOTE: Even with the battery removed, the capacitor can hold onto its previous charge and still shock you.

  4. Remember, some flash circuits automatically recharge after being triggered. Keep this in mind when handling the flash circuit.
  5. Try to avoid touching any metal parts until you have confirmed that the capacitor has been safely discharged. This includes the metal end of the tool you use to take the camera apart. Be sure you only grasp the tool by its insulated handle.
  6. Whenever your are working with the flash circuit, short the capacitor's terminals with a metal object before handling it. This will dissipate any leftover charge (usually as a visible spark/audible crack) in the capacitor. To reiterate Tip 4, use a tool with an insulated handle (like a screwdriver) and don't hold it by its metal end.
  7. Whenever you discharge the capacitor by shorting its leads, be certain you make a good connection. Sometimes it appears you have made an electrical connection when you actually haven't. This can be caused by a poor angle of approach with your discharge tool or a build up of non-conductive burnt residue.
  8. Even if you see the capacitor spark once when you short it, do not assume it has been fully discharged. Sometimes there is still some leftover charge after the initial spark. Be sure you try to short the capacitor a few times before deeming it safe.

Basic Theory

Now that you have safely acquired all of the proper materials, we can begin discussing the project details. The goal of this challenge is to have the chipKIT board safely measure the voltage of the camera flash circuit and automatically trigger the flash with a relay. We can use the flash circuit's charging LED as a means to to indirectly measure the voltage of the camera's flash capacitor. As the flash circuit charges, more current (on average) flows through the charge LED, making it brighter. Due to the high voltages in the flash circuit, it is not safe to directly measure the charge LED's current with the chipKIT board. Instead, we will use an optocoupler (also called an opto-isolator) to electrically isolate the board.


An optocoupler contains an internal LED and a photo-diode (or photo-transistor). As more voltage is applied to the optocoupler's LED, it becomes brighter. The increased amount of light inside the optocoupler causes more current to be generated by the photo-diode. Thus, the optocoupler allows two circuits to interact while providing electrical isolation.

For this design challenge, we will remove the flash circuit's charging LED and wire the optocoupler's LED in its place. This is why you must use a camera with a charging LED and not a neon bulb. Next, we will build two circuits to aid us in measuring the output of the optocoupler. The first circuit we will build is called a transimpedance amplifier. This circuit will convert the optocoupler's output current to a voltage and then amplify that voltage for the chipKIT to read. For details about how transimpedance amplifiers work, you can follow the orange tab on the right.

The second circuit we will build is a low-pass RC filter. To understand why a low-pass RC filter is required, you must first have a basic understanding of how the camera flash circuit operates. If you are interested in learning about the details of how the flash circuit works, you can follow the green tab on the right.

Why use a Low-Pass Filter?

The reason a low-pass filter is needed is because inside of the flash circuit there is an oscillator sub circuit. The oscillator is what makes the whining noise you hear when you charge the camera flash. As the flash capacitor becomes more charged, the frequency of the oscillator increases. This is why the pitch of the charging noise increases the longer you charge your flash. The rise in frequency also makes the charging LED brighter. This is the same principle used in the Breathing LED project (this project is linked in the the yellow tab to the right) to vary the brightness of an LED. Unfortunately, the frequent pulses generated by the oscillator cannot be accurately read by the chipKIT board.

A low-pass filter can be used to average the pulses into a DC voltage that the chipKIT can record. The RC filter does this by accumulating the charge of each pulse. As the frequency of the pulses increase, the capacitor in the RC filter has less time to discharge. This means on average the capacitor will gain charge, increasing its voltage.

Step 2: Assembling the Circuit

Assembly Steps from Relay Controlled LEDs

  1. Place the relay near the far left edge of the breadboard and straddle it across the valley. Be sure that the relay's pins line up with the holes as shown in Fig. 6.
  2. Connect the ground pin to the breadboard's blue ground rail.
  3. Place a flyback diode (either a regular diode or LED) across the coil terminal so that the cathode is facing upward.
  4. Place a button so it is oriented as shown in Fig. 6.
  5. Connect the left side of the button to the 3.3V pin.
  6. Place a 220 Ω resistor that connects the button's right side to ground.
  7. Connect a wire from digital pin 27 to the button's right side.
  8. Next, place an N-FET transistor so its leftmost leg connects to the relay's coil. Make sure the transistor is oriented as shown, otherwise the transistor won't function properly.
  9. Connect the transistor's rightmost leg to ground.
Figure 6. Relay controlled camera flash circuit.

Design challenge modification steps

NOTE: In Fig. 6. these steps are highlighted in red.

  1. Connect the transistor's center leg to digital pin 33.
  2. Connect the 5V source to the breadboard's red power rail.
  3. Connect the the 5V power rail to the relay's coil.
  4. Place the HCNR200 optocoupler as shown in Fig. 6. (note the orientation)
  5. Place the TCA037DP1 op-amp as shown in Fig. 6. (note the orientation)
  6. Run a wire from optocoupler pin 6 (PD2 Anode) to op-amp pin 7.

    NOTE: For reference, Fig. 7 illustrates the pin-out of the HCNR200, while Fig. 8 illustrates the pin-out of the TCA037 op-amp.

  7. Figure 7. HCNR200 pin-out
    Figure 8. TCA037DP1 op-amp pin-out.

  8. Run a wire from optocoupler pin 6 (PD2 Cathode) to op-amp pin 8.
  9. Connect op-amp pin 7 to ground.
  10. Place a 100K Ω resistor which connects the op-amp pin 8 and op-amp pin 1.
  11. Connect op-amp pin 2 (Vcc) to the 5V power rail.
  12. Connect op-amp pin 4 (Vee/Ground) to the ground rail.
  13. Connect a 10K Ω resistor to op-amp pin 1 as shown in Fig. 6.
  14. Place a 100 nF capacitor with one side connected to the 10K Ω resistor and the other side connected to the ground rail.
  15. Run a wire from pin A0 to the 100 nF capacitor.
  16. Using an alligator wire, connect the top half of the camera's flash trigger to the relay's switching terminal. You may need to stick a small piece of regular wire into the breadboard for the alligator wire to clip to.
  17. Use another alligator wire to connect the bottom half of the camera's flash trigger to the relay's NC (normally closed) terminal.
  18. Prepare to remove the flash circuit's charge LED. Take note of its polarity (flat edge = negative, round edge = positive), this will be important when wiring in the optocoupler's LED.

    Tip: For the green Kodak circuits (with the ID: 2J6406), the LED terminal closest to the small black resistor (see bottom right corner of the flash circuit, Fig. 6.) is the positive side. Keep in mind that this rule does not apply to all camera circuits. Always double check the LED's polarity before removing it.

  19. Remove the charging LED by carefully wiggling it and pressing up on the LED terminals with a pair of pliers. Your goal is to carefully break the solder joints of the LED so you may remove it. Once removed, securely attach a black wire where the negative terminal was, and a red wire where the positive terminal was. Be certain these wires are secure. A loose connection here can easily cause the circuit to malfunction.

    Tip: To make a secure connection, stick bare wire through the holes and bend it tight around the PCB using the pliers. For the best possible connection, you can also de-solder the LED and solder in the new wires.

  20. Run a black alligator wire from the optocoupler's 1st bottom pin to the negative LED wire you attached to the flash circuit.
  21. Run a red alligator wire from the optocoupler's 2nd bottom pin to the positive LED wire you attached to the flash circuit.
  22. Insert a AA battery into the battery pack slot directly connected to the red wire.
  23. Next, use an alligator wire to connect two of the battery pack's terminals as shown in Fig. 6.
  24. Connect the positive wire of the battery pack to the camera's positive battery terminal (it looks similar to a two pronged fork, see Fig. 2).
  25. Finally, connect the negative wire of the battery pack to the camera's negative battery terminal. It is the other metal pin which arches over the camera bulb as seen in Fig. 2.
Fig. 9. Circuit Schematic

The schematic for the circuit can be seen in Fig. 9 above.

Step 3: Writing the Sketch


Before we begin writing the sketch, we should discuss exactly what we want it to do. The first thing we want the sketch to do is allow us to manually control the relay using the push button. This was done in the previous project, Relay Controlled LEDs. Here we will modify the snippet of code from that previous project so that every time the relay is pressed, it briefly activates and then deactivates. The function that we write to accomplish this will be called triggerCamFlash(). Next we want the relay to be automatically triggered once the camera has reached 200V. For both of the previous features to work, we will need a couple of supporting functions; one that reads and converts the value from pin A0 to a voltage, one that takes that voltage and estimates what the camera circuit's voltage is, and one more that averages the estimated voltage for trigger stability. You can read through the list of functions below to get a better idea of how each one operates.

Function Descriptions:

    • Function name: triggerCamFlash()
    • Line number: 42
    • Description: This function takes NOT arguments. When called, it simply activates the relay for 100 milliseconds before returning it to its original state. The function also changes the status of LED4 on the chipKIT to represent the relay's current state.
    • Function name: readVoltage()
    • Line number: 52
    • Description: This function reads a value from analog pin 0. It the converts the value to an equivalent voltage that would be seen by measuring the output of the Isolation/Measurement circuit.
    • Function name: voltageEstimator()
    • Line number: 59
    • Description: This function takes the voltage of the Isolation/Measurement circuit and makes an estimate of what the camera circuit's current voltage is. The estimation is done using a mathematical equation, as seen below.
      \[Camera Voltage = (3.273X^6 -82.358X^5 + 208.81X^4 -276.32X^3 + 201.88X^2 - 75.824X +11.308)\times 100\]
      In the equation, X represents the voltage produced by Isolation circuit. This equation was obtained by simultaneously measuring and saving the camera circuit's voltage and the Isolation circuits's voltage. The data was then put into Microsoft Excel® spreadsheet software and a polynomial regression was run producing the equation seen above. Bear in mind that this equation provides an estimate. On average, the value it produces is within 2% of the actual camera voltage.
    • Function name: avgVoltage()
    • Line number: 67
    • Description: This function collects the estimations produced by voltageEstimator() and averages them. The raw estimations produced by voltageEstimator() can fluctuate wildly. Getting an average estimation helps make the auto trigger function more accurate and stable. It also makes the values printed on the serial monitor more readable.
    • Function name: autoTriggerCamFlash()
    • Line number: 91
    • Description: This function uses the average camera voltage and estimated camera voltage to automatically trigger the camera flash. When both of these values exceed 200V, it calls the triggerCamFlash(). Both the average and estimated voltage are used in this function to increase triggering accuracy and stability.

For further explanation about each function, read through the comments in the sketch below.

                    int relayControlPin = 33, btn1 = 27, LED4 = 13, a0 = 0;
					void setup()
					 Serial.begin(9600);//Enable Serial communication for debugging
					 pinMode(relayControlPin, OUTPUT); 
					 pinMode(LED4, OUTPUT);//LED4 will visually keep track of what state the relay is in 
					 pinMode(btn1, INPUT);
					 digitalWrite(relayControlPin, 1);
					 digitalWrite(LED4, LOW);//LED4 indicates what position the relay is in. 
					 //When LED4 is LOW the relay is activating to trigger the camera flash.
					 //When LED4 is HIGH the relay does not conduct. 
					//Define global variables to be used in loop()
					double voltIn, CamVoltEst, avg;
					void loop()
					  voltIn = readVoltage(a0);//Read voltage from transimpedance amplifier
					  CamVoltEst = voltageEstimator(voltIn);//Estimate voltage in camera flash circuit
					  avg = avgVolt(CamVoltEst);//Calculate the average voltage over a period of time
					  Serial.println(avg);//Print Average Estimated voltage to serial monitor

					//Uncomment the section below if you want to manually trigger the camera flash using the button
					//When using the section be sure to comment out autoTriggerCamFlash(); above
					/*  if(digitalRead(btn1))//If button 1 pressed

						while(digitalRead(btn1)){}//Wait for button 1 to be released

					void triggerCamFlash()

					  digitalWrite(relayControlPin, 0);//Activate relay
					  digitalWrite(LED4, LOW);//Write to LED4 and indicate the relay is activating the flash
					  delay(100);//Wait 100 ms for camera flash to occur
					  digitalWrite(relayControlPin, 1);//Deactivate relay
					  digitalWrite(LED4, HIGH);//Write to LED4 and indicate the relay is in its default state

					double readVoltage( int analogPin)
					  int x = analogRead(analogPin);//Read value from analogPin0
					  return ((x/1024.0)*3.3);//Convert value stored in x to a voltage, and return voltage

					double voltageEstimator(double x )
					  //This equation is used to estimate the voltage the flash circuit is at, based on the voltage obtained from the optocoupler and transimpedance amplifier 
					  //It was derived by collecting data points for both voltages and running a regression
					  double y = (13.273*pow(x,6.0)-82.358*pow(x,5.0)+208.81*pow(x,4.0)-276.32*pow(x,3.0)+201.88*pow(x,2.0)-75.824*x+11.308)*100;
					  return (y);

					double avgVolt(double vin)
					  static int sampleCount;
					  static double sum;
					  static double avg;
					  int sampleSize = 20;//Number of sample values that will be collected before calculating the average
					  sampleCount++;//Every time avgVolt() is called a new sample is read in, so we increment the sampleCount
					  sum = sum +vin;//To keep track of the samples we sum them each time avgVolt() is called
					  if(sampleCount > sampleSize)
					   //If the sampleCount is greater than the sample size we reset the values below so a new set of samples can be collected
					   sampleCount = 1;//reset numSamples to 1
					   sum = vin;//reset sum by overwriting it with the current sample 
					  else if(sampleCount == sampleSize)
						//If the sampleSize is reached calculate the average of the samples collected so far and return it
						avg = sum/sampleSize;
					  return avg;

					void autoTriggerCamFlash(double avgVoltage, double estVoltage)
					//To get a reliable auto trigger you need to check that both the average voltage and estimated voltage agree
					if(avgVoltage >= 200 && (estVoltage >= 200))


  • If you were unable to obtain a Kodak disposable camera:
    • If you were unable to obtain any Kodak disposable cameras, try using another brand. As long as the flash circuit has a charging LED, the circuit and sketch will work. Just remember that the project was designed around a specific Kodak flash circuit so using a different type could produce inaccurate results.
  • When I press the camera charge button nothing happens:
    • When the charge button is pressed, you should hear the oscillator whine and increase in pitch as the camera charges. If this doesn't happen, check that you have correctly wired the battery polarity to the camera's battery terminals. If you still can't get the camera to charge, double check to make sure you placed the wire correctly in step 31 of assembly. If none of the above works, check to make sure the battery you are using isn't dead.
  • The chipKIT never tries to auto trigger the flash / I am not getting any voltage readings:
    • If you aren't getting any voltage readings or having issues getting the chipKIT to auto trigger, first refer to the previous tip and make sure the flash circuit is actually charging. If you can confirm the flash circuit is actually charging, double check that your wiring matches Fig. 6. If you are confident you have wired everything correctly, check the wire connections you made when you replaced the flash circuit's charging LED. If you did not solder these wires into place, it is likely one of them has come loose. Try fiddling with the connections to see if it makes a difference.

Test Your Knowledge!

Now that you've completed this Design Challenge, try experimenting with it:

  • Open up the serial monitor to see the estimated voltage as the camera charges. Notice the chipKIT can only estimate the voltage while you hold the flash circuit's charge button down. Keep in mind when you let go of the charge button it does not mean the flash capacitor discharged to a safe voltage. The capacitor will retain its charge for a while, so always be prudent when handling the circuit no matter what readings you see on the serial monitor.
  • In loop() try commenting out autoTriggerCamFlash() and uncommenting the manual flash trigger code. Upload the sketch and open up the serial monitor. Try triggering the flash at different voltages and notice what happens. Experiment and determine what the minimum voltage to activate the flash is. Notice if you try to trigger the flash when the voltage is to low, the voltage will not decrease at all despite the brief electrical connection made with the relay.

  • Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.
  • Circuit and breadboard images were created using Fritzing.