📜 ⬆️ ⬇️

Smart watch do it yourself for 1500 rubles

This story began with the fact that after reading posts with the DIY tag, I decided to get a set of MK + debug board. Googling found out that the cheapest motherboard in the city is TI's LaunchPad. Without hesitation, I went to the store for her, and rushed ... like everyone else first had flashing LEDs, then a display connection from the Siemens CX75, and so on.
Soon I was tired of doing something just like that, without a goal, in order to do something. So the idea arose to create a gadget for myself, which I would use all the time.
For details, I ask under the cat.

I usually walk down the street in my headphones and I don’t hear the phone’s ringing, and a bunch of phone + case + pocket + walking = no vibration is felt. And I came up with a gadget for myself: an informant about SMS and calls in the form of a watch / bracelet. Again, the idea is not new, and in the shops a lot of similar stuff, but I wanted, first, to do it myself, and secondly, it still turns out to be cheaper. The first pancake, as they say, lumpy:

“I don’t know, my watch doesn’t show time.” (C)
The composition is simple: MK, BT, diodes, voltage regulator, vibration motor, battery, case from the old clock. An application for android was written for it, and a small program for MK. Miracle beast, which is already 6 months old, which helped me out more than once.
What the program does on android: connect via BT with a clock, send “1” - the connection is passed, we start the service and listen to incoming SMS and calls. When receiving it, send via BT event ID “2” - SMS, “3” - call.
What does the program on the MK: when receiving a symbol with BT ("1", "2", "3") include a certain sequence of on / off indication and vibration.
Then I didn’t even think about any energy saving mode, and I also forgot about the fact that the stabilizer is working at voltages of 3.6 - 6 V. As a result, one battery charge lasts for working days, provided that the "clock" is constantly connected via BT.
About three months ago, I decided to take up this idea thoroughly and add functionality that is not enough: a full clock, display of the name of the caller, text and SMS sender, the possibility of flashing. I thought there would be a problem with the last one, because the MK is reflashed via the Spy-Bi-Wire interface, and I didn’t want to pull 3 pins to the body output, but then I read in the datasheet that the MK has a bootstrap Loader (BSL) mode that allows you to flash it through the UART interface .

Insides


What I needed from the parts that I had to buy:


At first I wanted to put the MK in the QFN package, but then refused, and took in the tssop28 ​​package. It is easier to breed, as there is still a place under the body.
Part Name
Purpose
Cost of
msp430g2553ipw28
microcontroller
60
lir3048-lby2
battery
77
ds1337u +
real time clock
78
ADP3338AKCZ-3.3-RL7
stabilizer
124
CP2102-GMR
USB UART
84
MCP73831T_2ACI_OT
charging li-ion, li-pol
54
HC-06
bluetooth
120
LCD nokia 1202
screen
33

Total: 630r.
')
All parts were bought in the city, except for BT - it was ordered from China, if you buy in the city, you can find it for 350r.
The rest: mini usb, buttons, vibration motor taken from the old communicator; quartz and passivation were found in the bins of the motherland. If you buy this small things, it will cost 300 rubles on the strength.

Details have what next? Further the model was going to and the program for MK was written. Having rejected Energia, I switched to CCS 5.3 free version with code restriction of 16kb, which is quite enough, considering the memory size of the MK (16kb). In MK involved: 2 timers and WDT + in the mode of interval timer, HW I2C, ADC10, BSL, FLASH. Special attention was paid to the consumption of the device. As a result, 30 mA at full load (BT is not connected, MK is in normal mode, the backlight is at maximum), 8 mA in standby (BT is connected, MK is in low consumption mode, backlight is off) and less than 1 mA in clock mode only (BT is off , MK in low consumption mode, the backlight is turned off). The capacity of the battery is 200mA, so one charge is enough for a day or more. Simultaneously with the programming of the MK, the program for android was being finalized, namely: when an incoming call, the phonebook matches the number, and if a match is found, replace the number with the name and send via BT. And when you receive SMS, we also send the text of the message.


Pay


After writing the program and checking the viability of the assembled model, I proceeded to wiring the board, etching, tinning and soldering.

The entire board took 6 jumpers, 5 capacitors, 8 resistors, 1 LED. Turn on ... works!

Housing


Perhaps it was the most difficult. Dremel, plexiglas, dichloroethane, goi paste: hellish mixture ... I will not particularly describe the process of making the case (and I forgot to make a photo). 2 layers of 6mm plexiglass on the bottom of the case and 2mm plexiglass and protective glass screen from the old fotik on the top. In the process of turning the case, the question arose of attaching the watch to the arm, the usual watch straps would be too steamed with their fastening mechanisms, so I bought one for 350r .:



A couple of through holes in the case and the strap mount is ready. The case turned out really not very good, but it does not affect the functionality of the clock and fully performs its functions.

Here is a video of work:


And finally, I'll sign for all the functionality of my watch:

TOTAL: For 1500 wooden and 3 months of work in the free from work and study time from idea to realization.

Conclusion


While I was busy with this watch, I had a suspicion that a similar article would be published on Habré, but somehow it had passed.
I wear a watch for a week, sometimes correcting software glitches and shortcomings. Recently added the ability to reset an incoming call.

I hope this post will inspire you to do something useful.

PS I look forward to questions and comments!

Part 2 - Board and Components

Source: https://habr.com/ru/post/218495/


All Articles