Total Pageviews


Tuesday, June 4, 2019

Chinese Power Supply PS-1502DD (15V/2A)

original article
   I receive a cheap power supply made in China named PS-1502DD. This power supply can deliver 5 fixed stepts: 1.5V, 3.6V, 4.8V, 6.0V, 7.2V or one adjusting output from 0 to 15V at 2A (theoretically).
   After quick test with Photoframe at 4.8V and 0,63A I realise final transistor (2N3055) is put directly on steel case and is not ok.
  I remove original 2N3055 and I put 2SC5200 on aluminium radiator
   Now, I can power photoframe for long time 😁...
    Ok, I search on net informations about this power supply and I find usefull adresses:бп-кит-ps-1502dd-как-доработать-регулятор-тока/
  The schematic for this power supply is based on "old" LM723 and classical current limiter with transistor, see 

   In article you can see a god version to decrease power dissipation: use a small microcontroller to "follow" output voltage on a switching power suply instead classical transformer and bridge rectifier...

Saturday, June 1, 2019

Sending and Receiving Multiple Text Fields from Arduino in a Single Message

   For some applications we need to send numbers (integer or not) from one Arduino to another Arduino, fo example, is easy to read one or more analog inputs with Arduino and sent to ESP8266 or Nodemecu/Wemos board to publish on IoT server or local webpage. ESP8266 hase just one analog input and is more complicated to use electronic switch to comute for have multiple inputs.
   I test with simple schematic, using SerialSoftware to use D2 and D3 pins:
  I use info from Arduino Cookbook by Michael Margolis and extract info for use 2 Arduino boards, one as sender and second as receiver. Also first Arduino code the message before sending and second Arduino receive and decode the mesage.
   First, I send 3 integer number as in original article using tx_1.ino for fixed numbers or tx_1a.ino for random numebers. For receiver I use rx_1.ino sketch.
  I made Multiple Text Fields in Single Message using Arduino movie to see hwo system work.
   For send a temperature (as -23.50C or +23.50C), a state of a sensor (0 or 1) and a procentage (0 to 100), I use some calculus tricks, for example, I multiply the temperature value with 10 and use integer value, for negative temperature consider a number 1 for sign (and zero for positive) and send multiplied value added at state of sensor, extra send procentage value.
   For example, if temperature is +2.4 degree Celsius, state of sensor is 1 and procentage is 17%, first Arduino will send:
- first numeber is 24 (2.4*10)
- second number is 1, because temperature is positive and sensor is active: 0*10+1
- third number is 17.
   If second Arduino receive 119,11,39 return values are:
- temperature is -11.9 degree Celsius, because 119/10 = 11.9, sign is minus because 11 = 1*10 + 1
- sensor is activated becuse 11 = 1*10 + 1
- level of water is 39%.
   I made Multiple Text Fields in Single Message using Arduino (2)
using tx_2.ino sketch for transmiter and rx_2.ino.

Saturday, April 20, 2019

Delay off system using millis()

my original article

    In simple Arduino projects you can use delay command for have few seconds a led on and after that off, but in in this time program is halted. If you use millis() function, Arduino can execute other tests in program, not halt...
   In Arduino IDE program you cam find sketch named BlinkWithoutDelay
  In article Using millis() for timing you can find a good explanations
   I use this schematic for first test, using a push button and pull-up resistor on input
   If you upload delay_button.ino sketch, you will see next cases:
- standby state, led off:
- push buton, led off
- instantaneous, led on, time defined in sketch
- standby state, led off, again, waitting push button.
because I write the sketch using this chart
In Serial Monitor, you can see
   I change button with infrared module, schematic is
   For module sensor with normal state logic output (LOW in standby and HIGH when is triggered) sketch is delay_sensor.ino
and if you use other sensors with negative state logic output (HIGH in standby and LOW when is triggered) sketch is delay_sensor1.ino
    I made movie named delay off using millis()
    For this sketch(es), states are:
- stanfby, led off
- sensor is triggered, led is instant on
- led is on few seconds (selected in sketch), led is on
- after few seconds (selected in sketch), led is off
Also, in Serial Monitor, you can see the states:

Saturday, April 13, 2019

Simple alarm system with Arduino

original article
   A simple system alarm can be made with Arduino board, a sensor module (sound, PIR, Doppler, etc) and 2 switch or remote control.
   Base schematic is
If use buttons (switches) for control alarmsystem_0.ino is use without change
but is use remote control (singnal in HIGH) must changed in
Also, if sensor is like mine (infrared sensor) sketch is without change
but it easy to change in
for negative logic comand (active in LOW).
    After powered the system, alarm is in stand-by
and after push ON button (or button from remote control), alarm is in waitting mode
If sensor is activated, sound (yellow led in my case) is intermittently powered 10 second or more, depend value from here
   You can see 2 video:
   I add a new movie with this alarm system using RCWL-0516 Doppler (radar) sensor (this sensor was tested a few time ago an posted at 
   Default sketch is for power off the alarm system
but you can change to be armed after powered up dthe alarm system