Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Add and External Fan
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Add and External Fan

by tcsmedes49508 on Sat May 08, 2021 2:45 pm

I have a RPi3B+ with a PiJUice hat on it, on top of that is a 3.5" PiTFT and I have a RLT SDR connect and GLONAS GPS Dongle via USB, and all of this work fine for my ADSB tracker.

The issue I have is the SDR dongle runs very hot, and I would like to cool it with a small 3.3v fan, which I would normally plug into pins 2 and 6 on the PI, but those are covered up by the PiTFT, there is a 3.3v header at P3 on the PiJuice the bend on the plugs may be pretty tight but maybe just building jumpers using solid core wire would work, there is also a J3 header on the PiJuice that uses VSYS although I haven't been able to find any documentation on that or how it works. Really looking for ideas on how to hook up the external fan to keep the SDR cooler before I put the whole thing in a small enclosure.

Thanks in advance.

tcsmedes49508
 
Posts: 8
Joined: Wed Mar 20, 2019 9:29 am

Re: Add and External Fan

by mikeysklar on Mon May 10, 2021 6:09 pm

Interesting project. What are you doing with this combination of gear?

I would probably cheat and just purchase a USB fan from amazon.

https://www.amazon.com/dp/B0821YC2NW/re ... UTF8&psc=1

If you are using our 3.5" PiTFT there should be a second set of headers you could pull power from. Add a diode for kickback protection.

363222F6-B017-4ACF-8D81-A7B55FC1A6EF.jpeg
363222F6-B017-4ACF-8D81-A7B55FC1A6EF.jpeg (188.04 KiB) Viewed 139 times


Maybe it is overkill, but you could have a seperate fan controller or the Pi itself with a EMC2101 connected to have good thermal control so the fan is not always running. These small fans can be really loud.

https://www.adafruit.com/product/4808

mikeysklar
 
Posts: 4572
Joined: Mon Aug 01, 2016 8:10 pm

Re: Add and External Fan

by tcsmedes49508 on Sat May 15, 2021 8:31 pm

Okay, so I cheated and added a USB fan and yes that was pretty simple. Next question then becomes is there a way to turn off he power to a single USB port on the Pi 3B+. I have played a bit with hub-ctrl, and with uhubctl and it appears that I can shut down the entire 4 port hub which I don't want to do since I have an RTL-SDR and a UBlox GOS receiver plugged in to 2 of the other ports. The age of these projects and the some what confusing documentation have me a bit confused.

What I want to be able to do is run a script to shut off the port the fan is plugged into when I have the unit in the house with the enclosure open, and then run the script again to turn it on when the enclosure is closed.

And again any help on this would be appreciated.

tcsmedes49508
 
Posts: 8
Joined: Wed Mar 20, 2019 9:29 am

Re: Add and External Fan

by mikeysklar on Mon May 17, 2021 6:07 pm

@tcsmedes49508,

It's okay if you do not want to share what this project is for. I was just curious as it is an interesting mix of gear.

Glad the USB fan worked out. I had not tried those before, but figured they would be dead easy to work with.

In terms of shutting down individual ports you have the right idea with hub-ctrl. You will need to use lsusb and determine the exact BUS and DEV numbers:

https://github.com/codazoda/hub-ctrl.c

You can also specify the USB device based on the BUS and DEV numbers. Use the following command the list the currently connected devices. It's useful to run this with the device disconnected and then again with the device connected so that you can tell which device is the one you are trying to target (the Targus in my case).


Code: Select all | TOGGLE FULL SIZE
lsusb


Now that we know the BUS and DEV numbers, we can control the power using those numbers as well. Here's the command for that.


Code: Select all | TOGGLE FULL SIZE
sudo ./hub-ctrl -b 001 -d 005 -P 1 -p 0


This time we are controlling the device on BUS 001 (-b 001) device 005 (-d 005) port 1 (-P 1) and turning the power off (-p 0).

mikeysklar
 
Posts: 4572
Joined: Mon Aug 01, 2016 8:10 pm

Re: Add and External Fan

by tcsmedes49508 on Mon May 17, 2021 9:14 pm

Sorry I missed the first question. It is an ADS-B receiver feeding Flightaware and adsbexchange. It started as a small weekend project that has grown and become more of an overall learning experience.

This weekend, I mounted the whole thing inside a small plastic box to allow me to put it outside and not worry much about the weather. But when I bring it back inside with the fan running it is quite loud.

