Whilst Matilda worked on the LEDs and top panel, Hans finished off the circuits for the MOSFET power switch and connectors.
Circuit Explanation
A MOSFET is used as a low side switch to turn the power to the servo, RGB LED controller board and humidity sensor. This is connected to the Arduino output with a few extra components from the Arduino Workshop KitArduino Workshop Kit.
The gate of the MOSFET effectively acts like a big capacitor and for a short period before the transistor turns on it can draw a sizeable current. So series resistor R1 is used to limit the current drawn from the pin. A second resistor R2 sinks that charge to ground when the switch is turned off and ensures that the MOSFET remains off when the Arduino is asleep. The ratio of these two resistors needs to be high so that there's not a big voltage drop over R1, as the MOSFET will only switch on when the threshold voltage of 4v is reached. The final component is a protection diode, this dissipates the charge from any inductive loads such as the servo's motor when the MOSTFET is turned off.
Protoshield
By this point the protoshield had been through a few revisions. This was clear by the spaghetti layout of the resulting wires. The headers for the cables were also a problem and had to be bent over to allow the connectors to fit. Some of these also had to be repositioned so that they could fit around the support struts. Given that the MOSFET will mostly be off and switching infrequently, it should not be necessary to attach a heatsink.
The cable for the new knock knock sensor was also created and Hans realised that the strip board had +V, SIGNAL, GND with the protoshield had SIGNAL, +V, GND as intended so that means the cable will need to be carefully fitted in the correct orientation. Not an ideal situation but also not a complete disaster.
Top Comments