Title MainSite Home" Back
Patch
KS4
AS

Many schools don't teach electronics past very basic circuits which for anyone who has read any of my articles is in my opinion one of the great losses of our education system. In 1979 we had BBC micro's controlling robot mice solving mazes all over the country. Some 25 years later we have chips under £5 that on their own are as powerful as the BBC that program with the same principles, yet the fact that a few soldered joints are required is enough to make most D&T teachers run for cover.

To keep trying to address this problem I have sat down with the arduino series of chips many of which come in experimenter packages. This means that projects can be made using the breadboard principle.

The project is targeted at keystage 4 and AS level due to the level of concentration required for the software. If you use my incarnation of the system then you will need to make a circuit board. If you get one of the other Arduino experimenter boards then you will be able to make the same project with a breadboard. I am using the L293D chips as a buffer between the microcontroller and the stepper but on low voltages with these steppers it could be omitted.

This project offers another alternative view of a traditional item, many designers have made their fortune coming up with design alternatives to very fixed designs, Starks juicer being one of the most well know, Stark has made a fortune off the look of his products despite any design flaws, the juicer looks good but does not address the problems of the pips, I postulated that the addition of a stainless steel spring as a ring round the body would catch these and also be able to be removed and washed, if you can't visualise this imagine pushing a scrungie (Girls elasticated hair ring) over the top of the juicer until it gets to the three legs it would sit like a halo round the juicer catching the bits but letting the juice through.

I would introduce the geared clock at both levels as a thought provoking solution, one of the teaching tricks I used when discussing clock design was to show pupils how deep the clock face is dug into our schema. I would draw four marks on the board at 3 6 9 and 12 pm with no circle, I would then draw two hands from the middle showing a time of day. I would then turn to the students and ask them what time it says, when one got it right I would say but how can you tell there are no numbers, I would then draw two hands (one must be short) on their own and throw the challenge "OK now what's the time" a student would always get the right time, at which I would ask them how are you doing that ? Whatever the answer I would point out that like many things telling the time is dug so deep into our minds we can work from the briefest of clues. This knowledge can also influence our design as we now know we can make a clock that is two hands only and it will tell us the time. Once you get this concept across you can remind them that this applies to many design problems and we can use this ability to identify common knowledge to make simplistic design work.

Before starting the design project itself, I would start with some research of types of clocks, I would also include some research on icons and company logo's to see how they employ known looks and iconic design.

Resources
 

Clock

 

The Gear Clock.

 

The gear clock is another application for the gear program I recently acquired and uses the Arduino Nano microcontroller a nice ready to go package designed to plug into your project board.

The Gear Template Generator Program from http://woodgears.ca/gear/index.html At a cost of 26 dollars and can be bought with credit cards or paypal.

It will export to DXF, HPGL, CSV, and Sketchup.

The Arduino Nano chip is a very powerful microcontroller but at £30 it represents a significant cost. The fact that it handles all types of code and is ultra versatile and includes full floating pont mathematics in the one chip, its potential is almost boundless.

The Arduino Nano

The First Arduino Nano using the ATmega168

Nano

Now replaced with the

Arduino Nano 3.0 using the ATmega 328

Nano1

The arduino chips are often found on ready to go project boards which from a teaching point of view can reduce all requirement for soldering to zero.

 

Mega

Arduino Mega

Mega

Arduino Nano Pinout.

Pinout

 

The eight LED's that are used to monitor the triggering of the stepper circuits are poked through the stand to add a little light show to add to the whole effect.

Template

 

Two DXF files were produced and a backing stand was designed to hold all the pieces.

Draw

The prototype was made in MDF.

Prototype

close up of the clock face or ring the colours are a bit clashy but it's hard to decide just what colours would work the best. I am thinking I will try one in transparent coloured acrylic when I revisit this project in six months time.

Closeup

Two recovered stepper motors . Removed from dot matrix printers

Back

Circuit Board

Circuit

Arduino Nano.

Arduino Nano

 

