Friday 24 February 2012

Kiln Controller Building Blocks

Today I sketched out the new building blocks to the KC1 Kiln Controller System. The only difference from the existing diagram is the addition of the COMS block. The COMS block is the controller to PC communication. The idea is that it will talk directly to the PC software.


Kiln Software Progress

It's been a little while since I did any work on the software side of things but I'm hoping for the software to connect to the controller using the new COM hardware. At the moment you have to physically remove the serial EEPROM and read it with a device programmer to access the log data.













The graph display was from the very first series of test fires; the kiln was running on 10 Amps in a wall socket rather than  21 Amps on a dedicated cable so it only reached 780ÂșC. At first there were noticeable oscillations (over / under-shoot ) in the graph line; which I managed to reduce by adjusting the code, I believe it's related to what is called the 'thermal response' of the kiln; and the aim of the game is to smooth-it-out as much as you can. The method I used was just something I made up; but to a master in the field of temperature control systems; it's probably a fine art!

Monday 20 February 2012

RS232 RTS/CTS

I was reading about the RTS and CTS lines this afternoon, although my controller won't be using them I created this little cartoon to help me understand how they work.




Sunday 19 February 2012

RS232

Over the last couple of days I have been reading up on RS232. My idea is to add RS232 support to my kiln controller so it can 'talk to'a PC. It seems fairly easy to implement a simple version in which it uses only the basic Rx Tx lines to transfer data.

As always I like to try and understand the thing I'm working on so I'm not going to use any built-in UART on the PIC, and instead do all the work in code.

I'm going to use 9600 baud rate and this will be fixed in my hardware. According to the specs this means that data has to be sent at 104 uS per bit. So one of the key tasks I needed to do was to setup my timing. Luckily my Ebay digital scope came in very handy to do the measurements. What I did was I created some PIC code to output a single byte to one of the PIC output pins and repeat forever. This allowed me to measure with my scope to see how far off my timings were. The format for the data is 10 bits, starting with a start bit followed by 8 data bits then finally a stop bit.


A little sketch of what I wanted to achieve.





Controller running and hooked up to my digital scope.



The picture below shows the output levels. Using the scope markers it showed me the timing was slightly longer for each bit than I really wanted. After sending 10 bits the 10th bit was approx 36 uS off  (988 uS instead of 1024 uS) but if the receiving device started sampling at the fixed period of 104 uS after the initial 52 uS offset, the data, I'm guessing would actually pass without error; But when I come to add the final code to send data  I'll need to make sure the timing is a little more closer to the specs but for this experiment everything went very well!




Why build a kiln controller ?



Well firstly I've always been interested in electronics and computers so when I purchased an old pottery kiln from Ebay I thought it might be a nice project to try and build a kiln controller. After looking around at the various ready made units they just seemed so expensive. Also there was so little information about making one I thought it would be a good challenge.




Transporting the kiln in the back of my car along with the fact that the stainless outer case fixings were mostly broken almost reduced the kiln to brick dust during the 100 mile trip!!














 After removing the old kiln sitter, there was no going back!


















After lots of research and reading I had come up with this prototype design. It was far from complete but after some firing schedule simulations I thought it was ready for the next stage.












When I started this project I had a multimeter and a serial JDM programmer and very little experience with electronics; over the following months I bought odd bits of test gear from Ebay. The picture is a thermocouple simulator, I used it to feed-in simulated temperatures to the controller.








When I started sampling the thermocouple voltages in my PIC16f877A my readings were inconsistent, and I had no idea why!  So I bought my first cheap analogue oscilloscope from Ebay, and after a week of working out what the hell all these knobs and controls are for I realised from the scope display that it was actually the thermocouple simulator and other sources that were producing noise on my A/D line; luckily as the noise was intermittent but predictable I could actually filter it out in the software.






This was a 240 AC voltage power test to make sure my 80A Chinese solid state relays were working.













This is one of my father-in-laws stoneware slip-cast animals for test firing, he is a truly amazing sculptor and all self-taught too!












This was during the first test firing. The kiln was only firing on half power as it was plugged into the mains wall socket. This was good enough for a simple firing test but the final setup will use the full 22 Amps with a dedicated power cable and a suitable breaker; Also in order to check for the correct operation and to make notes, I supervised it throughout, and yes! it was a very long day.
















This was the finished stoneware piece.