This week, I learned how to use the solenoid among the DC motors and created a simple weather indicator.
I felt the cheerful sound of a solenoid moving resembled an alarm.
This alarm device provides a cute display in binary form, indicating only whether one should bring an umbrella or not.
I thought I had correctly wired the transistor and diode, but it didn't work at all. It worked only when I ignored both elements. I suspected that the resistance amount of the transistor was too high, causing insufficient current.
With the help of TA Zhenfang, I learned that to reach the required current of 1.1A for the solenoid used in class, the voltage assigned to the transistor needed adjustment. Using a 1000Ω resistor, the solenoid current only reached a mere 3.3mA (3.3V/1000Ω). Meaning, I decreased the resistance to increase the entire current and reduced the voltage consumed by the transistor to increase the voltage allocated to the solenoid.
Even reducing it to 47Ω (70mA, Solenoid allocated voltage 4.8V according to Zhenfang), only faint sound was heard, and it didn't work. However, a 30Ω resistor worked. Referring to the collector saturation region graph from the transistor specification, 30Ω allows 110mA (3.3V/30 Ω), the voltage allocated to the transistor subtly decreases resulting in increasing the voltage size for the solenoid.
When the Solenoid is High(1), it indicates clear weather, and when it's Low(0), it represents cloudy weather. I designed it with a paper box layer covering it to minimize interference with the operation of the solenoid.
Whenever I clicked the particle.functions(Sunny, Raining) it shifts the weather display.