Book Read Free

Upcycled Technology

Page 4

by Daniel Davis


  If you were to power up the Arduino at this point, you should see the backlight come on for the screen, but nothing will display on it until we add some code, so let’s do that next.

  We have the LCD connected to our Arduino driver, so the final key to making the LCD useful is to program some code into the Arduino that sends text to the LCD. Arduino has its own programming software that you can download from their website.11 After installing software, plug your Arduino into your computer and launch it. If I were to write the entire code from scratch, I would have to tell each Arduino pin what to display, how to display it, when to turn off, etc., which would take forever. Luckily this can be resolved through the use of “libraries”12. I was able to find a couple of different libraries for the PCF8114, but I chose this one from GitHub user cattzalin13 because of its ability to display bitmap images.

  You can download it, unzip it, and then move it to your Arduino libraries folder (check out this guide14 for more information). You can then open up the Arduino software and start writing some code. You can use my code below as reference, but basically I imported the library, set the variables for the type of screen I was using, and then I sent some text to the screen.

  Plug in your Arduino, upload the code, and if everything works, you should see your text on the screen!

  Now that we have our LCD functioning, we can move on to the next step!

  #include

  static const byte ledPin = 13;

  static const byte LCD_WIDTH = 96;

  static const byte LCD_HEIGHT = 65;

  static PCF8814 lcd;

  void setup() {

  lcd.begin(LCD_WIDTH, LCD_HEIGHT);

  pinMode(ledPin, OUTPUT);

  lcd.print(“The LCD Totally Works!”);

  delay(5000);

  lcd.clear();

  }

  void loop() {

  lcd.setCursor(0, 0);

  lcd.print(“Visit my website”);

  lcd.setCursor(40, 1);

  lcd.print(“at:”);

  lcd.setCursor(0, 2);

  lcd.print(“www.tinkernut.com”);

  delay(5000);

  }

  Step 5: Adding Bluetooth

  Right now, all we have is an LCD screen on which we can display stuff. As a watch, it’s nothing special. Every watch can do that. The magic dust that will turn this LCD screen into a smartwatch is Bluetooth. Bluetooth is a wireless standard that will let the smartphone communicate with the Arduino and to send it data like time, date, notifications, etc. I ended up going with a JY-MCU (HC-06) Bluetooth module. It’s about the size of the Arduino Pro Mini. There are smaller options available, but they require surface mount soldering skills, which I don’t really want to get into for this project.

  Connecting it is pretty simple. Here’s a diagram:

  Step 6: Other Components

  There were a couple more hardware features that I wanted to add to the smartwatch: a vibration motor for notifications and a button to turn the backlight on and off. To properly wire a DC motor to an Arduino, it normally requires a transistor, a diode, and a resistor to avoid burning out the Arduino and/or the motor. But since this is a very small motor with very small voltage, and because there is very little space for it, I’m just wiring it directly to the Arduino. The last element I added was a momentary switch button wired to pin two and the GND pin of the Arduino.

  Step 7: Updating the Arduino Code

  The Arduino code that we’ve written so far simply displays characters on the LCD, but we want it to do a lot more than that. The first thing I want to add is a “splash” screen, which is basically a logo or image that is displayed when the watch is booting up. You can’t insert an image into Arduino code like you would insert an image into a Facebook post. Instead, we have to convert the image into code that can be read by the Arduino. To create the coded version of an image, you’ll need a black and white image, and you’ll need to make sure it’s sized to within the resolution of your screen and saved as a bitmap file format. For the Nokia screen I’m using, it’s ninety-six by sixty-five pixels. Then you can download a free image conversion program called LCD Assistant15. Just load the image into the program and save the output as a text file.

  When you open up the text file, you will see the image code that you can use in your program.

  Let me add as a disclaimer that my code is very buggy, but I’ve made it open source. The code is thoroughly commented and documented, so you can copy the code from my GitHub page16, but here’s a brief explanation of what it does. Aside from adding an image to my Arduino code, I also added some code that reads data from the Bluetooth Serial connection. So if data is sent from a connected Bluetooth device (such as a smartphone), it will read that data and process it. The data that it’s going to be processing from the smartphone will be the current date, time, a phone number value, and a text value. Each of those values is stored as a variable and displayed to the screen. If there isn’t a value sent by the smartphone, then it just displays a default text or no text at all. At the end of the code, I have the section to make the button work, as well as a backlight loop to keep the backlight on for a set period of time.

  Step 8: Making an Android App

  The second half of making this smartwatch “smart” is connecting it to an Android phone. To send data from the Android phone to the smartwatch, we will need to make an Android app that runs on the phone. I know that sounds like a daunting task, but there’s a nice cheat for making quick and dirty Android apps. MIT maintains a program called App Inventor17 that is a simple, user-friendly way of making Android apps. If you want a quick run-through on how to create apps with it, you can watch my “Make An Android App In 7 Minutes” tutorial18. The app I made was very simple; it essentially had a connect/disconnect button for the Bluetooth, and then it would send the date/time and phone/text notifications via Bluetooth. Since I can’t really export working files from AppInventor, we’ll have to settle for images of the layout I created. If you don’t want to create your own code, you can download mine at the Google Play app store.

  It’s important to note that the Bluetooth device must be paired with the Arduino in the settings before you can use it in the app.

  Step 9: Testing the Functionality

  We’ve got our Bluetooth Arduino watch (connected to a breadboard), and we have our Android app, so let’s test it out. After you see the splash screen, it will then wait for input from your phone before displaying time.

  As stated in bold above, make sure that the Bluetooth device is paired with your Android device in the settings first. Then you can launch your app and connect to it. If everything is successful, you should see the date and time on the screen.

  Pushing the button should activate the backlight. And last but not least, whenever you receive a call or a text, the screen should light up and the motor should buzz.

  Step 10: Shrinking It Down

  Now that we have the software and hardware to make a functioning smartwatch, we now need to make it look like a smartwatch. The first step is to swap out the larger Arduino Uno for the smaller Arduino Pro Mini. Just load the same software onto the Arduino Pro Mini, and then connect all the wires to it in the same way. The next step is to take the mess of wires connected to the breadboard and solder them all together into a simple little circuit board. I ended up adding a diode to the motor for protection and a 10k Ohm resistor to the momentary button. Another tip for the motor is to make sure that the head of the motor isn’t being obstructed by anything. Otherwise, the vibrating top of the motor might get stuck. How you arrange everything is completely up to you, your skill level, and what you have to work with.

  There’s one key component we’re missing. The watch obviously needs a source of power. Ideally, it should be a rechargeable battery that can be recharged using any micro USB cable (just like most portable devices). To achie
