Build Your Own Programmable Logic Controller

[Q] is an Electrical Engineer who works in an industrial setting. He frequently uses Programmable Logic Controllers at work but had never built one himself. He decided to undertake the project at home and managed to build a PLC that outputs 120V AC or 12 V DC and has optoisolated inputs.

On the circuit board you’ll find an ATmega8 and an EEPROM for extra data storage. Six outputs are controlled by relays since they are able to output either alternating or direct current. There are eight inputs which use optical isolators as buffers to protect the microcontroller.

So what did he end up using this for? It was part of his Christmas light setup last year. The image above shows the PLC in a water-tight electrical box with extension cords running to each of the devices he wishes to control. The example code is what he used on the X-mas setup, but it should be enough of a guide to program this to work with just about any application.

USB Keyboard Prankster

Being a long time prankster, [cyclonite] came up with this pretty clever hack in an old USB flash drive.

The drive was removed from its case, and the stock memory and controller was removed. On the back, an attiny 2313 is glued to the pcb, while resistors are swapped to work with the VUSB library. Wirewap wire is used to jumper all the needed points to the new micro controller on the back, and a temporary ICSP header was fitted on the end to load software.

What your’re left with is an innocent looking usb drive that, when plugged in, sets itself up as a keyboard then proceeds to toggle the caps lock on your victims computer every few minuets. Classic.

Join us after the break for a quick video.

Continue reading “USB Keyboard Prankster” →

Extending The Battery Life Of LED Dominoes

[Fede.tft] wrote in to tell us about some work he’s been doing to save battery life for LED dominoes. He originally got the idea after reading this post about the electronic gaming pieces. That project was aimed at the 555 timer contest and therefore, used a 555 timer. [Fede.tft] calculates the battery life for the CR2302 battery in the 555 circuit at no more than about 80 days. That’s if you never use them and the LEDs are never illuminated. It makes sense to remove the batteries from the device when not in use, but a redesign to increase efficiency is definitely worth the effort.

This rendition does away with the 555 chip in favor of a CMOS chip. By building a circuit around four NAND gates of a CD4011 chip, the standby lifetime of the battery is calculated to increase to about 4.5 years. Not bad! Add to this the fact that replacing the 555 timer didn’t increase the component count, the price for the chip is similar to the 555, and you didn’t need to resort to a microcontroller. Yep, we like it.

Papydoo Is Watching You!

Papydoo spends most of its time sleeping, but if startled by vibration it will wake up and stare you down with a cold and unnerving robo-gaze like you have not seen before. Or it might just do something crazy like display a scrolling Space Invaders character marquee.  That’s the thing with Papydoo, you just never know.

Vibration sensing is accomplished with a piezo element harvested from an old horn speaker that is simply sandwiched between the project enclosure and the surface it is sitting on. A MCP601 op-amp is used to amplify the weak potentials from the piezo element and feed them to the ADC of a Zilog Z8F083A microcontroller. When sufficient vibration is detected, the MCU wakes up and displays one of a number of different animations on the front panel 32X8 LED matrix. The various display modes can also be manually selected using a small button on the back of the enclosure.

Power consumption is reduced to 150uA while sleeping by only briefly waking the MCU once per second to check the current vibration level. Nearly all of this power draw can be attributed to the op-amp, and although there are much more efficient models available, sometimes the best choice is just the one you already have on hand in your parts bin. Regardless, the power consumption is low enough to run the device off of a set of AA batteries.

We could imagine that similar setup could be used for a number of different low-powered messaging applications that would only “wake up” when someone was near enough to read and interact with. Add a loud speaker and this might even make a good alarm to keep pesky coworkers out of your “cube”. What would you do with a Papydoo?

Thanks for the tip [Laurence]! If you happen to read this, we are dying to know: why “Papydoo”?

Short video after the break.

Continue reading “Papydoo Is Watching You!” →

Single-chip Digital Audio Player

[Dmitry Gr.] built a simple circuit to playback digital audio. At the center you can see an 8-pin PIC 12F1840 microcontroller. It’s pulling audio data from a microSD card which is read through a full-sized SD card adapter to which he soldered jumper wires for all of the necessary connections. There is one additional semiconductor, a FET which is used to drive the speaker seen to the left. Unregulated power is provided by a pair of AA batteries (four are seen in the picture above but only two are actually connected to the circuit). He’s planning to post his code package soon, but for now you’ll have to be satisfied with a couple of demo videos and a schematic. Both videos are embedded after the break, and we’ve also included a screenshot of the schematic which is shown in the second video.

This is very similar to the 1-Bit Symphony CD we saw almost a year ago in a links post. That one used a jewel case instead of the protoboard seen here, and had a headphone jack instead of the speaker.

Continue reading “Single-chip Digital Audio Player” →

Simple IR Bounce Tachometer

[Rajendra Bhatt] writes in to let us know about a nice simple IR bounce tachometer. The project uses a startUSB for PIC board and a 16×2 character LCD with a very basic Infrared bounce circuit.  Measuring either a reflective or non reflective spot in the rotating object, in this case a bit of white paper, the micro is supposedly capable of measuring up to 99,960 RPM (we think the paper might fly off at this point) with a resolution of 60 RPM. This is the same concept as a beam-break style tachometer but keeps all your electronics on one end of the spinning hazard.

The article also goes into detail about setting the PIC18F2550’s Timer0 register to enable 16-bit resolution.  The PIC is configured to turn on the infrared LED for one second, measure the number of pulses (through timer registers), and multiply that value by 60.  We would be more careful with the TMR0H and TMR0L counters as they have to be read and written in a certain order to preserve their values, but you’d need to be measuring upwards of 15,360 rpm to run into that error.

It is a quality writeup for anyone interested in learning about the start USB for PIC board, tachometers, or a new project. Thanks [Raj]!

Capacitive Touch Sensor Shield For The TI Launchpad

Texas Instruments just released a product they call the Capacitive Touch Boosterpack which is basically a touch-sensitive shield for the Launchpad. The video after the break shows an unboxing and demonstration of the product which TI is launching with a $4.30 limited-time price tag. The red PCB itself has a capacitive touch button in the center, surrounded by a touch-scroll wheel, which is centered in a proximity senor that takes up the rest of the board. There are also nine LEDs which look like they’re soldered on the underside of the board, through routed holes that mount them flush with the top surface. The pack also comes with a new MSP430 microcontroller, the G2452, which has 8 KB of flash memory and takes care of calibrating, reading, and processing signals from the board thanks to the software package that goes along with the add-on kit.

Looks quite nice. There’s a heck of a lot of information in the documentation for this hardware. We do wish it was a bit easier to find board layout information, but we’re sure it’s there somewhere.

Continue reading “Capacitive Touch Sensor Shield For The TI Launchpad” →