Since dismantling our pre-bought annoying box last week, we have attempted to recreate the action of the arm using an arduino and code. Using a guide we found online we created a setup using a push button, potentiometer, dc motor and a L293D chip.
The guide used: https://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing/overview
int enablePin = 11;
int in1Pin = 10;
int in2Pin = 9;
int switchPin = 7;
int potPin = 0;
int speed = analogRead(potPin) / 4;
boolean reverse = digitalRead(switchPin);
void setMotor(int speed, boolean reverse)
digitalWrite(in1Pin, ! reverse);
Below is a YouTube video of our setup working, using the gear arrangement from the box we bought to give the arm more torque.
As you can see from the video we used the gear arrangement from the box we bought to give the arm more torque to turn a switch off. This setup works so that the arm reverses when the button is held down, so if we replaced it with a switch it would return back into the box when the switch was turned off.
For next week we need to look into a way to make the arm stop rotating once it has hit the switch, we are also starting to design the box all the components are going to be housed in.
Since last week we purchased a pre-made ‘useless box’ online so that we could take it apart and look into how it works.
This pre-made box was constructed from the following components
- DC motor
- 2 x AA batteries
- SPDT switch
- Gear arrangement (for increased torque)
- Rocker switch
- Plastic arm
When the switch on top of the box was flicked on, this caused the motor to rotate the arm until it turned off the switch, causing it to then rotate the opposite way until the rocker switch was pressed down, cutting off the power.
After dismantling the mechanism to separate parts, we figured that the rocker switch was controlling the motor, so this can be removed for our project and replaced by our Arduino.
In the next week we are going to connect up the arm, battery and motor to our Arduino so we can create the same action using a motor shield, ULN, push button and code.
We have found a step by step guide online who uses a stepper motor to make a useless box. This will be useful but we will be doing it a different way.
Since handing in our first arduino project we have conducted research into what we can make for our end of year project. As we used LED’s in the last one we are planning on using motors to create a more ambitious project, which has greater levels of user experience.
From research we came across videos on YouTube of these ‘leave me alone’ boxes, which turns off a switch after it has been turned on by someone.
Watching these boxes in action is really enjoyable and engaging so wanted to do something similar that we can display in the atrium.
In the video below the arm has different actions controlled by an arduino and code script so that it turns it off in a variety of ways at different speeds making it more fun.
For our project we would like to make something similar but with a slightly different function. One idea was to add a light inside, so it’s as if the arm inside wants to go to sleep but you keep turning on the light in his house. A second idea was to have something that covers a light sensor, which the arm could then come out and take it back into the box as if it was eating something.
Another idea would be also using a light sensor, where something comes out when its dark and the lights are off, but hides away when the lights are off. This could made more appealing by using LED’s as the creatures eyes so people can see them glowing when he’s out of the box.
A similar idea to the light idea has already been done with a candle and a heat sensor to trigger an arm to put out the candle.
For next week we are going to conduct more research into how these are made and controlled, as well as potentially buying a pre-made model online which we can take apart to see how it works.
In week 2’s session we learnt to turn an LED on and off using a push button on our Arduino. We both manged to make it work but found the code pretty hard to understand. Hopefully it will become more clear in the coming weeks what each function means.
In terms of our project we have decided to continue firstly with our firefly light project. This will involve several light sensors connected to a light matrix, so that when the light absorbed by the sensor decreases by putting your hand over it, a select few LED’s in the matrix light up. With multiple sensors in a row, waving your hand across them slowly will hopefully create a smooth array of LED’s across the matrix to glow. The Matrix will be put underneath some fabric so the lights are less visible.
Our aim for next week is to look into the hardware we will need and also carry out some research into the necessary code.
In our first session, we managed to make an LED light blink using an Arduino and coding on the computer. We then brainstormed different ideas for our project which had to be inspired by nature. Below are our 3 favorite ideas:
- Inspired by ripples in water, we’d like to create the same affect using a pressure sensor to control a moving part, under a tray of water. Using a pressure sensor, we would like to be able to control the frequency of the ripples, the harder you press.
2. Our second idea is inspired by glowing fire fly’s. We would like to use light sensors to illuminate LED’s in a dot matrix so that when it get’s dark they light up. The light sensors would be triggered by either turning off the lights in a dark room, or being covered with your hand. Using multiple sensors will enable us to create an array affect on the matrix.
3. Our final idea was inspired by insects that curl up to defend themselves, wood lice for example. Using a touch sensor, we would produce a 3D mechanical model which would curl up into a ball when the sensor is triggered, and roll out flat again over time.