ve this, I got a 3.7v 100 mAh Li-ion battery and a one amp micro USB charging board that acts as a surge protector and regulator.

  After the project, I found this battery that would probably make a better option. Before soldering the charging board to the Arduino, I tweaked the code and made sure everything was perfect and then reuploaded it one last time to the Arduino. I say “last time” because it will be difficult to upload anything to it after it’s all been shoved inside of the smartwatch case. With the code uploaded, you can now solder the charging board wires to the VCC and GND pins or the RAW and GND pins on the Arduino and then test it out!

  Step 12: Final Steps

  We have made it to the final step! This is the fun part where we take our smartwatch monstrosity and make it look purdy. Feel free to get creative with the casing. You can use whatever materials you have available. What I did was take the measurements for the watch, the screen, the backlight button, the on/off switch, and the micro USB charger and enter them into a CAD program. For simplicity’s sake, I used Tinkercad19, an online CAD program. The watch size ended up being about 1 ¾ inches wide and tall, which is tolerable. But it also ended up being one inch thick, which is not as desirable. Most of that space was being used up by the battery I chose. So in retrospect, I’ll probably end up going with a thinner but wider battery.

  I took the CAD model and printed it out using a 3D printer. It took a couple of tries before I was able to get everything to fit. To finish things off, I added the screen protector that I salvaged from the original cell phone along with a watch band. Overall, I’m happy with the results. If I were to revisit this project, I’d probably opt for a slimmer battery, smaller Bluetooth, and a fabricated PCB. Hopefully this inspires some of you to upcycle your own old cell phones into something cool!

  Old Webcam to Backup Camera

  Turning an Old Laptop into a Projector

  CD-ROM Drive to 3D Printer

  Old Smartphone to Security Camera

  Revive an Old iPod

  Old Cell Phone to Smartwatch

  Old Webcam to Backup Camera

  Parts & Tools Check List

  •USB webcam

  •Android smartphone

  •Six foot USB extension cable

  •USB OTG adapter

  •Strong magnets

  Turning an Old Laptop into a Projector

  Parts & Tools Check List

  •Old unused laptop

  •Overhead projector

  •Screwdriver

  CD-ROM Drive to 3D Printer

  Parts & Tools Check List

  •3 x Desktop computer CD-ROM or

  DVD-ROM drives

  •3 x Stepper motor drivers

  •1 x Arduino

  •1 x Desktop computer power supply

  •2 x Electrical box covers

  •1 x Generic 3D printing pen

  •1 x 22 Ohm resistor (value may vary depending on your 3D printing pen)

  •1 x NPN transistor

  •Various nuts, bolts, and spacers

  •Soldering equipment and wire

  Old Smartphone to Security Camera

  Parts & Tools Check List

  •Old Android smartphone

  Revive an Old iPod

  Parts & Tools Check List

  •An old iPod Classic (may not work with other models)

  •A CompactFlash (CF) camera card

  •CF Card to ZIF adapter (available on

  eBay, Amazon, or Ali Express)

  •iPod Classic repair kit (also available on

  eBay, Amazon, or Ali Express)

  Old Cell Phone to Smartwatch

  Parts & Tools Check List

  •Old Nokia Cell Phone

  •SparkFun Arduino Pro Mini 3.3v

  •Bluetooth Module

  •Micro USB charging board

  •3.7v Lithium ION battery

  •4 x 1.8 kOhm resistors

  •4 x 3.3 kOhm resistors

  •1 x 10 kOhm resistors

  •1 x diode

  •Small slide switch

  •Small momentary button

  Afterword

  Upcycling is more than just slapping a new coat of paint on a night stand. There’s an element of artistry and nostalgia in old things that we often take for granted in the wake of silicon chips and mass production. Each item has a history and tells a story of a bygone era and how we’ve developed as a society. To let time and lack of interest steal these hidden treasures from us is like leaving a music box’s melody to be buried and forever lost in a landfill.

  Through upcycling, we are not only keeping these legacies alive; we are adding to them. Just like adding a dash of spice to an old recipe, we are creating art while building upon the art of others. Each item that we upcycle has an endless history of artistry and innovation: how the materials were sourced, the tools that made it, the design process, the production process, and the path it took to get to you. It’s the lineage of our society, and it’s that lineage that we are honoring and continuing.

  As in life, there can be tremendous benefit in taking a second look at what’s considered worthless junk and embracing it instead of discarding it. Inspiration can be found in things you would never expect. Hopefully this book has taught you to see through the label of “junk” and to instead focus on the potential of older gadgets to become something new. Maybe one day, another generation will upcycle your upcycled creations!

  Acknowledgements

  An acknowledgement for my own book. As an IT professional, that’s not something I ever thought I’d be writing. Don’t get me wrong, I’ve often wondered what it would be like to write a book and an acknowledgement, but I never really expected that wonder to become an actual, legitimate reality. This whole process of writing a book has been surreal and somewhat eye-opening. Being a part of this process and seeing “how the sausage is made,” as it were, has really brought to light the hidden roles of the people that surround me. So even though this is slightly unfamiliar territory for me, the only reason this book even exists is because of the love, kindness, guidance, cooperation, patience, and encouragement of others, and I want to do my best to acknowledge those hidden figures.

  Putting a book together requires a lot of time and attention. But when you have a family, including a one-year-old, having spare time and attention is a precious commodity. To that end, I have to thank my wife, Marian, who sacrificed her own time and attention and spent many a night with a screaming toddler just so that I could see this thing through. For me, love is shown more by actions than words, and to cede her time so that I could achieve my goals speaks more than a book full of love notes.

  The topics and projects in this book are the result of my passion for learning and understanding technology. I share this passion with the thousands of viewers and followers on my YouTube channel. Sometimes it’s hard to continue having a presence on social media due to all the negativity surrounding those platforms, but I have a great base of subscribers and commenters on my channel who have spurred me on and supported me for years. If it wasn’t for them, I would have given up on making stuff a long time ago.

  How you grow up shapes who you become when you’re older. You always hear that growing up in a large family is great, and I had the delightful benefit of being raised in a large family with my mom and dad, two brothers, and three sisters. All of them have always encouraged and supported my drive and creativity…at least to my face. Aside from my family, my biggest influence growing up was Lewis H. Hunt, our 70-year-old cattle-farming neighbor. He showed me the value of hard work and how to push through the boundaries of my perceived limitations. He was an amazing guy, and he will be missed.

  Let’s be honest, if I were to try and publish a book on my own, it would probably make for the world’s greatest toilet paper. All I have is a jumbled mess of thoughts. What
you’re holding in your hands right now is the product of a team of hard workers who are experts at turning monochromatic words into art. I am in humble gratitude to the team at Mango for giving me this once-in-a-lifetime opportunity!

  Finally, I would like to thank my friends at SplatSpace, my local hacker/maker space. Maker spaces in general are a great place to meet likeminded makers, share ideas, and get feedback for projects. SplatSpace is a great group of men and women who love to look at the world and see what makes it tick. They’ve inspired me and helped me refine myself as a maker. Thank you all!

  About the Author

  Daniel Davis is an IT professional and Youtube personality with an insatiable curiosity and a propensity for tinkering. Using his desire to constantly learn and share what he's learned, Daniel founded the STEM focused Tinkernut, LLC (www.tinkernut.com) to teach people more about tinkering, hacking, and programming. His efforts through Tinkernut, LLC have been fetured and published in several major websites, blogs, textbooks, and magazines. Aside from learning and teaching, Daniel is also an active supporter and member of local maker spaces and maker space initiatives.

 

‹ Prev