Wednesday, March 20, 2019

Simple Digital Clock with PIC16F628A and DS1307 and 7-Segment LED display

In this new project I am again using PIC16F628A microcontroller. The goal is simple digital clock with 7-segment LED display and the clock will have no additional functionality - no alarm, no seconds digits, no date. The latter can be added in the software though. For the RTC chip I chose DS1307. For the LED display I used Kingbright CC56-21SRWA.


Friday, March 8, 2019

3-wire fan adapter with fake 'tach' signal

This is a quick small project that I design this evening. My wife complained about loud fan in her computer, so I purchased the quieter fan I can find in Sofia - SUNON HA80251V4-000U-999.
It's only 22 dB noise but unfortunately it is two-wire fan without yellow tach signal wire. The computer will work fine but at every startup it will beep some fan error and will require confirmation to continue.
I spend some time researching the subject and found that the tach signal is square wave signal and usually have two pulses for every rotation. So the frequency of the signal will be: F = (RPM / 60) x 2.
For example a 2000 RPM fan will have 67 Hz tach signal. 
One unusual thing about 3-wire fans is that the tach wire is connected as open collector.

The solution is very simple - small adapter board with square wave oscillator followed by a NPN transistor with open collector. The frequency of the oscillator is not that important - from 33 Hz imitating 1000 RPM fan to 200 Hz for 6000 RPM fan. I chose the classic two transistor astable multivibrator:




I soldered the components on a small piece of perfboard. The fan doesn't come with a connector but only with two strip wires, which I soldered directly to the board. On the other side I soldered standard 3-wire cable with molex connector. The adapter worked as expected - the computer recognized the fan and started without problems. I checked with HWiNFO, and the program reported around 2600 RPM for this fan.

This adapter can also be used entirely without a fan - the computer will still think there is a fan connected. Of course if your CPU burn out it will be only your fault :)