Author Topic: Pulsing Light Amplifier - (Frequency Meter) - COMPLETED!  (Read 28867 times)

0 Members and 1 Guest are viewing this topic.

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #25 on: October 05, 2013, 01:05:36 pm »
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? 
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #26 on: October 05, 2013, 04:19:36 pm »
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 measure
the pulsing frequency to be 100Hz!  When I measure TV sets and monitors
that 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 off
a perfect sine wave while all the other sources give more of a pulse?

I cannot explain it.
Any suggestions???
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #27 on: October 05, 2013, 04:25:59 pm »
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.
================================
https://dannyelectronics.wordpress.com/
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #28 on: October 05, 2013, 04:45:06 pm »
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?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #29 on: October 05, 2013, 06:15:11 pm »
Quote
Shouldn't I observe the same effect in the case of a PWM light pulse with 50% cycle?

When 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+.
================================
https://dannyelectronics.wordpress.com/
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #30 on: October 05, 2013, 06:46:47 pm »
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 get
negative values as well from -V to +V.  Why do I get negative values with the main lamp  ???

Duty cycle with the mains lamp is measured correctly at 50%

What meter is that ?  Interesting.
Did you actually test it with a signal generator?

 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #31 on: October 05, 2013, 09:50:07 pm »
It is one of those VC-something meters. I thought that they also make one that goes to 30Mhz or so.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #32 on: October 05, 2013, 09:51:34 pm »
Quote
The output of the BPW34 diode is decoupled with a capacitor

I don't know how you decouple the diode - they are typically dc coupled to an opamp. A schematic would help I guess.
================================
https://dannyelectronics.wordpress.com/
 

Offline mamalala

  • Supporter
  • ****
  • Posts: 777
  • Country: de
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #33 on: October 05, 2013, 09:58:43 pm »
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 get
negative values as well from -V to +V.  Why do I get negative values with the main lamp  ???

Quite 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 first ;)

Greetings,

Chris
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #34 on: October 06, 2013, 05:25:03 am »
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 with
the 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 10Khz
Do 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 that
way 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 back
to zero.

Anyway, now it makes perfect sense that the incandescence lamp is pulsating at 100Hz
and with minimal ripple.  That's why they are the best lights for your eyes and brain...
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #35 on: October 06, 2013, 10:36:22 am »
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 amp
as the reference voltage I get 50mA!  I became aware of that because the two resistors
were getting a little hot, not a lot though.  I am also using the IN5819MIC diode at the input
of the detector.

The other op amp circuit that drives the BPW34 photo resistor draws less than 20mA.

Is that normal?


Peak Detector
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4706
  • Country: au
  • Question Everything... Except This Statement
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #36 on: October 06, 2013, 10:41:35 am »
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,
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #37 on: October 06, 2013, 11:02:18 am »
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!
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #38 on: October 06, 2013, 11:48:13 am »
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 Light

Great, thank you for your help.
Now I need to design a board and put all the components in the black box.   :)

« Last Edit: October 06, 2013, 01:20:21 pm by hgg »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #39 on: October 06, 2013, 11:52:15 am »
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).
================================
https://dannyelectronics.wordpress.com/
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #40 on: October 06, 2013, 01:21:36 pm »
dannyf Thank you.
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter) *UPDATE*
« Reply #41 on: October 11, 2013, 04:14:02 pm »
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 LM358P
which has a broader choice of supply voltages.   I am using now a 9V battery that gives me a wider
voltage range making the UT102C “more” sensitive.  I’ve also replaced the feedback resistor with a 4K
one for more amplification.  Now the circuit can read the frequency of a mobile phone screen in broad
daylight.  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 directly
above the diode…

Then it struck me!  What about if you can also hear the light source?  I connected the output of the small
circuit 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!  (depending
on 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 decent
video camera)



The LM386N datasheet states that the absolute maximum of the inputs voltage is 400mA.  My question
is, what happens if you exceed that limit?  Is there any danger of destroying the thing?  I have measured
the maximum peak to peak voltage from the preamp and I have used a voltage divider on its output to
the LM386N just to be sure.

Below is the revised circuit schematic:


free image hosting

My other question is that while the whole thing works very well, when I connect the output of the
preamp to the input of the amp, the signal gets distorted.  It has some small peaks and valleys, it gets
attenuated a bit and phase shifted as well !  The photodiode amplifier outputs a perfect sine wave if the
LM386N is not connected.   (mains light source)

The probing points are:  Output of C1 for the yellow signal (photodiode amp) and Output of C5 for the
blue signal (amp).


Preamp signal only


Preamp & Amp

Is 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!

 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4706
  • Country: au
  • Question Everything... Except This Statement
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #42 on: October 11, 2013, 10:05:45 pm »
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,
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #43 on: October 11, 2013, 10:38:54 pm »
Quote
voltage is 400mA

I submit it for your re-consideration, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #44 on: October 12, 2013, 05:16:28 am »
Hello Rerouter,

You are right about the photodiode.  Its in its photovoltaic mode.  The funny thing though is if
I turn it around, the circuit works exactly the same...  :-//

It looks like that the speaker output cap C5 causes the phase shift.


Speaker not connected


Speaker connected after C5


Speaker connected before C5

In 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.

Quote
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,
The circuit draws 4mA with no pulsing light source and 80mA at its maximum....  but if I don't use C5 then
you are right, it draws some 100's of milli-amps.  Having said that, the circuit looks like it creates some
huge current spikes because although it draws 80mA maximum if I use OCP at the power supply and
a 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... :))

Quote
I submit it for your re-consideration, :)
dannyf what do you mean?  To try it out?...  :)
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #45 on: November 03, 2013, 10:25:04 am »
Hi,

The light amplifier and frequency meter works quite nicely measuring accurately any kind of
pulsing light of any frequency and intensity.  I found out that the best way to implement a
volume control is to put a pot in series with the photodiode. 
  Actually the best way
was 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 a
headphones jack connected at the output of the photodiode pre-amplifier.  Its extremely
sensitive and with the headphones you can detect even the slightest variance in a light
pulse.

The only problem is that when you power the circuit on, the output of the LM386 that drives
the 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)


Spikes

The 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?

« Last Edit: January 20, 2014, 04:50:52 pm by hgg »
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #46 on: November 03, 2013, 01:19:34 pm »
I have just replaced the 47uF capacitor that I had between ground and Vcc with a 3300uF and the
problem was solved.

I am not sure if there is any better way.
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #47 on: November 10, 2013, 01:40:11 pm »
Hi,

I would like to be able to connect the photodiode to the circuit with a 50cm external cable
but I am having 50hz noise interference problems.

290mVpp without any pulsing light input...

Noise with no signal

and 912mVpp if I cover the cable with my hand!

Noise while covering the cable with my palm

The noise arises only when I connect the cable to the inverting input of the LM358
and the photodiode is setup up in photovoltaic mode between the inverting and the non
inverting inputs. I don't have such problems with the photodiode directly attached to the
breadboard.


Schematic



I am using the cable shown below:

Cable end


Photodiode

How 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.
 

Offline commongrounder

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: us
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #48 on: November 27, 2013, 07:11:58 pm »
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! :)
 

Offline hggTopic starter

  • Frequent Contributor
  • **
  • Posts: 970
  • Country: gr
Re: Pulsing Light Amplifier - (Frequency Meter)
« Reply #49 on: January 20, 2014, 04:31:37 pm »
Hello commongrounder,

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 that
the signal got distorted when connecting the speaker, but that
was solved by replacing resistors R4 & R5 with x10 their values.

The only problem I could not solve and I don't understand is
why 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf