I know the whole controlling a fan with an arduino thing is getting old, but somehow I still don't get it to work. Tried to answer it based on other questions but I am too much of a newbie to extrapolate the info there to my specific problem.
For my project of building an arduino-controlled mushroom grow box, I need to control a PC fan and ultrasonic fogger. I chose these two products:
DC 3-12V Ultrasonic Fogger, DC 5V Fan
I hoped that by using 5V devices, I could connect them to the 5V pin of the arduino to power them. However, with the whole setup (see circuit and photo), they don't run. I'm using a BC337 transistor. I tried them both separately, but nothing.
I know that there is a resistor missing in the photo, I forgot to put it back in when I took it.
The fan works if I just insert it between 5V and GND but the fogger doesn't do anything.
The code works (and is fairly hard to mess up) but I'm including it anyway.
const int fan = 3;
void setup() {
pinMode(fan, OUTPUT);
}
void loop() {
digitalWrite(fan, HIGH);
}
Do I need a higher voltage power supply or is something wrong with my transistor choice? Which parts would be a better fit? Or am I entirely on the wrong track?
In the end the full thing should also contain an LCD display and a SCD41 sensor, both connected via I2C.
Thanks in advance!