Total Pageviews

Friday, November 4, 2016

Adjusting clock with thermometer using DS3231 on 1.8" ST7735 display

   I made a clock with manual adjust for data and hour without RTC library, just use subroutines.
   For 1.8"display with ST7735 driver I use TFT_ST7735 library adapted by Bodmer after Adafruit library.
   I use next schematic:
with TFT_DigitalClock_RTC1c.ino sketch (in sketch you will find links with original info about some soubroutines).
   If you push MENU button, enter in mode to adjust hours, then minutes, day of week, years, mounth, day, after that Arduino send data to DS3231 to store and after that clock will work normally, see in adjuting clock with thermometer using DS3231 on 1.8" ST7735 display movie:


Bibliography:
https://github.com/Bodmer/TFT_ST7735
http://andydoz.blogspot.ro/2014_08_01_archive.html
http://www.goodliffe.org.uk/arduino/rtc_ds3231.php
http://forum.arduino.cc/index.php?topic=398891.0
http://nicuflorica.blogspot.ro/2016/11/afisaj-tft-de-18-cu-driver-st7735b-3.html

Saturday, October 29, 2016

1.8" TFT display with ST7735B

   I buy an small 1.8" TFT display with ST7735B driver and I try to connect directly to Arduino Uno board as I see on net... but result was not good... display is almost white
and just disconnect accidentaly the GND I can see something...
   So, I search on Arduino forums and on net (article INSTRUCTABLES: Arduino TFT display and font library ) and I found a solution like Nokia 5110 monochrome display .. I put 1k resistor on each data pins to Arduino to display:
and I tested more Arduino library for this display with ST7735 driver (from Adafruit, TFT library, ucglib library, etc) and I made  move to see .. movie is named ST7735B display with Arduino board

NOTE: Original article is in roumanian language, see Afisaj TFT de 1,8" cu driver ST7735B !!!

Monday, October 3, 2016

Under & overvoltage relay for AC main power supply (2)

   After I test the Measuring AC Voltage with an AC to AC power adapter from OpenEnergyMonitor and put my result on article Measuring AC Main Supply Voltage with Arduino (2) and after I made Under & overvoltage relay for AC main power supply now I change schematic for made a new version for voltage protection relay using this schematic
   If I use main_supply_emonlib_under_overvoltage_ver3.ino sketch after module is powered, on display I see the voltage on main power supply:
and after I push MENU/OK button, on display is undervoltage thereshold, who cand change with + & - buttons:
    After I push MENU button, value is stored in EEPROM memory, on display is overvoltage thereshold, who can be change by + & - buttons:
after push again MENU button, value is stored in EEPROM memory, on display is delay-off tine in second for reconnect coil relay after voltage inoutside range:
   In under & overvoltage relay with Arduino (2) movie you cand see the cases and how you cand cheange value for undervoltage, overvoltage and delay-off time:
   If I use main_supply_emonlib_under_overvoltage_ver3c.ino value for main power supply is displayed with a number after comma (point), exactly as in under & overvoltage relay with Arduino (3) movie:

31.07.2020
   I added a sketch to use LCD1602 alphanumerica display on i2c connexion instead existing display (with MAX7219 and 7-segment led display). Sketch is main_supply_emonlib_under_overvoltage_ver4.ino !

02.08.2020
   I added a new sketch with best implement of delay-on to connect the relay... see main_supply_emonlib_under_overvoltage_ver4a.ino

Under & overvoltage relay for AC main power supply

   After I made a test for Measuring AC Main Supply Voltage with Arduino, now I change the sketch for made protection relay with adjustable limits for undervoltage, overvoltage and delay-off time using 3 buttons:
   After power the module, Arduino read and calculate vltage for AC main power supply and if is ok, coil relay is powered:
   If push MENU/OK button, on display is SET
after 2-3 seconds, on display is undervoltage threshold, who cand change using + & - buttons:
    After you push MENU/OK button, is displayed overvoltage thereshold, who cand change using + & - buttons:
   After you pus MENU/OK buttons on display is delay-off time for reconnect coil relay after voltage is outside good range, also you can change value form 1 tp 20 seconds using + & - buttons:
    After you push MENU/OK button, on display is main voltage:
   I write main_voltage_3.ino sketch who made exactlly in picture, but it more easy to understund cases if you see under & overvoltage relay with Arduino movie

Bibliography:

Tuesday, September 27, 2016

Measuring AC Main Supply Voltage with Arduino (2)

   In article named Measuring AC Voltage with an AC to AC power adapter from OpenEnergyMonitor I found a interesting solution for measure AC voltage.
   Schematic is
   I use EmonLib library like in article:
   On DSO I see on R1 resistor
and at A2 input of Arduino board (on R4 resistor):
   I use an LED display with 8 digit 7-segment drived by MAX7219 (I present on article namend Modul de afisare cu 8 cifre LED din 7 segmente fiecare controlate de MAX7219
   I use some configuration for LedControl library (dosc at The Arduino LedControl library):
   Test schematic is
   I write main_voltage_emonlib_1.ino sketch and upload in Arduino board:

Measuring AC Main Supply Voltage with Arduino

   If you need to measuring AC main supply voltage with Arduino must made some calculation.
   I use a simple schematic:
   I can directly measure the DC voltage on R1 resistor. I use internal reference from Arduino Uno board (compatible board with ATmega328 microcontroller) so maximum value for U2 can be
U2 = U1*(R1+R2)/R1 = 1.1*(1+22)/1=25.3V
  AC voltage U1 so DC voltage U2 = U1*1.41-Udiode
  If we put value in equation
U1 = (U2+Udiode)/1.41
because I use trafo U0 = k * U1.
  For tests, I use a trafo imprinted 220V/2x12V 200mA but if I measeure voltage from secondary coil
I found 11V when main voltage is 220V, so k = 220/11=20. I use an 1N4007 diode and Udiode=0.65V.
  I use an LED display with 4 digit 7-segment drived by TM1637 (who I present on base blog in article named Afisaj cu 4 cifre controlate de TM1637 si Arduino and sketches are at https://github.com/tehniq3/TM1637-display):
   Schematic for display put on Arduino Uno is:
   I write main-voltage_0.ino sketch and upload in Arduino board and I made a movie named main supply voltage measured with Arduino