Ez a számláló a poszt nézettségét mutatja. Mindenképp olvasd el ezt a posztot a részletekért.



Friss topikok



My newborn breathe monitor

2012.08.18. 13:18 versatile

Hi all.

I'm a dad and very happy. My little girl was born 2 week ago.

Before my child's delivery, I began to develop a baby breathe monitor.

I would like to share the results, but it's not finished because my baby arrived 10 days earlier than tought.

I thought that I'd construct one monitor for my baby 1 month ago, that does not have a simple sound or capacitive sensing but light triangulating method.

I disassembled main Wii remote and soldered out the camera. I made a printed circuit with Atmel Atmega88 microcontroller, and modificated the Japanese guy Kako C software. (http://www.kako.com/neta/2007-001/2007-001.html)

The cam senses maximum four light spots and can report a spot size and position at a maximum of 200Hz refresh rate.

The first idea is the next:

Put infrared light source on my baby clothing and the Wii camera reports the lights spot position for the microcontroller. The micro computes the relative motion data and alarms when there's no or low motion detected.

The first test resulted very bad value for the light source, because the LED did not emit enough light for the cam.

The sufficient light source is too big, and My baby can gulp the components easily. The big LED needs a  large amount of energy, this results big battery. This is no way.

The second idea is one big infra light source beside the cam, and reflecting decals on the baby clothing.

During the test some problem turned out. The decal reflected low light, but better than LED. The decay fixing is not safe for the clothing, and the reflecting angle is low.

The third,and final idea is some red laser pointer, pointing at the baby clothing.

It seems dangerous but the emitted laser power is lower than 1mW and my baby is not able to move so that it can't stare into the beam.
It is not swallowable and it's easy to set the right position.

The hardware:

Wiicam connect through I2C with 3,3V logic level. The microcontroller works with 5V power supply. Four green LED indicate the light spot number, eight various colour LED indicate the moving amplitude. It has one push button for changing the working mode, and setting the alarm treshold. It has a buzzer for sound alarm.

Wiicam needs 25MHz clock and 3,3V power supply, it's generated by the LM1117-3.3 IC and quartz generator.

The ATmega88 TWI interface is used for I2C connection and is pulled up  with 10K resistor to 3,3V supply.

I don't have printed circuit board plan with me, because I'm on vacation and the plan is at my workplace.

Here is the shematic:


The I2C bus needs to be pulled-up to 3,3V supply, It's working properly. The controller works at 18,432Mhz.

The software:

Kako wrote one good code for acessing the camera data quickly. ( Thanks! ) I modificated and integrated some functions.

First I read the four light spots data from the camera and save them, then I wait some miliseconds and read them again.

I search the diference between the two meassurements and collect them. If the total difference is higher than the treshold, it effects good conditions. Otherwise no or low movement is detected. 10 seconds bad condition calls the forth alarm. The movement data and light spot number are displayed on the LED bar for easy check of the proper working.

A button controls three working modes: arm, disarm, setting. If you press  the button once for less than 1 sec, it toggles arm and disarm mode. Arm mode indicates two short beep sounds, disarm indicates one long beep sound after 1 sec when button is released.

If it's pressed for more than 2 sec, the software switches up to setting mode. Each button push increases the treshold value.
 Threshold is valid from 0 to 32. The valueis  displayed on a led bar binary. If there's no push on the button for ten seconds, threshold value is stored in an eeprom, and the software returnes to arm or disarm mode.

The modified code can be downloaded here:

Sorry, I didn't comment the code because I'm lazy and I have little free time. Please forgive it to me.

The sensig method:

The laser pointers project from 1 to 4 light spots onto the baby's clothing . The laser beams are paralell with the cam axle with little offset.

When the baby is breathing, her chest moves up and down cyclic and moves the clothing. The light spots are  moving  in front of the cam, and generate different data. The movement is very small, but the high resolution cam sensor is capable to sense. Normaly 2-4 pixel change is realized under two measuring per light spot. The system noise is low, three light spots generate 1-2 pixel change with no movement. Higher sound can make 1-2 pixel noise.


During 2 weeks of continous running there's been an accomplishment of good results. There's been very low number of false alarms, and there's been no crash.



Some videos of the operation:



Class II are low-power lasers that must emit a visible beam. The brightness of the beam is relied upon to prevent staring into the beam for long enough periods to cause eye damage. These lasers are limited to a radiant power less than 1 milliwatt, which is below the maximum permissible exposure for momentary exposure of 0.25 second or less. The natural aversion reaction to visible light of this brightness is expected to protect the eyes from damage, but any intentional viewing for extended periods could result in damage. Some examples of this class of laser are demonstration lasers for classroom use, laser pointers, and range-finding devices.

I meassured the used laser pointers radiant power and the result 0.428-0.527mW.

For more eye safety, I'm searching for usable light sources.

In the future I plan to boxing and finishing.

Best regards.


1 komment

A bejegyzés trackback címe:



A hozzászólások a vonatkozó jogszabályok  értelmében felhasználói tartalomnak minősülnek, értük a szolgáltatás technikai  üzemeltetője semmilyen felelősséget nem vállal, azokat nem ellenőrzi. Kifogás esetén forduljon a blog szerkesztőjéhez. Részletek a  Felhasználási feltételekben.

JoeHorseDick · http://kifordultvilag.blog.hu 2012.08.22. 23:49:45

popular science rss feedből jöttem, jó kis projekt, gratula!