Cov txheej txheem:

IOT123 - 5PIN ATTINY85 NRF24L01 BRICK: 4 Kauj Ruam
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK: 4 Kauj Ruam

Video: IOT123 - 5PIN ATTINY85 NRF24L01 BRICK: 4 Kauj Ruam

Video: IOT123 - 5PIN ATTINY85 NRF24L01 BRICK: 4 Kauj Ruam
Video: soldering revisited 2024, Kaum ib hlis
Anonim
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
IOT123 - 5PIN ATTINY85 NRF24L01 BRICK

Hloov tshiab: Qhov teeb tsa no feem ntau yog kev kawm lossis lub hauv paus rau kev sim software/fais fab mov. Txawm hais tias thaum PB5 yog neeg xiam oob qhab raws li RESET, nws tsis nyeem qhov tseem ceeb raug siv analogRead: rooj plaub siv tseem ceeb rau kev nyeem ntawv sensor. Yuav saib mus rau ATTINY84 teeb tsa…

IOT123 BRICKS yog chav DIY modular uas tuaj yeem sib xyaw nrog lwm IOT123 BRICKS, txhawm rau ntxiv kev ua haujlwm rau ntawm qhov chaw lossis hnav tau. Lawv tau ua raws li lub xwmfab nti, ob-tog protoboards nrog sib cuam tshuam los ntawm qhov.

Qhov BRICK no ntxiv 2.4GHz RF txuas rau tus tswv rau IOT node cov ntaub ntawv sib sau ua ke. Nws tsis hloov pauv tau zoo li nws tsuas yog muab ib tus pin, tab sis nws yog qhov pib zoo thiab muaj zog ntau dua li 3Pin Circuit uas kuv tab tom mus rau.

Qhov BRICK no yuav muaj roj teeb BRICK, POWER BRICK thiab BREAKOUT BRICK tsim los uas tuaj yeem siv tau los yog lub taub hau koom nrog.

Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej

Cov Khoom thiab Cov Cuab Yeej
Cov Khoom thiab Cov Cuab Yeej
Cov Khoom thiab Cov Cuab Yeej
Cov Khoom thiab Cov Cuab Yeej
Cov Khoom thiab Cov Cuab Yeej
Cov Khoom thiab Cov Cuab Yeej

Muaj Daim Ntawv Teev Npe Tag Nrho ntawm Cov Khoom thiab Sourcing.

  1. nRF24L01+ (1)
  2. 1 "Ob tog ob tog protoboard (1)
  3. ATTINY85-20PU (1)
  4. 8 Pin DIL IC Qhov (1)
  5. Poj Niam Headers (2x4P, 1P, 2P)
  6. Hookup hlau (~ 8)
  7. Cov laug thiab hlau (1)
  8. Muaj zog Cyanoachrylate Adhesive (1)

Kauj ruam 2: Circuit Court Assembly

Circuit Court los ua ke
Circuit Court los ua ke
Circuit Court los ua ke
Circuit Court los ua ke
Circuit Court los ua ke
Circuit Court los ua ke

Cov plaub fab ntxoov ntxoo daj yog cov haujlwm uas yuav siv tau rau kev txuas tom qab, yog li sim thiab ua kom lawv tsis txhob xaim.

