Close

Thinking Out Loud

A project log for A Halo For Lucy

It's not what you think.

bud-bennettBud Bennett 02/19/2019 at 23:302 Comments

Location:

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:

  1. It's tiny. (4.4x2.4x1.0 mm)
  2. Low power drain: 20mW avg.
  3. Low component count.
  4. Good Range: 5-200cm
  5. More accuracy than needed: < 5mm.
  6. Fast: 33ms acquisition time.
  7. I2C interface. (This is both good and bad...details below.)

What's not to like:

  1. Narrow field of view: 25°. (Multiple sensors required to cover adequate field of view.)
  2. The data sheet sucks. ST has decided not to include a table of registers addresses for the I2C interface. (Details below.)
  3. 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 believe that the minimum number is 5. It's possible that 3 would work, given that Lucy is most likely to collide with something directly in front of her and her head is swiveling to match forward direction. Any comments on this? More sensors mean higher power requirements and shorter battery life (and higher cost -- the sensor is about $6).

The Interface:

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.

Other Features:

  1. Battery and charger. Probably a single cell Li-Ion battery. An 18650 cell contains quite a bit of energy. Charge from USB port.
  2. Power supply: 3.0V switcher. Or LDO with a 3.3V switch mode converter for efficiency.
  3. 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.

Discussions

Gerben wrote 02/20/2019 at 16:03 point

It might be a good idea to put the battery underneath the dog. As the batteries will be the heaviest part. Having it low, will make it more balanced.

I was thinking of reusing a head-torch. You'd get a nice, somewhat weather proof battery box. Some of them even have a battery charger circuit inside. You could maybe reuse the (elastic) straps too.

Best of luck.

  Are you sure? yes | no

Bud Bennett wrote 02/21/2019 at 02:41 point

I haven't thought that far ahead...though I agreed that the battery would probably best be mounted either under the chin or on the collar for the reasons you mentioned. This is going to be a monstrously complex system, I'm afraid, with a steep learning curve. Both Lucy and I will be better for it, but i'm dreading the amount of work involved.

  Are you sure? yes | no