Fail of the Week: Reset Issues with 595 and HD44780

fotw-reset-issues-595-character-lcd

We really like to see hardware hackers stepping out of the safe and polished boundaries of available Arduino libraries. One example of this is a project which [Matteo] thought worked: using a shift register to drive a character LCD. This can be a desirable way to do things, because it takes the GPIO usage down from six to just three connections. If you don’t remember seeing that one earlier this month take another look. The gist of it is that [Matteo] hacked one function in the LiquidCrystal library to make it happen.

What makes this a truly great fail is that the problem was not immediately apparent, and is difficult to reliably reproduce. The LCD is unstable depending on how the Arduino board is reset. When connecting the Arduino to a computer the screen doesn’t work until you press the reset button. But press the reset button repeatedly and you get a non-functional screen plus the gibberish seen above.

There’s not much to go on here, but we think it’ll be a lot of fun to state your theory on the malfunction and suggesting for testing/fixing the issue. This could be a lot of things, the controller on the display getting mixed-up, the 595 missing an edge (or something along those lines). Do you fix this with hardware (ie: capacitor to avoid voltage dip), a software issue (need a longer delay after startup), or a combination of the two?


2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which runs every Wednesday. Help keep the fun rolling by writing about your past failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

Using an HD44780 character LCD with the Raspberry Pi

[Tech2077] is one of the lucky ones who already got his hands on a Raspberry Pi. He’s been looking into different interface options with the GPIO header and just posted a guide to using an HD44780 character display with the RPi. We like this approach because instead of doing some hard-core LCD work he’s using prototyping equipment you probably already have on hand.

Getting a character LCD running should be really simple. The gotcha is the logic level gap between the devices. If you’ve been working with Arduino, your add-ons are probably meant for a 5V power rail  and logic levels. The RPi outputs 3.3V logic. You could use a level converter (you’d need at least 7 pins to be converted in this case) or you can be a bit more clever. [Tech2077] grabbed an I2C port expander that uses just 2 of the RPi lines to address even lines of the display (four data bits plus three control bits). This is a bit of a hack, as the 3.3V logic is 0.2V below the recommended minimum for a digital 1 on the port expander. But it seems to work just fine! If it didn’t, a couple of NPN transistors would do the trick as well.

Addressing the new peripheral is just a matter of loading the i2c module and writing some Python.

Spectrum analyzer users custom characters on an HD44780 display

[Camilo] built a spectrum analyzer to use with his audio system (translate). The hardware is quite simple, using an op-amp, microcontroller and LCD display. He chose an LMV324M low-voltage op-amp which connects to the incoming audio signal and feeds its output to the microcontroller’s ADC. In this case, he chose a Freescale microcontroller from the HCS08 family which is running at 20 MHz. This gives the project enough speed to properly analyze the incoming audio. He mentions that he’s following the guidelines set forth in the Nyquist-Shannon sampling theorem and using the Fast Fourier Transform when processing the samples.

This isn’t the first time we’ve seen a character LCD used as a display for a frequency analyzer. This other ATmega8-based rendition supported several different screen layouts. These displays have enough RAM to store eight custom characters. Each character is 5×8 pixels, lending eight levels to each character for a total of 16 for each column seen above. We love the simplicity of the hardware in the project but we wouldn’t mind seeing an additional potentiometer to fine-tune how the data is displayed on the screen to take advantage of its full range. See the project in action in the clip after the break.

[Read more...]

Raspi Ambilight Integrated in a 19″ Rack Packs Lots of Peripherals

raspi ambilight

Ambilight systems create light effects around your monitor that correspond to the video content you’re playing. [Sébastien] just build his (French translated to English, original here) and embedded all the elements in a 19 inch rack he bought from Farnell.

As most ambilight systems we’ve covered over the years the HDMI signal is first split in two, one being sent to his monitor while the other is converted into a S-Video signal. The latter is then captured with a STK1160 stick connected to a Raspberry Pi. A python script using the OpenCV library is in charge of extracting the frames pixels and figuring out what colors should be sent to the SPI connected LPD8806 LEDs. A nice web interface also allows to drive the LEDs from any platform connected to his local network. Finally, a standard HD44780 LCD and an infrared receiver are connected to the raspberry, allowing [Sébastien] to control and monitor his platform. Funny thing: he also had to use two relays to power cycle his HDMI splitter and converter as they often crash. You can check out a demonstration video from a previous revision after the break.