Circuit Board In Real World Mode. This is intended to be the simplest stepper motor controller solution that includes all the features of an H bridge.

The L293D motor controller is very useful at driving two dc motors in both directions which is very useful for robot projects (a single L293D drives the wheels on all bert robots). It can also be used to drive one stepper motor, it is worth remembering that if you don't switch the circuit off the input to the L293D will leave the coil energised which not only makes the motors run hot it will stop the steppers working properly. The software uses a fire and ice setting, the ice setting allows the coil time to de-magnetise and the D part of the chip to sink the voltage. The LED's also ensure that the output pins don't float whine in the ICE part of the pulse cycle.

The circuit was designed in Circuit Wizard.

Real

 

Circuit Board In Standard Mode.

Circuit Real

At a later date it is intended to revisit this project and add the 1307 real time clock chip, I may also try to used the analogue ports to flash 8 more LED's.

Arduino Software

The fact that the arduino does floating point math allows the microcontroller to calculate time as a number of partial steps thus we can use stepper motors of any size of step angle and define them as part of the beginning of the program. This allows us to use reclaimed steppers from printers and also two steppers of different angle or step movements.

The circuit uses two L293D motor controllers to make stepper control easy.

/*
GearClock By Gary Smith

*/

float steps01 = 96 ; // This is the number of steps on the hour ring stepper motor for one rotation.

float steps02 = 96 ; // This is the number of steps on the minutes ring stepper motor for one rotation.

const int fire = 25; // Step Time for the pin to be live

const int ice = 20; // Step Time for the pin to be dead

float pulses01 = 0 ;

float pulses02 = 0 ;

int timex = 9850; // This is the timing loop adjust this to compensate for the drift in the microcontroller.

int hoursring[] = {
12, 9, 11, 10, 12, 9, 11, 10}; // firing sequence for the stepper cores

int hrsring = 0;

int minitring[] = {
8, 5, 7, 6, 8, 5, 7, 6}; // firing sequence for the stepper cores

float hrspulse = 0;

float minpulse = 0;

int actpulse = 0;

int lll = 0;

void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:

Serial.begin(9600);

pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);

}

void loop() {

delay(timex);

float pulses01 = steps01 / 60 / 6;

float pulses02 = steps02 / 10 / 6 ;

hrspulse = hrspulse + pulses01;

actpulse = hrspulse;

Serial.print("Pulses ");

Serial.print(pulses01, DEC);

Serial.println("");

Serial.print(" ActPulses ");

Serial.print(actpulse, DEC);

Serial.println("");

Serial.print(" Hrspulse ");

Serial.print(hrspulse, DEC);

Serial.print(" Actpulse ");

Serial.print(actpulse, DEC);

hrspulse = hrspulse - actpulse;

Serial.print(" Math ");

Serial.print(hrspulse, DEC);

Serial.println("");


for (lll=1; lll <= actpulse; lll++) {


hrsring = hrsring + 1;

if (hrsring > 4) {
hrsring = 1;
}
else {
//
}

digitalWrite(hoursring[hrsring], HIGH);

delay(fire);

digitalWrite(hoursring[hrsring], LOW);

delay(ice);

}

minpulse = minpulse + pulses02;

Serial.print("Pulses ");

Serial.print(pulses02, DEC);

Serial.println("");

Serial.print(" Minpulse ");

Serial.print(minpulse, DEC);

actpulse = minpulse;

Serial.print(" Actpulse ");

Serial.print(actpulse, DEC);

minpulse = minpulse - actpulse;

Serial.print(" Math ");

Serial.print(minpulse, DEC);

Serial.println("");

for (lll=1; lll <= actpulse; lll++) {


minring = minring + 1;

if (minring > 4) {
minring = 1;
}
else {
//
}

digitalWrite(minitring[minring], HIGH);

delay(fire);

digitalWrite(minitring[minring], LOW);

delay(ice);

}


}

 

Project Download Files - Download - WinZip

Project Download Files - Download - WinRar