Editor's Note: This project is called RetroWatch, and the tutorial was originally posted on Instructables by GodsTale. The tutorial for this project is already available in Polish and Korean, and now HardChuangBang has added a Chinese version. When it comes to wearable devices, the first thing that comes to mind is usually smart watches. It’s good to buy a stylish smart watch, but as a maker, you can also choose to make one yourself like me! I named this DIY smartwatch RetroWatch. The whole project is based on Android and Arduino development board. All the software and hardware designs of the project are open source. You can download the source code or contribute your own strength on GitHub. It is also worth mentioning that RetroWatch already supports u8glib, which allows you to choose any screen you want (including OLED), and the RAM occupied by the screen can be reduced. Step 1: System structure designAs shown in the figure above, the structure of RetroWatch is relatively simple: the hardware platform is based on Arduino, and there is only one control button on it. In addition, I also developed an Android-based application that allows the watch to connect to Android devices via Bluetooth, so that we can view RSS push and system notifications on Android devices through RetroWatch. Step 2: Component PreparationBecause we are making a smart watch, ensuring that each component is small is also one of the keys. Arduino Microcontroller I chose the smallest Arduino, ProMini, which is a lightweight version of UnoR3. It doesn't even have a USB interface chip, so you need to prepare an additional USB to UART module. This Arduino has two versions with different working voltages (3.3v/5v). I chose the 3.3V version because the Bluetooth module and display both support 3.3V, and the 3.7V LiPo battery can also be used normally. The 3.3V version of Arduino operates at 8MHz, and the 5V version operates at 16MHz, but 8MHz is enough for practical use. The core processing device of Arduino Pro Mini is ATmega328 microcontroller, which has 2KB RAM. However, the Arduino version with ATmega128 that only has 1KB RAM is not enough. Bluetooth The HC~06 Bluetooth module is quite common. One of them has an interface board with a reset button and an LED, but it is also relatively large. Since the interface board is not very useful for this project and it also adds extra cost, the HC~06 without the interface board is selected here. Display We need a display that is small enough and consumes low enough power. I finally chose Adafruit's 0.96-inch 128×64 OLED display, which supports I2C and SPI and can be easily connected to Arduino. I chose I2C and SSD1306 driver chip. Battery My choice is a 3.7VLiPo battery with a capacity of 140mAh. It can last for 7 hours under normal use. Again, the size of the battery is important. other In addition to components such as wires, a 10kΩ resistor is also required (for button connection). Step 3: AssemblyThe hardware structure connection diagram of the entire system is shown below: Bluetooth connection to Arduino:
OLED connection to Arduino:
If you are using the SPI interface, you can refer to the Adafruit tutorial and connect as follows:
Buttons: The connection method is as shown in the figure. Note that a 10kΩ resistor is used here. Connect the battery to the Arduino:
USB to UART module connected to Arduino:
The installation dimensions are as follows: Step 4: Compile the Arduino code and uploadThe completed Arduino project can be downloaded from GitHub. After downloading, don't rush to compile it, you still need to configure the development environment first. Install the graphics driver: First, you need to install the graphics processing library Adafruit_SSD1306 and Adafruit-GFX-Library so that images can be displayed on the OLED. (In some development environments, the Adafruit library will conflict with the Robot_xxx library; if this happens, back up the Robot_xxx library and delete it from the library folder.) WARNING: If you are using an OLED with the SH1106 driver, download the Adafruit_SH1106 driver from GitHub. In addition, this project also supports u8glib. You can download the version that supports Arduino from its official homepage. Copy the bitmap image header file: Copy the bitmap.h file in the RetroWatchArduino folder to the path /Arduino installation folder/Arduino/hardware/libraries/RetroWatch. If there is no such path, you can create it yourself. Modify the source code: Open ArduinoIDE and load RetroWtchArduino.ino. If the pins you use are different from those in this tutorial, you need to modify the pin definitions:
If you are using u8glib, load the RetroWatchArduino_u8glib.ino file and pay attention to the following code:
If you are using Adafruit's graphics library and have used the OLED's Reset pin, connect the OLED's Reset to the Arduino's D8 pin. You can also customize it:
Compile and upload: After completing the above steps, compile and upload. If successful, the RetroWatchArduinoLogo and AdafruitLogo will be displayed on the screen. After the logo, the screen will display 00:00, as shown below: Step 5: Android software and its source codeBecause only versions after Android 4.3 support reading notification information from apps, please make sure your Android device is installed with Android 4.3 or later. But if you are using a version lower than 4.3, you can use another castrated version of the app: you can receive notifications through the smartwatch, but you can't read the content. The source code of the app can be viewed on GitHub, or you can install it directly through the Google Play Store (RetroWatch or RetroWatchLE for lower versions). After installing the Android software, check whether the system has granted it permission to read notifications. Next, turn on the Bluetooth of your phone and pair the Bluetooth of your Android phone with that of the Arduino. Then select the connected Arduino in the RetroWatch software. If “Connected” is displayed on the interface, it means the connection is successful. Click the menu and select Data transfer to Watch, and then the device will use Bluetooth to transfer the time and information to the smart watch. Because the performance of the watch hardware is limited, we need to use Android apps to implement many functions. The main function of the watch itself is display. In the Android app, you can set the types of push messages (only English characters are supported) and status notifications (such as mobile phone battery level and signal strength), and you can also push RSS subscribed in the app (you can subscribe to weather RSS to display the weather on the watch). Updates are synchronized every 30 minutes. In addition, the app provides 65 different display icons, and you can define your own settings. Step 6: Watch function introductionOnce everything is installed, it's time to explore our smartwatch. The smartwatch system works in the following mode: Startup display: Display the logo and start the watch. Clock display: Displays the time on the connected Android phone. In addition, the time display can be modified. Currently, three modes are provided: analog display, digital display and mixed display. If you click a button, the watch will enter the emergency information display mode. If there is no data update and operation within 10 minutes, the display interface will switch to the standby interface. Emergency information display: When the user clicks the button or a new emergency message is input, the watch enters this mode. The user can click the button again to view the next message. If there is no operation for 10 seconds, the watch will automatically display the next message. After the message display is completed, the watch switches to normal message display. Because the RAM is only 2KB, it is very small. Therefore, the smart watch can store up to 3 emergency messages. If there are more than 3, the oldest message will be automatically deleted. Normal information display: After the emergency information is displayed, the watch will continue to display normal information. Click the button or do not operate for 5 seconds to display the next information. After the information display is completed, the watch switches back to the clock display. A maximum of 7 normal information can be stored. Standby display: If there is no data update and operation within 10 minutes, the display interface will switch to the standby interface. In this mode, the watch interface only displays the indicator (which can be selected in the Android application) and the time in hh:mm mode, and its power consumption is also reduced. In standby mode, click the button or receive a new message, and the watch enters the clock display mode. Here is a video demonstrating the working process: Step 7: External structure production You can hand-make a simple wrapper yourself: You can also download the 3D file to make a cool watch: Of course, you can choose not to wear a watch, and it’s also good to make a desktop reminder: |
<<: The essence of the Internet winter is the collapse of the loser economy
>>: 10 predictions for VR in 2016
How much does it cost to be a Guyuan agent for a ...
This article is reproduced from Xinhua News Agenc...
On July 30, the Huaqiang City Garden project in B...
Compared to the remastered games for Microsoft XB...
Yesterday afternoon, Pinduoduo held an emergency ...
Recently, the entry #One person controls 600 mobi...
In recent days, Jetour has made a breakthrough an...
How much does it cost to customize the Yongxin Mu...
One minute with the doctor, the postures are cons...
In the past two years, mobile Internet has been e...
In 2015, with the bombardment of information from...
Chip manufacturer Nvidia has a long history with ...
As one of the rivers with the richest aquatic bio...
Recently, Chinese scientists discovered a new min...
In recent years, the media has repeatedly reporte...