Tuesday, 29 December 2009

The crit

This setup shows the model, the circuit, the probes and the main idea my project is based on.

This is my feedback:

Great to have a real time clock working.

Think about crafting the sounds. Decide on what these are. Take inspiration rather than direct-content from your probes. Have high quality sounds. Decide on whether it is MP3 or physical sounds and get prototyping.

Lights are horrid.

How commercial do you want this to be?

How will users set the time?

Very good comments and points to be getting on top off!

The device

I made this bird, named Jeffery, for the crit on Monday to show the lecturers how my form will differ from a generic alarm clock. I want my device to be used as a means of breaking your sleep cycle, to wake you up only and to be quite an important feature in the bedroom. (I don't want the user to read time) This i still need to work on but i feel my model shows this well, quite chuffed with the result!

Talks with Mike

I could not get my solenoid to magnetise which meant something was wrong with my circuit construction.

When i managed to speak to Mike, it turned out that my transistor was not powerful enough, so he gave me a MOSFET which seems to have worked.

He has also told me that i need to get a different solenoid to the one i have if i want it to act like a piston. He suggested trying to add a spring to my solenoid or to purchase a solenoid that has one included.

Bit of a set back as it took 1 week to recieve the last solenoid!

PLAYing around

When my order of solenoids arrived, i received a free changing LED thingy so I decided I would learn how to use it and use it as an indicator to show output control on a real time clock.

Wiring up was not too bad, easy to follow instructions came with the LED, finally i might add!

My only problem was actually turning the LED to the correct colour I had programmed.

Each colour had a corressponding pin to turn 'high' or on. When i stated red to come on, all available colours came on, not just red. I quickly realized that if i wanted red to turn on, i would have to ensure that green and blue were off.

digitalWrite(redPin, HIGH); // set red on
digitalWrite(greenPin, LOW); // set green off
digitalWrite(bluePin, LOW); // set blue off

However, when i did this, the red did not come on but one of the others. I PLAYed on the circuit i had made thinking that i might of wired up my pins wrong or got my colours confused.

It took me some time to understand that the LED was in fact inverted. This means when i command 'HIGH' to turn on, i really need to command 'LOW', usually used to command off. So my code simply needed to be turned upside down...

e.g. to turn on red:
digitalWrite(redPin, LOW); // set red on
digitalWrite(greenPin, HIGH); // set green off
digitalWrite(bluePin, HIGH); // set blue off


I want to find out what people are currently waking up to and what they would prefer so in this probe i have included 2 10 second recording devices to capture each sound separately. The booklet includes instructions of how to use the devices and enables the user to record and share information/ stories behind each sound.

I hope this will help me PLAY around with my potential output.

Tuesday, 8 December 2009

Talks with Jon

Thumbs up!!

Next step is to PLAY with the output, so i plan to give out some recording 'probes' to discover what people are currently waking up to and what they want to wake up to. I've also ordered some solenoids to PLAY with too.

Monday, 7 December 2009

Setting an alarm

My next step was to learn how to control an output based on my real time clock.

Baby steps...

To begin, i used the arduino examples and looked at using a potentiometer (analog input) to control an output; led. i set up this circuit.
This was a good example to follow. I needed to see the values of the potentiometer so i used a code from my real time clock and inserted it into the example;

Serial.begin(9600); //read value from sensor

void loop ()

Serial.pintin(name you have given); //show value in your COM

I could now turn the potentiometer and see the values change in relation to my blinking LED.

I then opened my real time clock file and started making adjustments, doing a 'save as' so not to muck up my original code.

baby step 2...

I opened another arduino example of using 'if else'. This code allows you to set an action to a variable, like my time.

My goal: to set a time for a red led to turn on, otherwise keep green led on.

if(minute == 1) { // == must be used to use an exact value! otherwise will not work!

digitalWrite(redPin, HIGH); //turn on red pin
digitalWrite(greenPin, LOW); //turn off green pin

else { //otherwise turn green led on
digitalWrite(redPin, LOW); //turn off red pin
digitalWrite(greenPin, HIGH); //turn on green pin

This was good but would not let me keep more than one minute on.

Baby step 3...

I removed my 'if, else' with 'case' again using an arduino example.

First thing i needed to do with my real time clock programme, was to define my constants for the red led to be on;

const int nameMin = value; // mine was minuteMin = 1: this sets the min value for red led to be on
const int minuteMax = 2; //sets max value for red led to be on.

in the 'void loop' section of the code, i added;

int range = map(minute, minuteMin, minuteMax, 0,2) //maps sensor range to four options.

switch (range) { //do something different depending on the range value.

case 0: //action when 1 min is reached

digitalWrite(redPin, HIGH); //turn on red pin
digitalWrite(greenPin, LOW); //turn off green pin

this allowed my leds to react to a duration i set.

I had completed my goal of controlling an output based on my time.

Friday, 4 December 2009

real time clock

I have written my first piece of arduino code and it works! My DS1037 is working well with arduino so i can now keeps time. Above shows my working model and below shows the schematic diagram i followed, from arduino homepage.

This is my very very first arduino encounter.

I found getting started quite hard. It has been a good couple of years since i last looked at and did coding, never mind building a circuit. Arduino language is new so finding the correct terms to use in the programme took ages as well as understanding the reading codes as i didn't know what i was looking at.

Once i realised what code i needed to write and found how to use the arduino site, i was rocking!

Thursday, 3 December 2009

Talks with Pete

After speaking with Pete, feel a bit better now. He agrees that my project needs a focus and that i should be limiting myself. He also suggests that i should stick with what Jon says but do more to prove to him about my decisions and apply the bird song to noises to what i am suggesting to keep us both happy and keep things moving forward.

He has also suggested that i get familiar with environmental hapticks and apply this principle to my project to get sounds from the environment depending on the location of the alarm, using the alarm to create the noises from your environment.