[Read more...]

Hackaday Links: February 9, 2014

hackaday-links-chain

Here’s a quick tip to extend the usefulness of your multimeter. It’s a set of mini test hooks soldered to alligator clips with a short hunk of stranded wire in between. You can buy mini test hooks that go right on the metal probes of your meter, but the weight and bulk of the meter probes and cords sometimes get in the way. This rig allows more flexibility because of that wire.

Staying on the theme of test equipment tips, here’s a simple way to make a Y-connector for logic analyzers. [Thomas] uses a dual-row pin header, shorting each pair of pins so that both rows are connected. When this is plugged into a pin socket it leave two pins for connecting your test equipment and the rest of the project hardware.

After seeing our feature of a 3-wire Character LCD [Chad] wrote in to mention he built a 1-wire version using an ATmega328.

If you’re going to be in Anaheim this week you can stop by the ATX-West expo and see a 3D printer with a 1m x 1m x 0.5m printing area. [Thanks Martin]

Speaking of 3D printers, here’s a big delta robot (seven feet tall) outfitted for alternative material printing. It’s printing a CT scan of ribs and a heart in hot glue. This seems to be a popular material for more artistic uses. We just saw a hexapod which deposits hot glue as it roams.

The weaponized quadcopter post from Tuesday was a controversial one. The really bad part of it was the laser, which strapped to anything is extremely dangerous. But the other hack may have just been poorly executed. Hackaday alum [Jeremy Cook] wrote in to mention that fireworks and quadcopters can be used more responsibly. He strapped a sparkler to his quadro and used it to make light graffiti. You may remember that [Jeremy] wrote an introduction to light graffiti for us back in November.

Controlling Alphanumeric LCDs With Three Wires

shift

The HD44780 LCD controller is the defacto way of adding a small text display to your next project. If you need a way to display a few variables, a few lines of text, or adding a small user interface to a project, odds are you’ll be using one of these parallel LCDs. These displays require at least six control lines, and if you’re using a small microcontroller or are down to your last pins, you might want to think about controlling an LCD with a shift register.

[Matteo] used the ubiquitous ‘595 shift register configured as a serial to parallel converter to drive his LCD. Driving the LCD this way requires only three pins on the Arduino, [Matteo]‘s microcontroller of choice.

For the software, [Matteo] modified the stock Arduino LiquidCrystal library and put it up on his Git. Most of the functions are left untouched, but for this build the LCD can only be used in its four bit mode. That’s not a problem for 99% of the time, but if you need custom characters on your LCD you can always connect another shift register.

If you just can’t spare three pins for a display, you could squeeze this down to just two, or add a second microcontroller for a one-wire-like interface.

Controlling Alphanumeric LCDs With Two Wires

LCD

The Hitachi HD44780 LCD controller is the most common interface to all those alphanumeric LCDs out there, and there are a million and one tutorials for connecting these displays to any microcontroller imaginable. This still doesn’t mean hooking up these displays is necessarily simple, though: you still need at least four wires for the data, at least two for control signals, and power and ground lines for connecting the LCD the traditional way.

Here’s a neat trick for connecting HD44780 displays that only needs two wires. In this setup there’s only a ground and power+data wire. The interesting part of this build is using the power pin to transmit serial data with an RS-232-like format. The only difference is keeping the data line at +5 V when idle; a reasonable-sized cap keeps the display and controller alive when the master microcontroller is transmitting.

This technique does require a bit of logic on the receiving end, which a small 8-pin PIC can handle with ease. Communication between a microcontroller and this “smart” LCD is done at 2400 bps, which even the wimpiest micro can handle. All the software to make this setup work are available here, and we expect an Atmel-based version to hit the Hackaday tip line shortly.

Follow

Get every new post delivered to your Inbox.

Join 96,468 other followers