Controlling a fan/cooler

hey, can somebody give me a tip? i want to control a fan cooler using arduino, nothing very complicated, just turn on and off. Do i need a shield or anything like this? Or can i just connect the red, black and yellow wires directly in the arduino's board? Thx

A transistor or MOSFET to switch it on and off would be needed - is this a standard 12V computer cooling fan ?

Yep. standart cooler. Can u give me an example of the code? Can i use a potentiometer instead?

They are a brushless motor plus controller all on one unit. Some are controllable, some aren't, but they usually run fine from 7V upto about 15V, speed proportional to voltage - although this is a convenient way to control usually. Controllable speed ones have a pin to control them, many have a sense pin that is used on a motherboard by the bios to detect if the fan bearings have siezed up.

Simple on-off control (not PWM) is just a transistor I think (perhaps a protection diode too?)

i have two of then, one with 2 wires (black and red) and the other one with 3 wires (b,r, and yellow). i guess the last one is controlable. All i wanna do is to find a way to turn it on and of. maybe change the speed, but that's not my primary objective. just wanna know how to do this

The yellow wire on your second fan is the tacho output, not a control input. You can switch them on and off using a mosfet.

thanks bros