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.
Filed under: Programming
The first stage of programming the clock involves simply getting the minute’s digit, which is the digit furthest on the right, to count from 0 to 9. Using the flow chart in programming editor I programmed the picaxe. In this program I used let B0= 32, B0 gives a pin its name and 32 is the binary code that sets the minutes digit to 0. By adding an, if then command into the program I was able to loop the program around. Each time the program looped around and did not = 22 it – 1 from 32 which enabled the clock to count upwards. When it reached 22 the, if then command, would repeat the process. The first program shows the flow diagram, the second program is the flow diagram converted into basic using picaxe programming editor.
Filed under: Connecting Clock Components
After making the PCB’s the next stage was to connect the picaxe 18x project board to the main PCB using wire and solder. Then using ribbon cable I connected the main PCB to the display PCB. This was done using two connectors with IDC termination. Once the components were connected together and given power the display did not show anything.
In order to fault find it was necessary to use the oscilloscope. This is a type of electronic test equipment that allows signal voltage to be viewed as a two-dimensional graph (For more info on oscilloscope’s see link). To make the fault finding easier I disconnected the project board from the PCB and connected a protocircuit. It was easier to fault find using the wire switches connected to ground on the protocircuit. This enabled me to check each of the four inputs going into the 4511. Using a probe from the oscilloscope I was able to test the voltage going in and out of the 4511 BCD chip. A line going horizontally across the display registers how much voltage there is. Due to this closer inspection of the main PCB I was able to identify that one of the pins on the 4511 was not connected to ground. This was pin 5 the store input. Using a section of wire I connected pin 5 to ground, once this was connected the circuit and display were functional. I then wired the project board back to the main PCB and this was all functional. I can now start with the programming
Filed under: Making PCB's
Making the PCB’s
The PCB layouts from art worker are printed out onto assertate using a laser printer, the black image will end up as copper on the final PCB. The print should be of a mirror image of the circuit, as this will ensure the black areas of the artwork will be in contact to the PCB’s Photoresist during UV exposure.
The board is cut to size using a guillotine, this is then cleaned... The layout is then printed onto the board using the UV exposure unit. The exposure unit has a timer on it, it is important that this is set to the right time, in this case two minutes. Once complete, the printed boards are washed of using photoresist universal developer. This is done by placing the crystals into a tray and mixing them with warm water, the boards are then put into this and the solution washes away any particles. The layout of the PCB’s should become clearer and after one or two minutes they can then be washed of using water.The next process involves using Ferric Chloride, when using this safety gloves, classes and overalls must be worn. The PCB’s are place in the lid/mesh basket board holder of the developing tank. The Ferric chloride used in the tank must be kept warm at 45 degree C this is because it reduces the etch time from around 1 hour to 15 minutes. After several minutes, the copper will start to fall off, leaving the circuitry. Once complete the boards can then be washed, remembering to wear all the safety gear. Using a precision high speed drill and a 1mm bit the holes can then be drilled into the circuit.