Yog tias siv 40P header strips, txiav thiab sau 1P thiab 2P headers, tseem ua rau 2x4P (los ntawm 2 cais 4P's).

Muaj qee qhov xwm txheej uas qhov muag ntawm lwm sab ntawm lub qhov los ntawm qhov raug thaiv. Thaum qhov no yog qhov xwm txheej, Kuv tau muab lub dob tso rau ntawm lub hom phiaj los ntawm lub qhov, tom qab ntawd los ntawm sab sab yaj cov laug thiab thawb cov hlau txuas txuas rau hauv qhov chaw, tuav thiab tshem tawm cua sov.

  1. Ntxig 2x4P Poj Niam Header (1), 8P DIL Qhov (2, ib nrab hli mus rau nruab nrab), 1P Poj Niam Header (3) thiab 2P Poj Niam Header (4) los saum toj. Solder tawm hauv qab.
  2. Nyob rau sab saud, xaim xaim xaim daj rau hauv YELLOW1 thiab YELLOW2, thiab txuas dua.
  3. Nyob rau sab saud, xaim ib lub xaim daj rau hauv YELLOW3 thiab YELLOW4, thiab cov laug.
  4. Nyob rau sab saud, xaim xaim xaim daj rau hauv YELLOW5 thiab YELLOW6, thiab txuas dua.
  5. Nyob rau sab saud, xaim xaim liab rau hauv RED1 thiab RED2, thiab muab tshuaj txhuam.
  6. Hauv qab, taug qab cov xaim dub rau hauv BLACK1 thiab BLACK2, thiab cov laug.
  7. Hauv qab, taug ib txoj kab liab liab rau hauv RED1 thiab mus rau RED2, thiab cov laug.
  8. Hauv qab, taug ib txoj kab daj rau hauv YELLOW1 thiab YELLOW2, thiab cov laug.
  9. Hauv qab, taug ib txoj kab daj rau hauv YELLOW3 thiab YELLOW4, thiab cov laug.

Kauj Ruam 3: Xeem

Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem

Cov cai rau ntsuas yog yooj yim thiab muab los ntawm www.theengineeringprojects.com. Ib tus tswv Arduino UNO sau RF cov haujlwm rau Serial Console. ATTINY85 nRF24L01 BRICK nce ntxiv thiab sau ib tus lej rau RF channel. Raws li peb tsis siv tus lej PIN 1, Kuv yuav tawm qhov teeb tsa Rov Pib Dua Fuse Me ntsis rau tom qab Qhia, lossis koj tuaj yeem ua raws cov txheej txheem ntawm no.

Tus Sender Code

Tus Neeg Tau Txais Txoj Cai

  1. Rub tawm Qhov Tau Txais code mus rau Arduino UNO.
  2. Hlau txuas UNO rau nRF24L01 raws li qhia saum toj no.
  3. Rub tus xa ntawv xa mus rau ATTINY85 (ATTinyCore/ATTINY85/8MHz).
  4. Ntxiv ATTINY85 rau BRICK.
  5. Ntxiv nRF24L01 rau BRICK.
  6. Txuas Arduino UNO ntawm USB rau lub PC.
  7. Hauv Arduino IDE xaiv qhov tseeb COM Port.
  8. Qhib Serial Monitor ntawm 57600 baud.
  9. Fais fab BRICK nrog ~ 3V (saib daim duab 1 ntawm cov kauj ruam no).
  10. Txheeb xyuas qhov tseem ceeb sau rau console.

Code muab los ntawm https://www.theengineeringprojects.com/2015/07/interfacing-arduino-nrf24l01.html rau kev xeem ntawm

// Xa - ATTINY85
#defineCE_PIN3
#defineCSN_PIN4
#suav nrog "RF24.h"
RF24 xov tooj cua (CE_PIN, CSN_PIN);
constuint64_t kav [2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL};
Cov lus txib tsis tau kos npe = 1;
voidsetup ()
xov tooj cua.begin ();
xov tooj cua.setRetries (15, 15);
xov tooj cua.openReadingPipe (1, kav [1]);
xov tooj cua.startListening ();
xov tooj cua.printDetails ();
xov tooj cua.openWritingPipe (kav dej [0]);
xov tooj cua.openReadingPipe (1, kav [1]);
xov tooj cua.stopListening ();
}
voidloop (tsis muaj dab tsi)
{
xov tooj cua.stopListening ();
radio.write (& Hais kom ua, sizeof (unsignedlong));
xov tooj cua.startListening ();
Hais kom ua ++;
ncua (1000);
}

saib rawnRF24L01_aattiny85_send.ino tuav nrog ❤ los ntawm GitHub

Code muab los ntawm https://www.theengineeringprojects.com/2015/07/interfacing-arduino-nrf24l01.html rau kev xeem ntawm

// RECEIVE - ARDUINO UNO
#suav nrog
#suav nrog "nRF24L01.h"
#suav nrog "RF24.h"
RF24 xov tooj cua (9, 10);
constuint64_t kav [2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL};
voidsetup (tsis muaj dab tsi)
{
Serial.begin (57600);
xov tooj cua.begin ();
xov tooj cua.setRetries (15, 15);
xov tooj cua.openReadingPipe (1, kav [1]);
xov tooj cua.startListening ();
xov tooj cua.printDetails ();
xov tooj cua.openWritingPipe (kav dej [1]);
xov tooj cua.openReadingPipe (1, kav [0]);
xov tooj cua.startListening ();
}
voidloop (tsis muaj dab tsi)
{
Serial.println ("voj");
yog (xov tooj cua. muaj ())
{
unsignedlong cov ntaub ntawv = 0;
xov tooj cua.read (& cov ntaub ntawv, sizeof (unsignedlong));
Serial.println (cov ntaub ntawv);
}
ncua (1000);
}

saib rawnRF24L01_arduino_receive.ino tuav nrog ❤ los ntawm GitHub

Kauj Ruam 4: Cov Kauj Ruam Tom ntej

Lwm IOT123 BRICKS uas sib xyaw nrog qhov no:

  • 3.3V POWER BRICK
  • LIR2032 roj teeb BRICK

Pom zoo: