Arduino Shift Registers

Hasistranger

Well-known member
  • Oct 21, 2010
    13,426
    7,103
    113
    Western Province, SL
    my-journal-view.vercel.app
    මචන්ලා ඔයාල දන්නවනේ මම කාලයක ඉදන් java speech recognition system එකක් හදල එක වැඩි දියුණු කරනවා කියල , ඒ වගේම එකට wireless home automation system එකකුත් හදල එකත් program එකටම අමුණලා වැඩ කරවනවා කියල දන්නවා ඇතිනේ.ඉතින් මම ලගදි කරපු වෙනස්කම තමයි home automation system එකට shift register එකක් සම්බන්ද කරපු එක.

    දැන් ඔයාල බලනවා ඇති මොකක්ද මේ shift register එක කියන්නේ , මොකක්ද එකෙන් කරන්නේ කියල.ඔයාල දන්නවා ඇතිනේ අපි arduino board එකක් ගත්තහම අපිට I/O pins සීමිත ගණනක් තියෙන්නේ කියල.ඉතින් මේ shift register එකක් උපයෝගී කරගෙන අපිට පුළුවන් arduino board එකේ I/O pins තුනක් පමණක් උපයෝගී කරගෙන බාහිර උපකරණ ඉතා විශාල ප්‍රමාණයක් පාලනය කරන්න.

    අපි දැන් බලමු කොහොමද මේ shift register එකෙන් වැඩ ගන්නේ කියල.


    Pinout_1.png


    මේ උඩින් තියෙන්නේ 8 බිට් shift register එකක්. ඒ කියන්නේ අපිට මේ shift register එක උපයෝගී කරගෙන I/O උපකරණ 8ක් පාලනය කරන්න පුළුවන්.මේකේ,


    Q0 ඉදන් Q7 වෙනකන් තියෙන පින් ටික I/O පින් විදිහට ක්‍රියා කරනවා.
    Vcc පින් එකට +5 විභවයක් ලබාදෙන්න ඕන.
    GND පින් එකට භූගත පින් එක විදිහට ක්‍රියා කරනවා(-V).
    DS කියන පින් එක arduino board එකට connect කරන්න ඕනේ.
    OE පින් එක භූගත කලොත් පමණයි මේකේ I/O pins වැඩ කරන්නේ.
    ST_CP කියන පින් එක arduino board එකට connect කරන්න ඕනේ.
    SH_CP කියන පින් එක arduino board එකට connect කරන්න ඕනේ.
    MR කියන පින් එකට +5 විභවයක් ලබාදෙන්න ඕන.


    මෙන්න මේ විදිහට තමයි මේ shift register වැඩ කරන්න අවශ්‍ය විදිහට connections දෙන්න ඕනේ , shift register එක ගැන සරල පැහැදිලි කිරීමක් පහල තියෙන වීඩියෝ එක මගින් බලාගන්න පුළුවන්.






    දැන් බලමු කොහොමද මේ shift register එක automation unit එකට සම්බන්ද කරගන්නේ කියල.

    ඊට කලින් මම දාපු Home Automation System එක හදාගන්න හැටි තියෙන පොස්ට් එක බලන්න.


    Wireless Home Automation System ( Arduino + ESP8622 + Java )


    Automation.jpg





    මේ උඩ තියෙන පින්තුරයේ විදිහට connections ටික හදාගන්න.


    • [FONT=&quot]ESP8622 module එකේ TX pin එක [/FONT][FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ pin 2ට connect කරන්න.[/FONT]
    • [FONT=&quot]ESP8622 module එකේ RX pin එක [/FONT][FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ pin 3ට connect කරන්න.[/FONT]
    • [FONT=&quot]DC to DC converter එකේ +V[/FONT][FONT=&quot]OUT[/FONT][FONT=&quot] පින් එක ESP8622 module එකේ CH_PD එකටත්connect කරන්න.[/FONT]
    • [FONT=&quot]DC to DC converter එකේ -V[/FONT][FONT=&quot]OUT[/FONT][FONT=&quot] පින් එක ESP8622 module එකේ GND එකට connect කරන්න.[/FONT]
    • Display එකේ VCC පින් එක dc to dc Converter එකේ [FONT=&quot]+V[/FONT][FONT=&quot]OUT[/FONT] පින් එකට connect කරන්න.
    • Display එකේ GND පින් එක dc to dc Converter[FONT=&quot]-V[/FONT][FONT=&quot]OUT[/FONT] පින් එකට connect කරන්න.
    • Display එකේ SCL පින් එක Arduino එකේ A5 පින් එකට connect කරන්න.
    • Display එකේ SDA පින් එක Arduino එකේ A4 පින් එකට connect කරන්න.
    • Shift Register එකේ DS(14) පින් එක [FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ pin 4[/FONT][FONT=&quot][FONT=&quot]ට connect කරන්න.[/FONT][/FONT]
    • [FONT=&quot][FONT=&quot]Shift Register එකේ OE(13) පින් එක [FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ [/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot]GND එකට [/FONT][FONT=&quot][FONT=&quot]connect කරන්න.[/FONT] [/FONT][/FONT][/FONT]
    • [FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ ST_CP(12) පින් එක [FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ [/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]pin 5[/FONT][FONT=&quot][FONT=&quot]ට[/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]connect කරන්න.[/FONT] [/FONT][/FONT][/FONT] [/FONT][/FONT][/FONT]
    • [FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ SH_CP(11) පින් එක [FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ [/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]pin 6[/FONT][FONT=&quot][FONT=&quot]ට[/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]connect කරන්න.[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT] [/FONT][/FONT][/FONT]
    • [FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ MR(10) පින් එක [FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ [/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]5V පින් එකට[/FONT][/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]connect කරන්න.[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT]
    • [FONT=&quot]Relay module එකේ GND pin එක [/FONT][FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ GND pin එකට connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ VCC pin එක [/FONT][FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ 5V pin එකට connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN1 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q0[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(15) එකට connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN2 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q1[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(1) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN3 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q2[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(2) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN4 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q3[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(3) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN5 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q4[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(4) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN6 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q5[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(5) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN7 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q6[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(6) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]Relay module එකේ IN8 pin එක [/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Shift Register එකේ Q7[/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][/FONT][FONT=&quot] pin(7) එකට[/FONT][/FONT][FONT=&quot] connect කරන්න.[/FONT]
    • [FONT=&quot]DC to DC converter එකේ +VIN[/FONT][FONT=&quot] පින් එකට වෙනම 5V power source එකකින් ධන අග්‍රයක් සම්බන්ධ කරන්න.[/FONT]
    • [FONT=&quot]DC to DC converter එකේ -V[/FONT][FONT=&quot]IN[/FONT][FONT=&quot] පින් [/FONT][FONT=&quot]එකට වෙනම 5V power source එකකින් ඍන අග්‍රයක් සම්බන්ධ කරන්න.[/FONT]
    • [FONT=&quot][FONT=&quot]5V power source එකේ ඍන අග්‍රය [/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]Arduino[/FONT][FONT=&quot] බෝඩ් එකේ [/FONT][/FONT][/FONT][FONT=&quot][FONT=&quot][FONT=&quot]GND එකට [/FONT][FONT=&quot][FONT=&quot]connect කරන්න.[/FONT] [/FONT][/FONT][/FONT][/FONT][/FONT]

    [FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot][FONT=&quot]දැන් පරිපථය සම්පුර්ණයි.







    [FONT=&quot]දැන් [FONT=&quot]මේ[/FONT] තියෙන ලින්ක් එකෙන් updated java speech recognition system එක බාගත කරගෙන මගේ බ්ලොග් එකේ තියෙන විදිහට settings ටික හදාගන්න.

    [FONT=&quot]ඔයාලට මේකෙන් යම් දැනුමක් ලැබුන කියල හිතෙනවා.අව්ලකට තියෙන්නේ මම දන්න දෙයක් තව කෙනෙක්ට තේරෙන විදිහට කියල දෙන්න මම දන්නේ නැහැ.[/FONT]


    [FONT=&quot]එහෙන[FONT=&quot]ම් මම ගිහින් එන්නම්.


    [/FONT][/FONT]
    [/FONT] [/FONT][/FONT][/FONT][/FONT][/FONT]
     
    Last edited:

    harindugamlath

    Well-known member
  • Dec 18, 2008
    23,667
    1,060
    113
    පට්ටයි මචෝ.. දිගටම ගෙනියමු ප්‍රොජෙක්ට් එක...:cool::cool::cool:
     

    _A_I_I_

    Member
    Feb 22, 2014
    8
    3
    3
    මේකෙදි Arduino එක නැතුව ESP8266 එකෙන්ම ඔය වැඩේ කරන්න පුළුවන් නේද ? හැබැයි ESP8266 - 12 ව‍ගේ module එකක් ඕනේ. ESP8266 වල Arduino වලට වඩා features තියනවා. තව relay පාවිච්චි කරනවට වඩා optocoupler තියන triac පාවිච්චි කරන්න පුළුවන්.
     

    Hasistranger

    Well-known member
  • Oct 21, 2010
    13,426
    7,103
    113
    Western Province, SL
    my-journal-view.vercel.app
    මේකෙදි Arduino එක නැතුව ESP8266 එකෙන්ම ඔය වැඩේ කරන්න පුළුවන් නේද ? හැබැයි ESP8266 - 12 ව‍ගේ module එකක් ඕනේ. ESP8266 වල Arduino වලට වඩා features තියනවා. තව relay පාවිච්චි කරනවට වඩා optocoupler තියන triac පාවිච්චි කරන්න පුළුවන්.


    ඔව් එහෙම කරන්න පුළුවන් , එත් esp-01 එක ගොඩක් ගණන් අඩුයි අනිත් models එක්ක ගත්තහම.මම මේකට Arduino එක ගත්තේ ඉස්සරහට මම මේක තවත් update කරනවා තව RF Link එකක් connect කරලා room වලට කව්රුහරි ගියහම lights on වෙලා room එකෙන් එලියට ආවහම lights off වෙන විදිහට PIR sensors connect කරලා .ඒ වැඩෙත් ඉවර උනහම මම ඒක ගැනත් ත්‍රෙඩ් එකකින් ඔයාලව දැනුවත් කරන්නම්.