User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Sun Dec 09, 2018 4:34 am

tlfong01 wrote:
Sat Dec 08, 2018 4:58 am
Amazon Radio Shack 12VDC Mini Buzzer by Radio Shack - Price: USD$29.99
https://www.amazon.com/RADIO-SHACK-12VD ... B01BH0I5SU
How Doorbells Work - How stuff works
https://home.howstuffworks.com/home-imp ... rbell2.htm

Rpi/ESP8266 GPIO Compatible 3V Buzzer Operating Current Checking Notes
...
Attachments
buzzer_test_2018dec0901.jpg
buzzer_test_2018dec0901.jpg (193.27 KiB) Viewed 1073 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Sun Dec 09, 2018 9:09 am

tlfong01 wrote:
Sun Dec 09, 2018 4:34 am
Rpi/ESP8266 GPIO Compatible 3V Buzzer Operating Current Checking Notes[/color]

Buzzer Testing Notes

Buzzer Youtube (2kHz, 10sec)
https://youtu.be/NpFtCe2kd-A

Errata 2018dec11hkt1353 - CS9012 should read CS9014 NPN BJT. My apologies!

/ to continue, ...
...
Attachments
buzzer_test_2018dec1101.jpg
buzzer_test_2018dec1101.jpg (170.92 KiB) Viewed 959 times
Last edited by tlfong01 on Tue Dec 11, 2018 5:54 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 4:49 am

tlfong01 wrote:
Sun Dec 09, 2018 9:09 am
tlfong01 wrote:
Sun Dec 09, 2018 4:34 am
Rpi/ESP8266 GPIO Compatible 3V Buzzer Operating Current Checking Notes[/color]
Buzzer Testing Notes
Buzzer Youtube (2kHz, 10sec)
https://youtu.be/NpFtCe2kd-A

Buzzer Circuit (50% sure, guess welcome!)

/ to continue, ...
...
Attachments
buzzer_cct_2018dec1004.jpg
buzzer_cct_2018dec1004.jpg (184.62 KiB) Viewed 1023 times
I am an electronics and smart home hobbyist.

User avatar
Burngate
Posts: 5780
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 10:06 am

That diagram looks wrong - have you swapped collector and base?

pcmanbob
Posts: 5494
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 10:59 am

I think your buzzer diagram should look some thing like this.

Image

you may find the contact ( clapper in your diagram ) is actually normally closed and opens on coil being energised.
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 11:47 am

Burngate wrote:
Mon Dec 10, 2018 10:06 am
That diagram looks wrong - have you swapped collector and base?
Actually I double checked. Let me checked one more time.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 11:56 am

pcmanbob wrote:
Mon Dec 10, 2018 10:59 am
1. I think your buzzer diagram should look some thing like this. ...
2. you may find the contact ( clapper in your diagram ) is actually normally closed and opens on coil being energised.

1. Your diagram looks OK. I guess I made a careless mistake somewhere.

2. Ah, that is important, otherwise it won't start. I did not think of that. I wrongly thought that no initial condition was necessary, either way (NO or NC) it will start.

3. I have actually carelessly broken the connections of the coil (glued tightly to the metal base) and cannot trace back them now. So I am making guesses. I once also wrongly thought that without clapper it will also oscillate, so I googled for oscillator with one transistor, one resistor, and one coil, but I could not find any, usually there is a capacitor.

4. Anyway, I will check the connections again.
Last edited by tlfong01 on Tue Dec 11, 2018 5:38 am, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Mon Dec 10, 2018 12:50 pm

pcmanbob wrote:
Mon Dec 10, 2018 10:59 am
4. Anyway, I will check the connections again.

It took me almost 30 long minutes to use my multi-meter to trace the connections. Now I know how to look at the green traces (before they were my blind spots).

There is one final piece of jig jaw I could not complete. That is the point y, which seems not connected to anything. Is this y connected to the clapper?


I am a bit tired and decided to give up. Perhaps someone can help. ;)
...
Attachments
buzzer_cct_2018dec1005.jpg
buzzer_cct_2018dec1005.jpg (166.2 KiB) Viewed 982 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Wed Dec 12, 2018 12:36 pm

tlfong01 wrote:
Mon Dec 10, 2018 12:50 pm
It took me almost 30 long minutes to use my multi-meter to trace the connections.
There is one final piece of jig jaw I could not complete. That is the point, which seems not connected to anything. Is this y connected to the clapper?
I am a bit tired and decided to give up. Perhaps someone can help. ;)

The buzzer has TWO coils!

