Editor Version ×
recommended

Pro Edition

free

Brand new interactions and interfaces

Smooth support for design sizes of over 3W

devices or 10W pads

More rigorous design constraints, more

standardized processes

For enterprises, more professional users

Std Edition

Easy to use and quick to get started

The process supports design scales of 300

devices or 1000 pads

Supports simple circuit simulation

For students, teachers, creators

Ongoing

STD ATtiny13 TinyRemoteIR XL

ATtiny13 TinyRemoteIR XL

Project tags

License

CC-BY-SA 3.0

License: CC-BY-SA 3.0

Mode:

Mode

Editors' pick

Editors' pick

  • 2.6k
  • 0
  • 10
Update time: 2022-03-02 07:29:34
Creation time: 2021-05-16 13:54:27
Description

Description

# Overview TinyRemoteXL is a 12-button IR remote control based on an ATtiny13A powered by a CR2032 or LIR2032 coin cell battery. - Firmware (Github): https://github.com/wagiminator/ATtiny13-TinyRemoteXL ![pic1.jpg](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyRemoteXL/main/documentation/TinyRemoteXL_pic1.jpg) ![pic2.jpg](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyRemoteXL/main/documentation/TinyRemoteXL_pic2.jpg) # Hardware The basic hardware is similar to the 5-button [TinyRemote](https://github.com/wagiminator/ATtiny13-TinyRemote). The main difference is that the ATtiny13 has to query 12 buttons here. There are various options for using a larger number of buttons with just a few pins. However, most of them do not meet the following conditions: - there are only four pins available for twelve buttons, - a keystroke must trigger an asynchronous interrupt to wake the ATtiny from deep sleep mode, - the circuit must not consume any electricity as long as no button is pressed. A combination of voltage dividers and a couple of diodes does the trick: ![wiring.png](https://raw.githubusercontent.com/wagiminator/ATtiny13-TinyRemoteXL/main/documentation/TinyRemoteXL_wiring.png) If, for example, button 4 is pressed, pin PB0 is pulled to ground via the corresponding diode and a pin change interrupt is triggered, which wakes up the ATtiny. The diodes prevent the 4k7 resistors of the voltage divider from shorting out. The voltage that can be measured at PB2 via the ADC results from the supply voltage divided by the 10k resistor on the upper side and two 4k7 resistors (= 9k4) on the lower side. This value depends on the key pressed. # Software ## IR Protocol Implementation The implementation for the NEC, SAMSUNG, SONY and RC-5 protocol is taken from [TinyRemote](https://github.com/wagiminator/ATtiny13-TinyRemote). Refer to this project for a complete explanation. ## Setting the IR Codes Before compiling you have to define the IR commands for each button. Different protocols and device addresses can be used. Several codes can also be assigned to a single key, separated by semicolons. ```c #define KEY1 NEC_sendCode(0x04,0x08) // LG TV Power: addr 0x04, cmd 0x08 #define KEY2 RC5_sendCode(0x00,0x0B) // Philips TV Power: addr 0x00, cmd 0x0B #define KEY3 SON_sendCode(0x01,0x15,12) // Sony TV Power: addr 0x01, cmd 0x15, 12-bit version #define KEY4 SAM_sendCode(0x07,0x02) // Samsung TV Power: addr: 07, cmd: 02 #define KEY5 NEC_sendCode(0xAB04,0x08);SON_sendCode(0xE401,0x15,20) [...] ``` ## Button Detection If a key has been pressed, a pin change interrupt is triggered and the ATtiny is brought out of sleep mode. The pressed key is then identified via the voltage divider between the individual keys using the ADC of the ATtiny. ```c // Pin assignments #define BINT1_PIN PB0 // interrupt pin for buttons 1..6 #define BINT2_PIN PB3 // interrupt pin for buttons 7..12 #define BADC1_AP 1 // ADC port for buttons 1..6 #define BADC2_AP 2 // ADC port for buttons 7..12 // Button ADC thresholds const uint8_t THRESHOLDS[] PROGMEM = {217, 173, 158, 136, 103, 41, 0}; // ADC read button row and return button number uint8_t readButtonRow(uint8_t port) { PRR = 0; // power on ADC ADMUX = (1
Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Footprint Quantity BOM_Supplier BOM_Manufacturer BOM_Manufacturer Part BOM_Supplier Part
1 CR2032-BS-6-1 B1 BATHOLDER_CR2032 1 LCSC Q&J CR2032-BS-6-1 C70377
2 100n C1 C_0603 1 LCSC YAGEO CC0603KRX7R9BB104 C14663
3 BAS16TW D1,D2,D3,D4 SOT-363 4 LCSC CJ BAS16TW C68955
4 SMD Tactile Switch6*6*6mm KEY1,KEY2,KEY3,KEY4,KEY5,KEY6,KEY7,KEY8,KEY9,KEY10,KEY11,KEY12 KEY-6.0*6.0 12 LCSC ReliaPro SMD Tactile Switch6*6*6mm C23873
5 IR333-A LED1 LED-3MM/2.54 1 LCSC Everlight Elec IR333-A C264290
6 IR333C/H0/L10 LED2 LED-3MM/2.54 1 LCSC EVERLIGHT IR333C/H0/L10 C72053
7 2n3904S Q1,Q2 SOT-23-3 2 LCSC KEC 2n3904S-RTK/PS C18536
8 10k R1,R2,R3 0603 3 LCSC UniOhm 0603WAF1002T5E C25804
9 1k R4,R5 0603 2 LCSC UniOhm 0603WAF1001T5E C21190
10 4k7 R6,R7,R8,R9,R10,R11,R12,R13,R14,R15 0603 10 LCSC UniOhm 0603WAF4701T5E C23162
11 ATtiny13A U1 SOP-8_150MIL 1 LCSC MICROCHIP ATTINY13A-SSU C14075

Unfold

Project Attachments

Project Attachments

Empty
Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn