There are still some minor things to do with the PCB before it is ready to hook it up in the power supply. First of all, i had to put the reset button. Also, i had to slightly mod the 4-pin connector for the fans. A PC fan connector has 4 pins but the back side is made to fit also a 3-pins connector. This way, both a 3 or 4 wire fan can be inserted. After all, both fan types have the same pinout for the first 3 wires. They only differ on the 4th wire.
| | | | I soldered the switch on a 2-pin connector. | This is the back side of the button | I sliced the plastick back behind the 4th pin of the an connector | This way, both a 3 and 4-wire fan can be correctly orientated |
Then, i made the 2-buttons,the LED wire and the potentiometer connectors:
| | | [B]I had no better buttons to use, but i have already order a few[/B] | I have a 5-positions connector because i may want to add more buttons | I have one 3mm LED and one 5mm LED | | | | I think i will keep this set-up. The green LED will be for the power. | There are 2 potentiometers, one for the temperature and one for the fan speed | The potentiometers are directly connected to the analog inputs of the PIC |
I got a K-type thermocouple from ebay with small mass, but still it does not react very fast in changes. So, i will use one typical K-type thermocouple from a multimeter. I do not have one right now in stock, but i think that right now its on the plane for Greece. At last, i am now ready to plug all the connectors on the PCB and hook it on the power supply. I do not expect to see much... As a matter of fact, i will see absolutely nothing, for the PIC that i use has a totally empty flash. I am ready to plug the programmer and start playing... Here is the PCB (as always, click to enlarge):
Boot me up! (August 30 2011)
I wrote a quick and dirty software for the PIC to read the thermocouple. Actually, i copied the routine from my Soldering Station because i use the same chip to interface and compensate the thermocouple. So far, the PCB does nothing more than reading the temperature from the thermocouple, but i'm excited because the 7-segment displays work like a charm. The 4511 driver to drive the segments and the ULN2003 to drive the digits was a really good idea and i will use it for my future projects. Once again i was impressed by the precision of the thermocouple. It is really impressive what 2 dissimilar wires can do!
A problem with the PCB ruined the day
Well, it was expected to happen... After all, this PCB is the prototype, so i should not get mad... Anyway, here is the thing: First of all, i wanted to test the TMR1 gate function of the PIC and set it to measure the fan RPM. I may use this method for my next project (PC fan controller), so i added the brown wire to the PCB. I may remove it afterwards, because i do not really want to have RPM feedback from the fan. The fan will run with PWM pulses in an open loop. The thing that really messed me up is the PWM output. I've done this error many times, the very same error. I get the PWM output from the wrong PIC pin. This time, instead of taking the PWM ouput from pin 8 (SEG21/CCP3/P3A/AN5/RE0), i took it from pin 5 (SEG15/VREF+/C1IN+/AN3/RA3). So i had to cut the line from pin 5 and connect a wire (the white wire) to get the PWM from the correct pin. The result is a fully functional but ugly PCB
|