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?
Fail 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.
[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.
[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.
Continue reading “Spectrum analyzer users custom characters on an HD44780 display”
[Jaromir Sukuba] has an awesome BrainF*ck interpreter project going. He’s handling the entire language in less than 1 kB of code. Sounds like a great entry in the 1 kB Challenge. The only problem is the user interface. The original design used a 4 line character based LCD. The HD44780 controller in these LCDs have their own character table ROM, which takes up more than 1 kB of space alone.
[Jaromir] could have submitted the BrainF*ck interpreter without the LCD, and probably would have done well in the contest. That wasn’t quite enough for him though. He knew he could get character based output going within the rules of the contest. The solution was a bit of creative compression.
Rather than a pixel-by-pixel representation of the characters, [Jaromir] created a palette of 16 single byte vectors of commonly used patterns. Characters are created by combining these vectors. Each character is 4 x 8 pixels, so 4 vectors are used per character. The hard part was picking commonly used bit patterns for the vectors.
The first iteration was quite promising – the text was generally readable, but a few characters were pretty bad. [Jaromir] kept at it, reducing and optimizing his vector pallet twice more. The final design is pretty darn good. Each character uses 16 bits of storage (four 4-bit vector lookup values). The vector pallet itself uses 16 bytes. That means 64 characters only eat up 144 Bytes of flash.
This is exactly the kind of hack we were hoping to see in the 1 kB challenge. A bit of creative thinking finds a way around a seemingly impossible barrier. The best part of all is that [Jaromir] has documented his work, so now anyone can use it in the 1 kB challenge and beyond.
If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!
We love squeezing every last bit of silicon goodness out of a tiny chip, or at least we delight in seeing it done. Today’s analog/digital hack is one of the sweetest we’ve seen in a while. And it’s also a little bit of a puzzle, so don’t scroll down to the answer until you’ve given the schematic a good think-over.
Continue reading “Craziest Pin-Saving LCD Trick Ever!”
Roland’s Alpha Juno 2 is an analog, polyphonic synth made in the mid-80s. While it isn’t as capable as the massive synths made around that time, it was very influential synth for the techno scenes of the late 80s and early 90s.
[Jeroen] is lucky enough to have one of these synths, but like all equipment of this era, it’s showing its age. He wanted to replace the character LCD in his Alpha Juno 2 with an OLED display. The original character LCD was compatible with the Hitachi HD44780 protocol, and still today OLEDs can speak this format. What should have been an easy mod turned into editing hex values on the EEPROM, but he still got it to work.
While the original character LCD could display one line of 16 characters, the ROM in the synth didn’t know this. Instead, the display was organized as a 2×8 display in software, with line one starting at address 0h, and line two starting at 40h. For a drop-in replacement, [Jeroen] would need a display the characters organized in this weird 2×8 format. None exist, but he does have a hex editor and an EEPROM burner.
With the Alpha Juno’s firmware in hand thanks to someone who does a few firmware hacks to this synth, [Jeroen] had everything he needed. All that was left to do was going through the code and replace all the references to the second line of the character LCD.
After burning and installing the new ROM, the OLED display was a drop-in replacement. That meant getting rid of the whiney EL backlight in the original display, and making everything nice and glowy for a few nights on a dark stage.
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.
Continue reading “Raspi Ambilight Integrated in a 19″ Rack Packs Lots of Peripherals”