I hate desks.
I really do, that's why I couldn't stand sitting on a desk and study for hours.
I thought why not make something fun to encourage me achieve more?
Smart Desk Mood Lamp was my way out, something fun enough to keep me attached to the office!
Hence the chosen theme is to be 'Smart Devices for Your Work Desk '
Tinker CAD
Software: Tinker CAD
Purpose: Design simulation for the electronic circuit
Materials: Electronic components:
Adapter
Jumper wires
Crocodile wires
Breadboard
LCD
LDR sensor
RGB LED
Switch
220 ohm resistor
Arduino UNO
Non-electronic components:
Cardboard
So, how can I make that circuit understand what it's supposed to do?
The brain (Arduino) is controlled using coding; therefore, I used Arduino IDE to control my chip.
CODING STEPS:
To use an IC, I have to install a library to make the IDE understand it, that's what I used for the LCD to define it.
For better understanding, I named each pin used after the component's name (switch, RGB, LDR).
Moving next to the void setup function (that only works for one time), I started to classify each pin whether it's output or input to make the Arduino understand which is controlled by which, then I implemented the initial states for the LCD to show display, set the cursor (position of printing), and printing a text as a genuine start.
Then defined my two variables (one for the switch to initially display the LCD and turn on the rest of the device, the other one is for the LDR sensor).
The next step is followed by action using the void loop function and from loop we can deduce that it's infinitely repeated.
The logic then begins, and in my scenario, I found the nested if to be convenient to build the whole circuit depending on the switch value whether it is high or low.
Inside the first condition comes the second one to determine what the sensor can read to change the RGB color, and the LCD display for the study mood and relax mood.
Finally to save some lines and delay time, I created an external function for RGB pins to call it at any condition without complicity and with simple values.
The idea was to create a circuit that can encourage me to study, it had two moods, one for studying and it works if the light is on (detected by the sensor) and prints on the screen "study me" with the RGB TURNED ON WITH WHITE
the other mood is for someone who decides to take a break or a nap so if the user turns off the light, the screen displays "relax & chill" and change the RGB gradually for amusement.
OUTPUT: LCD, RGB LED
CONTROL: ON/OFF switch, LDR sensor
POWER SUPPLY: 5v Adapter
AS FOR STEPS:
I choose a 5-volt power supply after I had checked the datasheet for each component.
I started connecting the RGB LED each leg to a PWM Arduino pin through a 220-ohm resistor (to protect it from over voltage) and the cathode pin to the mutual ground.
I proceeded with the LCD, after checking its datasheet for wiring, I connected both SDA &SDL to two different analog pins in Arduino which leaves VCC for the common positive in my breadboard and GND for the common ground.
Moving eventually to the switch which I designed to turn on the device and also to set an initial mood to display the LCD at the start, I connected one leg to a digital pin in Arduino and the other to the common Gound.
The main component is considered to be the breadboard for smooth wiring specially for series connections (ICs with resistors, common positive & negative).
After folding I cardboard, I started taking measurement for the components to cut into the design and fix the components using the wax gun, I made sure each element faced the right view for the end user for a friendly interface (LCD & switch for front view, RGB & LDR for top view).
When you hear for example COP what's the first thing that comes to your mind?
mmmmm, maybe environment, climate, or agriculture.
We had a great opportunity this week to create a comprehensive ecosystem to indicate moisture, temperature, humidity in both manual and automatic moods.
I can do more wrong than right :(
my main problem was in the enclosure as shown in the video, my interface components are placed in two different views (top & front view), I had components that were attached directly to the breadboard (RGB LED, LCD, switch) so I couldn't let the board hang in the air or face multiple views at once.
solution:
attach crocodile wires instead of jumper wires... (try and error method as I had the glue as my first option but it didn't work).
benefits: longer and not directly attached to the board.
Issue number 2:
mounting challenge in enclosure while trying to connect the slide switch (the legs couldn't breakthrough the cardboard thickness).
Solution: replacing the slide switch with on/off switch for better wiring in enclosure.
Now I know more about real sizes for machines and how to create a virtual estimation for them on software tools such as Laser cut and Cura, not to mention to take in consideration the limitations of producution in terms of how much materials are consumed and production time.
Checking out the precise work of the printing machines was mind blowing as it was my first practical experience which made me start to consider myself as areal maker!
Title of Media