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:
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
file gia.molis tora se brika ke ise poli endiaferon. exo mia idea gia pio statheri thermokrasia gia pid temp controllers.nomizo pos tha itan kalitera an anti na kobete to power apo to heating elemend , apla na mionete kai na afksanete otan pesi I thermokrasia,etsi o xronos pou xriazete gia na ftafi I antistasi sto maximum pig temp tha ine poli ligoteri kai to lathos ligotero. ti nomizis, ? se efxaristo.
@Angeltech Follow the schematic as shown - I added the wire after i discovered the problem with the PCB, so there may be pictures without the wire. I really cannot remember what happened.
As for the fan, you need an oscilloscope to see if the PWM pulses arrive at the fan.
Sir I have no luck with fan speed in 3 or 4pin fan still not working right, hope you could help another thing is do I have to connect pin 23 and pin 6 of microcontroller seems you just connect it and remove on the demonstration picture. please advice.
Sir thank you very much, now the 7 segment brightness is the same, still working on the fan problem maybe I have to change the darlington transistor which i used C4169 that contains diode and zener that might effect the control signal.
@Angeltech I used 2 different display sets so i have different delays to have same brightness. What you want to do not is go to the "Display.inc" file and replace the "call Wait390uSec" with "call wait2mSec" (found 3 times).
For the PWM, i'm not sure what the problem is. It should work.
@Iuliu well, actually i do, but i have not finish the housing. I stuck in the nozzle which was originally from special plastic, but it was eventually not so special to withstand the heat of the resistor which accidentally came into contact - so it burned into flames. I will make it from stainless steel or something like that.
Hello Giorgos Lazaridis have you made the new proiect "a PCB preheater" ?
I'm thinking to do my self to,but i want to use 16f819 ,that pic i have about 5 pieces,my question is is fast enough at 4 Mhz clock?
@Ricardo The layout had errors, check this page:
I have not correct these errors, so you will need to find and correct them yourself. If this is ok with you, i can send the layout to your email. And if you correct these errors and it works, you can send them back so i can then upload them in the site.
@Ricardo The worklog is here:
There are 5 pages in which i explain exactly how i made it. As for the parts, i cannot help you with them. You need to locate them from your local market, or order them from internet like from farnell.com
Hi! I know there are a lot of information in your website but I can not find some parts like these:
IC1 PIC 16F1937 Microcontroller
IC3 MAX 6675 Cold-junction compensated K-Thermocouple to digital converter (0°C to 1024°C)
IC5 ULN2003A High Voltage - High Current Darlington Arrays
IC6 MOC3021 Random Phase Optoisolator TRIAC Driver Output
IC7 DF02M 1.5 Ampere Bridge Rectifiers
Also, I'd like to ask you the source code in assembly...
Hi! Assembly it will be nice for me...Can you provide the source code? I want to buy the hardware (PCB) already done/working but I need the 18F4520 instead 16Fxxxx. I don't have time to do it myself and I won't find some parts in my place so, let's talk about...Can you help me? Since now, thanks a lot!
Hello!! How's it going? I'm stating Control&Automation Engineering and I liked your job..very nice! So, I have a question, Is there any chance you provide me the source code in C ? I would like to learn how to program PID ALg into a PIC18F4550 using MikroC compiler so, could u help me, please? In last case, Do u have PayPal account? ;) Let's go deal!
@awan i've been trying to convert the old-style articles (like this one) with the new style articles. I have already upload the TCPDF library, but i cannot get it to work. I hope everything will work well in the end.
@Stefan i'm sorry but i do not do circuits (nor programs) on demand. You will need to do the change yourself, or get a same PIC. As for the ULN, it is a darlington pair array. Instead of using 6 transistors i use this.
Good job,I have a plans for this,but there not in function.So I would like you to finish this project and to build one for myself.But I don't have that PIC microcontroller that you're using I want to use PIC16F877A(887 etc.) can you recompile for it?And I want to know why there is ULN2023,what is his job? :D