Sunday 8 July 2012

Prototype V2

After a few nights of soldering I've managed to get a new prototype version up and running. This as mentioned in the previous post will become the new live test version.

(8th July 2012)
Added the RS232 communication module to the controller (not shown in this pic) and it works a treat! so this week it's just finishing off the firmware coding.





(13th July 2012)
The controller to external eeprom code is now complete, which basically means when you select a firing programme, the programmes are displayed dynamically from the eeprom.


(14th July 2012)
I finished the last part of the programme data re-code last night - what a pain in the arse that was! I completely filled up the area left for writing any more code!, In order to finish off the core routines I had to drop exisitng features; I was very dissapointed about this but I guess this isn't a PC software application, so I don't enjoy the freedom of tens of megabytes of free programming space.


(15th July 2012)
Finished some changes to the PC programme compiler; the compiler allows me to compile programmes and now configuration files for the controller. I'm currently now working on the PC communication code. All the tools described form the drivers of the hardware. From a user point-of-view these should be invisible and only the front-end tools will be visible.

(16th July 2012)
Progress on the PC RS232 code is coming along nicely; I've created a simple console application and added a couple of commands already, once complete I plan to move all the code into a library which all the applications described above can use, this will allow them to directly access the controller.

(Aug. 2012)
Bad month this month,  I managed to kill 2 x LCD displays and a microcontroller!! Found a timing issue with the eeprom; looks like more head bashing with the bit-bashing i2c. Got to order more LCDs and microcontrollers from China!


(03 Sept.2012)
Last night I fixed the nasty timing bug in the eeprom i2c bus, this only effected the eeprom.. I discovered this whilst testing the RS232 PC routines when occasionally it was returning bad data. Back on with testing / tidying the PC software side.

(02 Oct. 2012)
I'm pretty satisfied the firmware is solid enough for live testing. I had a small problem with the programme upload code not working, but it just needed a few tweaks here and there.

The next job is to tidy up the PC code and software.  I want a real nice way of creating profiles; at the moment it's all done in XML and compiled use a special command line tool.  Although this method works, it's far too techie orientated for a typical users to follow.  I've got some good ideas for this so it should interesting to see where it goes!


(11 Feb. 2013!)
Well, it's Feb! and things are moving along once again; I've created another version of the proto2 but this time it's small enough to fit into the nice blue box. The pic below shows the larger one and the smaller one.  I couldn't fit it all on to one small board so I had to make two, the other one, which isn't shown in the pic has all the power rails on.

Last night I powered up the uC, LCD display and flash memory;  so far, so good!  tonight I plan to add the clock and thermocouple chip and then make sure the RS232 PC communication side of things is working.












(12 Feb. 2013)
Got the clock working and the RS232 Communication; one thing I noticed is that the RS232 module appears on the PC as a different COM port, which means potentially you could control multiple kiln  controllers from one PC, which I thought was pretty cool!    Tonight I plan on adding the thermocouple IC chip and then giving it a final test before I finally put it in the box and fix it to the kiln.

(13 Feb. 2013)
Added the thermocouple chip, and no joy, for some reason the temperature is reading 0! I'll check it out tomorrow.

(14th Feb.2013)
Thermocouple chip is now working! I missed a wire connection between 2 of the pins. So all I need to do is to tweak the trimmers to make sure it's reading correctly and use my thermocouple simulator to simulate some temperatures.

Tuesday 3 July 2012

Getting Back to It!

It's been a while since I last posted; I've been working mainly on other things so I haven't been able to focus much on the controller. I've worked on the circuit schematic a little but there are still some areas of the circuit that still need thinking through. I guess my problem is down to the fact that because this is my first project and I've gained so much electronics experience in doing it that I keep changing my mind and moving the goal posts by adding new features!  So the plan is to push the current version through to a working prototype that can be better tested, and also for me to stop adding new features!.
 Last night I started to build a version of the controller on a simple veroboard,  the idea is to use this one on the kiln whilst the PCB layout version is being finalized. My nice blue box will have to wait for the PCB version, as my veroboard circuit is far too big to fit in.

Whilst creating the veroboard version I can get back up to speed on the controller code for the kiln programmes, I basically have to re-write it because I moved the programme memory from in the controller chip to an external serial flash memory device, this allows for a greater number of potential programmes. with the added bonus of freeing up valuable controller memory.

Sunday 15 April 2012

Kiln Controller Programme Compiler

I finished the programme compiler last night; it's in a beta state so it might be buggy. It allows me to very quickly compile firing shedules into a binary file, the binary file can be either burnt into the flash memory chip; or uploaded to the controller via serial RS232. This change makes the existing controller programme selection code obsolete, so this will need to be re-coded.

Saturday 14 April 2012

Memory Chips

Finally the new 64K flash memory chips arrived yesterday, so last night I checked each one on my basic JDM programmer and they appeared to work fine. Tonight's task is to complete the programme compiler, this will compile an xml file containing the programmes into a binary file format that the kiln controller will read.

After doing some simple calculations it looks like it will hold around 500 programmes each with 3 segments; also a 32K block will be be set aside for the data logging area.

Wednesday 28 March 2012

Even More Memory!

Yesterday I decided to upgrade the flash memory from 16k to 64k, so I ordered 5 pieces from China; the extra space will give more space for logs and even more programmes!

Monday 26 March 2012

Kiln Controller Box


This weekend I thought I'd take a look at finishing up the project box, it's nothing special just a standard off-the-shelf one; the buttons are standard push buttons, it's all rather a clunky looking solution but it should do for this version; once it's all wired up to the board and powered up I'll post some more pictures.

Monday 19 March 2012

Programmes in Memory

I've been re-working the chip code so it uses the external eeprom memory for storing the firing programmes. This involves changing the way they are stored and also changes to the programme selection. In order to add the programmes to the eeprom memory I have to compile the data into its new format. To do this easily I decided to use xml to store the programmes. At the moment it's looking like I can potentially store 64 firing programmes with 3 segments per programme, alternatively you could have 51 programmes with 6 segments.

So hopefully this week I can read the compiled firing programmes in the chip code.

Sunday 4 March 2012

Kiln Controller to PC Serial Link

Over the weekend I managed to get the connunication side of things up and running. The basic framework is in place and now all I need to do is add more commands to the code. Originally the idea was to send full commands to the controller as Ascii text; But because of the added overhead of parsing the commands I decided to change the format and instead send the commands as raw byte sequences. The plan is; over the next couple of weeks to add all the rest of the commands.

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.