Introduction: RGB - Led Strip 12 V Controlled by an ATtiny85 With an 125Khz RFID Module

Picture of RGB - Led Strip 12 V Controlled by an ATtiny85 With an 125Khz RFID Module

The basic idea gave me this side RGB-RFID-Lamp . But since I have a lot ATtiny85's I will use this micro-controller. To make it easier for me, I tested all part first on an Arduino Uno.

Material:

  • 1 x RGB – Led strip 12 V
  • 1 x ATtiny85
  • 3 x MOSFET IRL540N
  • 3 x resistors 10 kOhm
  • 1 x 125 khz RFID – Modul
  • 1 x Voltage regulator 7805
  • 2 x 10 uf Capacitor
  • 4 x Terminal blocks som wires

Step 1: Test the RGB-Led Strip and RFID-Modul on a Arduino Uno

Setting RGB LED strip:

I did like here at Jerome-Bernard's blog ,jerome-bernard.com - blog

He has an error in his Fritzing® drawing with the 10kΩ resistor this must be between the Gate and GND on the MOSFET and not Drain and GND. The resistor Gate to GND have the task of keeping Gate pin LOW which is especially important when starting the Arduino Uno.

Another resistor, as I do not use, can be used is from Gate to Arduino pin to reduce the flow and protect the pin.

I tried different MOSFET's, after reading a lot about MOSFET operation and how they work, seen video on Youtube, I ended up with the IRL540N.

They can easily be "burned" when swapping around with Gate - Drain – Source. You can build up a simple N - MOSFET tester like this: Mosfet-Tester

Setting up the RFID 125 khz module: I did use his setup : fibidi.com it worked out very god.

Tested RGB Led strip and RFID - module together with an Arduino Uno and the entire set worked as expected.

Step 2: Setting Up RGB - Led Strip on a Attiny85 :

Picture of Setting Up RGB - Led Strip on a Attiny85 :

The next step was to porting it over to an ATtiny85. The layout of a ATtiny85 has only five pin you can use, 2 pin for PWM and 3 Analog pin. I needed for the RGB - Led strip 3 PWM and for the RFID - Module 1 pin only Tx = read. Attiny85 must also have a clock speed of 8 MHz and to do so are described here : change the tiny arduino between 1mhz and 8mhz

From RFID - module I only use the read = Tx function, I found a library from Nick Gammon he made this library: http://gammon.com.au/Arduino/ReceiveOnlySoftwareSerial.zip

The next is to getting an additional PWM - pin this was a bit of a challenge. Since I am not so good in write programms or similar. But I found a solution here:

http://forum.arduino.cc/index.php?topic=134754.0

https://gist.github.com/dranger003/838bae8aef695b0...

So pin 4 – of the ATiny85 layout is the third PWM - pin.

So the pins looks as follows se also the part of the datasheet :

  • PB0 - PWM / Red
  • PB1 - PWM / Green
  • PB4 - PWM / Blue
  • PB3-125 kHz RFID Tx just read

For better and easy control of RGB - Led strip I use this library: https://github.com/joushx/Arduino-RGB-Tools

A very easy method to control RGB - Led or strip.

After a breadboard setup to see that everything function, I could solder it on a strip board.

On the pictures from left to right :

  • RFID - antenna
  • power 12 V, IC 7805 voltage regulator with two 2 10uf capacitor
  • ATtiny85 , Terminal Blocks for the RGB - Led strip
  • RFID - module and 3 IRL540 N Mosfet and 10 kOhm resistor

Step 3:

Picture of

I made a wooden box for the RGB - Led strip and ATtiny85 board. On the frozen glas is the RFID - antenna connctet and on the video you can se how it worked.

The schematic is not the best but gives a hint how I put all things together.


Step 4:

If there any electronic fault or programm mistakes you can se or now please write me so I can correct it, this is my first Instructable

Sincerely Gregor

Comments

kennyheng (author)2016-08-14

So how it work?

theredbryophyte (author)2015-12-17

Nice idea. Could you give us a link to what RFID module you used - there seem to be loads of different ones.

It is hard to recommend a shop or similar, I bought min in Denmark. I have used 125 kHz reader since I already had a lot of key-tags, the blue one in the pictures.

But I found one her some are similar to mine at SeeedStudio

or if you like build your own I found this : RFID reader works with 125 kHz tags

With greetings from Denmark Gregor

Thanks you. It looks like building my own one would be interesting!

khadu77 (author)2015-12-17

Nice one.

About This Instructable

3,304views

41favorites

License:

Bio: electronic beginner + Do things for fun, interest, play My answer is only from my own knowledge as status beginner and the internet search engine
More by SebastianB2:Sends a Sms With Temperatur on TimeBluetooth Speaker in Ash Tree BoxSound Activated Lightbar
Add instructable to: