Arduino Heart Rate Monitor

[Wolf] had a Polar brand exercise watch that wirelessly monitored a chest strap that sends it heart rate data. It sounds like there’s some way to transfer data from the watch to a computer, but it’s only meant for use with Polar’s website. He wanted to do a little more with the equipment so he ditched the watch and built an Arduino-based heart rate monitor.

He’s still using the chest strap and was happy to find that SparkFun sells an OEM receiver for it. Just add a 32.768 kHz clock crystal and an optional antenna wire and you’re up and running. Once the receiver finds a transmitting chest strap, it will pulse an output pin with each beat of the heart. [Wolf] used the D2 pin of an Arduino Uno to connect to the receiver because this pin corresponds to one of the ATmega’s external interrupts. A rolling average of five inputs are used to help smooth the display data, which is shown on the 2.8″ LCD screen seen above.

Working With The µOLED-128-G1 Display

If you’re not already familiar with the 4D Systems µOLED-128-G1 display, [Gary] put together a project that shows some of the features it offers. This is a smart display, having its own onboard microcontroller and a microSD slot. The SD card stores image and video data, while the microcontroller takes care of displaying them based on simple serial commands it receives. This means you can hook it up to a computer or microcontroller and show still or animated sequences with minimal programming effort. We’ve embedded a video after the break, or you can look in on this slot machine project from last year that used the same module.

[Gary] is using a PIC microcontroller programmed with PIC Basic Pro. But most of the work is done with a 4D Systems program called Graphics Composer. You build out the images and animations you want to see on the screen, which are then formatted for the display and written to the SD card. [Gary] mentions that the card is not written using a traditional filesystem, so if you know of another way to write data to and from this card we’d love to hear about it in the comments. The image editing software will also spit out the serial commands necessary to pull your freshly minted graphics up on the display.

Continue reading “Working With The µOLED-128-G1 Display”

Discrete Logic Driving Game Development

[Caleb] is hard at work on a driving game based on 7400 series logic chips. This will be his entry in the Open 7400 Logic Competition, and it really outlines why this contest is especially tricky.

The concept behind the game is quite simple. You’re the driver of a car (the red dot at the bottom of the display square seen above) and need to navigate the curves in the road as you drive along. It’s the same game as we saw played on receipt paper back in June. [Caleb’s] using and LED matrix as the display, and we’re confident that if we grabbed our favorite microcontroller we could have this up and running on an 8×8 bi-color display in an afternoon. But doing it without the crutch of a programmable chip really brings out the clever engineer inside of you.

The circuit seen above is a Logisim proof-of-concept that [Caleb] went on to test on the breadboard. He thought he had everything figured out until he realized that his Data Flip-Flops were very occasionally not powering up in the same state as he predicted. Don’t worry, he found a solution to the problem. But we can’t wait to see what other hurdles he encounters as he pushes on toward completing the project.

ATtiny Hacks: Stopwatch Turned Race Clock

ATtiny Hacks Theme Banner

The folks over at blondihacks are gearing up for an event called “The 24 Hours Of LeMons” which is a form of low-budget endurance racing involving cheap cars, heroic repairs, wacky themes, and a lot of serious driving. The format of the race is pretty simple, the cars race around the track continuously for a set amount of time (usually 12 or 24 hours), and the goal is to complete as many laps as possible in that time.

In order to be racing that long each team has multiple drivers, and a in car timer would be especially helpful. While commercial models cost a pile of money, the team was able to source a dual clock / stopwatch with a nice big display, and hack it up with an Attiny13. The stopwatch is deactivated when the engine is off, and reactivated when the engine gets turned back on.

Now when one driver’s turn is up they come in for a pit stop where the engine is shut down for saftey reasons. When the new driver is ready to leave, the clock automaticly resets for them and they can get on with the race.

ATtiny Hacks: ATtiny45/85 Servo Library

ATtiny Hacks Theme Banner

Servo8bit is a library for AVR microcontrollers that allows you to drive servo motors without the need for a 16-bit timer. Obviously, this is quite useful for smaller chips that only have 8-bit timers and it is specifically targeted at the ATtiny45 and ATtiny85 microcontrollers. The library offers 256 steps of resolution, and can drive up to five servos at one time. Servo control pulses can be generated between 512 and 2560 microseconds and if you don’t mind increasing the time between these pulses [Liya] says it would be possible to increase the 5-servo limit.

The library is quite easy to use, but in its current state it would take just a bit of work to port to another device. It’s been written for an 8 Mhz clock signal with PortB used to drive the motors. Using find-and-replace to change the PORTB keywords to use a DEFINE variable should be easy enough, but we don’t know how hard it would be to change the clock frequency.

We wonder if it’s possible to make this a slave device, perhaps implementing a 1-wire protocol?

Interfacing With A PS/2 Mouse

[David] sent in his implementation of reading a PS/2 mouse with a PIC microcontroller and some LED displays. Of course, this follows hot on the heels of using a PIC with a PS/2 keyboard so now might be the time to start digging out your old peripherals out of your junk pile.

[David] began his project trying to figure out how to connect a mouse to his breadboard. After hacking the plastic off a PS/2 mouse extension cord, he wired everything up according to the pinout. Programming the PIC to understand PS/2 commands was a little strange. [David] is used to having his microcontrollers provide the clock signal. The PS/2 protocol is a bit strange as the peripheral sets the clock. Since PS/2 is a bidirectional protocol, the mouse also accepts commands. The host – [David]’s PIC – must send the mouse a command to start sending movement data.

Because USB keyboards and mice are backwards compatible with PS/2 ports, [David] tried out a few USB mice with a USB to PS/2 adapter. Every attempt at using a USB mouse failed. Strangely, when a Bluetooth mouse was tried (via Bluetooth to USB to PS/2), everything worked perfectly. Check out [David]’s PIC mouse demo after the break.

Continue reading “Interfacing With A PS/2 Mouse”

Pinball Machine Eats Your Quarters, Tells Time

pinball_machine_clock

[alanamon] had an old pinball machine in his basement, and thought it would be cool to rig it up to serve as a clock as well. He didn’t want it to be just any clock however, he wanted the pinball machine to be the most accurate clock in his house.

Other than telling time using the game’s scoring reels, there were two other things that he wanted to ensure with this build – that the game functioned normally when desired, and that the clock mechanism made no permanent changes to the game. To accomplish this, he dug around inside the machine and made all of his connections using clips secured to the game’s Jones plugs instead of drilling holes and soldering wires.

The clock runs off an Arduino, which gets its its time data using an old GPS receiver he had kicking around. The receiver pulls time data from GPS satellites much like this clock we featured yesterday, updating the score reels once every minute. The clock can be programmed to turn the machine on and off at a scheduled time each day, and simply turning off the Arduino will allow you to play the game in its unaltered state.

We never really contemplated using a pinball machine to tell time, but it works for us! Check out a video of his pinball clock in action after the jump.

Continue reading “Pinball Machine Eats Your Quarters, Tells Time”