Pulsing Light Amplifier - (Frequency Meter) - COMPLETED! - Page 1
Forum section: electronics / projects

author: hgg
author_rank: Frequent Contributor
timestamp: October 02, 2013, 03:55:11 pm
content: Hello!I am currently trying to build a simple light amplifier with a photodiode in its photoconductive mode,using an op amp. I have never used an op amp and I don't really know exactly what I am doing...As an immediate result, I have a problem....Below is the schematic of my circuit:Light AmplifierI did not use a split source to power up the op amp,that's why I am using the R2/R3 voltage divider.The pulsing light source is well amplified but I have ringing spikes in the square wave either afterthe rise or after the fall. These spikes change with light intensity. If its low then it happens afterthe rise of the wave. If it is high then it happens after the fall of the signal. Maybe the diodeor the op amp is saturated, I am not sure what is going on. Maybe a capacitor of the propercapacity and at the proper location might solve this problem.In the following video you can see what I mean:Any help is appreciated!Regards,George.

author: mamalala
author_rank: Unknown
timestamp: October 02, 2013, 05:24:46 pm
content: What is R2 supposed to do? It is effectively bypassed to GND by the photodiode anode connection to GND. Then, for photodiode applications you may want to use a transimpedance amplifier instead, like the OPA380.Also, if probing fast signals (which the rising/falling edge there is), you want to keep the probe's ground connection as short as possible, using the ground lead clip is not the best.Attached a quick circuit of how a circuit with the OPA380 could look like, check itt's datasheet for more details:http://www.ti.com/product/opa380Greetings,Chris

author: Paul Price
author_rank: Super Contributor
timestamp: October 02, 2013, 05:28:49 pm
content: Looks like on your schematic that R2 is shorted out.

author: Kevin.D
author_rank: Frequent Contributor
timestamp: October 02, 2013, 07:46:22 pm
content: Hi Goerge theres other ways of doing what you want but anyway ,your schematic showing r2 shorted must be only on the schematic else you would not work at all I guess .Whats probably causing your ringing (if your probing is oK) is that your forming a lowpass filter with R1 and any diode capacitance present, so if diode has 50 pf capacitance for example then this rc filter's formed will delay the feedback and cause extra phase shift in the feedback ,so about a decade above it's break frequency (break frequency would be ~ 15 Khz for 50pf and 220k) you would then have close to 180 deg phase shift (90 already from opamp and close to 90 from R1-Cdiode ), that will cause amp to ring at it's crossover frequency . try putting a cap in parrallel with R1 to cancel effect of diode capacitance .(make it at least = to C diode or a bit larger so 100pf should do you .and happy experimenting

author: hgg
author_rank: Frequent Contributor
timestamp: October 03, 2013, 07:24:39 am
content: Hi guys!Ok, here is an update.Below is the actual breadboard circuit:breadbord circuitIndeed, resistor R2 looks like its grounded, but if I remove it, the circuit stops functioning! Dead...It looks like that I made a mistake in the schematic and I've placed a ground on the anode of thephotodiode...I probe the circuit at ground and A13."mamalala" do you think that the OPA380 would be a better solution? I need to be able to measurepulsing light signals up to 1Mhz. Will the OPA380 give me hight gain? In your schematic you have R3and R4 in series. Why didn't you just use a single resistor?Kevin, I tried the 100pf and it worked!Both spikes almost gone! Is there any tutorial on how tocalculate the 100pf value? I did not understand the break frequency. Does it mean that abovethat frequency the circuit will have problems again? I need it to go up to 1Mhz.

author: Rerouter
author_rank: Super Contributor
timestamp: October 03, 2013, 10:31:56 am
content: in order to cancel out the effects of the diodes capacitance you need to match that value across R1, and this will vary with the voltage and current levels you drive the diode at and even slightly with temperature if you use the diodes datasheet,for my own personal interest, what are you planning to use for the pulsed light source? i've been mulling over building a similar project

author: mamalala
author_rank: Unknown
timestamp: October 03, 2013, 10:44:13 am
content: Quote from: hgg on October 03, 2013, 07:24:39 amWell, the OPA380 is especially suited for photodiode applications. Right on the front page of the datasheet it also says, under "Applications": optical amplifiers. It has low noise, is fast, small drift, etc.The partial schematic i posted is from a project i did a few years ago. The two resistors in series have the purpose to reduce the capacitance there, sincee in that application i was dealing with rather fast signals.Note that photodiodes produce a current depending on the amount of light, whereas the resulting voltage then depends on the impedance of whatever it is connected to.Greetings,Chris

author: dannyf
author_rank: Super Contributor
timestamp: October 03, 2013, 11:30:29 am
content: QuoteI don't know your application but it is generally helpful to get it work at levels that match your skills and then you can go from there.

