You are on page 1of 19

Making

Machines
FATIMA MAIDERIBE
1 Research

Contents 2 Coding Practice

3 Concepts

4 Prototype

5 Final Design
6 User Manual

7 Code Documentation
8 References
Research
While researching my final clock, I looked
back on our previous project last term. I
look at the clocks that I previously found
interesting and thought I would like to
build. I then looked up clocks that were
made using Arduino. I knew I wanted to
keep the idea of the colour changing
depending on the time, especially after the
lessons we had with the Neopixel.
Coding
Practice
Neopixel
After we learned how to use the LEDs
we moved on to the Neopixel. I found
that working with Neopixel was a lot
easier since we used the example
code and ….. We then used buttons to
have it change colour when it was
pressed to change to a different
colour. Afterwards, I merged the RTC
and the Neopixel together to have it
show the time. But since the Neopixel
had 16 and not 12 LEDs I could not get
the exact same time. So instead I
Video Link
divided the seconds by 15 so that it
could to some degree show the time.
RTC
With the RTC we not only got to learn
how it works but also how to assemble it
together. Before we got to programming
it with the Arduino we soldered it, which
was something I got to do for the first. At
first, I was worried that the connections
were correct, but after testing it with the
ds1307, I saw it worked. But even though
it worked the first time I had a lot of
problems with later on. Sometimes on
the serial monitor, it will print that it
couldn't the RTC. After finally checking
the connections on the Arduino, it finally
worked.
IR Remote
Since we had not had the opportunity
to use the IR Remote, I had to find
tutorials of it online. the first few that I
found were different from the one
that I had, but I was able a to find
another one that explained how to
map each of the buttons and test it
with LEDs. I then tried to use the code I
had of Neopixel and RTC and had the
remote inxrease and decrease the
brightness. At the start it didn’t really
work because I had mapped the
wrong buttons. but after rectifying
that problem I was able to get it to
function properly.
Concept
After the formative
presentation, I reevaluated
the idea I originally intended
for my final project. I then
decided I wanted to have a
sort of the old boxy tv style.
Where the light from the
Neopixel would shine and you
would see the time from it.
You would use and IR Remote
to control it.
MATERIAL INTERACTIVITY
Once I got an idea of what my concept For the interactive part of my project, I
was going to be I decided that I was decided I wanted to use an IR Remote
going to laser cut instead of 3D printing instead of a button. So it would
after I got feedback. After researching increase/decrease the brightness of the
some of the different materials, I came Neopixel, turn it off, and also switch
across perspex acrylic and thought that between the time and when its
would be the best material for my morning/afternoon/evening/night.
project.
Prototype
Just before I started building my final
project I prototyped it using
cardboard just to get an idea of what
the measurements were going to be
and how it was going to love overall.
At the start, I was planning on having
my components at the bottom/base.
But after some feedback, I deiced to
have it to have it at the back so the
Neopixel is pointing directly at the
screen and I would only need a
mount to hold it up.
Final Design
For my final design, I was originally going to laser cut
my acrylic to my desired dimensions and glue them
together like that. But I was then recommended to try
a website (https://en.makercase.com/#/basicbox)
where you can type the box dimensions and it will
create finger knots where you can fit each piece
together like a puzzle. This made it easier when it
Video Link
came to glueing everything together and making
everything even. After that I then laser cut the area
where the cable for the Arduino would go through
and a screen area where you would be able to view
the neopixel. Just before I glued everything I made
sure that each component was positioned well and
also made mounts for the neopixel so that it can stay
in place and face the screen directly. Also, one for the
IR receiver, so that It was near the opening that I
made in the front. So that light would pass thorough
and the remote will still work.
Final Design
After I saw everything was functioning properly I
superglued everything and added masking
tape to the side, so that I can dry it properly.
Even though it was working well at one point,
when I checked again later in the evening it was
not working. So I checked the example code for
the Neopixel and it worked fine. Then I checked
the RTC, which said it could not find RTC so I had
to open the TV by the screen since it was
already loose, that way I was able to access it
and fix the connections that were A5 and A4.
Final Design
After correcting the problems I was able to get the clock to
function again properly. I then re-attached the screen and
added the finishing details to the final clock design. I believe that
I was able to achieve my goal for this project by being able to
show the time with the Neopixel and having an IR remote control
it. I thought the overall design was really good, but if I had more
time I would have added a bit more to it especially now that I am
more confident in using the laser cutter. But overall this was a
success.

Video Link
Neopixel

Ir Receiver
User Manuel
The Time TV shows the time with a Neopixel and you
can use the IR Remote to do a few things to it!

One of the first things you can do with If its to bright for you, thats alright!
This button will increase the brightness
the Time TV is press the arrow that is Just press the arrow that is facing
of the Neopixel
facing up (^). down.

Increase Brightness Increase Brightness Decrease Brightness

You can also check whether its morning, When you've done checking out all the
This button will decrease the brightness
afternoon, evening, or night when the 0 cool features, you can press the red off
of the Neopixel.
button is pressed button to turn it off. But dont worry
you can always press one of the arrow
buttons to turn it back on!

Decrease Brightness Check Color of the Time Turn Off


Code Documentation
The code starts off with the inclusion of the different libraries
needed in order for the components to function. Then the most
important part of this section would be mapping the buttons
used for the IR Remote. Since the numbers did not correspond
to what was on the remote, I needed to have the Arduino read
the data from what was on the remote. Which when pressed
would show the correct number on a serial monitor. I then
defined the buttons I wanted to use, named them so that I can
call them later in the code, and added their corresponding
number.
Code Documentation
With this part of the code, I decided to have it
be its own function because I wanted to clean
up the code in the void loop. This code
controls the time that is shown on the
Neopixel. Since the Neopixel has 16 pixels, I had
to find a way to show seconds, minutes, and
hours without it disappearing after a certain
period of time. Since we already worked on the
seconds in class, which was dividing the
seconds by 15 since 0 is counted. So it starts at
0 instead of 1, meaning 15 would be 16. Then I
had for every 3 quarters the Neopixel would
change colour. Whereas for the minute and
hour part of the code I used the
Modulus/Remainder of the NUMPIXELS instead.
Code Documentation
The void loop was the most important part of my clock code as
it does many things. Its primary function is, in my case for my
clock, to increase/decrease the brightness when the up and
down button is pressed and turn it off when the off button is
pressed. For button 1 the timeoftheday function is called so that
the code can be executed. I found that for some reason the
Neopixel would not move/change colour unless the button was
pressed, but I wanted it to still work without having to press the
button. So I used the Simple timer library and I set an interval
for around 1 second (called in Void Setup), which got it to work.
Lastly, for button 0 I wanted to have something similar to my
previous project when the colours represented the morning,
afternoon, evening and night. So if the hour was less than 5, it
would change to the colour that represented the night, if the
hour was less than 11 it would change to the colour that
represented the morning, etc.
References
Sources
https://roboticsbackend.com/arduino-ir-remote-
controller-tutorial-setup-and-map-buttons/
https://en.makercase.com/#/basicbox

Libraries
Simple timer
RCTlib
Adafruit NeoPixel
IR Remote

You might also like