When I tore down the first buzzer, I did not look carefully before removing the glued coil with magnet, so afterwards I could no longer trace how the coil was connected. Now I carefully opened up another buzzer and zoomed in the coil. I found there are actually two coils, or 4 wires connected to the PCB, as displayed below.
...
Attachments
buzzer_cct_2018dec1201.jpg
buzzer_cct_2018dec1201.jpg (146.64 KiB) Viewed 950 times
Last edited by tlfong01 on Thu Dec 13, 2018 1:28 am, edited 2 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Wed Dec 12, 2018 1:04 pm

tlfong01 wrote:
Wed Dec 12, 2018 12:36 pm
The buzzer has TWO coils!

Buzzer PCB Tracing Now 70% sure, Guessing Schematic and Circuit Analysis Welcome!

By the way, I also found that the clapper is not electrically connected to anything. I checked with a scope that the circuit still oscillates even when the top plastic cover with the clapper has removed! :mrgreen:

...
Attachments
buzzer_cct_2018dec1202.jpg
buzzer_cct_2018dec1202.jpg (151.56 KiB) Viewed 943 times
Last edited by tlfong01 on Thu Dec 13, 2018 1:25 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
Burngate
Posts: 5780
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Detect current on Raspberry pi

Wed Dec 12, 2018 6:49 pm

Am I being thick?
The two photos of the board seem to be different!

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 1:05 am

Burngate wrote:
Wed Dec 12, 2018 6:49 pm
Am I being thick?
The two photos of the board seem to be different!

Yes, they ARE different. Actually before submitting my last post, I did hesitate to add the remark that they are different. But I didn't, for a couple of reasons:

1. Again it took me 20 long minutes to trace the PCB traces. I was a bit tired, and it was getting late, so as usual (dinner time, bed time etc) I called it a day early.

2. Let's don't get physical, you know what I mean. :lol:
https://www.youtube.com/watch?v=6zwPVU92-XQ

3. I found a couple of buzzers in my junk box, some broken, some not, and I mixed up all of them. Now I took a group picture, as displayed below.

4. Guess reasons welcome! :mrgreen:


TaoBao buzzers

(rectangular CN¥1.68) https://item.taobao.com/item.htm?spm=a2 ... t=9#detail

(all) https://s.taobao.com/search?spm=&_tb_to ... ce=suggest
...
Attachments
wht_and_blk_buzzers_2018dec1301.jpg
wht_and_blk_buzzers_2018dec1301.jpg (173.24 KiB) Viewed 850 times
Last edited by tlfong01 on Thu Dec 13, 2018 12:24 pm, edited 2 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 7:06 am

tlfong01 wrote:
Wed Dec 12, 2018 1:04 pm
By the way, I also found that the clapper is not electrically connected to anything. I checked with a scope that the circuit still oscillates even when the top plastic cover with the clapper has removed!
...

Look Ma, No Clapper!

Now the CS9014 collector output drives a MAX9812 microphone amplifier whose output in turn drives an 8 Ohm speaker.

(No Clapper Buzzer Youtube) https://youtu.be/WkSjsbY6dSY
...
Attachments
no_clapper_buzzer_2018dec1302.jpg
no_clapper_buzzer_2018dec1302.jpg (147.39 KiB) Viewed 876 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 11:19 am

tlfong01 wrote:
Wed Dec 12, 2018 1:04 pm
By the way, I also found that the clapper is not electrically connected to anything. I checked with a scope that the circuit still oscillates even when the top plastic cover with the clapper has removed!

Buzzer CS9014 collector and case voltage waveform

I applied 5V to the buzzer, and found CS9014 collector voltage peaks to 25V!
...
Attachments
buzzer_test_2018dec1301.jpg
buzzer_test_2018dec1301.jpg (167.99 KiB) Viewed 861 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 11:42 am

tlfong01 wrote:
Thu Dec 13, 2018 11:19 am
tlfong01 wrote:
Wed Dec 12, 2018 1:04 pm
By the way, I also found that the clapper is not electrically connected to anything. I checked with a scope that the circuit still oscillates even when the top plastic cover with the clapper has removed!

Buzzer CS9014 collector and case voltage waveform

I applied 5V to the buzzer, and found CS9014 collector voltage peaks to 25V!
...

CS9014 Collector, Base, and Diode Anode voltage waveforms
...
Attachments
buzzer_test_2018dec1303.jpg
buzzer_test_2018dec1303.jpg (182.69 KiB) Viewed 854 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 12:45 pm

tlfong01 wrote:
Thu Dec 13, 2018 1:05 am
Burngate wrote:
Wed Dec 12, 2018 6:49 pm
Am I being thick? The two photos of the board seem to be different!
Yes, they ARE different.


Now the old one again
...
Attachments
buzzer_2018dec1301.jpg
buzzer_2018dec1301.jpg (155.29 KiB) Viewed 848 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 1:04 pm

