|A brief comment on software.|
|I am not a software programmer and do not write code. Years ago I did a course to learn to program in basic and while I understand some of the fundamentals have never had any reason to try to take it any further. So, once again I am indebted to people who do particularly Bruce Breimon for writing the code we needed to get his switch to drive an air solenoid. He wrote it to include variable parameters to allow anybody using it play with numbers to vary the way the programme operates for any specific purposes. I will include a few examples of the variables in action as a small chart that should allow extrapolation to achieve a variety of outcomes. Additionally my oldest son Clinton who, as well as being a reference point for my electronic questions, has also written some software that will allow me to program my chips to control both air solenoids and also simple coils..
At the heart of each switch is an integrated circuit (IC) called a 12f683. This is the chip that I programme to control the frequency of the coil or air solenoid activation. As I said at the beginning of my webpage, this is not a “how to” document but rather an “if I can help you I will” document but I will include some detail where I can. If you have any other queries I will help if I can.
In order to program chips (ICs) you need a programming system. When Bruce started he chose the PICkit2 programming system which I also chose because it is an effective tool. It does involve some expenditure and since the Aussie dollar has crashed relative to the US dollar, things have become a bit more expensive. If you have a look on EBay you will see some copies for sale. If possible I recommend you stick with the original US version because the programming board is superior to the copies. While the Chinese version of the programmer worked, the programming board that came with it did not.
As well as the PICkit2 programmer you will also need a system to compile the programme you have written, copied or altered, before transferring them to the PICkit programmer. Bruce and I use Microcode Studio.
This is what the 12f683 looks like. They have 8 pins and are fiddly to use. Be prepared to be patient.
The test bed. This is a switch connected to a 5 volt voltage regulator. I use this to test that the programming was successful by counting the number of times the LED flashes.
|What follows is a series of instructions that should get your chip programmed. Because all but three of my clocks have different pendulum lengths, the setting of the pulse rate has been a matter of trial and error.
Your are now, as they say, ready to cook with gas. Good Luck.
|Included below is a small chart which should give you some idea of the outcome when you make changes to the Pause and Pauseus commands in the program.
Pause 10 Pauseus 3000 33-34 pulses per minute
Pause 10 Pauseus 2000 35-36 pulses per minute
Pause 9 Pauseus 500 43 pulses per minute
Pause 9 Pauseus 1000 41 pulses per minute.
These figure should give you enough information to extrapolate the figure and fiddle to get the sort of outcome you are after.
My experience with the PIC Basic Pro program has been mixed. Suffice to say that I have not been able to get the numbers fine enough to provide the accuracy I would like to achieve. I have clocks that may be losing slightly with a, for example, Pauseus of of 341 but then gains a bit if I change it to Pauseus 340 (reducing the Pauseus number speeds up the clock) which can be a bit frustrating.
Clinton, my oldest son, has written a program in Machine language with an additional parameter so that there are three options instead of two. I will be using this program in this clock but it will take a while before I know what the outcome has been.