Transitor and Diode Circuit to Control Fan?


I ordered some parts to get a fan to work based on cloud-driven GPIO.

As the fan is rated at 3V, I had plans to connect it directly to the Grove connector and turn it on and off that way.

Unfortunately, although I successfully tested the fan at 3V, the Grove connector is not sending enough power to the fan. I can’t figure out what the output current is of the Grove connector. If anyone knows, feed me knowledge.

I’m now looking for advice on building a circuit to use the 3.3V from the Grove connector as a trigger. I vaguely remember using transistors in my youth. I’m looking at this transistor

Would this be suitable?

My plan is to connect the transistor to a 5v input source (it’s in spec for the fan) and then use the 3V from the Grove connector to trigger the 5v output on and off.

My other option is this:

I’m thinking of connecting the 3.3v from the Grove connector to Pin 1 and the positive from my 5V power supply to pin 3, then connect the positive of the fan to pin 2. After that, I’m planning to ground the fan to the ground of the 5V power supply.

Advice? Cost is not a factor as this is a one-off project. I’d rather pay more and have it be more convenient. I found this voltage calculator for the voltage regulator above.

This one looks simpler.

I’m still trying to figure out if I need a diode in the circuit. I’m expecting that the voltage regulator will handle that. I hope.

I found that there is a kit and ordered it. However, as it takes 5-11 days to receive it, I may go to Fry’s Electronics this weekend and look for discrete parts to move the project forward faster.

I’m also looking at this kit.

As Seeed makes the Renesas S5D9 IoT Fast Prototyping Kit, there might by a way to work with Seeed and test these components for the S5D9.

Note that our friends at Medium One are working on demo code to control the PWM signal from the PMOD and also utilize the 5v from the individual pins. The current cloud-driven GPIO uses only 3.3v.


I received my Sparkfun box in the mail today.

I’ll also get several boxes of the Seeed ARDX kit.

I’m going to try and build the circuit to increase the 3.3v Grove connector signal 5v with an external power source.

I’m starting off with the 2N3904 NPN bipolar junction transistor that is included in the kit. I’ve connected the emitter to ground and am using the 1N4148 diode now. I’m using the base of the transistor to control the flow of current on the cathode.

I have a fan working on a breadboard triggered by a 3.3v signal. I switched the resistor to a 200 ohm resistor.

I was able to get the fan to work with the cloud-driven GPIO

Hardware Parts

  • S5D9 IoT Fast Prototyping Kit
  • 200 ohm resistor (probably a bit too low and a 330 ohm might be better)
  • 5 volt fan I used this one. $8 for two fans
  • 5 volt power source. I’m powering my breadboard with something like this. $5.49 with free shipping
  • 2N3904 NPN bipolar junction transistor or equivalent. I’m using this kit
  • 1N4148 diode or equivalent. I’m using the part from the kit above
  • Grove cable. I’m using 1 piece from this pack
  • Breadboard and jumper wires. You can get 4 breadboards and 120 pieces of wire in a pack like this


  • Medium One Diagnostics Intelligence S5D9 .srec binary. (free). You need an USB cable to transfer the .srec binary to your S5D9 board
  • Renesas IoT Sandbox Data Intelligence. Click here to activate the Diagnostics Intelligence Kit (free)

Completed Project and Created HowTo