USB2Serial Adapter As An I/O Device

There was a time when computers had parallel ports. For the hacker types, this meant an eight bit data port, and nine additional pins which could be interfaced with the real world via the 25 pin connector. This is no longer the case, although USB does help with suitable hardware. [Jabi] was working on a project that required controlling one relay to switch a strip of LED’s. His solution was to use a USB to Serial Adapter as an I/O device (Spanish, translated here).

He wrote a short C program, SioFus (Simple Input Output from USB2SERIAL), that converts a simple USB to Serial Port Adapter into an I/O device with 4 inputs and 2 outputs. It’s simple and gets the job done. The code uses ioctl and allows DCD, DSR, CTS and RI to act as inputs while DTR and RTS act as outputs. These pins then likely control transistors that switch the relays. The SioFus code is available on github and there are a couple of to-do’s on [Jabi]’s list if you would like to chip in.

The video after the break supposedly shows the hack in action. Seems like some kind of photo booth which then spits out a QR code, possibly a URL to the picture (post in the comments if you figure out what it does).

If you are looking for a more dedicated hardware, check out the Tiny Bit Dingus – a microcontroller stuffed into a USB plug with a few controllable pins.

Continue reading “USB2Serial Adapter As An I/O Device”

More GPIOs For The ESP8266

The ESP8266 is an incredible piece of hardware; it’s a WiFi module controllable over a serial port, it’s five freaking dollars, and if that’s not enough, there’s a microcontroller on board. Until there’s a new radio standard, this is the Internet Of Things module.

The most common version of the ESP, the -01 version, only has a 2×4 row of pins for serial, power, configuration, and two lines of GPIO. It’s a shame that module only has two GPIOs, but if you’re good enough with a soldering iron you can get a few more. It took a lot of careful soldering, but [Hugatry] managed to break out two more GPIOs on this tiny module.

According to [Hugatry] a lot of patience to solder those wires onto those tiny pads, but after finishing this little proof of concept he discovered a Russian hacker managed to tap into four extra GPIOs on the ESP8266-01 module (Google Translatrix).

As a proof of concept, it’s great, but there’s more than one ESP module out there. If you’re looking for a cheap WiFi module, check out the ESP-03, -04, or -07; they have nice castellated pins that are exceptionally easy to solder to.

Video below.
Continue reading “More GPIOs For The ESP8266″

The Pi 2 Means Faster GPIO

The Raspberry Pi is a great machine to learn the ins and outs of blinking pins, but for doing anything that requires blinking pins fast, you’re better off going with a BeagleBone. This has been the conventional wisdom for years now, and now that the updated Raspberry Pi 2 is out, there’s the expectation that you’ll be able to blink a pin faster. The data are here, and yes, you can.

The method of testing was connecting a PicoScope 5444B to a pin on the GPIO pin and toggling between zero and one as fast as possible. The original test wasn’t very encouraging; Python maxed out at around 70 kHz, Ruby was terrible, and only C with the native library was useful for interesting stuff – 22MHz.

Using the same experimental setup, the Raspberry Pi 2 is about 2 to three times faster. The fastest is still the C native library, topping out at just under 42 MHz. Other languages and libraries are much slower, but the RPi.GPIO Python library stukk sees a 2.5x increase.

Convert a Rotary Phone to VOIP using Raspberry Pi

There’s something so nostalgic about the rotary phone that makes it a fun thing to hack and modernize. [Voidon] put his skills to the test and converted one to VoIP using a Raspberry Pi. He used the RasPi’s GPIO pins to read pulses from the rotary dial – a functional dial is always a welcome feature in rotary phone hacks. An old USB sound card was perfect for the microphone and handset audio.

As with any build, there were unexpected size issues that needed to be worked around. While the RasPi fit inside the case well, there was no room for the USB power jack or an ethernet cable, let alone a USB power bank for portability. The power bank idea was scrapped. [voidon] soldered the power cord to the RasPi before the polyfuse to preserve the surge protection, used a mini-USB wifi dongle, and soldered a new USB connector to the sound card. [Voidon] also couldn’t get the phone’s original ringer to work, so he used the Raspberry Pi’s internal sound card to play ringtones.

The VoIP (SIP) was managed by some Python scripting, available at GitHub. [voidon] has some experience in using Asterisk at his day job, so it will be interesting to see if he incorporates it in the future.

[via Reddit]

 

 

WiFi Controlled Power Outlets with Raspberry Pi

[Tim] was looking for a way to control his power outlets using WiFi. He looked into purchasing a WeMo but he realized that he could build something even better with more bang for his buck. He started out by purchasing a five pack of Etekcity wireless remote control outlet switches. These are kind of like the WeMo, only they aren’t controlled via WiFi. Instead, they come with an RF controller. [Tim] just needed to find a way to bridge the gap between the RF remote and WiFi.

[Tim] decided to use a Raspberry Pi as the brains of the controller. He also purchased a SMAKN 433MHz RF receiver and transmitter for communicating with the wireless outlet switches. The wiring for the modules is pretty simple. There are only four wires. There are power and ground wires for each module. Then the transmitter needs two GPIO pins while the receiver only needs one.

[Tim] began with a fresh installation of Raspbian. He then installed Wiring Pi, which gives you the ability to interface with the GPIO pins in a way that is similar to Arduino. He also installed Apache and PHP to create a web interface for switching the outlets. The last step was to write some custom software. The software included a script that allowed [Tim] to sniff out the controls of his RF remote. The correct codes are entered into the “toggle.php” file, and everything is set. All [Tim] has to do now is browse to his Pi’s web server and click a button. All of the custom code is available via git.

A Dev Board For The ESP Lua Interpreter

From the great minds behind the NodeMCU Lua interpreter for the ESP8266 comes a proper dev board for the WiFi platform of 2015. They are calling it, the NodeMCU-devkit, and it’s a reasonable, cheap, and breadboardable breakout board for the ESP8266.

The version of ESP8266 used in this project is the ESP-12, the newer, fancier model with RF shielding, a questionable FCC logo, and every single one of the GPIOs exposed on castellated connectors. The rest of the board is a USB to serial converter (the CH340G – probably the cheapest USB to serial chip out there), a few passives, and a USB micro connector. It’s simple, cheap, and open source. You can’t do better than that.

This dev board is explicitly designed to work with the NodeMCU firmware, a Lua-based firmware for the ESP. Already we’ve seen some projects make the Hackaday front page with this firmware. Sure, it’s just a garage door opener, but that’s extremely impressive for a chip that’s only a few months old.

Thanks [Baboon] for the tip.

RasPiCommPlus, An Expansion Board For Expansion Boards

The easiest way to connect a GSM module to a Raspberry Pi would be to buy a breakout module, install some software, and connect to a mobile network with a Pi. Need GPS, too? That’s a whole other module, with different software. The guys behind RasPiCommPlus are working on a better solution – a breakout board for breakout boards that takes care of plugging a ton of modules into a Pi and sorts out the kernel drivers to make interfacing with these modules easy.

Right now, the team has a GPS and GSM module, digital in and out modules, an analog input module, and RS-232 and -485 modules. They’re working on some cool additions to the lineup, including a breakout for Sharp memory displays, a 9-axis IMU, a stepper motor driver, and a 1-wire breakout module.

Some of the RasPiCommPlus team showed up to the Hackaday Munich party and were kind enough to sit down for a demo video. You can check that out below.

Continue reading “RasPiCommPlus, An Expansion Board For Expansion Boards”