How to Make a Timed Air Ventilator

Need to ventilate a room? This article will show you how I made a relay-operated, GPS-timed fan to vent out the moist air in my boat’s cabin. It is controlled with a PIC16F628A and has an LCD.

Let The Air Flow

In small rooms where there is little to no ventilation, air tends to stand still. If the air is a little moist, you’ll definitely have mold and fungi in certain places.


Mold and fungi are found in nature and are necessary to break down leaves, wood, and other plant debris. Since I’ve got a whole lot of wood in my boat, I will certainly have mold and fungi there. I cannot prevent them from coming in, but I can take some measures to try to keep the environment inside my boat as hostile for the mold and fungi as possible.

There are at least two ways to deal with this. One way is to wash and clean on a tight schedule. Now, how fun is that? Being the geek that I am, I nerded something up instead: a fan which circulates and vents out the moist air on a fixed, timed basis.

Designing the System

I want the system to do the following:

  • Circulate the air
  • Automatically turn on/off, in a steady interval
  • Run from a car battery
  • Contain a battery charger to charge the battery
  • Contain a display that shows time and other info


To make such a system, I’ll need the following parts:

  • A 12v fan
  • A microcontroller
  • A 12v battery, and a 12v battery charger
  • 2 relays, something to track time and screw terminals.
  • Other parts, according to part list below


I want the fan to run for five minutes each hour. That will be hard coded in the software.

The setup will run from a car battery. My fan is rated 12v 4.5A. To ensure that the battery is always top-charged, I’ll connect it to a battery charger. To ensure that the battery charger is not overloaded when the fan is running, I’m going to make the system “disconnect” the charger while the fan is running. One relay will operate the fan, and the other relay will operate the battery charger. When the fan is running, the battery is not charged, and when the fan is not running, the battery is charged.

To keep track of time, I’m using a GPS module. In this project, I’ll use the Skylab SKM53-series module (PDF). This unit sends several NMEA sentences over UART each second. The datasheet recommend to use a 10K pull-up resistor on both RXD and TXD. This will increase the serial data stability. I did not do that, and I’ve not noticed any instability. I might be lucky. On the same page in the datasheet it says that suitabe decoupling capasitors should be added. A 10uF electrolytic and a 0.1uF ceramic. When I breadboarded the circuit, I used only a 0.1uF ceramic.

Scroll to Top
Scroll to Top
Read previous post:
Basics of the SPI Communication Protocol
Basics of the SPI Communication Protocol

When you connect a microcontroller to a sensor, display, or other module, do you ever think about how the two devices talk to each...