So, today was the last day of Summer Quarter at school. I just finished the second and final project in my Electronics cource - Building a PCR temperature cycler.
My device uses a PIC16F684 microcontroller, running
This assembly code, assembled using the MPASM Suite via the MPLAB IDE ver. 8.14.
Schematic of the device is as follows(image may come later):
On the PIC:
Vcc - power
Vss - ground
A.0 - MCP9701 output
A.1 - Connected to two things: One, to the data/instruction select pin of the LCD, and two to a voltage divider. The divider I used had a 10k resistor between the pin and ground, and a 100k trim-pot variable resistor between power and the pin. This allows for adjusting of the voltage reference for the A.0 analog input. 2.5V is what the divided voltage is supposed to be.
A.2 - Enable pin on the LCD
A.3 - Switch 1 - GO/NEXT button
A.4 - Output to one side of the H-bridge
A.5 - Output to the other side of the H-bridge
C.0 - D0 on LCD
C.1 - D1 on LCD
C.2 - D2 on LCD
C.3 - D3 on LCD
C.4 - Switch 2 - UP button
C.5 - Switch 3 - DOWN button
Note that all three switches use normally-open push-button switches between the pin and power, and a 10k pull-down resistor between the pin and ground.
------------------------------------------------------------------------------------------------
My device uses a 20X4 LCD and three push-button switches for user interaction, a MCP9701 temperature sensor for temperature feedback, and two pins connected to an H-bridge(either relay or semiconductor based) for output to a peltier junction.
Operation:
When you first power the device up, it will show a custom startup message, and after 5 seconds, go to a screen where you can set the first time variable. It it called 'melting' time, because that is what the correct teminology for the first temperature is, or so I was told. You can adjust this up and down by 1 between 0 and 255(where it rolls over), using the up and down buttons. The next button saves the value and goes to the next screen.
Next you have a temperature-set screen. You can set the temperature anywhere between 0 and 102C in 0.125, or 1/8th of a degree increments. Again, up and down increase and decrease the value, and next goes to the next screen.
You have two more sets of time/temperature screens, and then you have a 'cycles' screen. This tells the device how many times to cycle between each of the three temperatures before shutting off. This value can be set between 0 and 255(0 will actually do 256 times).
Now, when you press the next button, you will be taken to a screen where you can review all three temperatures and times. Pressing up or down from this screen goes back to the start of the settings process, and pressing next starts the process.
The process:
When you start the process, it will compare the temperature you set to the temperature from the A2D converter, and if the incoming temperature is too high, it will turn on the peltier in 'cool' mode, or if it is too low, it will turn it on in 'heat' mode.
When the two temperatures are equal, it will start counting down, still holding the temperature as close as it can to the set temperature.
When the counter reaches 0, it will reset things and repeat the process for the second temperature, and then again for the third and final temperature.
When the third and final temperature is done, it will decrement the number of cycles left to do, and repeat the entire process.
Note that the counter is done in one-second increments, and during the temperature controlling process the LCD updates 5 times a second.
Hopefully *someone* understood *some* of this.
-RobbieThe1st