UPDATE: This setup is largely academic or a base for testing software/power supply. Even when the PB5 is disabled as RESET, it does not read values accurately using analogRead: the main use case for sensor readings. Will look into the ATTINY84 setup...
The IOT123 BRICKS are DIY modular units that can be mashed up with other IOT123 BRICKS, to add functionality to a node or wearable. They are based on the inch square, double-sided protoboards with interconnected through holes.
This BRICK adds 2.4GHz RF connectivity to a master for IOT node data aggregation. It is not very flexible as it only offers one pin, but it is a good starting point and more energy efficient than the 3Pin circuit that I am heading for.
Step 1: Materials and Tools
There is a full Bill of Material and Sourcing list.
- nRF24L01+ (1)
- 1" Double sided protoboard (1)
- ATTINY85-20PU (1)
- 8 Pin DIL IC Socket (1)
- Female Headers (2x4P, 1P, 2P)
- Hookup wire (~8)
- Solder and Iron (1)
- Strong Cyanoachrylate Adhesive (1)
Step 2: Circuit Assembly
The yellow shaded squares are positions that may be used for connections later, so try and keep them clear of wires.
If using 40P header strips, cut and file the 1P and 2P headers, also gluing the 2x4P (from 2 separate 4P's).
There are a few occasions where soldering on the other side of a through hole is obstructed. When this is the case, I soldered a dob on the target through hole, then from the side melt the solder and push the exposed hookup wire into center hole, hold and remove heat.
- Insert 2x4P Female Header (1), 8P DIL Socket (2, half moon to centre), 1P Female Header (3) and 2P Female Header (4) from top. Solder off on bottom.
- On the top, trace a yellow wire into YELLOW1 and YELLOW2, and solder.
- On the top, trace a yellow wire into YELLOW3 and YELLOW4, and solder.
- On the top, trace a yellow wire into YELLOW5 and YELLOW6, and solder.
- On the top, trace a red wire into RED1 and RED2, and solder.
- On the bottom, trace a black wire into BLACK1 and BLACK2, and solder.
- On the bottom, trace a red wire into RED1 and onto RED2, and solder.
- On the bottom, trace a yellow wire into YELLOW1 and YELLOW2, and solder.
- On the bottom, trace a yellow wire into YELLOW3 and YELLOW4, and solder.
Step 3: Testing
The code for testing is simple and derived from www.theengineeringprojects.com. An Arduino UNO master logs RF activity to the Serial Console. The ATTINY85 nRF24L01 BRICK increments and writes an integer to the RF channel. As we aren't using the PIN 1, I will leave the setting of the Reset Fuse Bit for a later Instructable, or you can follow the process here.
- Upload the Receive code onto the Arduino UNO.
- Wire up the UNO to a nRF24L01 as shown above.
- Upload the Send code onto the ATTINY85 (ATTinyCore/ATTINY85/8MHz).
- Add the ATTINY85 to the BRICK.
- Add the nRF24L01 to the BRICK.
- Connect the Arduino UNO via USB to a PC.
- In the Arduino IDE select the correct COM Port.
- Open the Serial Monitor at 57600 baud.
- Power up the BRICK with ~3V (see 1st photo on this step).
- Check the values written to the console.