Last time I built the blocker you see in the photo, see my previous post. http://blog.workingsi.com/2011/05/ir-led-speedred-light-photo-blocker.html. I'm playing with technology to ruin the plate photo taken by speed and red light cameras. This would also apply to automated police license plate screeners, toll collectors like EZPASS, etc. Last time I learned a lot and made some mistakes, so I'm amping it up a bit to try to make a more effective design. I won't repeat the backstory in the other post. This post I'm going to take a more scientific approach and pull out all the stops.
This is just for fun and education and I have no intention that I or anyone else will use this for inappropriate purposes. This is just a playground for technology.
Last time I focused on making a plate out of cheap components that was easy for anyone to build. I used a cheap plastic license plate frame and TV IR diodes. The end result looked totally innocuous and was fairly effective in messing up photos taken in lower light, but not so great in broad daylight.
Now I'm going to try to take this to the next level. This high power LED is $12, but is 10X more powerful and has a wider field of view than the TV remote IR diodes.
One downside I noticed when I got the parts, is that it appears the LEDs are not sealed up. There is no lens on the top of the LED, so for the road, they would need some sort of lens or cover. A problem for later.
Another choice is on ebay from overseas sellers. Twice the power, but still looking for real data sheet and it seems kind of fishy and over rated. It may be the same component.
These diodes run at 1A instead of 100mA, and can handle surges up to 5A . With 100mA I had plenty of trouble last time keeping the power in each component in it's rated range using a resistor as a current limit. I was dropping 3V at 100mA in the resistors, so with 300mW the 1/2W resistors still get pretty hot. I did learn that it is most efficient to put multiple LEDs in series. Last time I put chains of 6 together, which was 1.5V * 6 = 9V, and the remaining 3V dropped across a 30ohm resistor. That won't work well at 1A, I'd need a 3 ohm resistor and I'd need resistors rated for 3W! These are small enough that I could mount an array of 4 or 8 of them without drawing any attention. Also the high power LEDs have a slightly higher forward voltage, so I can't put as many in series.
Generally people drive these big high power LEDs with switching circuits. I can dump 5A peak through these and switch it on and off with a duty cycle of 20% and keep the steady state average to 1A. It is a lot easier to control pulse width than it is to build a constant current source at 1A. That would require an amplifier to regulate with feedback and lots of high current parts. I need to keep the frequency of switching in the >10kHz range to make sure the diode is on longer than the frame time of the camera so I'm certain it appears on in the picture, especially when it is bright out.
The other thing I learned is that heat is a big problem, and at 1A it is going to get very hot. So this time I will use a nice blank metal license plate frame that will act as the heat sink. The license plate will also be part of the heat radiator. Generally I'm going to be dissipating 1A * 2V * 4 LEDs = 8W per string, with two strings this is as much power as a LED light bulb for your home, and those get really hot.
I need a good metal license plate frame. I was planning on using black like this one, when I had black plastic IR LEDs.
Generally people drive these big high power LEDs with switching circuits. I can dump 5A peak through these and switch it on and off with a duty cycle of 20% and keep the steady state average to 1A. It is a lot easier to control pulse width than it is to build a constant current source at 1A. That would require an amplifier to regulate with feedback and lots of high current parts. I need to keep the frequency of switching in the >10kHz range to make sure the diode is on longer than the frame time of the camera so I'm certain it appears on in the picture, especially when it is bright out.
The other thing I learned is that heat is a big problem, and at 1A it is going to get very hot. So this time I will use a nice blank metal license plate frame that will act as the heat sink. The license plate will also be part of the heat radiator. Generally I'm going to be dissipating 1A * 2V * 4 LEDs = 8W per string, with two strings this is as much power as a LED light bulb for your home, and those get really hot.
I need a good metal license plate frame. I was planning on using black like this one, when I had black plastic IR LEDs.
Now my LEDs are white. I think that chrome would make it harder to see the LEDs. I'm also going to try this one:
One with a logo might add some visual distraction, but I'm not sure if the holes will mess up the logo
I'm going to drill out holes for the LEDs to shine through, and possibly mount a power switching transistor onto the metal frame as well.
This is the initial test circuit I will use to start powering the LEDs. The idea is to keep an average 1A current flowing through the LEDs, while powering from the 12V automobile power. Since limiting the current with a resistor would be the same as making a cigarette lighter (way too much power and heat from the resistor), I'm using duty cycle as the means of regulating. The LEDs can handle 1A average, but 5A peak. So i'm setting up the LEDs via the forward voltage to pull 5A. The 1N4002 are simple rectifier diodes that are used to drop 1.25V each at 5A. They are also rated for 1A constant. I could have put in at least 1-2 more LEDs but they were too expensive.
I'm just using an Arduino during prototyping to create a variable width 5V pulse that I can control easily.
Arduino Duemilanove Board
This is a simple programmable microcontroller that anybody could use. Buy it and plug it into your USB, load the free software and send the program. Eventually this could be a hardwired oscillator. The FQP50N06L is a huge switching transistor that is driven by a 5V input swing and has <0.05 ohms on resistance. It can handle 52A at 60V.
Some other possible solutions are commercial PMIC - LED Drivers, there are standard auto LED drivers like these:
This is the Arduino program that toggles pin 11 to power the LED. Nothing to it, just a blink program.
Had to update the schematic. Learned that when the Arduino is off and booting up or loading a program, the outputs float and the LED string turns on hard, sending way too much current through. Fixed this with a pulldown resistor:
I also found that when I flash the LEDs at a slow rate, when I try to take a picture the automatic exposure control of the camera gets really screwed up. That is a good thing! I don't know if the speed cameras have automatic exposure control, I assume they do, and how much in advance of the picture they set the exposure. Normally exposure control is a sensor running and integrating the scene over a long time. Long time here means ten milliseconds up to a second. What I want to happen is to trick the camera into not seeing the light, and then blinding it when the picture is taken. Now that gets me back to trying to detect the camera flash, which is just not going to happen at a distance in an outdoor environment.
As I calculated before, a speed camera is going to have a pretty short exposure to catch a moving car without blur. An idea I will explore is constantly ramping the brightness up and down at a high rate, or having multiple banks that flash and ramp brightness. At least one bank must be on all the time to be sure the camera doesn't take the picture at the wrong moment. On second thought, there is some possibility that might work as well, by tricking the camera into thinking the scene is bright, and then make it underexpose the picture. Seems a little shaky, will require testing.
Next I need to add a way to monitor the current, the Arduino could do that by measuring the voltage somewhere in the string, that is what the commercial drivers do. Either that or I pick up some of the commercial LED drivers, and maybe some more LEDs :-)
Decided that speed camera vendors must sell their wares too, and provide data sheets to money hungry municipalities. A little google work found one! Turns out it can use an INFRARED flash. So that explains why I can't see the flash. It also confirms that an Infrared LED will not be filtered and should be effective.
http://www.gatsometer.com/files/file/brochures/high-res/en/leaflet_RS-GS11_ENG.pdf
Answers some critical questions. 1/1000 shutter speed, 0.3sec to get the exposure right, 12bit dynamic range and a CCD sensor (CCDs are sensitive to bloom, meaning flooding of light across the sensor when it is too bright).
Now I have enough information to do some math with some wild guesses to see if there is any hope.
http://www.mathsisfun.com/geometry/steradian.html has some W/sr equations.
http://www.gizmology.net/LEDs.htm has a lot of good equations on radiant energy
http://www.iala-aism.org/chapo/publications/documentspdf/doc_229_eng.pdf has information on measuring lights
No guarantees on this math, but first I need to figure out how much power the license plate reflects from the flash hitting it, knowing the flash power rating above:
Next I figure out how much power the LEDs manage to get into the camera lens:
I'm not totally sure of the flash calculation, still looking up resources on flash intensity. However the result so far is that the LEDs will be 10X brighter than the light reflected from the flash off the plate. Not bad. I think I'm being very generous about how much power makes the return trip, since I'm not accounting for spreading. Now keep in mind the camera advertises a 12bit dynamic range, which is 2^12 =>4096:1 signal to noise. As a former camera designer, I know that is BS, a camera really has at most a 2^11 usable range, or 2048:1 and that is being generous if the scene and settings of exposure are optimal. The output ADC may have a 12bit range, but the scene content can not be that large. You can get maybe 10K electrons in a CCD pixel, and have a noise floor of 100e reading them out. Any signal down near the noise is not going to be sharp enough to get you a ticket. The scene will be centered somewhere in the middle if they got the exposure correct, so count on 100:1. All that said, the camera can still distinguish items in the scene that are 10:1 in brightness easily. Now a human has to look at the photo, and it is a matter of how much they process the image.
A human can only see about 2^6 or 64:1 dynamic range. Conclusion. There is hope that the IR LEDs will be bright enough to mess up the picture. I could have a lot of errors in my assumptions, but still we are in the ballpark to be effective.
Back to the lab, got some more LEDs in the mail...
Got four more SFH4232 diodes and wired them up with the other four in as tight an array as possible. Hand soldered the surface mount components, and I'm disgusted with my solder job. However it should work. In a final product a small PCB would allow you to pack these closer and make a ground plane for a heat sink. The diodes have a heat slug on the back that I'm not able to take advantage of. My plan is to use the metal license plate and frame sandwich to draw out the heat.
Next I have to polish up the Arduino's control program. I want to flash the LEDs and sense the current back to the Arduino in a control loop. This is how the commercial LED drivers work to regulate the current. The power is so high that a few seconds of messing up the code could blow $100 worth of LEDs, so I'm going to test it with some low power indicator LEDs first. Breadboarded up the Arduino with two FPP50N06L switching transistors.
http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=FQP50N06L-ND%09&x=10&y=15
Needed to boost the PWM frequency of the Arduino to greater than the shutter speed of the camera. Normally it is about 500KHz, too slow for the 1/1000 => 1KHz shutter. Stole the code here to bump it up:
http://www.arduino.cc/playground/Code/PwmFrequency
Worked right out of the box, checked it on the scope. Now the frequency is 3.9KHz and I can just use the analogWrite() function without running a loop as I did above. That way I can save the brainpower of the Arduino for my control loop.
Add the analogWrite to the LEDs, the analogRead for the sensor, and a serial write. I'm going to load this and see if this slows down the PWM frequency on the scope. Still 3.9KHz. Sweet, the computational overhead is not messing up my flash rate. This should work.
Got some 5W 1ohm resistors so I could measure the current in the diodes by measuring the voltage drop.
http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=MRA05-1.0-1%25-ND&x=10&y=14
Made sure not to buy wirewound resistors, because they are inductive and since i'm switching the current through them it would ring like mad.
My first measurement of the current was only 0.39V -> 390mA! I wanted 1A average current. The forward voltages are not stacking the way I expected. Ramped up the duty cycle to 40 and got the current to 790mA.
Diode array is getting WICKED HOT! I'm going to have to mount this on the plate frame and get some heat sink action or I'm never even going to be able to test this thing at full power unless I can get the heat out.
First I have to drill out the license plate frame in a hole pattern that matches my hand kludge diode array.
I will take a full size picture and tape it on, then drill.
I used the black frame as a practice, since my plan is really to use a chrome license plate frame of the same type. The shiny chrome will disguise the LEDs better than black. Here are the holes I drilled with the drill press. Drilling went smoothly, the pot metal license plate frame was easy to drill. However the metal was shiny under the black and despite my best efforts the paint was marred in a few places. If I was going to use this as a final project, it would need some touch up paint or to be taped before drilling.
Connected to the Arduino and the driver circuits
Powered up to 800mA per diode. Max is supposed to be 1.0A, so not quite full power. Frankly I'm not impressed yet. The previous version seemed to be just as effective at less than half the light power spread over a larger area. What is going on? The camera I'm using to photo this is my cell phone. It does an auto exposure, which I've said above I don't think the traffic cameras have time to do. It closes down and I get the same picture no matter how bright the light is.
To prove my point, I took a picture of a 100W light bulb on the ceiling. OK it was really a 23W compact fluorescent 100W equivalent. You can see the wood grain an inch from the bulb, and this has 4X more power than my LEDs based on input power. Now the LEDs may be more efficient than fluorescent, but the camera sensitivity is higher to visible. I should have done this before we went on this ride!
So is the project busted? ... no I don't think so. It depends a lot on the camera and photo conditions. As I said earlier, taking a photo of a moving car in outdoor environment and reading the plate is not easy. It needs a high performance camera that is going to be on the edge of working, so it won't take as much to mess it up as it does the camera in my basement. First I need to find a camera without automatic exposure.
One way this is quite likely to work , is to actually drill holes in the plate, and put the IR LEDs behind the numbers. My state has white plates, so it might not be too obvious. The number behind the LEDS won't be readable, that is for certain. That is a much easier block than a light near the numbers. I'll try that next. Try that idea at your own risk, I'm not telling you it's OK to do this.
Here are some shots of a license plate I found by the side of the road, drilled with four high power LEDs behind it. Since the plate is white and the LEDs are white they are pretty invisible until you try to take a picture.
Here is the plate at night, taken from a cell phone camera. The shot is dark because the LEDs make the camera adjust to be very dark.
I'm just using an Arduino during prototyping to create a variable width 5V pulse that I can control easily.
Arduino Duemilanove Board
Some other possible solutions are commercial PMIC - LED Drivers, there are standard auto LED drivers like these:
- A6264 Automotive Stop/Tail LED Array Driver http://www.allegromicro.com/en/Products/Part_Numbers/6264/6264.pdf However this one only sources 100mA, it would have been perfect for my previous 100mA project :-(, but I need 1A for this job.
- A6261 is similar http://www.allegromicro.com/en/Products/Part_Numbers/6261/6261.pdf
- LTC3783 does 350mA, and has feedback, but has external switches, so it really replaces the Arduino in the test circuit. http://cds.linear.com/docs/Datasheet/3783fb.pdf
- Cypress CY8CLEDAC01 http://www.cypress.com/?docID=24622, also needs an external switch.
I'll keep looking, I haven't found a part yet that I like, so i'm sticking with my circuit. I'm going to have to solder up the LEDs to even get started, as they are surface mount. Here is the embarrassing kludge of the Arduino breadboarded to the NMOS switch, 1N4002 diodes and wired to the four LEDs soldered to a vectorboard. I also put in a visible red LED in parallel just so I could see when it was on. This jig was just so I could make sure the LEDs were working before I went on. I also added a 2K resistor pull down to Arduino pin 11 to keep the power off to the LED when the Arduino is booting.
Zowie! That is bright looking through the camera! Haven't adjusted the power yet, no idea if this is max. Components do get a bit warm. I did notice like the other 850nm diodes, they glow a faint red when turned on. This caused me to discard the last set, but I have since learned that nobody will see a faint light outside.
This is the Arduino program that toggles pin 11 to power the LED. Nothing to it, just a blink program.
void setup() {
// initialize the digital pin as an output.
pinMode(11, OUTPUT);
digitalWrite(11, LOW); // set the LED off
}
void loop() {
digitalWrite(11, HIGH); // set the LED on
delayMicroseconds(20); // wait for a second
digitalWrite(11, LOW); // set the LED off
delayMicroseconds(80); // wait for a second
}
// initialize the digital pin as an output.
pinMode(11, OUTPUT);
digitalWrite(11, LOW); // set the LED off
}
void loop() {
digitalWrite(11, HIGH); // set the LED on
delayMicroseconds(20); // wait for a second
digitalWrite(11, LOW); // set the LED off
delayMicroseconds(80); // wait for a second
}
I also found that when I flash the LEDs at a slow rate, when I try to take a picture the automatic exposure control of the camera gets really screwed up. That is a good thing! I don't know if the speed cameras have automatic exposure control, I assume they do, and how much in advance of the picture they set the exposure. Normally exposure control is a sensor running and integrating the scene over a long time. Long time here means ten milliseconds up to a second. What I want to happen is to trick the camera into not seeing the light, and then blinding it when the picture is taken. Now that gets me back to trying to detect the camera flash, which is just not going to happen at a distance in an outdoor environment.
As I calculated before, a speed camera is going to have a pretty short exposure to catch a moving car without blur. An idea I will explore is constantly ramping the brightness up and down at a high rate, or having multiple banks that flash and ramp brightness. At least one bank must be on all the time to be sure the camera doesn't take the picture at the wrong moment. On second thought, there is some possibility that might work as well, by tricking the camera into thinking the scene is bright, and then make it underexpose the picture. Seems a little shaky, will require testing.
Next I need to add a way to monitor the current, the Arduino could do that by measuring the voltage somewhere in the string, that is what the commercial drivers do. Either that or I pick up some of the commercial LED drivers, and maybe some more LEDs :-)
Decided that speed camera vendors must sell their wares too, and provide data sheets to money hungry municipalities. A little google work found one! Turns out it can use an INFRARED flash. So that explains why I can't see the flash. It also confirms that an Infrared LED will not be filtered and should be effective.
http://www.gatsometer.com/files/file/brochures/high-res/en/leaflet_RS-GS11_ENG.pdf
Answers some critical questions. 1/1000 shutter speed, 0.3sec to get the exposure right, 12bit dynamic range and a CCD sensor (CCDs are sensitive to bloom, meaning flooding of light across the sensor when it is too bright).
Now I have enough information to do some math with some wild guesses to see if there is any hope.
http://www.mathsisfun.com/geometry/steradian.html has some W/sr equations.
http://www.gizmology.net/LEDs.htm has a lot of good equations on radiant energy
http://www.iala-aism.org/chapo/publications/documentspdf/doc_229_eng.pdf has information on measuring lights
No guarantees on this math, but first I need to figure out how much power the license plate reflects from the flash hitting it, knowing the flash power rating above:
Next I figure out how much power the LEDs manage to get into the camera lens:
I'm not totally sure of the flash calculation, still looking up resources on flash intensity. However the result so far is that the LEDs will be 10X brighter than the light reflected from the flash off the plate. Not bad. I think I'm being very generous about how much power makes the return trip, since I'm not accounting for spreading. Now keep in mind the camera advertises a 12bit dynamic range, which is 2^12 =>4096:1 signal to noise. As a former camera designer, I know that is BS, a camera really has at most a 2^11 usable range, or 2048:1 and that is being generous if the scene and settings of exposure are optimal. The output ADC may have a 12bit range, but the scene content can not be that large. You can get maybe 10K electrons in a CCD pixel, and have a noise floor of 100e reading them out. Any signal down near the noise is not going to be sharp enough to get you a ticket. The scene will be centered somewhere in the middle if they got the exposure correct, so count on 100:1. All that said, the camera can still distinguish items in the scene that are 10:1 in brightness easily. Now a human has to look at the photo, and it is a matter of how much they process the image.
A human can only see about 2^6 or 64:1 dynamic range. Conclusion. There is hope that the IR LEDs will be bright enough to mess up the picture. I could have a lot of errors in my assumptions, but still we are in the ballpark to be effective.
Back to the lab, got some more LEDs in the mail...
Got four more SFH4232 diodes and wired them up with the other four in as tight an array as possible. Hand soldered the surface mount components, and I'm disgusted with my solder job. However it should work. In a final product a small PCB would allow you to pack these closer and make a ground plane for a heat sink. The diodes have a heat slug on the back that I'm not able to take advantage of. My plan is to use the metal license plate and frame sandwich to draw out the heat.
Next I have to polish up the Arduino's control program. I want to flash the LEDs and sense the current back to the Arduino in a control loop. This is how the commercial LED drivers work to regulate the current. The power is so high that a few seconds of messing up the code could blow $100 worth of LEDs, so I'm going to test it with some low power indicator LEDs first. Breadboarded up the Arduino with two FPP50N06L switching transistors.
http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=FQP50N06L-ND%09&x=10&y=15
Needed to boost the PWM frequency of the Arduino to greater than the shutter speed of the camera. Normally it is about 500KHz, too slow for the 1/1000 => 1KHz shutter. Stole the code here to bump it up:
http://www.arduino.cc/playground/Code/PwmFrequency
Add the analogWrite to the LEDs, the analogRead for the sensor, and a serial write. I'm going to load this and see if this slows down the PWM frequency on the scope. Still 3.9KHz. Sweet, the computational overhead is not messing up my flash rate. This should work.
Got some 5W 1ohm resistors so I could measure the current in the diodes by measuring the voltage drop.
http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=MRA05-1.0-1%25-ND&x=10&y=14
Made sure not to buy wirewound resistors, because they are inductive and since i'm switching the current through them it would ring like mad.
My first measurement of the current was only 0.39V -> 390mA! I wanted 1A average current. The forward voltages are not stacking the way I expected. Ramped up the duty cycle to 40 and got the current to 790mA.
Diode array is getting WICKED HOT! I'm going to have to mount this on the plate frame and get some heat sink action or I'm never even going to be able to test this thing at full power unless I can get the heat out.
First I have to drill out the license plate frame in a hole pattern that matches my hand kludge diode array.
I will take a full size picture and tape it on, then drill.
I used the black frame as a practice, since my plan is really to use a chrome license plate frame of the same type. The shiny chrome will disguise the LEDs better than black. Here are the holes I drilled with the drill press. Drilling went smoothly, the pot metal license plate frame was easy to drill. However the metal was shiny under the black and despite my best efforts the paint was marred in a few places. If I was going to use this as a final project, it would need some touch up paint or to be taped before drilling.
Taped in the light array as a mock up just so I could dissipate the heat and take some photos. You can see the black electrical tape if you look. Here is the frame, light array and license plate assembled without turning it on.
Connected to the Arduino and the driver circuits
Powered up to 800mA per diode. Max is supposed to be 1.0A, so not quite full power. Frankly I'm not impressed yet. The previous version seemed to be just as effective at less than half the light power spread over a larger area. What is going on? The camera I'm using to photo this is my cell phone. It does an auto exposure, which I've said above I don't think the traffic cameras have time to do. It closes down and I get the same picture no matter how bright the light is.
To prove my point, I took a picture of a 100W light bulb on the ceiling. OK it was really a 23W compact fluorescent 100W equivalent. You can see the wood grain an inch from the bulb, and this has 4X more power than my LEDs based on input power. Now the LEDs may be more efficient than fluorescent, but the camera sensitivity is higher to visible. I should have done this before we went on this ride!
So is the project busted? ... no I don't think so. It depends a lot on the camera and photo conditions. As I said earlier, taking a photo of a moving car in outdoor environment and reading the plate is not easy. It needs a high performance camera that is going to be on the edge of working, so it won't take as much to mess it up as it does the camera in my basement. First I need to find a camera without automatic exposure.
One way this is quite likely to work , is to actually drill holes in the plate, and put the IR LEDs behind the numbers. My state has white plates, so it might not be too obvious. The number behind the LEDS won't be readable, that is for certain. That is a much easier block than a light near the numbers. I'll try that next. Try that idea at your own risk, I'm not telling you it's OK to do this.
Here are some shots of a license plate I found by the side of the road, drilled with four high power LEDs behind it. Since the plate is white and the LEDs are white they are pretty invisible until you try to take a picture.
Here is the plate at night, taken from a cell phone camera. The shot is dark because the LEDs make the camera adjust to be very dark.











































