Total Pageviews

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

Monday, September 26, 2016

Home acces using keypad from outside and push button from inside

   I made a system for home acces with delay-off using keypad from outside and push button from inside. I write a sketch for use actuator or solenoid.
   In stand by mode, solenoid (or actuator) is released.
   After I indroduce good code *1234# from keypad actuator is unlocked for 0.7 seconds; about 5 seconds acces is permited, after that actuator is locked for 0.7 seconds. Same cases are when push button from inside.
   If you use solenoid instead actuator, after I introduce good code *1234# from keypad coil solenoid is powered about 5 seconds, after that coil solenoid is released.
   Base test schematic is:
but if you use actuator, schematic is
and if you use solenoid, schematic is
   A comrade, Tommy, made a permanent montage on PCB for actuator:
   I put an alphanumeric LCD1602 display on i2c and an RTC module with DS3231 (or DS1307) and base schematic is:
   If you upload acces_code_keypad_3.ino sketch. in standby mode, on display is hour & date:
and when acces is shared and a open padlock is displayed.
   In movie named door lock acces with code and pushbutton you cand see all I write: