micropython
micropython copied to clipboard
tutorials→music: Speaker, really?
https://github.com/bbcmicrobit/micropython/blob/v1.0.1/docs/tutorials/music.rst
It's very easy to generate bleeps and bloops from the device if you attach a speaker.
Tried it, micro:bit survived it. Then read the micro:bit schematic & NRF52833 datasheet:
- https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.3.pdf#page=145
- RING0 is directly attached to P0.02/AIN0, "standard drive".
- "standard drive" = 4 mA sink/source.
- Typical Speakers have 4…8 Ohms. (3.3 V (=VDD, worst case) -0.4V) / 4 Ohms (worst case) = 0.725 A. Factor 181.
- Did not find anything about "short circuit protection" or similar.
- Is attaching a speaker directly a good idea?
https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.3.pdf#page=156 (nRF52832) max sink current is 7 mA @ VDD=3.3V.
Funny fact about the V2 onboard Speaker demo circuit datasheet, Page 3:
- Worst case current @ 4.5 V and 16±3 Ω is 346 mA
- the 2SC3199 transistor in the circuit is capable of 150 mA
- Even if the transistor could handle 346 mA, IB should be approx. 34 mA, but then the base resistor could be (5 V(=UIN_peak) - 1 V (=UBE)) / 0.034 A = 116 Ω max.
Extrenal speakers and microbit is a bit suckling em and see. A real magnet +coil speaker requiers a reverse bias diode