author: hgg
author_rank: Frequent Contributor
timestamp: October 03, 2013, 12:09:04 pm
content: "rerouter", I see what Kevin meant now, ok.For a pulse light source I am using an high intensity LED diode from a bike light connectedto a 555 pulser circuit I've already built. The led can go easily to 2khz but I need to modifythe 555 circuit to go higher. That is my 'control' signal to test the pulsing light amplifier. Itwould be great if I can use a Cree LED but I don't know yet how to power such a currenthungry load."dannyf" My skills are for 10hz or less...I have never worked with opamps.My application is the following:Because computer monitors of the past and of the present (lcd pwm etc) make me a bit dizzy, I wassearching for an actual meter that will tell you the pulsing frequency of any light source but I couldnot find one. ( I wanted to measure this frequency, before buying a specific computer monitor).Even PC monitor testing labs did not seem to have anything like this and they were measuring thepulsing frequency with video camera shutter timings and with not very accurate results.So I decided to build one myself. Initially what I did, was to hook up a spare small solar panel thatI had lying around, to my UT61E multimeter and set it to frequency mode. It worked like a charm!I've started measuring everything I could find, monitor, tv sets led house lamps, pwm flashlights ...Very accurate results! The setup was bulky though and I wanted something portable and more efficient.The solar panel had plenty of voltage output but large capacitance so the signal was not so clearand at the top of the khz range it started to smooth out and disintegrate. A photodiode soundedmore promising but I needed to build a signal amplifier. So here I am trying...I can already measure a 2khz pulsing light source very accurately. I am planning to connect the finalamplifier circuit to the very cheap UT120C multimeter that I bought for the purpose. The problemis that the UT120C needs at least a signal of 1V peak to peak to start registering a high frequencyreliably. I need to make it sensitive enough so that it can also measure the frequency from mobilephone displays. I have measured my nokia phone to be 300Hz but with the oscilloscope. The signalwas around 100mV peak to peak. So I need the output to be at least 1V peak to peak which is notat the moment. Any ideas? Will a second opamp be able to step up the output range from 1V to 5Vfor example?Kevin you said that there are other ways to do what I am trying to do. Can you suggest a bettersolution?If I can make the amplified output level non linear, that would be even better! Low intensity lightsignals would be more amplified than the hight intensity ones and I would have a better range.I read somewhere that you could achieve that by replacing the feedback resistor with a log-diode.Is this true? (I don't have a log-diode to try.)If anyone can suggest better ways of achieving what I am trying to do, please feel free to share!(maybe there is even a better way to read the frequency of the signal than using the UT120Cmultimeter. I don't know.)Thanks.George.

author: dannyf
author_rank: Super Contributor
timestamp: October 03, 2013, 12:38:58 pm
content: QuoteAnything from simple transistors (bjt or jfet), logic gates, comparators to mmic + opamp. It is much easier since you don't care about the fidelity of the wave form, just its frequency.BTW, you will rarely find a light source blinking at 1Mhz.

author: Rerouter
author_rank: Super Contributor
timestamp: October 03, 2013, 01:30:13 pm
content: dannyF i am actually planning something like that, so dont discard it out the window,as for the circuit i would still use the op amp as a buffer, then feed that into an ac coupled comparitor so you only trigger on a significant signal change,

author: hgg
author_rank: Frequent Contributor
timestamp: October 04, 2013, 07:16:22 am
content: Actually I do care about signal fidelity because if the light pulse signal deviates from its square form,then for some reason the UT120C loses its sensitivity...

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 07:28:31 am
content: Hi,Ok, I've just tested another photodiode and is simply awesome for very low light!Its the TSL-250R Light to Voltage converter. Now I can easily detect the frequencyfrom the display of any mobile phone. The diode has an embeded op amp and thefeedback components as well. The problem with that photodiode is that it saturatesvery easily in normal light conditions and goes flat to 3.1V I am powering the wholecircuit from a 4.2V battery. Maybe I will use both diodes and switch between themfor low and bright light conditions. I have gone up to 12Khz with the UT120C whichis its actual limit for that voltage range and up to 45Khz with the UT61E!What I want to do is have an LED that will light up when the output of the photodiodereaches or exceeds 3V, in order to know when it is saturated.Is there any easy way to do that?Thank you.p.s. Photodiode Info:http://uk.farnell.com/taos/tsl250r-lf/photodiode-sensor-l-volts/dp/1182346?Ntt=TSL-250R

author: mamalala
author_rank: Unknown
timestamp: October 05, 2013, 08:21:09 am
content: Quote from: hgg on October 05, 2013, 07:28:31 amYou can put a simple aperture in front of it. Put the diode in a small piece of light-tight plastic pipe or similar, put black cardboard over the end where the diode "looks" through, and poke a small hole in there. This will reduce the amount of light the diode will receive.Quote from: hgg on October 05, 2013, 07:28:31 amA simple comparator will do that for you:http://en.wikipedia.org/wiki/Comparator. Make sure to add some hysteresis to it to stop it from switching back and forth rapidly when the input signal is at (or close to) the desired trigger point.Greetings,Chris

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 09:00:26 am
content: Hello Chris,I though about using a variable circular polarizing filter but it seems like that a variable aperturemight be a better idea.What about using a 3V reversed biased zener diode connected to the LED indicator instead of thecomparator?Thanks!

author: mamalala
author_rank: Unknown
timestamp: October 05, 2013, 09:56:28 am
content: Quote from: hgg on October 05, 2013, 09:00:26 amMay or may not work, i don't know, since i don't know the parts specs and setup you are using. If you want to drive an LED, be aware that the output if the diode/detector you are using may not be able to drive that much current directly. It all depends on what it can do. Using a comparator will probably give you a faster response and rising/falling edges of the signal. But then again, as said, it all depends on what parts you chose and what they can do/handle.Greetings,ChrisEdit: Plus, using a zener means the only way to adjust the set-point is by modifying the aperure. Using a simple comaparator allows you to adjust that using a simple trimpot, while you can use a fixed aperture (i.e. just a hole).

author: Rerouter
author_rank: Super Contributor
timestamp: October 05, 2013, 10:32:58 am
content: you would want to isolate the led from the output signal, as your photo diodes bandwidth will be crippled if your output has to contend with the capacitance and inductance of 10mA flowing through a generic LED

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 10:43:41 am
content: I have used leds as light sensors - to measure brightness, not frequency. They may work as a frequency measurement.QuoteIt is unlikely to be good for 1Mhz.QuotePut some paint on it. Like nail polish.QuoteNot likely.

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 11:00:50 am
content: Chris I want to use the LED only as a saturation indicator. It will light up when the photodiode issaturated and this happens exactly at 3V. 3.1V and you cannot take a frequency measurement.The signal is starting to clip and then after 0.1V you get a flat line.Rerouter what about the following circuit to drive the LED? :Over Voltage IndicatorI will be measuring the frequency from ground and the point before R2.QuoteYou are right I think... Do you think that the circuit above will work?Will I avoid such problems if I use a comparator? (which I don't know how...)Dannyf indeed the integrated diode does not seem to go high in frequency, that is why I will use bothof them and switch between low & high light.

author: Rerouter
author_rank: Super Contributor
timestamp: October 05, 2013, 11:21:49 am
content: I would personally use a peak detector circuit for this, as your approach has duty cycle changing as it encroaches as opposed to a hard limit which may limit its effectivness for low PWM %'sTake a look at the attached image to see what i'm talking about, a few passives and you can find open collector comparators for stupidly cheap prices, not to mention apart from when the signal strength changes which can be up to 1mA (can be limited by increasing 100 ohm resistor) it only draws an average of ~5uA for your signal level,

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 11:26:33 am
content: Do I need to create and feed into the comparator a 3V reference voltage as well?My supply will be 4.2V, are the resistor values going to be the same for the comparator to work?Is the LED placed after the 330Ohms resistor?

author: Rerouter
author_rank: Super Contributor
timestamp: October 05, 2013, 11:34:26 am
content: the reference can be a simple divider as a comparators inputs should be high impedance, it doesnt need to be very accurate just as long as its lower than the peak detector voltage when you want it warning you,might suggest a small tweaking pot if you ever want to fine tune it, but the voltage you use should be about 0.5 less than your signal voltage if a normal diode and about 0.3V less if a schottkey to account for the drop,as far as my resistor values, it was for your signal level using a 5V supply, so tweak the led resistor if its not bright enough,as far as the time constant in the peak detector goes goes, it will recover in under a second, and shouldn't need to be changed much as its being used as a warning as opposed to a measured signal,

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 11:35:54 am
content: QuotePut the led on the emitter: between the (right) led Vfwd and Vbe, you get to 3v.And it saves a few parts too.

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 12:00:41 pm
content: Rerouter I will try your suggestion. Can I use the MCP6281 as the comparator? I have more of themlying around..dannyf don't you agree with what rerouter said?1)Quote2)QuoteWill I solve the above problems by putting the LED on the emmiter?

author: Rerouter
author_rank: Super Contributor
timestamp: October 05, 2013, 12:39:16 pm
content: Yes you can use an MCP6281, as it will happily sink or source 20mA

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 01:05:36 pm
content: Great! Thank you for your help. I will try it out.One quick question.Did you place the diode just after the photodiode output signal?In the graph its part green part red. What type of diode shall I use?

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 04:19:36 pm
content: It Works !!!Thank you very much for the help!One strange thing I've noticed is the following:If I just turn on the room light I get a perfect sine wave on the scope.My lamp is an incandescence one and here in Greece we have 50Hz mains.It makes sense because it picks up the 50hz on/off pulsing of the lamp.The strange thing though is that my photodiode circuit and the scope measurethe pulsing frequency to be 100Hz! When I measure TV sets and monitorsthat I know their frequency I get an accurate result. But not with the lamp.(I've tried more lamps further down the room).Do you think that is has anything to do with the fact that the lamp gives offa perfect sine wave while all the other sources give more of a pulse?I cannot explain it.Any suggestions???

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 04:25:59 pm
content: It makes perfect sense that your incandescent lamp gives out light at 100hz: the negative cycle is as good as the positive cycle for the light bulb - the wave form is essentially sin() squared -> almost like a full wave rectification into a resistive load.

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 04:45:06 pm
content: So it takes into account the negative cycle as well.Shouldn't I observe the same effect in the case of a PWM light pulse with 50% cycle?

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 06:15:11 pm
content: QuoteWhen you pwm a load, it is typically powered by a DC source so when it is off, it is truly off. Thus 500hz pwm will yield 500hz reading on your meter.Many such meters also allow the reading of duty cycles as well - that can be interesting.I have a $10 meter that is spec'd to 10Mhz in frequency but actually goes to 20Mhz+.

author: hgg
author_rank: Frequent Contributor
timestamp: October 05, 2013, 06:46:47 pm
content: The output of the BPW34 diode is decoupled with a capacitor, so I read only the ac component.When I shine a pwm light I get values from 0 to +V, but when I shine the mains lamp I getnegative values as well from -V to +V. Why do I get negative values with the main lampDuty cycle with the mains lamp is measured correctly at 50%What meter is that ? Interesting.Did you actually test it with a signal generator?

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 09:50:07 pm
content: It is one of those VC-something meters. I thought that they also make one that goes to 30Mhz or so.

author: dannyf
author_rank: Super Contributor
timestamp: October 05, 2013, 09:51:34 pm
content: QuoteI don't know how you decouple the diode - they are typically dc coupled to an opamp. A schematic would help I guess.

author: mamalala
author_rank: Unknown
timestamp: October 05, 2013, 09:58:43 pm
content: Quote from: hgg on October 05, 2013, 06:46:47 pmQuite simple. Take a sine wave, center of it is null. The lamp will light up during the positive half, as well as the negative half. Unlike a LED it can take both. Take a bridge rectifier for example, the output will be 100 Hz, since the negative half will be "flipped up". Same with an incadescent lamp, just that you don't have a rectifier.With PWM, all you have is "all on" and "all off". It swings between 0 and full. There is no "negative" that anything could use....If that is not clear i can do some images to make it more clear, but this should be basic knowledge. If you have trouble understanding, let me know and i will try to make it more clear to you. But the best way of understanding things is to figute it out yourself. So, try that firstGreetings,Chris

author: hgg
author_rank: Frequent Contributor
timestamp: October 06, 2013, 05:25:03 am
content: Good morning,DannyF I placed a capacitor in series at the output of the BPW circuit, not the actual diode.I am reading the frequency from ground and the capacitor output. I did not use one withthe integrated light sensor.$10 for a VC meter with frequency up to 10Mhz ?? I cannot find one.Which model do you mean?Have you actually tested it?More important for me though its the sensitivity of the meter and not the 10Mhz.The UT120C needs >=1Vrms for 10Hz to 10KhzDo you know what is the sensitivity of the VC?Chris, I was confused because you can look at a square wave signal at the center and thatway it seems like a sort of sine wave that has positive and negative components...A pulse of course goes from zero to high, stays high for some time and then goes backto zero.Anyway, now it makes perfect sense that the incandescence lamp is pulsating at 100Hzand with minimal ripple. That's why they are the best lights for your eyes and brain...

author: hgg
author_rank: Frequent Contributor
timestamp: October 06, 2013, 10:36:22 am
content: Rerouter Hi,The comparator circuit you showed me works fine but it seems to draw a lot of current!I measured all the components used and they are all working with tiny amounts of current.When I measure though the two resistors that make the divider and supply it to the op ampas the reference voltage I get 50mA! I became aware of that because the two resistorswere getting a little hot, not a lot though. I am also using the IN5819MIC diode at the inputof the detector.The other op amp circuit that drives the BPW34 photo resistor draws less than 20mA.Is that normal?Peak Detector

author: Rerouter
author_rank: Super Contributor
timestamp: October 06, 2013, 10:41:35 am
content: you can greatly increase the resistance values for the reference as the op amp inputs are very high impedance, at 50mA that means your using a total of 84 ohm... i can understand why they would be hot, take what ever values you have now and times them by 100, realistically increasing by 1000 would not hold any issue,this is all assuming your using a simple resistor divider,

author: hgg
author_rank: Frequent Contributor
timestamp: October 06, 2013, 11:02:18 am
content: You are right, I am using low resistor values. 22 Ohms & 47 Omhs...I think I have 2.2K Ohms & 4.7K Omhs.I will try these and see.Thanks again!

author: hgg
author_rank: Frequent Contributor
timestamp: October 06, 2013, 11:48:13 am
content: Its funny what a difference two resistors can do...Rerouter you know your circuits well. I need to buy some books.Current consumption now with both photodiodes working : 7mA!I also measured a portable UV CFL black light and it came out to be 38.5KHz !!! with killer spikes.Also confirmed by the UT61E. Well, not the best light for your eyesight...UV Black LightGreat, thank you for your help.Now I need to design a board and put all the components in the black box.

author: dannyf
author_rank: Super Contributor
timestamp: October 06, 2013, 11:52:15 am
content: The meter is a VC81D.Hope it helps.Just so you know, a logic gate (particularly one with ST input) is also a comparator (to a fixed Vref).

author: hgg
author_rank: Frequent Contributor
timestamp: October 06, 2013, 01:21:36 pm
content: dannyf Thank you.

author: hgg
author_rank: Frequent Contributor
timestamp: October 11, 2013, 04:14:02 pm
content: Hi!Just an update about the small project I am doing and some questions that arose.I finally decided to use only the BPW34 photodiode because I replaced the 5V op amp with the LM358Pwhich has a broader choice of supply voltages. I am using now a 9V battery that gives me a widervoltage range making the UT102C “more” sensitive. I’ve also replaced the feedback resistor with a 4Kone for more amplification. Now the circuit can read the frequency of a mobile phone screen in broaddaylight. The photodiode does not get saturated and you can use it in the morning with no problem.You can measure the frequency of a 60watt mains bulb, while shinning a 1000 lumens flashlight directlyabove the diode…Then it struck me! What about if you can also hear the light source? I connected the output of the smallcircuit to an LM386N audio amplifier with a speaker and the whole project become more interesting now.You will be able to measure the frequency of the light source and hear it at the same time! (dependingon the speaker you have of course…)Check out the video below where I measure and listen to several sources of pulsing lights:(one of them is very interesting) (again, sorry for the video quality but I do not have a decentvideo camera)The LM386N datasheet states that the absolute maximum of the inputs voltage is 400mA. My questionis, what happens if you exceed that limit? Is there any danger of destroying the thing? I have measuredthe maximum peak to peak voltage from the preamp and I have used a voltage divider on its output tothe LM386N just to be sure.Below is the revised circuit schematic:free image hostingMy other question is that while the whole thing works very well, when I connect the output of thepreamp to the input of the amp, the signal gets distorted. It has some small peaks and valleys, it getsattenuated a bit and phase shifted as well ! The photodiode amplifier outputs a perfect sine wave if theLM386N is not connected. (mains light source)The probing points are: Output of C1 for the yellow signal (photodiode amp) and Output of C5 for theblue signal (amp).Preamp signal onlyPreamp & AmpIs this normal ?(The distortions get more pronounced on very fast signals)Finally, I know that by changing R5 I can increase or decrease the output of the photodiode amplifier,but how can I implement a speaker volume control?Thank you!

author: Rerouter
author_rank: Super Contributor
timestamp: October 11, 2013, 10:05:45 pm
content: To be very honest i cannot see how your circuit can possibly work as far as the speaker part is involved, and believe this would be half your problem, and the photodiode to me now must be operating in photovoltaic mode as opposed to photocurrent, (bit slower but for most PWM rates more than sufficient) which also to me atleast confuses me as to how it can work, but low and behold i see the waveforms,by AC coupling your measured signal you are forcing half the signal below ground, now your circuit has no negative rail, so it is most likely shunting a few 100's of milli-amp through the speaker op amps input protection diodes,equally the 10K and 670 ohm are your amplitude control, throw a potentiometer in there and you have controlled attenuation (reducing signal amplitude) or using a potentiometer like in the image below to control amplification, only if you do try and control the attenuation use a bias resistor like 100 Ohm to ground to prevent the pot from holding the op output hard to ground,below i have attached the circuit i feel you should try, everything is biased around 4.5V and only the speaker output has any negative voltages involved,

author: dannyf
author_rank: Super Contributor
timestamp: October 11, 2013, 10:38:54 pm
content: QuoteI submit it for your re-consideration,

author: hgg
author_rank: Frequent Contributor
timestamp: October 12, 2013, 05:16:28 am
content: Hello Rerouter,You are right about the photodiode. Its in its photovoltaic mode. The funny thing though is ifI turn it around, the circuit works exactly the same...It looks like that the speaker output cap C5 causes the phase shift.Speaker not connectedSpeaker connected after C5Speaker connected before C5In your schematic you are measuring the output signal before C5.The signal though gets distorted quite a bit if I don't use C5.Also in your schematic you connect only the 10k (R4) resistor to the non-inverting input of the LM386.If I do that, I will feed it much more than the 400mV stated maximum. That's why I also use R5.QuoteThe circuit draws 4mA with no pulsing light source and 80mA at its maximum.... but if I don't use C5 thenyou are right, it draws some 100's of milli-amps. Having said that, the circuit looks like it creates somehuge current spikes because although it draws 80mA maximum if I use OCP at the power supply anda 250mA limit, it switches off... ! (especially with fast signals)I am not sure exactly what is going on...In your opinion what is the main mistake of the circuit? (the whole circuit...)Quotedannyf what do you mean? To try it out?...

author: hgg
author_rank: Frequent Contributor
timestamp: November 03, 2013, 10:25:04 am
content: Hi,The light amplifier and frequency meter works quite nicely measuring accurately any kind ofpulsing light of any frequency and intensity.I found out that the best way to implement avolume control is to put a pot in series with the photodiode.Actually the best waywas to connect a 1K log pot in series with the speaker.The device will have a speaker which will be connected at the output of the LM386 and aheadphones jack connected at the output of the photodiode pre-amplifier. Its extremelysensitive and with the headphones you can detect even the slightest variance in a lightpulse.The only problem is that when you power the circuit on, the output of the LM386 that drivesthe speaker produces a huge voltage spike. Power source is 9V and the spike can reach 8V.Same happens on the photodiode pre-amplifier output but when you have the headphones on,its not a nice experience...(There is also a spike when you switch off, but it is small)SpikesThe yellow line is from the preamp and the blue from the LM386.Do you know if there is any way to suppress that initial spike?

author: hgg
author_rank: Frequent Contributor
timestamp: November 03, 2013, 01:19:34 pm
content: I have just replaced the 47uF capacitor that I had between ground and Vcc with a 3300uF and theproblem was solved.I am not sure if there is any better way.

author: hgg
author_rank: Frequent Contributor
timestamp: November 10, 2013, 01:40:11 pm
content: Hi,I would like to be able to connect the photodiode to the circuit with a 50cm external cablebut I am having 50hz noise interference problems.290mVpp without any pulsing light input...Noise with no signaland 912mVpp if I cover the cable with my hand!Noise while covering the cable with my palmThe noise arises only when I connect the cable to theinvertinginput of the LM358and the photodiode is setup up in photovoltaic mode between the inverting and the noninverting inputs. I don't have such problems with the photodiode directly attached to thebreadboard.SchematicI am using the cable shown below:Cable endPhotodiodeHow do you go about shielding external probes such as this photodiode from noise?What kind of cable is the most appropriate for this?Do I need any kind of termination?I hope you can help.Thank you.

author: commongrounder
author_rank: Frequent Contributor
timestamp: November 27, 2013, 07:11:58 pm
content: hgg:I have built your light pulse amplifier and it works well. Thanks for your efforts!I believe the problem you are having with line noise pickup has to do with the fact that the photodiode pins have no direct ground reference (i.e. they are feeding the inverting and non-inverting inputs to an op-amp). Both wires are antenna for hum/noise fields fed into the op-amp inputs. The unbalanced cable you are using is throwing off the common-mode noise rejection the inputs to the op-amp would afford. You are better off using regular two wire cable. The best solution though, is to use two wire plus shield cable. This has two conductors inside the braided or foil shield, like a balanced microphone cable. The shield would be hooked to ground. Then the op-amp can reject the hum/noise, and the wires themselves will be (mostly) shielded from the hum/noise to start with.It's been a while since you posted this, and I hope you have already figured this out, but I thought I would add my take on the situation for anyone else building this useful little circuit.Cheers!

author: hgg
author_rank: Frequent Contributor
timestamp: January 20, 2014, 04:31:37 pm
content: Hellocommongrounder,I just saw your reply concerning that problem with the circuit!...That sounds like a good idea.I will definitely try it out because I need an external light sensor.There are two more problems with the circuit. The one was thatthe signal got distorted when connecting the speaker, but thatwas solved by replacing resistors R4 & R5 with x10 their values.The only problem I could not solve and I don't understand iswhy the output signal from the LM386 has a phase shift.Anyway, thank you very much for your suggestion!Tomorrow I am going to buy some cable for testing.George.

author: hgg
author_rank: Frequent Contributor
timestamp: January 22, 2014, 09:13:49 pm
content: commongrounder, I've just tried your suggestion and it worked a treat!I've made a one meter probe and the noise is exactly the same as if I had thephotodiode on the breadboard.Thank you!

author: hgg
author_rank: Frequent Contributor
timestamp: February 18, 2014, 07:45:24 pm
content: Hi,I am trying to design a PCB for my finished circuit and this is my first try so please forgive my mistakes...Any comments or suggestions ?I am using a 20 mil trace width. Is is too small? The board has a size of7 x 5 cm99 x 64mm.I have also added a ground plane. Is this a good practice? Will it increase the price of the PCB?I would like to add some terminals. For example the power and ground inputs from the batteriesand the output to the speaker. How do you normally do that? Do you add a via and then connectit to an existing trace?Thank you.images

author: commongrounder
author_rank: Frequent Contributor
timestamp: February 19, 2014, 03:39:11 pm
content: Hi hgg:Your thread caught my eye today. Looks like you are approaching the finish line with your pulse detector circuit. I am sure there are folks with more board design experience than me can comment on your circuit board design, but it looks pretty good to me. Having a ground plane can act as a shield for keeping noise down, but you have to watch out that the capacitive effects don't roll off the high frequency response of your circuit. I built mine on perf-board and have a reasonably quiet output (I don't have the speaker amp section on mine, as I just output direct to a 'scope).Also, I wonder if you might post a finished schematic of your circuit with all the changes, so those that find this thread will be sure to build the most refined version.I'm glad your remote sensor is working well.

author: hgg
author_rank: Frequent Contributor
timestamp: February 19, 2014, 04:28:48 pm
content: QuoteIndeed, thanks to your suggestion for the correct cable! It made all the difference.I am now double checking all the connections to see if everything has been placedcorrectly on the PCB. You got me thinking now about the capacitive effects of theground plane. On the breadboard I saw that the value of the C2 capacitor near thephotodiode was critical for proper operation. I will be using the circuit for frequenciesup to 100Khz and on the breadboard works very nice. If the ground place will reducethe noise then this is great because I need it to be very sensitive.Do you think that its a good idea to remove part of the copper ground plane aroundthe general area of the C2 capacitor?I can't wait to place the order for the PCB! I have so many applications to try it on!The most economical online PCB manufacturer I found was Elecrow :http://www.elecrow.com/services-c-73/pcb-fabricate-service-c-73_116/special-offer-for-2-layer-1010cm-max-green-pcb-510pcs-p-761.htmland I think I will place the order with them since its my first try and I don't want to paya lot in case I make any mistakes... I have updated the schematic and the PCB again.This will be the final version I think. Half the board is for the low battery light...Its a fine circuit for low battery detection though. Quite narrow triggering of aroundan 8mV window.If you see something wrong with the parts layout or the routing please tell me.Thanks again.Here is the final schematic:L2S

author: commongrounder
author_rank: Frequent Contributor
timestamp: February 19, 2014, 10:48:03 pm
content: I think if it were my board, I would leave the ground plane under the input circuit (PD, C3, R1, C2). I checked the board specs and it is 1.6mm thick. The capacitive effects at 100khz shouldn't be noticeable, especially since the traces are pretty short and narrow. You could always remove copper afterwards if it proves to be a problem.Thanks for posting the schematic.

author: hgg
author_rank: Frequent Contributor
timestamp: February 20, 2014, 06:57:34 am
content: You are welcome.(J3 will be connected to a 5K linear pot for gain control and J2 to a 1K log pot for volume control)I have been searching yesterday for information on the subject which I think is very interestingand I have found an article from Texas Instruments that is very informative.The PCB is a component of op amp design. by Bruce Carter.http://www.ti.com/lit/an/slyt166/slyt166.pdfA design suggestion as well which more or less agree with the above article.http://electronics.stackexchange.com/questions/39239/when-to-use-ground-plane-cutouts2nd answer.I think I will indeed leave the ground plane for now since I am working with lowfrequency stuff and the ground plane might do more good than bad in terms ofnoise suppression. Its a good practice though in high speed analog design (>1Mhz)to remove it from the inverting section of the opamp.

author: hgg
author_rank: Frequent Contributor
timestamp: March 16, 2014, 05:55:03 pm
content: Hi,I have received the PCBs from Elecrow and I have to say that they did a very nice job.I did not have any high expectations but the quality of the PCBs is excellent.The photo does not do justice to the quality of the PCB: (and the price was right)Very strong PCB, with excellent pads. The text while extremely small, is very clear. (7x5 cm)And here is the board populated:I had to remove and resolder several times one capacitor without any damage to the pad & solder mask.I am very excited because the little project is approaching completion.Only if Murphy was out of the way just for once...I have the following problem which I cannot really explain.I have connected the UT120C to the output of my light to sound converter and when it is poweredby its own 3V cell it works perfectly. Frequency measurement is very fast and sensitivity is high.If I try to power it from the batteries with a 3.1V regulator, then its sensitivity drops significantly!The output from the regulator is very clean (3 mVpp) and I've tried with a 3V LDO and the LM317.Either the UT120C likes only coin cells or there is something to do with the ground that it shareswith the rest of the circuit. I cannot understand why its doing that.Here is everything inside its enclosure but not yet finished:I can use a separate switch and use the UT120C with the coin cell, but it would be much betterto be able to power the multimeter from the rechargeable batteries.Any ideas why this is happening?Thank you.

author: commongrounder
author_rank: Frequent Contributor
timestamp: March 17, 2014, 01:06:51 am
content: Very nice to see your almost finished project. It should look very polished when buttoned up. I suspect the negative battery terminal doesn't like to be tied to the common measurement terminal through a common ground connection. They are undoubtedly at different potentials. You may have no choice but to run the meter on the battery, unless you install an isolated dc/dc converter (for $$).

author: hgg
author_rank: Frequent Contributor
timestamp: March 17, 2014, 06:29:51 am
content: commongrounder thank you,You always help with grounding.. problems!QuoteHow can I measure this difference in potential? I measured several ground points and thereis no voltage difference between them.Isolated DC/DC converters are indeed not cheap, but since this will be the prototype, I mightas well go for it. Will something like this do the job? :http://gr.rsdelivers.com/product/traco/tmr-1-0511/dc-dc-converter-isolated-5v-200ma-1w/7813178.aspxOne thing that concerns me is that because isolated DC/DC converters, convert DC to an AC highfrequency voltage, and then with a transformer they convert them again to DC, they might injectsome form of noise into my circuit which works with very low voltage levels. Will I have to put itin a metal enclosure?By the way, difference in breadboard capacitance and inductance became apparent when I usedthe same parts but on a PCB. So, for the best sound quality you have to short resistor R6 and adda 10uF electrolytic capacitor in parallel with C4. Noise is down to a minimum and its differentiationability of even the weakest pulsing light, even in broad daylight is amazing! I have also replacedthe LM358 with the TLV272 op-amp which is slightly better and with a faster slew rate.If you want a PCB I can send you one. I have 10 more...

author: hgg
author_rank: Frequent Contributor
timestamp: March 22, 2014, 02:26:58 pm
content: Hi,Finally the project is finished and ready to measure a lot of LCD screens !In order to solve the ground loop problem I had to use an isolated DC - DC converter.It added 30mA to the total consumption... but now the multimeter works properly.(Not really a problem though, because 18650 batteries have a lot of juice.)I have to thank you all guys for helping me! This little project and all its problems that had to besolved, forced me to learn a lot of things. Its not perfect but it works pretty well. I am using thephotodiode in its photovoltaic mode because this way it is very sensitive in low light, but I willtry another version with the diode in its photoconductive mode and faster amplifiers. I also haveto find out the cause of a resonance near 15Khz which makes it unable to measure the frequency.In the future instead of using the UT120C, I might try to build a separate frequency counter circuit.The maximum frequency I managed to measure with a pulsing LED was 85kHz but it can gohigher if you use a brighter LED pulse.Anyway, here is the finished product! Looks like it came out from an 80's lab.Its measuring a faint flashlight beam of 123.9Hz under direct sunlight.And here is how a colourful ice cube sounds like:Thanks again!George.

author: commongrounder
author_rank: Frequent Contributor
timestamp: March 22, 2014, 02:43:31 pm
content: Hey! I missed your last post after mine, but caught sight of the thread this morning. Congratulations on finishing your project! I'm glad the DC/DC converter did the trick for your meter. Even though there may not have been a measurable DC potential difference between the grounds, there must have been an AC difference that was suppressing the input signal to the meter. In any case, it looks and sounds great. I have made note of your final circuit changes, and will add them to my version.

author: hgg
author_rank: Frequent Contributor
timestamp: March 22, 2014, 03:55:53 pm
content: Hi commongrounder,Thank you.The DC/DC converter worked pretty well and with no EMF interference.I don't think that there is something similar on the market. In many LCD screen reviews I'veseen, they try to measure flickering or refresh rate with a camera with a variable shutter speed.I lot of work not accurate and for low frequencies.Portable instant and accurate measurements with the L2S....and you can listen to your monitor as well...

author: dannyf
author_rank: Super Contributor
timestamp: March 22, 2014, 09:42:18 pm
content: Cause for celebration!

author: hgg
author_rank: Frequent Contributor
timestamp: March 23, 2014, 02:11:37 pm
content: Indeed. ...and... I couldn't resist.I connected the audio output of an old laptop to a BJT driving an LED and boom, wirelessaudio transfer via lightwaves.I was really amazed by the audio sound quality !You have to carefully bias the BJT so that it only works in its active region, otherwiseyou get clipping. I will also try to drive a powerful laser and see how far I can transmitthe audio signal. With this kind of sensitivity of the L2S, I expect it to go really far.Another fun application would be to use the L2S as a wireless radio in your living room,by modulating the music on top of the LED lighting of the room.Anyway here is a sample. It really sounds much better than in the video. I've recordedit with a old video camera and the audio is coming from the L2S speaker. Since it lookslike an 80's instrument, the music is appropriate....

author: dannyf
author_rank: Super Contributor
timestamp: March 23, 2014, 02:15:38 pm
content: On that front, someone actually made a WiFi communication with led.just limitless.

author: SeanB
author_rank: Super Contributor
timestamp: March 23, 2014, 02:22:08 pm
content: Nice idea, but you chose UMG music for the clips. That will get you a note in the post from YT for that, and disabling of the video. Best is to use some copyright free music for the new upload, or to annotate it and swap the soundtrack to some other music.

author: hgg
author_rank: Frequent Contributor
timestamp: March 23, 2014, 05:08:16 pm
content: Ok, I removed the previous video and uploaded another one but with a slightly better biasing.I am still amazed by the quality of the whole system. The hissing sound is from the videocamera microphone. L2S is clear as whistle.

author: dannyf
author_rank: Super Contributor
timestamp: March 23, 2014, 05:09:50 pm
content: QuoteIt shows how insensitive our ears are in detecting distortions.Something those golden ear types will never believe.

author: hgg
author_rank: Frequent Contributor
timestamp: March 23, 2014, 06:40:06 pm
content: Believe it or not, the following music was 'beamed' from the lowly LED to the L2Susing an internet live radio stream which of course is not of the best quality.Recorded with a digital voice IC recorder connected to the line out of the L2S.http://chirb.it/dnPd4C(Listen to it from a connected stereo system and not through laptop speakers.)After 29 seconds into the song, internet connection is lost for a while.Observe the complete absence of noise.

author: commongrounder
author_rank: Frequent Contributor
timestamp: March 24, 2014, 09:25:34 pm
content: Ha! That is absolutely great! Thanks for sharing the videos. I'll have to give that a try.