Introduction: IOT123 - 5PIN ATTINY85 NRF24L01 BRICK
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.
This BRICK will have a BATTERY BRICK, a POWER BRICK and a BREAKOUT BRICK developed that can either be soldered or header joined.
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.
8 Comments
5 years ago on Step 4
Well I hope they mesh with it rather than mash it.
Could it be a better idea to include the ".ino" files here for easy download?
Reply 5 years ago
I have included links to the GIST's own download functions.
Reply 5 years ago
> include the ".ino" files
Makes for multiple maintenance points... GIST is the point of truth as it provides an embed-able view of the code within the Instructable.
Reply 5 years ago
Maybe a picture of the back board would help.
So apart from sending an incremented number periodically what else can be done with this brick?
Reply 5 years ago
The Circuit Assembly step has photos of both sides of the board at various stages.
Reply 5 years ago
Once the "setting of the Reset Fuse Bit" has been done simple sensors (temp, humidity, light, IR) can be added to the PB5 which is broken out. This will be dealt with in more detail when I add the breakout board mentioned.
Reply 5 years ago
Sorry I see there is a pic of the back of the board
Tip 5 years ago on Step 3
The formatting of the GIST ate the whitespace. Best to go the the point-of-truth:
https://gist.github.com/IOT-123/2d0ea74bfdbc352138...
https://gist.github.com/IOT-123/7decba0c532fbbdf05...