Go Down

Topic: First Project Ever. Vibrating Alertness Alarm (Read 935 times) previous topic - next topic

CobyUnger

Hi,

I'm new to Arduino and basically a stranger to most programing. I am an industrial designer working on an ocupational theorpy project for a client with Multiple Sclerosis. The problem I am tackling is that he falls asleep a lot in casual settings and wants an alarm type device that will keep him awake. I want the device to be hand held and fairly discrete (so as small a board as possible will be best). The program will be fairly simple. When turned on I want the device to begin to vibrate at random intervals and only turned off when he presses a button.

I am planning on reading up on the programing side of things and teaching myself as much as possible but I need some advice about which board to buy. What is the smallest stand alone board I can buy? If there are smaller boards that require some other piece can I somehow modify them to be semi stand alone?

I may check back in later for programing advice.

Thanks,

-Coby

GoForSmoke

Would a sound in the ear do? Using an ear bud that would take less power so less battery, smaller, lighter, etc.

Otherwise cheap, small, low power, noticeable vibrator would be a small DC motor that turns an off-center weight. The final package if using a surface mount ATtiny could be very small and be worn like a semi-thick (depending on motor) wrist watch.

You could try a piezo-based vibrator but I dunno if that little bit would wake me up.


I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

CobyUnger

Sound in the ear was an idea originally but we decided that since this problem effects him mostly while talking to other people an audible alert would be too distracting. How much power can I run thorugh the ATiny? My non-programable mockup used 1.5 volts and was that seemed like enough. Also can I program the ATiny with Arduino software? How does that unit get connected to sensors and motors and such?

Thanks,

-Coby

Retroplayer

Why not model this after the alarms they use in cars to sense a driver falling asleep?

But, yes, you can program ATTiny's with Arduino. But you need to add these files: http://code.google.com/p/arduino-tiny/

And to run a vibrator motor, you just need a transistor and a resistor since you only need to spin in one direction: http://www.me.umn.edu/courses/me2011/arduino/technotes/motorswitchled/index.html

For sensors, it depends on what sensors.

GoForSmoke

Maybe there's a change in pulse or skin resistance when the patient nods off? Then it won't have to be a persistent occasional stimulus.

I suggest the tiny's because the are small (surface mount, less than 6mm square), have few pins and at low but more than you need speed ...

Quote
• Low Power Consumption
- Active Mode:
• 1 MHz, 1.8V: 300 ?A
- Power-down Mode:
• 0.1 ?A at 1.8V


It's the wake up kick that may eat your battery. But you may find a way around that.

A simple DC motor just needs power. That's 1 pin ON or OFF and ground. Button... could be 1 pin or 2 for some forms of touch-sensor (capacitive sense, piezo disk, etc) that IMO have way longer lives than moving-part types.

Yeah, if you have the core files for the chip, Arduino IDE can program just about any AVR.
MIT High-Low Tech:
http://hlt.media.mit.edu/?p=1695

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Riva


The program will be fairly simple. When turned on I want the device to begin to vibrate at random intervals and only turned off when he presses a button.

Instead of random time could you use accelerator sensor that triggers when the arm/wrist movement stops for X amount of time.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

mjkzz

You can buy very small vibrating motor, used in cell phones, search for "vibration motor" on ebay.

Not sure how to detect someone dozing off, but I think your idea of random alarm that requires him to turn it off might just be good enough.

Develope it on Arduino and then turn it into 8-pin app is definitely huge, as many have already suggested.
Search for "mjkzz" on eBay :-)

CobyUnger

Thanks for all the help so far guys. I'm really new to this, so I apologize if my questions are so amateur.

If I understand correctly from what I've read so far I will need the ATtiny, an Arduino, and A breadboard, A ATtiny programer board, and a commercial programmer board and all the components I intend to use on the device it's self. Is this correct? Do I really need all of this?

Thanks agian,

-Coby

Retroplayer

You can use an Arduino as an ISP to program the ATtiny. Do you already have an arduino board?

CobyUnger

No but I was just about to head out to RadioShack to buy one. What else will I need?

Retroplayer

Well, start with just an Arduino Uno for devlopment. You can take your code and put it in the Attiny later. You will need some NPN transistors with a CE current high enough for your motors, some resistors (they should sell an assortment pack) a vibrator motor, and a small breadboard.

That will get you started. Once you have it all developed, then look for an appropriate perfboard and enclosure and whatever accessories you need. Radioshack used to sell a little keyfob enclosure that would probably be enough to house  everything.

ironheartbj18

i m using those from http://www.sonicalert.com/products-alarm-clocks-all.html. i have one of them. i love it. let you know the vibrating input is 12 volts.

CobyUnger

So I've got my code and circuit basically figured out. I think I'm ready to load this onto a smaller unit. What exactly should I buy? There seem to be countless ATtinys out there. I only need to hook up a battery, button and motor plus the related resistors and such.

GoForSmoke

You should start by determining how many I/O pins you need, how much flash and RAM.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

CobyUnger

Very minimal flash and ram. The code is embarrassingly simple. In terms of pins I will need one in and one out plus ground and power I suppose. Speaking of witch, how do I run power into the ATtiny?

Sorry for all of the beginner questions. A book is on order so I'll be asking fewer questions soon.

Go Up