This page contains notes and ideas for the Dr Who themed sound and light box that Chris is building.
All of the logic and circuitry connected to the Raspberry Pi runs at 3V3 and is powered directly from the Pi. All “peripherals” (LEDs etc) are run at 5V and powered externally. Grounds need to be tied together, obviously.
Fairly standard stuff consisting of a 10kΩ pull-up resistor, connected via 1kΩ to the +ve leg of a 4.7μF capacitor and to the input of an inverting Schmitt trigger. Closing the switch pulls the capacitor low and the output of the Schmitt trigger goes high which is detected at the Pi.
BC337 NPN Transistor Calcs
These simple transistors are used to switch on the various LEDs. Need to work out what base resistors to use, consider 4 cases:
- 1 x RGB LED boards, 100mA
- 2 x RGB LED boards, 200mA
- 10mm LED, 70mA
- 2 x 10mm LED, 140mA
Turn the handle…
- Voltage across base resistor:
- Minimum current gain:
- Minimum current at base (for 200mA):
- Aim for 10mA so need resistor
So, in all cases, a 470Ω resistor would do.
These all have a suggested forward current of 65-75mA so we’ll go with 70mA. Forward voltage for red is 2.1V and 3.0V for white, green, blue. This gives a resistor value for red of 47Ω and 33Ω for the rest.
Hmmm, datasheets show ranges for forward voltage. I should probably measure the actual number for completeness.