Pages: [1]   Go Down
Author Topic: Using ATTINY 85V-10PU with the 2.4 Ghz Nrf24L01 Transceiver.  (Read 274 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was just wondering if it is possible to use the Atmel Attiny 85-10PU  (8 pins) with the Nrf24L01 Transceiver? i noticed that the micro controller might not have the right pins for the transceiver? Is there some pins that are unnecessary if i all i want for the transceiver to do is receive data?  if I can not use this micro coontroller what is the smallest possible micro controller i could use?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ive had some luck with this tutorial:

http://nerdralph.blogspot.ca/2014/01/nrf24l01-control-with-3-attiny85-pins.html

I had discussed this exact project with a buddy, Jack Christensen who supplied also a modified schematic of the one mentioned on Ralphs blog.




Please post back with your progress/updates! It takes a bit of messing with the header files. Here is a list of steps I took following Ralphs blog and Jack's schematic:


Proper Attiny85 library installation for nrf24l01

First, Install:


https://code.google.com/p/arduino-tiny/

download the latest version, Arduino 1.5. Extract, and drag the  “avr” folder  (found inside the “tiny” folder) into a newly created folder located in the sketch folder  called “hardware”.

the avr folder should be the parent folder of the at tiny cores/etc due to the Arduino IDE directory tree hierarchy.

NOTE: you will need to rename the txt file called “Prospective Boards.txt” to simply “boards.txt” within  the “avr” folder



 A proper installation should indicate the attiny boards available to select in tools.  





 download the “door monitor” file containing libraries needed : https://github.com/samuelclay/doormonitor

the only folders of interests are within the “mirf “ folder are  the “Mirf” and the “SPI85” folders, that I dragged within the main libraries folder (not the sketch libraries folder)



according to http://nerdralph.blogspot.com/2014/01/nrf24l01-control-with-3-attiny85-pins.html, modify the Mirf.cpp as follows:

Code:
void Nrf24l::csnHi(){
 PORTB |= (1<<PINB2);  // SCK->CSN HIGH
 delayMicroseconds(64);  // allow csn to settle
}

void Nrf24l::csnLow(){
 PORTB &= ~(1<<PINB2);  // SCK->CSN LOW
 delayMicroseconds(8);  // allow csn to settle
}

unmodified, everything compiled. when i incorporated Ralphs suggestion:
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 118
Posts: 4580
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was just wondering if it is possible to use the Atmel Attiny 85-10PU  (8 pins) with the Nrf24L01 Transceiver? i noticed that the micro controller might not have the right pins for the transceiver? Is there some pins that are unnecessary if i all i want for the transceiver to do is receive data?  if I can not use this micro coontroller what is the smallest possible micro controller i could use?

Nope. Not enough pins.

Use a Pro Mini: http://www.ebay.com/sch/i.html?_nkw=arduino+pro+mini
Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When connecting the nrf module to a tiny85, connect MISO(pin7) on the module to MOSI/DI(PB0), and not MISO/DI(PB1).  Here's the connections required:
nrf module  ATtiny85 pin
SCK(5)      PB2 (physical pin 7)
MOSI(6)     PB1 (physical pin 6)
MISO(7)     PB0 (physical pin 5)

Will I need to be using all of these pins listed above if i wish to only receive data from a transmission source? Thanks for the help, I do not have the Attiny with me yet but i have been able to walk through the setup a bit.
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 118
Posts: 4580
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will I need to be using all of these pins listed above if i wish to only receive data from a transmission source? Thanks for the help, I do not have the Attiny with me yet but i have been able to walk through the setup a bit.

Yes.

a) You have to send commands to the chip and check status bits no matter what you're doing.
b) Why would you want a Nrf24L01 connected to a Tiny85? There's no pins left for any sort of sensors or indicators. Where does the data you're transmitting come from? What can you do with it if you've go no pins left?

By the time you've connected all those extras diodes and capacitors to control the CS pin, what did you gain? You have no I/O pins left and it won't be smaller/simpler/lower power than using a Pro Mini.
Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
By the time you've connected all those extras diodes and capacitors to control the CS pin, what did you gain? You have no I/O pins left and it won't be smaller/simpler/lower power than using a Pro Mini.

The reason I am trying so hard to get it to work with the attiny is because  am in a high school class {engineering} and at the moment we have the attiny microcontrollers with us. Buying as many arduino mini pro's as we need would not fit our budget as well. If we only needed 1 device and size did not matter it would be perfect and there'd be no point in messing with the attiny. The only other two peices of equiptment that will need to be attached to the attiny is a LED and a piezo buzzer. If it comes down to it i could just use 1 pin for both of them.

Quote
Where does the data you're transmitting come from? What can you do with it if you've go no pins left?
What I want in the end is to have an arduino UNO  that will transmit any type of data to the receiver, the receiver will then look at the data and match it up with a certain command such as blinking light patterns or noise patterns.

@danieljay I am not sure if I read over everything correctly but in the end would this process allow me to only use 5 pins out of the 8 total? Leaving me the reset pin, and the two analog pins (physical pins 1,2,3) to use for outputs?
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 118
Posts: 4580
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The only other two peices of equiptment that will need to be attached to the attiny is a LED and a piezo buzzer. If it comes down to it i could just use 1 pin for both of them.

You're already out of pins...

@danieljay I am not sure if I read over everything correctly but in the end would this process allow me to only use 5 pins out of the 8 total? Leaving me the reset pin, and the two analog pins (physical pins 1,2,3) to use for outputs?

Two of the "8 pins" are Vcc and GND - can't be used for anything else.

If you reconfigure the RESET pin for input/output you won't be able to upload programs to the chip. You only get one upload (unless you buy a special programmer).

The only realistic way to do this is to add something like a 74HC595 to the system to gain 8 output lines then connect the Nrf24L01 control pins to that. The Nrf24L01 driver will need a lot of modification to get it working.


Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Two of the "8 pins" are Vcc and GND - can't be used for anything else.

I included the Vcc and Gnd in the 5 pins, but actually re-configuring the reset pin may work. I can just send some bytes between the two devices and once i'm confident, use my one upload. Hopefully i wont screw up making a light blink in the coding.

Quote
reconfigure the RESET pin for input/output

How do you do this?
Logged

Pages: [1]   Go Up
Jump to: