use arduino to help my daughter

Thank you for all the wonderful inputs. This is really encouraging as there seems to be a true possibility that this can be done. A truly helpful community!

As of the moment, I am currently reading up on the ladyada/adafruit website on the coding and breadboard basics. Like I previously mentioned, I am not a programmer by nature so this is fairly new to me, but the DIY and electronics part of it is familiar as one of my hobbies is RC.

I will be referencing the inputs provided here and will be getting a board in a couple of weeks (hopefully with enough coding knowledge by then) and start experimenting.

Btw - I showed my wife this thread and she is very grateful to everyone who has posted for providing their ideas to help me start this project.

Good luck, I hope you keep us posted.
I think I speak for everyone here saying that what ever the electronic outcome I hope this has a good outcome for your daughter.
Need more specific help please ask.

I surely will. Apologies for not being able to post back on this thread for the whole weekend, was out doing some repairs on the house which kept me busy the whole weekend.

Anyhow, I was doing some thinking over the weekend and figured the optimal way to go about the package of this would be in the form of a small pager with all the electronics packaged inside (arduino board, batt, vibrator motor and accelerometer) which can be clipped onto the waistband of pants/shorts.

I also mulled on the idea of the force sensor which can be slipped inside a shoe – this is also a good idea although I thought that it would also be helpful if my daughter would be able to still be reminded by the package even if she's at home, when we can't see her (ie playing in another room). The force sensor idea is really good, but that would require my daughter to wear shoes even inside the house, which she doesn’t. If the package was a clip-on like a pager, she could simply clip it on her waistband and it’ll be with her regardless if she’s wearing shoes or not.

With that in mind, I do have couple more questions if I may - I am planning to power whichever board I was going to get with a simple li-on batt (from a cellphone) which will put out 3.7v to keep the package light.