Now I am thinking about adding fan control, independent of the r pi using an EMC2101 but can't figure out what parts I need beside the 4 lead fan and EMC2101.

I had tried using the program you mentioned but I couldn't get it to shut down a single USB port, all the combinations I tried either shut nothing down or shut down all 4 of the USB ports.

Mike I know you had mentioned the EMC2101, do you have experience with the controller? I looks like I can run it with feather? Do I need anything else?

tcsmedes49508
 
Posts: 8
Joined: Wed Mar 20, 2019 9:29 am

Re: Add and External Fan

by mikeysklar on Tue May 18, 2021 11:10 am

Okay, too bad about the USB ports still being a full USB hub shutdown. I had seen mixed experiences with hub-ctrl. Some people claimed it works for a single port, others suggested it only shutdown power to everything and in some cases it was just a quick reset of the USB hub.

Moving on to adding an external fan. It is not necessary to add another Feather controller. You can use the EMC2101 directly with your Pi. If your Pi is maxed out pin wise then the feather might make more sense. Here is the guide and summary of what you need to get going.

0E939FD6-16C8-4CCC-AD2A-586F8349CA0B.png
0E939FD6-16C8-4CCC-AD2A-586F8349CA0B.png (177.22 KiB) Viewed 105 times


https://learn.adafruit.com/emc2101-fan- ... -3075972-6

Connect board VIN (red wire) to RPi 3V
Connect board GND (black wire) to RPi GND
Connect board SCL (yellow wire) to RPi SCL
Connect board SDA (blue wire) to RPi SDA
Connect board DP (orange wire) to Transistor Base
Connect board DN (gray wire) to Transistor Emitter
Connect transistor Collector (orange wire) to Transistor Base
Connect board FAN (blue wire) to fan PWM input
Connect board TACH (green wire) to fan Tach output
Connect DC jack positive pin to Fan V+ input
Connect DC jack GND to Fan V-/GND input
Connect DC jack GND to RPi GND

mikeysklar
 
Posts: 4572
Joined: Mon Aug 01, 2016 8:10 pm

Re: Add and External Fan

by tcsmedes49508 on Tue May 18, 2021 1:50 pm

I can't get to the pins on the pi, I have a pi-juice directly on the GPIO and then a 3.5" PiTFT on top of the pi-juice, with a pretty close tolerance between the 2. It may be possible to get jumpers onto the 13 pin GPIO on the PiTFT (https://www.adafruit.com/product/2441) but I haven't seen the pinouts for that connector.

I am thinking it may be nice to just have an independent fan controller in the box, and the experience of building it that's why I was leaning towards the feather.
So for a parts list:
1 X EMC2101 (https://www.adafruit.com/product/4808)
1 X Adafruit Feather RP2040 (https://www.adafruit.com/product/4884)
1 X Half size breadboard (https://www.adafruit.com/product/64)
1 X 40mm 3 or 4 wire fan
Some jumper wires

It looks like the EMC2101 plugs directly into the feather or do I need a STEMMA QT / Qwiic JST SH 4-Pin Cable? Can I power the fan from the feather USB input? So maybe I don't need the transistor? An I think I can monitor the temp with the EMC2101 and control speed with the feather?

Thanks for all the help so far.
Last edited by tcsmedes49508 on Tue May 18, 2021 2:42 pm, edited 1 time in total.

tcsmedes49508
 
Posts: 8
Joined: Wed Mar 20, 2019 9:29 am

Re: Add and External Fan

by tcsmedes49508 on Tue May 18, 2021 2:26 pm

This is what the project looks like right now, the screen is hard to read but shows a running list of the aircraft the system can see.

ADS-B.jpg
ADS-B.jpg (200.15 KiB) Viewed 101 times

tcsmedes49508
 
Posts: 8
Joined: Wed Mar 20, 2019 9:29 am

Re: Add and External Fan

by mikeysklar on Tue May 18, 2021 2:38 pm

This is a really interesting project.

The Feather RP2040 has the QT Qwiic connector so you can connect directly to the EMC2101 QT Qwiic headers. Make sure to order at least one QT cable by checking the also include box on the product page.

You also have a good thought about using the USB for power, communication and logging through the console of Pi <--> Feather RP2040.

mikeysklar
 
Posts: 4572
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.