Adding RS232 to a multimeter the hard way

You might want to store information from a multimeter to be graphed over time. This comes with pretty much all of the high-end professional models. But if you buy a super cheap meter you can bet this isn’t an option. [Jazzzzzz] has found a way to pull the data from a $4 meter via RS232. It’s not impossible, but we definitely think he’s doing it the hard way. That’s because he’s not just tapping into a dormant feature. He’s actually adding a microcontroller to sample the data and push it via the RS232 protocol.

On the bright side, this is easier than building a multimeter from scratch. The sampling circuits are still being used, with a PIC 16F688 intercepting the signals as they enter the stock microcontroller. The signal he was after comes into the chip on just one pin, but to get the readings right on the PIC he had to use an OpAmp. That’s only part of the puzzle as he also needed a way to tell what the selector switch was set at. In the end, adding a potentiometer and reading its value let him calculate the position.

[Thanks Karl]

Laser trip wire in an easy-to-use form factor

[Rul] built a nice laser trip wire alarm for use in Airsoft matches. Just place the enclosure so that the beam crosses a doorway and it will sound an alarm when the beam is broken. The only problem with this setup is that you need a reflective surface on the opposite side that can be positioned to direct the beam of light back to a photoresistor. But wait, there’s a second option. [Rul] also added a leaf switch that can be connected to an actual trip wire instead of using the laser.

A PIC 16F688 controls the laser module and monitors the photoresistor and leaf switch. When power is first switched on the box goes into a setup mode where it waits until the laser is detected by the photoresistor, switching on an LED to signal that you’ve got the beam aimed correctly. One press of the push-button puts it in activate mode which will sound the hacked window-alarm inside when the beam is broken. A toggle switch lets the operator chose between laser or wire operation.

You certainly won’t miss the alarm when it’s set off. Watch it scare the life out of a poor house cat in the clip after the break.

[Read more...]

Understanding interrupts in PIC microcontrollers

Interrupts are the name of the game for more functional microcontroller firmware. [Rajendra] just posted a tutorial covering all of the interrupt types for the PIC 16F688 microcontroller. He gives an overview of all of the major points: what an interrupt is, what causes interrupts, how to read the datasheet (often overlooked) to set up interrupts, and finally he applies it to a test platform and a bit of code.

We’ve been playing around with an Arduino again over the weekend and are a bit frustrated with the restricted access to interrupts. That issue deals with AVR interrupts, a topic with which we’re already well acquainted. But we work with PIC hardware much less often and it’s fun to explore how the other half does things, both in hardware and in code.

LCD PIC graphics demo

[conville] has been pushing standard HD44780 character displays to the limit. Embedded above is an example spectrum analyzer and text scrolling demo. Below you’ll find a scope demo. Both of these are created using a PIC 16F688 that dynamically rewrites a custom character set to create the animation. You can find the source code on mikrocontroller.net. [Read more...]

Follow

Get every new post delivered to your Inbox.

Join 91,277 other followers