The original KICAD schematic files are available on the Downloads page.
The software used to create the schematics and PCB can be downloaded from here. There is both a Windows and Linux version available.
The circuit is based around a PIC18F4550 microcontroller. The micro is responsible for measuring the temperatures, humidity and battery voltage, calculating the dew point and setting the various PWM outputs depending on the users needs. A USB stack has been implemented to communicate back to a host PC.
Three voltages are derived from the supplied 12V power.
The 5V is generated using a standard 7805 regulator. Diode D3 is a protection diode that will short circuit the incoming 12V supply if we inadvertently have the polarity swapped around. This will cause the inline fuse to blow and protect the rest of the circuit, the diode is rated for 15A.
The microcontroller uses two precision voltage references, 2.048V and 4.096V, for the upper and lower voltages of the microntrollers analog to digital converter. This increases the accuracy of the conversion and is also more stable than the 5V supply.
The humidity sensor is C3 in the diagram. It is a variable capacitor that is dependant on the relative humidity of the air. The capacitance will increase as the humidity increases, at the rate of about 0.6pF per 1% change in humidity. The 0% value is around 300pF plus or minus about 20pF.
The capacitor is used in a 555 timer circuit with the generated output frequency being measured by the capture module of the microcontroller. This module is configured to measure the period of 16 captured cycles. From this we can calculate the capacitance of the sensor and eventually the relative humidity.
The micro controls each of the four main PWM outputs with a logic high signal that passes through an open collector 7407D non-inverting buffer. A normal mosfet cannot be reliably driven with logic level signals, it needs something close to 10V to work properly. The output of the buffer is pulled up to the battery voltage so that the gate signal to the mosfet swings from ground up to 12V. The heating element is connected in series between the 12V rail and the drain of the mosfet. Whenever a logic high is seen at the input of the buffer the fet is switched on and current flows through the heater, we are basically applying ground to one end of the heating resistor when we want to heat it up.
Current Limit Detection
The drain of each fet is also fed back into the non-inverting input of a comparator. When a fet is switched on it has a slight internal resistance. The higher the current that flows through the fet the higher the voltage that is developed over the internal resistance. By monitoring this voltage, which measured from the drain to ground, we can see how much current our heaters are drawing. A simple voltage divider at the inverting input is used to set our threshold for this current. When the heater draws too much current the voltage at the + input of the comparator will be higher than the fixed voltage of of divider at the – input. Our opamp will then output a logic high which is detected back at the micro. We can then switch off the fet and thus save it and our heater from burning out.
Two auxillary outputs are implemented on the controller. These are opto-isolated outputs that can drive up to 50ma. These should ideally be used to drive an external solid state relay. The external positive supply should be connected to collector of the isolator, Aux_X_Out, with the Aux_X_Rtn line connected to the positive input of the relay. The other input of the relay should be connected to ground. When the isolator is switched on the external voltage will pass through the isolator, back out to the relay switching it on. This can be used to switch mains powered devices etc.
It is important to not drive an output directly that draws more than 50ma.
Two external fans can be driven by the controller. The positive line of the fan is connected to pins 3 or 4 of connector P3. The ground side of the fan is connected to pins 1 or 2 of the connector. The mosfet then switches the ground line to vary the speed of the fan as needed.
The fan is output is fused and rated for about 1.5A
A serial connection is used to update the firmware from a host PC. A standard MAX232 IC is used for the voltage translations between the PIC and the host.