Skip to content

goldiee36/desk-clock

Repository files navigation

HW Components
  • Arduino Pro Mini clone 3V3 8Mhz → remove voltage regulator and power led, see picture

  • 128x64 monochrome OLED display

  • DS3231 real time clock chip based module → remove charger resistor and power led, see picture

  • 14500 3.7V lithium battery

  • a micro USB lithium battery charger module, resistor changed to 3R6

  • three tactile push button

  • DHT22 temperature/humidity sensor + 10k resistor between the Vcc and Data pins

  • piezo beeper

  • plastic case: http://www.thingiverse.com/thing:1860495

HW wiring
  • arduino vcc and gnd to battery

  • DS3231 vcc to battery, gnd to D9

  • OLED vcc to battery, gnd to D8

  • DHT22 vcc and gnd to battery, data to D4

  • buttons to gnd and D2, D3, D5

  • beeper vcc to battery, gnd to D6

  • charger to battery

SW calibration
  • software have to be configured individually for each arduino, but only once

  • measure voltage with volt meter (eg. 3.93 V)

  • check voltage measured by the arduino by pushing the middle button (eg. 3.54 V)

  • change correction value in the arduino code: measured/reported: #define VCORR 3.93/3.54;

Features in software version v0.35
  • auto on-off: currently active, the screen turns on at every workday at 8:30 at turns off at 18:00

  • button 1 short press put device in sleep -→ almost no power consumption (~11 uA)

  • power off automatically if the battery reading is below 3.4V (power on with the left or the middle button)

  • change screen with short press of the middle button -→ show temperature, humidity, time and battery voltage with different layouts (easy to configurable in the arduino code)

  • on-time is up to 300 hours -→ depends on the ammount of data (pixels) the screen have to display (700mA battery and only one data - like the time - on the screen with small numbers)

  • on-time with 1 big data (like time) and two small (like temperature and humidity) is more then 100 hours. It is ~2 weeks with the auto on-off feature set to display only 8-9 on a workday

Comments
  • removing the resistor on the DS3231 clock module is needed if you use it with a CR3216 non-rechargeable battery as I do

  • make sure you are using the included DHT library. Without that the temperature/humidity measurements will be slow, as the un-modded library is using millis() to measure time. If the un-modded library got a request within 2 seconds it sends back the last measurement without actually measuring anything. (DHT sensor measure interval is 2 seconds.) The problem is that with the power-off of the arduino the timers are not counting so millis() is measuring only the on-time, so the old library thinks that we are still in the 2 seconds window even if the arduino was sleeping for minutes.

  • on the lithium charger module there is a resistor which tells the module how big the charger current should be. Usually these modules are shipped with a resistor (1.2 kOhm) for the 18650 batteries with 1A charging current. Changing the resistor to 3-4 kOhm will reduce the charging current to an acceptable level (400mA-300mA) for the capacity (700-1000 mAh) of the 14500 battery.

  • I used a few windings of the CAT5 wire for the contact points of the battery holder

  • I used a hot glue gun to fix the components into the case and CAT5 Ethernet wires the connect the pins. To save space I removed all metal pins from the boards like the oled display or the clock module.

  • to set the time on the clock module use the included setTime.ino : upload it to the arduino board, open serial console, set speed to 155200 and enter the current date/time on the serial console like: 2017,1,6,15,42,45

Table 1. TP4056 resistor - charge current table

kOhm

3 digit resistor code

mA

30

303

50

20

203

70

10

103

130

5

502

250

4

402

300

3

302

400

2

202

580

1.66

162

690

1.5

152

780

1.33

132

900

1.2

122

1000

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages