We love little tricks like this. Suppose that you want to generate an IR remote’s signal. It’s easy, because most of the codes are known. But it can be slightly harder because most IR remotes and receivers modulate the on pulses with a square wave at roughly 38 kHz for background lighting immunity.
With a competent PWM generator on a microcontroller, you can create this carrier modulation easily enough yourself. Set the PWM frequency to 38 kHz and the duty cycle somewhere in the 33%-50% range, and you’re set. But what if you don’t have a competent PWM generator? Such was the case that prompted [AnalysIR Blog] to fake it, with USART.
Here’s the trick. You set up the serial port to communicate at ten times the desired carrier frequency, and then transmit “special” data. (The number ten comes from eight bits of data plus a start and a stop bit.) If you want a 50% duty cycle, you simply send
0b11110000, as fast as the microcontroller will allow, for a mark and nothing for a space.
There’s some extra detail with inverting the signal if, as most do, your USART idles high. But that’s really it. It’s a cute trick for when you’re desperate enough to need it. And if you’d like to brush up some more on your asynchronous serial skills, check out our guide on troubleshooting USART, and the great comments that ensued.
Infra-red (IR) remotes are great, unless you’re in a hackerspace that’s full of crazy blinking lights and random IR emissions of all kinds. Then, they’re just unreliable. Some smart folks at Metalab in Vienna, Austria cut out the IR middle-man with a couple transistors and some audio software. They call the project HDMI Whisperer, and it’s a cute hack.
Metalab’s AV system has a web-frontend so that nobody ever has to stand up unless they want to. They bought an incredibly cheap 5-to-1 HDMI Switch to switch between displaying multiple video streams. But how to connect the switch to the Raspberry Pi server?
Fortunately, the particular switch has a remote-mounted IR receiver that connects to the main unit through a stereo audio jack. Plugging this sensor into a laptop and running Audacity while pressing the buttons on the remote got them audio files that play the remote’s codes. Simply playing these back out of the Raspberry Pi’s audio out and into the switch’s IR input through a tiny transistor circuit does the trick. Now they have a networked five-way HDMI switch for $10.
Given the low data rates of most IR remotes, we could imagine using the same trick for devices that have built-in IR receivers as well. Simply clip out the IR receiver and solder in a couple wires and then inject your “audio” signal directly.
But IR hacks are loads of fun. We’ve seen a bunch here, from the classic camera shutter-release hack to a more general tutorials on cloning IR signals with Arduinos.
Thanks [overflo] for the tip!
[Rohit] wrote in to tell us about a project he has created. Like most projects, his solves a problem. Sometimes while sleeping, a mosquito will infiltrate his room. He has a mosquito repellent machine but there are 2 problems, he has to get up to turn it on/off and it smells bad when in use. [Rohit] only needed a remote-controlled mosquito repelling machine but decided to make a 6 channel system he calls the RoomMote.
From the beginning, the plan was to use an old Sony TV remote to do the transmitting. The receiver unit was completely made from scratch. [Rohit] designed his own circuit around a surface mount MSP430 chip and made a really nice looking PCB to fit inside a project box he had kicking around. The MSP430 chip was programmed to turn relays on and off based on the signals received from the Sony remote. These relays are inside an electrical box and control AC outlets. Just plug in your light, radio or mosquito repellent into the appropriate outlet for wireless control. Code for the MSP430 is made available on [Rohit’s] project page for anyone wanting to make something similar.
In addition to the relays, there is an RGB LED strip attached to the custom circuit board. By using more of the Sony remote’s buttons, the LED strip can output 6 pre-programmed colors, some mood lighting for the mosquitoes!
Continue reading “RoomMote, a DIY Remote for Your Room Project”
With our busy lives, who has time to pay attention to TV show schedules? [Tamberg] certainly didn’t and that is why he came up with the web-enabled TV remove he calls the Smart Homer. This miraculous device knows when ‘The Simpsons’ is being broadcast, turns on the TV and switches to the appropriate channel.
Like the real Homer, not too much is going on up in this toy’s noggin. A couple of IR emitters are mounted in place of pupils and the associated wires are run down into his body. Right between a pink donut and a Krusty burger resides an Arduino and ethernet shield. This electronic duo acts as a web server and looks out to the ‘net for an online script. The script polls an online TV Program Guide and if ‘The Simpsons’ are on at that time, it sends a signal back to the Arduino to turn the TV on.
[Jason] always wanted a touchscreen TV remote control. He could have pressed an older Android tablet into service, but he wanted to roll his own system. [Jason] gathered the parts, and is in the process of building his own 7″ touchscreen setup. He started with a 7″ LCD capacitive touchscreen. He ordered his display from buy-display.com, a Far East vendor.
[Jason’s] particular display model comes mounted on a PCB which includes controllers for the display and touchscreen, as well as some memory and glue logic. The LCD controller board has quite a few jumpers to support multiple interfaces and options. While the documentation for the display was decent, [Jason] did find a few errors. After getting in touch with tech support at buy-display, he wrote a simple application which determines which jumpers to set depending on which hardware interfaces are selected from drop down lists.
With the LCD sorted, [Jason] still needed a processor. He selected the venerable Microchip PIC32MX series. This decision allowed him to use a Fubarino for the early prototypes, before switching to his own board as the system matured. [Jason] was able to get a simple GUI up and running, with standard remote buttons to control his TV and cable box. Code is on his Github repository.
[Jason’s] most recent work has centered on cutting the cord. He’s switched over from DC power to a 2600 mAh LiPo battery. Click past the break to see [Jason] test out his fully wireless work in progress.
Continue reading “A 7″ Touchscreen TV Remote Control from Scratch”
Laziness sometimes spawns the greatest inventions. Making things to reduce effort on your part is quite possibly one of the greatest motivators out there. So when [Kyle] had to get out of bed in order to turn off Netflix on his computer… He decided to do something about it.
He already had an Apple remote, which we have to admit, is a nice, simple and elegant control stick — so he decided to interface with it in order to control his non-Apple computer. He quickly made up a simple PCB up using the good ‘ol toner transfer method, and then populated it with a Bareduino, a CP2102 USB 2.0 to TTL UART 6PIN Serial Converter, an IR receiver, a USB jack, header pins, and a few LED and tactile switches.
It’s a bit tricky to upload the code (you have to remove the jumper block) but then it’s just a matter of connecting to it and transferring it over with the Arduino IDE. The Instructable is a bit short, but [Kyle] promises if you’re really interested he’ll help out with any questions you might have!
If you’ve ever needed a short-range remote control for a project, [firestorm] is here to help you out. He put up a great tutorial on using an IR remote to do just about anything with everyone’s favorite microcontroller platform.
[firestorm] used the Arduino IRremote library to decode the button presses on his remote. After uploading the IR receive demo included in the library, the Arduino spit out hex codes of what the IR receiver was seeing. [firestorm] wrote these down, and was able to program his Arduino to respond to each individual button press.
After figuring out the IR codes for his remote, [firestorm] threw a shift register into his bread board and attached a seven-segment LED. Since [firestorm] knows the codes for the number buttons on his remote, it’s very easy to have the LED display flash a number when the corresponding button on the remote is pressed.
A single seven-segment display might not be extremely useful, but with [firestorm]’s tutorial, it’s easy to give your Arduino some remote control capabilities with a simple IR receiver. Not bad for a few dollars in parts.