2020-07-03 (F) Weekly Summary

I wanted to create an arrow on the screen that would always point north, which was part of the reason for using hardware with a built-in display. There are countless mobile phone apps with a compass face, and some even wobble when you tilt the screen. I wanted to do that in simple vectors, but it would have been a lot of math, and Blockly was inconvenient for long formulas.

One of the stability problems I had was due to a calculation not performing in the order I expected. I could have done some experiments to learn how Blockly interprets equations. Instead of digging into that mess, I created many steps, and a few extra variables to print the value at any point and ensure it was in the expected range.
Text allows me to change angle by code

I thought about how the device accumulated rotation data. Since the gyroscope always has some jitter, the amount of time that passes determines how much bad data gets built up. I measured noise with a short time scale. To correct this, I measured how long it took to perform a genuine scan and used it to calibrate against errors. It helped steady my readings.
Text matches rotation

Gyroscope scans take longer when the sensor is rotating, so my calibration was still rubbish. I did some measuring and found that my previous guess of two milliseconds was way off. Scans could take as long as twenty-five milliseconds, but not less than eight. If I scaled my correction factor for one-eighth, it is no wonder I was getting crumby readings. It also took three milliseconds to perform the scan, so I had to factor that into my delays.

I understand why Inertial Measurement Units (IMUs) are not a tool for the faint-hearted.
Inaccurate despite efforts

I decided to move to a different IMU. This one was considerably more expensive and needed a controller, so I moved to an Arduino Nano. The BNO055 advertises itself as an Absolute Orientation IMU, and all the math-heavy stuff takes place on an onboard processor, and it just feeds out usable data.
BNO055 absolute orientation sensor

I got spoiled seeing direction data on my hardware, so I added a programmable light ring wrote code so it would only light up one light following the direction it was facing. There were twelve lights, so every thirty degrees, it would switch to the adjacent LED.
The device spins but the light changes according to rotation

If all goes well, this will be the seed for an implant someday, but for now, I want to make a haptic wearable. To that end, I connected a vibrating motor and a new LED. The vibrator comes on for a quarter of a second whenever the device enters a ten-degree region, and the LED stays lit anytime it points that direction.
Haptic prototype rig

The rest of the summary posts have been arranged by date.
First time here?

Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7

Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com

This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.

All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.

All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by  Brian McEvoy, cannot be used to claim property or assets.

Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.

This blog, including pictures and text, is copyright to Brian McEvoy.

Comments