Notifications
Clear all

Digital Relay?

5 Posts
2 Users
1 Likes
1,445 Views
(@garnold)
Member
Joined: 5 years ago
Posts: 81
Topic starter  

I'm looking to automate this fan and could use some advice please. There are two switches that control the fan speed and leds. I'm not really too concerned with the leds but need to control the fan speed. How do I flip that speed switch with hardware? Is the only way to use a relay? I'm hoping for something a bit smaller.

IMG 20200305 130655217

 


   
Quote
(@garnold)
Member
Joined: 5 years ago
Posts: 81
Topic starter  

Sorry, when I meant "flip that switch" was hoping to replace it with something that I could control with an Arduino.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1121
 

If that is a mains powered fan then I think a relay is the way to go, and its probably best to get one on a board with all the circuitry and pins to connect your Arduino to.   If its some low voltage fan then you could use some transistors or mosfets as a switch to a suitable power supply.  DroneBots had a good video on this a short while ago.


   
ReplyQuote
(@garnold)
Member
Joined: 5 years ago
Posts: 81
Topic starter  

@byron

The fan runs off of a USB plug so thinking it's only using 5volts. I think I'll use a fet to turn the power on and off but I need to figure out the switch. So this switch does not actually turn the fan on and off but switches between high and low. I'm still quite new to the hardware world and reading more about transistors. From what I'm reading a transistor can be used as a switch and I didn't know that. I'm guessing that might be a way to go?


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1121
 

The Aurduino can output 5v from its pins, but not much current. Check on the amperage requirement of the fan and compare that to the max amperage output of an Arduino pin.  You probably need to make an Arduino pin go low or high to switch a transistor on or off that will send power to your fan from a 5 volt supply external to the Arduino.   Now sit back and enjoy this Dronebot workshop video I link to below.  You will soon feel like an expert.  (Good old DroneBots he does this sort of thing so very well)


   
garnold reacted
ReplyQuote