tlfong01 wrote:
Thu Dec 13, 2018 12:45 pm
tlfong01 wrote:
Thu Dec 13, 2018 1:05 am
Burngate wrote:
Wed Dec 12, 2018 6:49 pm
Am I being thick? The two photos of the board seem to be different!
Yes, they ARE different.

Now the old one again
...



90% sure, guess schematic and oscillator circuit analysis welcome! :mrgreen:
...
Attachments
buzzer_2018dec1302.jpg
buzzer_2018dec1302.jpg (170.5 KiB) Viewed 843 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Thu Dec 13, 2018 2:37 pm

tlfong01 wrote:
Thu Dec 13, 2018 1:04 pm
90% sure, guess schematic and oscillator circuit analysis welcome!

Hartley Oscillator

One thing I don't understand is that the buzzer has two coils but no capacitor. So it is sort of half Hartley oscillator, which has two coils and one capacitor.

I guess Hartley uses inductors and capacitors to form a resonance circuit, which does not consume that much energy. But for the buzzer, perhaps wasting energy is not a concern. Less component count is. So I guess the buzzer does not have any resonance circuit, but only positive feedback, which I think is not a resonance circuit. Anyway, I don't even fully understand the resonance thing, (or the mysterious tuning fork). So I need to do some hard googling.

(Resonance Circuit Show) https://en.wikipedia.org/wiki/File:Tune ... _300ms.gif


Hartley oscillator - Wikipedia

The Hartley oscillator is an electronic oscillator circuit in which the oscillation frequency is determined by a tuned circuit consisting of capacitors and inductors, that is, an LC oscillator. The circuit was invented in 1915 by American engineer Ralph Hartley. The distinguishing feature of the Hartley oscillator is that the tuned circuit consists of a single capacitor in parallel with two inductors in series (or a single tapped inductor), and the feedback signal needed for oscillation is taken from the center connection of the two inductors.

Ralph Hartley - Wikipedia

Ralph Vinton Lyon Hartley (1888 - 1970) was an electronics researcher. He invented the Hartley oscillator and the Hartley transform, and contributed to the foundations of information theory ... ... formulated the law "that the total amount of information that can be transmitted is proportional to frequency range transmitted and the time of the transmission." His 1928 paper is considered as "the single most important prerequisite" for Shannon's theory of information..


Tank Circuit - Wikipedia

An LC circuit, also called a resonant circuit, tank circuit, or tuned circuit, is an electric circuit consisting of an inductor, represented by the letter L, and a capacitor, represented by the letter C, connected together. The circuit can act as an electrical resonator, an electrical analogue of a tuning fork, storing energy oscillating at the circuit's resonant frequency.

...
Attachments
hartley_oscillator_2018dec1301.jpg
hartley_oscillator_2018dec1301.jpg (149.59 KiB) Viewed 812 times
Last edited by tlfong01 on Sat Dec 15, 2018 4:56 am, edited 2 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Fri Dec 14, 2018 6:28 am

tlfong01 wrote:
Thu Dec 13, 2018 2:37 pm

90% sure, guessing schematic and brainstorming oscillation circuit analysis welcome
...
Attachments
buzzer_control_2018dec1401.jpg
buzzer_control_2018dec1401.jpg (164.5 KiB) Viewed 792 times
I am an electronics and smart home hobbyist.

User avatar
Burngate
Posts: 5780
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Detect current on Raspberry pi

Fri Dec 14, 2018 9:51 am

My guess would be that the resistor should be feeding the base, not the collector, so the coil connections are somewhat different from that - it may not be obvious which of the four wires is connected to which other. Only a meter can tell you that.

And I'm still not sure what the diode's doing, that way round.

Oh, how I wish teleportation worked.
I'd teleport it over to my desk, meter it out myself, then teleport it back, complete with a diagram.
Save everyone a lot of time.
Same goes for many of the problems posted here, as with many problems in life - trying to guide my aged MiL through her problems over the phone wastes so many hours; just showing her would be so much easier.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Fri Dec 14, 2018 1:42 pm

Burngate wrote:
Fri Dec 14, 2018 9:51 am
My guess would be that the resistor should be feeding the base, not the collector, so the coil connections are somewhat different from that - it may not be obvious which of the four wires is connected to which other. Only a meter can tell you that.

Ah, my meter tells me that my schematic is fake, go back to the drawing board! :mrgreen:
...
Attachments
buzzer_2018dec1401.jpg
buzzer_2018dec1401.jpg (180.85 KiB) Viewed 766 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Fri Dec 14, 2018 1:54 pm

tlfong01 wrote:
Fri Dec 14, 2018 1:42 pm
Ah, my meter tells me that my schematic is fake, go back to the drawing board!

Yet another drawing

I am losing confidence, so only 70% sure. :lol:

...
Attachments
buzzer_cct_2018dec1402.jpg
buzzer_cct_2018dec1402.jpg (172.35 KiB) Viewed 762 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Sat Dec 15, 2018 9:12 am

tlfong01 wrote:
Fri Dec 14, 2018 1:54 pm
Yet another drawing
I am losing confidence, so only 70% sure. :lol:

Buzzer CS9014 collector, base, Diode anode waveforms

1. Clapper removed.

2. Microphone amplifier and loudspeaker not connected.

...
Attachments
buzzer_wave_2018dec1501.jpg
buzzer_wave_2018dec1501.jpg (178.77 KiB) Viewed 724 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Sat Dec 15, 2018 12:56 pm

tlfong01 wrote:
Thu Dec 13, 2018 2:37 pm
Hartley Oscillator
One thing I don't understand is that the buzzer has two coils but no capacitor.
I guess Hartley uses inductors and capacitors to form a resonance circuit, which does not consume that much energy. So I guess the buzzer does not have any resonance circuit, but only positive feedback, which I think is not a resonance circuit. Anyway, I don't even fully understand the resonance thing, (or the mysterious tuning fork). So I need to do some hard googling.
Hartley oscillator - Wikipedia
The Hartley oscillator is an electronic oscillator circuit in which the oscillation frequency is determined by a tuned circuit consisting of capacitors and inductors, that is, an LC oscillator. The distinguishing feature of the Hartley oscillator is that the tuned circuit consists of a single capacitor in parallel with two inductors in series (or a single tapped inductor), and thefeedback signal needed for oscillation is taken from the center connection of the two inductors
Tank Circuit - Wikipedia
An LC circuit, also called a resonant circuit, tank circuit, or tuned circuit, is an electric circuit consisting of an inductor, represented by the letter L, and a capacitor, represented by the letter C, connected together. The circuit can act as an electrical resonator, an electrical analogue of a tuning fork, storing energy oscillating at the circuit's resonant frequency.

Pre-requisites for guessing how the weird buzzer oscillates

After googling a while, I concluded that I don't have enough knowledge to educationally guess why the buzzer oscillates. I think I need to first learn at least the following elementary things before making any educational guesses.

I found the tutorial from Electronics Tutorials is very good.

LC Oscillator Tutorial and Tuned LC Oscillator Basics - Electronics Tutorials
https://www.electronics-tutorials.ws/os ... ators.html

The tutorial starts with a couple of introductory paragraphs followed byt eh attached block diagram. The paragraphs are a very concise summary of ALL the important features of an oscillator. I need to read them more than 10 times before I can get a very rough idea of the operation. I think I need to later reason and memorize of at least the following important points:

1. Why positive feedback is needed.
2. Why overall network gain (not open amplifier gain) must be close to, or unity.
3. Why an amplifier such as a transistor is required.
4. Why the resonator losses can be overcome by using capacitor and inductors (this is the part I never had understood, and I need to try harder again! :mrgreen: )


/ to continue next post, ...
...
Attachments
osc_block_diagram_2018dec1601.jpg
osc_block_diagram_2018dec1601.jpg (24.24 KiB) Viewed 664 times
Last edited by tlfong01 on Sun Dec 16, 2018 8:35 am, edited 9 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Detect current on Raspberry pi

Sun Dec 16, 2018 4:44 am

tlfong01 wrote:
Sat Dec 15, 2018 9:12 am
tlfong01 wrote:
Fri Dec 14, 2018 1:54 pm
Yet another drawing
I am losing confidence, so only 70% sure. :lol:
Buzzer CS9014 collector, base, Diode anode waveforms
1. Clapper removed.
2. Microphone amplifier and loudspeaker not connected.

...

Will the 25V peak oscillation of the 5V buzzer fry my Pi?

It is weird that the CS9014 collector has a 25V peak, 1kHz signal. I originally thought that there should be a nice looking, smooth 1kHz or 2kHz 5V sinusoidal.

One thing I worried was that if I used Rpi/ESP8266/MCP23017 GPIO to source drive the buzzer, would the 25V peak spear like signal pierce the 5V/3V3/ driving source and fry the pi (I already had one Rpi3B fired, very likely because of a non thoughtful, carelessly supplied 7.5V power source. :( )

So I used the 4th channel of my Xmas 2018 gift, a ¥2,320 Rigol DS1054Z scope to check out. I was happy to find that I over worried, the Vcc from the XLsemi XL4015 5V 5A PSU is very regulated, does not show even a slight glitch. But then is Rpi GPIO as strong?


...
Attachments
buzzer_waveforms_2018dec1601a.jpg
buzzer_waveforms_2018dec1601a.jpg (202.15 KiB) Viewed 683 times
I am an electronics and smart home hobbyist.

Return to “Beginners”