I've had a couple of days to think about this project. I've also been observing Lucy when she's out and about to determine the best location for the halo. Lucy tends to walk with her head lowered, so it seems the best place to put a smallish electronics package is on her forehead between her eyes and ears. She has about 50mm to work with. This location would not have any obstructions from Lucy's other body parts and could be secured with a simple strap around her head. I think that I'm being overly simplistic here, but my expertise is not with mechanical things.
Choosing a Sensor:
There is a whole universe of distance sensors out there. I've ruled out certain types for size, power consumption, or aesthetic reasons. The favorite so far is ST's VL530X ToF (LIDAR?) distance sensor, for the following reasons:
- It's tiny. (4.4x2.4x1.0 mm)
- Low power drain: 20mW avg.
- Low component count.
- Good Range: 5-200cm
- More accuracy than needed: < 5mm.
- Fast: 33ms acquisition time.
- I2C interface. (This is both good and bad...details below.)
What's not to like:
- Narrow field of view: 25°. (Multiple sensors required to cover adequate field of view.)
- The data sheet sucks. ST has decided not to include a table of registers addresses for the I2C interface. (Details below.)
- Extremely complicated to implement if you're not expert in C or compilers or the jargon of embedded processors.
Field of view:
The VL530X has a field of view, per the datasheet, of 25°. This is pretty narrow. I put together a simple diagram to aid in determining the number of sensors required for this application:
I like the I2C interface. It's a standard. Some aspects difficult to implement and many components don't comply with all aspects. But the problem here is that ST has not properly documented how to use this sensor. There is not a word about the registers that can be addressed or what they do. ST requires the prospective customer to use their API (written in C) as the only method of communicating with the sensor. This sucks badly.
I found that Pololu offers a reasonably priced breakout board for this sensor, and also provides a library of commands that work with the Arduino. I've never messed with Arduino, so this is still a bit intimidating. But this is probably the path I'll choose going forward. I've asked a friend who's familiar with Arduino for help.
- Battery and charger. Probably a single cell Li-Ion battery. An 18650 cell contains quite a bit of energy. Charge from USB port.
- Power supply: 3.0V switcher. Or LDO with a 3.3V switch mode converter for efficiency.
- Accelerometer. To turn off the unit if Lucy is not moving or is laying on her side sleeping. A power saving feature.
That's all I've got so far. I'm sure a lot of this will change as things progress.