4

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.

Circuit of the fan connected to arduino. Fogger was hooked up the same way

I know that there is a resistor missing in the photo, I forgot to put it back in when I took it.

How it actually looked - but missing a resistor which I forgot to add in this (Refer to circuit)

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.

enter image description here

Thanks in advance!

1
  • 3
    the fan red wire is not connected to any part of the circuit
    – jsotola
    Dec 21, 2021 at 21:23

2 Answers 2

7

About the ultrasonic fogger:

The product description is misleading. This is a pure transducer. That means it does not generate its own ultrasonic frequency and is thus not DC. You need to provide an AC voltage at the frequency of 113kHz (though one reviewer states to have received products with a resonance frequency of 108kHz. Maybe just try out what you have). You can use utilize Timer1 to generate a fitting square wave at one of its output compare pins.

Note: Since you are more at the lower end of the foggers voltage rating you might see a bad performance when you get it to work. For it to work with its full power you should probably drive it with 12V, utilizing its full range.

About the fan:

As jsotola already stated in the comments, the red wire of the fan is not connected to the circuit. If you look at your breadboard you will see that the blue and red lines are interrupted in the middle of the breadboard. This means, that the rails are disconnected here (divided into the left and the right part of the breadboard). Move the red fan cable to the left of the red LED jumper wire. Then you should be connected.

1
  • Oh boy, now I feel dumb. Seems like I never used so much space on the breadboard before to notice this. I'll try your suggestions and hope that the fogger has enough power at 5V - or else get higher voltage power source for it! Thank you so much for the quick help
    – crabdance
    Dec 21, 2021 at 22:15
0

In regards with your schematics

  1. Are you sure you want your stuff working only when both D3 and D5 are up? Because it seems to me you connected them in series, so if one transistor is down, nothing's gonna work.

  2. check the power rating of the ultrasonic transducer, if you get your power source from the computer USB port, you will get at best about 2.2W from the 5V pin. It may turn out that it may be insufficient to produce any notable effect from the transducer with that, especially if you have the fan powered too.

2
  • Most modern PC USB ports (except maybe a laptop running very conservative power settings) will merrily provide at least 5V1A despite lack of negotiation. Even if it runs through the regulator (though I think USB power in usually doesn't), that gives us 800mA - 50mA for the arduino = 750mA * 5V = 3.75W. The transducer is rated 1.5W and the fan is likely 1.0-1.5W, so there's plenty of headroom.
    – Doktor J
    Dec 22, 2021 at 15:27
  • You're right, I meant to put them in parallel and completely messed up the second circuit drawing in my panicky state yesterday! Thanks for pointing this out.
    – crabdance
    Dec 23, 2021 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.