Is possible to command wireless an ATTiny85 to acts a relay?

Hi to all, my first post here so I hope it's right section.

My Home Automation Project contains a wireless relay for the heater (eheh, nothing of new for you :) ).

I don't want waste an Arduino for simply acts the relay.

My choice is the ATTiny85 wireless linked (NRF24L01) to a Raspberry. So a small PCB with battery+attiny85+NRF module.

Is it possibile for the ATTiny85 receive a signal (wireless) and acts a PIN to excite the relay?

I did search but not found nothing similar to my question. Can you address me to some question and best for some sketch?

Thank you very much

You can. However the nRF24L01 hogs a lot of pins but your T85 don't really have much to spare. I would suggest using the Pi to control the relay directly, and by using some clever programming you can get it to speak HTTP/TLS and allow your smartphone to speak to it.

I would say yes this is possible but it would drain the battery way to fast to be useful a nrf24l01 in rx mode takes maybe 11ma-+ that would drain 2 aa batteries in a week or so.
If you can supply the PCB from a adapter instead that would probably make it work better long term.
As for the attiny85 nrf connection unless you have a hvsp programmer so you can use all 6 pins as i/o you will have to cheat a bit and tie the ce pin on the nrf high and only connect csn sck mosi miso. you will still have almost full control of the nrf you just wont be able to sleep and do some other stuff.

one alternative is to implement this: http://nerdralph.blogspot.se/2014/01/nrf24l01-control-with-3-attiny85-pins.html
that would get you down to 3 pins… or let you control the ce pin instead.

I don’t know anything about the raspberry part of things so you are alone there.
But i have used this code on attiny85 mm earlier with good results it uses soft spi so just change the pins to whatever you feel like. you will have to either match the settings on the raspberry to this settings or the other way around but i think its doable good luck.

NRF24L01_Demo_For_Arduino_v11.zip (8.73 KB)

I don't think you have enough pins with an NRF24 on a t85... I think they take 5, and that's all you have available without blowing RSTDISBL and making the device very hard to reprogram.

Would work with a t84 though, those are about the same price, and have a lot more pins.

Just like an Arduino controlling a relay, you need a transistor (BJT or FET) to drive the relay coil.

Thank you to all for your answer!

Well, let's go to organize the ideas (for me!)

1) Raspberry PI 2/3: 40/50€ value on the net. Waste money to "simply" acts a relay, no? 2) Arduino UNO: 20/30€ for acts a relay. Yes, very very simple to control an Arduino wireless from a PI, all right?

So, my new project it can be following (let me know your point of view!)

A) Raspberry PI as LAMP server (with the web-based software on it) ==> Just done. I'm a PHP developer and I have written yes a full functional APP web-based that monitor temperatures, switch relays, log temps etc. connected with Raspberry GPIO.

Advantage: good velocity of execution as webserver. Disadvantage: mSD crash etc. So the PI need really to be accessible in every moment, and not permanent fixed on the wall / on the heater. In every moment I want attach to monitor and check what's the problem / change SD etc etc etc.

B) ARDUINO UNO (or do you want tell me another model) permament fixed to the heather // wall with simply acts a relay and wireless linked to the PI (NRFL2401+). I think that there are so many sketch around, all right?

C) 1/2/3/n wireless sensor, programmed with Arduino, acted by Attiny85 + CR2032 + NRFL2401, to send temp and humidity to the PI. So many sketches around the net, I saw.

What do you think?

Use the ATtiny 84 and have a lot more pins for arround the same price.