Filed under: Circuit Wizard Diagram
In order to set up my first protocircuit I used the principle design from this layout.
Filed under: Evaluation
My goal was to make a fully functional clock that is aesthetically pleasing and can read the time in the UK and Australia. I have achieved two of my goals and if I had more time I could update the program to read the Australian time. The clock has an accessible plug on the top so the program can be updated at any time. In order to change the program so it can display the time in both the UK and Australia, an interrupt command could be added. This would be triggered by a switch which can easily be added to the current design. The switch would connect to an input on the project board. Once triggered it would be a simple case of reading the same program but adding the amount of hours the Australian time zone is ahead. The clock is already accurate to within seconds of real time over twenty four hours, in order to make the clock accurate within a second of real time over a month, a year I could experiment over a period of one week even one month and see how fast or slow the clock is. As long as it is fast in the first 24 hours it would just be a case of altering the pause to the exact amount its fast or slow.
The design and make process for this clock has had many elements. Even with a detailed action plan the design and make process always turns up unforeseen problems. This project has shown how problems will occur in the design process; the important thing is how I went about resolving these complications. I have identified the need for detailed planning and setting realistic goals in the design process. When programming the clock I realised the importance of a structured approach to writing in basic. With the aid of flow diagrams I was able to understanding and solve different parts of the program in basic. This project has given me a deeper understanding of the design process and has enabled me to improve my analytical skills. With the experience gained from this project I will approach future projects in a much patient and structured way.
Filed under: Programming
Now that the program is correctly set to a 24 hour clock format, the aim is to get the clock as accurate as possible. In the earlier programs I used ‘for next loop’ commands to set the time. The amount of times it loops determines how long the minute’s digit takes to count, which then triggers the other digits. Due to the amount of ‘let’ commands being repeated this effects how many loops are needed. The more let commands the fewer loops you need to time a minute. Much time was spent trying different amount of loops and amounts of ‘let’ commands to get as close as possible to one minute. It should be remembered that the amount of ‘let’ commands in the loop control the brightness and evenness of the four digits.
I recognised that by getting the minutes as accurate as possible allowed me to experiment with time over 12 hours. There were a number of different methods for getting within 30 seconds of real time over 12 hours. But in order for my clock to display the time accurately over months even years I need a method of timing it over 24 hours. I decided that if I could get the clock running, if anything a little, fast then I could use a ‘pause’ in the program after 24 hours to stop the clock for the amount of time it is fast. This then makes the clock accurate within seconds over 24 hours. The program above runs within a few seconds of real time over 24 hours but has to pause at midnight for four minutes. With more time I could experiment over a period of one week even one month and see how fast or slow the clock is. As long as it is fast in the first 24 hours it would just be a case of altering the pause to the exact amount its fast or slow.
Filed under: Programming
Trying to work out how and where to put a (if then) command in basic was very difficult. By identifying the need for a flow diagram it made this process easier. By directly using the flow chart I could identify where the command should be placed. By asking the questions do hours = 4 if no continue counting, but if yes ask another question. Do tens of hours = 2 if not continue counting but if yes start at 0. By combining two questions it was possible to start the hour’s digit at 0 after 23:59. Thus giving 00:00 at midnight on the 24 hour clock. The other problem with the previous program were the four digits not giving an even brightness, to rectify this problem the let pin= b0, b1, b2, b3 command was repeated in a different order. The hope was that putting them in a different sequence would even the brightness. This worked in practice also by repeating the sequence it also added to the brightness.
Filed under: Programming
The problem with the previous program was the hour’s digit on the 24hour clock. This counted 0 to 9 which = 9am and then counted 0 to 9 again which = 19:00pm which is fine, but instead of the hours resetting to 00:00 after 23:59 the hours digit continued counting upwards to 9 for example 24:00,25:00,26:00 etc. With the aid of this flowchart I aim to rectify the problem. Also the four digits are not equally bright, one is bright and the others are much dimmer.
Filed under: Making the Clock Case
Using the laser cutter I cut to size and rastered a section of clear acrylic. This was drawn to size using 2d design. Before the acrylic can be cut it is important that the settings on the computer and laser cutter are suitable for cutting the dimensions and type of material. In order for the laser cutter to raster, the drawing has to be selected in the colour red. The front is made out of white hips polystyrene; the rectangle for the display was cut on the laser cutter. The outer profile was cut using the band saw and different types of file. The back is made from two layers of clear acrylic. This was cut and shaped using the band saw and different grades of files.Once the acrylic was cut to size, I could then form the shell using a heat bender. Once the acrylic has heated up it becomes flexible and can then be bent using a steel rod and a set square.
Using two bits of clear acrylic one acting as a plug the other seats outside the shell I was able to develop a back that velcro onto the shell.
Filed under: Making the Clock Case
This process involves mounting the PCB’s and clock display on small birch ply frames. I cut these frames using a cordless drill, jigsaw and band saw. The PCB’s were then fixed to these frames using 2mmx 18mm screws.
Filed under: Programming
Counting the Time
In this program I have moved on from the previous stage. By referring to my hand drawn flow chart I was able to identify each stage of the counting process. By adding let b0= 31 at the beginning of label 41 it reset the counting on the minutes digit to zero and starts counting up to 9 again. Each time the minutes digit counts to 9 and resets it triggers the let b1= b1-1 which counts the tens of minutes digit. So every ten cycles the ten minute digit moves from 0 to 1 this continues to 5 and starts at 0 again. I then enter let b1= 47 at label 51 and b2= 79 at label 52 this process starts each of the digits at 0 after counting. Then it was just a case of counting each digit up to its correct number. From the tens of hours I counted 0 to 2 and for the hours 0 to 4. This gives the clock a 24 hour time display. On reflection I identified the need for the hours digit to count 0 to 9 twice and at 23:59 the hours digit needs to reset at 0.
Timing the Clock
This section of the program involved using for and next commands. These were used as tools to loop a section of the program. The program without these commands runs far too quickly to give a real time reading. These commands delay a section of the program by looping a number of times before continuing with the program. By selecting the amount of times I want these to loop dictates the timing of the minutes, which drives the other three digits. After experimenting with a stop watch I found two for next commands set at 150 were pretty accurate for setting the clock.
Filed under: Programming
This flowchart is used to keep in mind the sequence of how the program works, when using picaxe programming editor.
Filed under: Programming
This video shows the display counting from 0 to 9 on each digit. This is a step in the programming process. The stages in the programming can be seen below in the flow chart and in basic.