According to the board comparison here (http://arduino.cc/en/Products.Compare) - see attachment below, I am now limited to these boards which will accept a 3.7v power source. All the others (uno, etc) require at least 5v or up.

Can I ask what would be the suggested board for the project requirements (will fit in a small pager size case with arduino board, batt, vibrator motor and accelerometer inside), and the easiest to work with bearing in mind I’m very much a beginner and this is my first arduino experience. Thank you again.

Kind regards,
Shaun

I also found this blog - http://bildr.org/2011/03/adxl345-arduino/

which looks like a promising lead. I figured the led can be placed with the vibrator motor, tweak the code a little.

Note, in terms of your list of boards, that only listed mostly the official Arduino boards. There are other boards out there that could be used:

  • Teensy 3.0 -- this runs at 3.3v, and it has a different processor (Arm) than most of the Arduinos (except the Due), so you occasionally find libraries that haven't been ported. It is in a dip-28 package, and made for breadboard/protoboard usage. The creator of the Teensy 3.0 puts a lot of effort into making things compatible and easy, and supports the board on his forum: Teensy USB Development Board
  • Adafruit Flora -- This runs at 3.3v, and has a plug for the li-poly battery. It is a wearable micro-controller, and competes with the lilypad. Unfortunately, it is currently sold out: FLORA - Wearable electronic platform: Arduino-compatible [v3] : ID 659 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
  • Adafruit Gemma -- This runs at 3.3v and a has a plug for the li-poly battery. It is a scaled down Flora, and it doesn't have much memory, and only 3 pins. But it is cheap ($8). Unfortunately it is sold out. I have a Gemma, and it and the trinket have a major weakness -- a lot of people have problems getting it reprogrammed, as the timing window is tight, and they have some teething issues: Adafruit GEMMA v2 - Miniature wearable electronic platform : ID 1222 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
  • Adafruit Trinket -- This comes in 3.3v and 5v versions, so you probably want the 3.3v version. It has 5 pins, and fits on a regular breadboard, but two of the pins are shared with the USB. I have a 5v Trinket. Like the Gemma, it has issues in terms of reprogramming it. Adafruit Trinket - Mini Microcontroller - 3.3V Logic [MicroUSB] : ID 1500 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits
  • Digispark -- This uses the ATtiny85 like the Gemma and Trinket, so memory might be an issue. It runs at 5v, but it has a boost shield that will allow you to power it with 2 AA battery or li-poly. It has 6 pins, so it is a little easier thant he Gemma or Trinket. There are a bunch of shields made for the Digispark that allow you to add things over time. It is very cheap ($9 for the basic microprocessor), and very small (1.5" x 0.75", including the USB plug that plugs into your computer). One possible downside, is the shields and such come unsoldered, so to get into it, you will have to learn to solder boards and such. If you have a MicroCenter computer store near you, they sell Digisparks and many of the shields. I have a Digispark, but I haven't done much with it, but I probably will do some stuff with it in the future. Frankly, I think it is a much better choice than the Gemma or Trinket at this point. The forum has moderate traffic on it, so people are using it. Digistump - Home of the Digispark and digispark [Digistump Wiki]
  • Sparkfun Pro Micro -- This runs at 3.3v, but I'm not that familar with it: Pro Micro - 3.3V/8MHz - DEV-12587 - SparkFun Electronics
  • Solarbotics Ardweeny -- Evidently this can run at 3.3 or 5v. It is a kit, and you need to solder the parts together: Solarbotics Ardweeny - Solarbotics Ltd.
  • I'm sure there are many other options, particularly if you are willing to solder parts together

In addition, you can boost the power of li-poly batteries to 5v, though it will obviously cause the battery to discharge faster.

I would say get it working first on a normal development board (probably Uno), and then once you have it working, you can work on shrinking it and working on extending the battery time. If you try to jump into the ultimate form first, you may find yourself shackled by restrictions you didn't know about before getting it. When you get the first prototype working, you might want to look over at this site for tips on reducing the power usage on your more finished builds: http://www.gammon.com.au/power

Thanks Michael. I wasn't aware of the different boards. I will also look into them for my requirements, it seems a lot of them will accept a 3.7v based on what you have said.

It seems that I maybe overthinking this (possibly), instead of accelerometers which might be a handful for a total beginner like myself, I saw this and realized (please do correct me if I'm wrong) that all I might need is a piezo to sense the vibration of a walk.

Basic and simple as it is, I came upon this tutorial and was thinking of simply replacing the LED with a vibrator motor, and there is no need to include the code for writing the "knock" to a PC, I would just have to add code to loop the vibrator motor every 5 seconds when the threshold that I set for the piezo is reached.

Any thoughts?

There are many different ways to do this. It will probably take time to figure out what is the best (I haven't used any of these in general, so I hope somebody who has done it can step in). Initially, don't try to do the whole project at first. Try to do some aspect (figuring out if she is walking incorrectly is obviously the most important). Initially just write the results to the serial monitor, and don't worry about batteries, just use a long wire. Once you are recognizing the walk, then you can worry about spiffing it up.

That element you posted would not work IMHO, unless you put a pad around it, because that metal part will dig into your daughter's heel. I think the velostat sensor mentioned in the firewalker shoe led, might have done the trick, but it currently isn't available for sale. Adafruit support did say recently that they hope to have it (or a replacement) back in stock soon.

The Teensy 3.0 also has touch sensors built in, and that might be useful. You can make a touch sensor from other microprocessors if you have 2 analog sensors (the Teensy 3.0 only needs one). However, that means you probably need to not consider the ATtiny85 based systems (Trinket, Gemma, Digispark, etc.).

Apologies if I was unclear. I was planning to put an Uno in a "box" type of package that will contain the Uno board, battery, piezo, that my daughter can clip on to her waistband. The piezo (Piezo Vibration Sensor - Large with Mass - SEN-09197 - SparkFun Electronics) I was planning to get will be inside the box along with everything. I think (hopefully) that this move will keep it simple instead of mounting it in a shoe.

I was planning to stick the piezo directly to the inside of the box, so in essence it would detect if the box is vibrating continuously (such as walking) then assign a threshold for that vibrating value to trigger the vibrator motor.

There is a section of the site on E-Textiles and Craft.
It is bound to have tips on making the electronics wearable and unobtrusive.
http://forum.arduino.cc//index.php?board=13.0

I liked the idea of the pressure sensors in the shoes but you would have all the issues of fitting things into multiple pairs (and you want a solution that will work without shoes).

I was planning to stick the piezo directly to the inside of the box, so in essence it would detect if the box is vibrating continuously (such as walking) then assign a threshold for that vibrating value to trigger the vibrator motor.

I think it will be quite tough to use a method like this to reliably detect toe walking compared with running (on toes), skipping, going up and down stairs etc. - but the only way to find out is to try :slight_smile:

You should experient on yourself first. I suggest you aim for a system that avoids false positives. Far better for your daughter to be accurately reminded 50% of the time, and to take heed, than to be frequently wrongly warned and very quickly learn to ignore the device.

I was planning to stick the piezo directly to the inside of the box, so in essence it would detect if the box is vibrating continuously (such as walking)

Yes I also don't think you will get any output from this sensor under these conditions.

Basically what you are trying to do is known as pattern recognition. You get output patterns that you want to trigger an alarm off and others that you don't. This sort of thing is usually handled by what is known as "template matching". You take a recording of alarm and non alarm conditions and then compare what you are currently getting with these. This will then give you a figure of how close to the alarm condition you are.
This is not an easy task for the software and an Arduino is not the best suited platform for this due to lack of memory and not much computing power. Anyway there are some terms for googling to see what you are letting yourself in for,
Good luck.

You seem to be heading towards a solution which vibrates whenever she is walking, whether toe-walking or not. I don't see how that would make any difference since it doesn't differentiate between desirable and undesirable behaviour.

Even if it only works when your daughter was wearing shoes, something that prompted her when she was walking incorrectly seems to be what is needed here. If possible, I'd have thought that applying the vibration to her foot (especially the ball of her foot) would make the feedback most intuitive and obvious - in effect, walking incorrectly would be slightly irritating.

I think some design compromise is required. Trying to find a shoeless solution is a step too far.

If you keep shoes then a solution using force sensors as suggested by Mike sound like it could be practical. Are we missing an even simpler solution though. I had assumed that the girl is walking on tip-toe, but there has been mention of ballet is she actually walking "on-point" i.e. with the sole of her shoe vertical? That would be quite extreme and very different from most normal foot motion. If so could a solution just using a tilt switch be possible? Could a switch detect a foot at between say 80-90deg but not respond if the foot is at lower angles but being shaken about?

I will post a quick video later of what the toe-walking actually looks like. It doesn't look like a ballerina who actually walks on the tips of her toes (toes AND sole fully vertical) - ie. almost or 90 degrees off horizontal plane.

My daughter's ITW (idiopathic toe walking) is very similar to when a person would try to reach an object, say a book high on a shelf that is out of reach of their normal height/arm extension, so that person would need to "elevate" a bit by going up on their toes.

In essence, her the toes are still flat on the ground, but the sole is lifted around 45+ degrees above horizontal.

I was hoping to choose the simple piezo (Piezo Vibration Sensor - Large - SEN-09196 - SparkFun Electronics) because by observing her gait in slow motion & real-time, it appears that the ITW induces an up/down motion that will vibrate the piezo with a stronger force than a regular/normal walk would. It's my understanding that the piezo's threshold can be set in the arduino to detect the stronger vibration that the ITW will produce. I will be posting the video shortly.

In essence, her the toes are still flat on the ground, but the sole is lifted around 45+ degrees above horizontal.

That is more what I imagined the first time round, the ballet reference threw me off track.
I still think there might be some merit in exploring a tilt switch but i have no idea how they would behave with all messy movements a foot makes.

The piezo idea might work, but I think it would be a hard one to crack.

The idea of force sensors has a much greater chance of success as it is simpler (though still involves a lot of technical issues). There will be a clear difference in force between the heel and toe sensors and the absolute magnitude might allow aother actions to be excluded e.g. skipping, running, using stairs which I imagine would all generate larger forces than walking.

Whatever way you go good luck.

I would agree a force sensor in the ball of the shoe would be the ideal way to go to detect if there is more pressure in that ball area (when on tiptoe) than compared to less pressure exerted when in a proper heel-to-toe walk. What would be ideal are force sensors in her shoes, wirelessly transmitting to a belt-clip mounted Uno and triggering the vibration as needed. That will be the day :slight_smile:

Anyhow, here is the video I made of her walking. I had her remove her upper/lower clothing so that the movement of her legs relative to her waist can be seen clearly.

Pardon the doodles on the wall behind her, kids will be kids :slight_smile:

Do watch in full screen in 1080HD if possible.

I would still be for keeping it in the shoe.

Various reasons - far less complexity, more direct feedback (feet, not waist).

I am a trifle suspicious about the piezo/ strain sensor. It will be a trifle difficult to distinguish the different time sequences of toe-walking as against toe-and-heel as normal walking is substantially toe walking (I am practiced in it in order to tread silently in school auditoria, church halls and the like) and it will be the duration of pressure, not the absolute pressure that will differ, and not by that much.

Using accelerometers (not sure that gyros add anything meaningful) makes for a far less critical assembly as it can be integrated into one single unit (though flexibility as such is important) whose exact location is flexible.

I would be a bit wary about making your daughter overly self conscious about her problem, with a bit of luck it might be something she simply grows out of.

I see what you are saying about the movement of the red dot, but I don't think you are appreciating the complexity of accurately detecting that motion amongst all the varied movements kids make.

On the other hand by looking at foot movement the problem appears to become quite simple. The ball of the foot always makes ground contact, the heel never touches and the foot angle looks almost constant throughout the step.

The force sensor idea would almost certainly be workable, but you need two one at the ball of the foot and one at the heel. Having seen the video though I really think you should experiment with tilt switches.

I don't know how well tilt switches will work in this application but they are cheap and experimentation would be easy; Glue one to one of your old shoes wire it up to your Arduino with a couple of leds. Light one led whenever the switch closes, write a sketch with logic to light the other led whenever it "thinks" problem walking is occurring. Walk around with the shoe on doing different activities and see how well your logic works and iterate the design based on the results. Try shaking your foot to see what the switch does, try lying on the floor.

Aim to write code that never gives false positives even if the false negative rate is very high.

My first attempt at logic would simply be to see if the foot is being kept above a certain angle for beyond a certain length of time i.e. foot held above 50deg for more than 10s then light led.

radman - you might just be onto something here. When you said glue a tilt switch and "...see if the foot is being kept above a certain angle for beyond a certain length of time i.e. foot held above 50deg for more than 10s then light led."

... I went back and watched the video and realized that her heels are constantly elevated when she is walking on her toes (which corresponds to X amount of seconds VS. a normal walk in which an angle is still created when the heel lifts from the floor, but is quickly also leveled off. A tilt switch might be simple enough to detect that tilt/angle, then the arduino would be coded to detect the amount that X amount of time, then light LED/vibrate motor.

....might also have to use a debounce code I think - http://arduino.cc/en/Tutorial/Debounce

...also this tilt sensor looks ok ? Tilt Sensor - AT407 - SEN-10289 - SparkFun Electronics

.also this tilt sensor looks ok ? https://www.sparkfun.com/products/10289

I have used these and they are notorious for not always making contact.
I know it is not politically correct but I would go for a mercury tilt switch they are much more reliable, you can still buy them legitimately although you can't sell them in some classes of equipment. However they are still permitted to be sold in medical equipment.

However, I do have my doubts over the tilt switch solution.