I was given an Arduino Uno as a gift and have been toying around with it.
I am comfortable with the programming side of things, however my knowledge in electronics and circuits is non-existant.
I have tried reading about my following question but I find I end up not really knowing if I actually found the right solution or not so I decided I'd ask here hoping for some help (and keep this as short as possible).
Simply put, I have a Rasberry Pi powered by it's own PSU connected to the Uno, talking and powering via USB. All working fine.
I also have a 4 pin 12v computer fan that I took from an unused computer which after some investigation managed to power up using an ac power adapter I had lying around.
From my research I found out I should be able to adjust speeds using the PWM pin with the arduino. I'm yet to figure out how to do that but I feel that I understand the coding needed behind the pins in order to provide the result I expect. But, I am really unsure about how to connect everything without causing any damage.
Is it just a matter of keeping the arduino powered by the pi (which will be connected in my final setup anyway), powering the fan through the second adapter and connecting the PWM cable to the Arduino directly?
I sometimes read about people connecting fans to arduinos and use resistors and diodes and that confuses me...
Thanks for your help!