Skip to content

This post is regarding my Senior Design Project from Dec 2011 – Sept 2012.

I was part of a five engineer team tasked with designing hardware modules for Plantronics, Inc. The modules were worn on the body to investigate the feasibility of harvesting energy from day-to-day human body movement. We reported to the Engineering Director at Plantronics on a weekly basis and ended up delivering 25 identical units to Plantronics on time, per requirements, in addition to a final presentation with 200 pages of documentation.

I was in charge of implementing the storage (SD card, file system, SPI) and the acellerometer (I2C). We used a PIC24H microcontroller.

Partner's Day Poster

After the initial project concluded, Plantronics reached out and asked for more analysis. Which was fair, the team had only delivered raw data but Plantronics was hoping to find out about actual energy-harvesting abilities. I took on the task as an individual, as most of the team had graduated already. It would take all Summer, but in the end Plantronics was very happy and I learned a whole lot. If you're interested in my work, I've included it below.

There's a really cool company out in Alameda, CA called Kai Concepts. One thing they make is the Kite Boat. I was fortunate enough to be contracted on as a part-time developer a couple years ago. What I made was a new pump board that inflates and deflates the internal bladders of a large kite pulling a boat. The regulating of the internal air chambers allows the angle of attack to be changed, thus raising or lowering the kite. It was a great learning experience.

The code is far from complete but I think I've got all the components together and built up. Take a look:

I ended up tossing out the top portion of the robot kit and just used the base and motors. I designed and printed three custom tiers to hold everything vertically.

I added an infrared sensor for low level obstacle avoidance and redundancy.

I've been working on this site rather than working on the code this past week. I find it hard to do both. I'll update the repo eventually, right now I've just been working out of a local copy. I have to finish driving the individual components then I'll push.

Okay, okay, time to get serious. What can I do with the LIDAR data?

Autonomous Car. That's popular these days.

With it's capabilities, the LIDAR I bought works best indoors. I will make an indoor rover. It wont necessarily do anything except roam the apartment but it should be fun to make and keep me busy at nights...

The idea is that a rover type bot will have a LIDAR scanner on top of it. It will use the data from the LIDAR to capture a scan of the room and then move to the furthest available distance which should be a wall or open area the scan couldn't reach. When it meets resistance, it should make a new scan and go towards the next furthest distance/wall. Something like that...still a work in progress.

Here's the stuff I'll use:

Jameco electronics has this robot base on clearance, they're out of stock on the 2-wheel version so 4-wheel drive it is. Turns out to be the DFRobot Pirate; just without the box. Neat.

Next I need something to drive the motors. I've made my own motor controller in the past so I'm just gonna use this controller from Adafruit. It's meant for Arduino based C++ libraries but I can make the board work using C just like I did the SD card. It will just take time. It's nice and small and with individual h-bridges, it's spec to do the right job.

For power I'll use a 5-volt rechargable battery pack. 5000mAh.

I also bought a new type of IMU that will supposedly spit out Euler angles and acceleration rather than just raw 9-axis measurements. The BNO055. It makes my Senior Design Data Analysis look trivial, but that's what 6 years of improvements will get you. I know how complicated it can be to try and extract linear acceleration for a single vector using raw sensor data [accelerometer, gyroscope, magnetometer]. This thing does it for you.

Alright, I'm talking to the LIDAR just like I said I wanted to. I can complete a full 360 scan..now what?

I'm not totally sure. I am happy that I got things working but I should probably do more with this device than just prove it out. I guess my next step depends on the application I want to use the LIDAR for. Until I figure that out, I just have an endless data stream that does nothing.

One thing I can do to that data is store it for later analysis. So that's my next step. Store data.

I had a feeling I would want to store the data, so when I bought the LIDAR I also bought this little microSD and RTC breakout board. It uses SPI to talk to the SD card, so I needed to go back and initialize SPI and its respective clocks and interrupts.

I ended up using FATFS to save the data in a human readable format. That's another abstraction layer. I save the data as a comma separated variable list so that I can easily import into Excel or Matlab later on.

I get 4000 samples per second, each 5 bytes long [20,000 bytes per second]. I don't think offloading the data to the SD card for later analysis is practical but it works for now. The unit is stationary so hours of data are not needed to be stored, just a second or so.

I was tasked with refreshing an existing product line. We wanted to add a number of features to our basic [radio] monitor-receiver. Things like adjustable digital audio levels, a different L/R filter and GPIOs. One novel change is the use of a multi-colored background LCD screen. The idea is that the 'white' background would turn red when an alarm is triggered making it easy to see the error from across the room. The problem: the LCD has no bezel. No way to mount it. Enter 3D Printing 🙂

It started with the idea of gluing the lcds in place, that lead me to design a jig that would hold the LCD screen in position…It failed. Glue was not enough.

We kept with the idea of glue though, trying different brands and polymers but it was known that some-sort of brace was going to be needed. Since I was redesigning the PCB anyway, why not add a mounting/alignment point on the board? This took the form of two holes in the center of the front of the board. Now I could design a brace. The idea was to make a simple brace that pressed the LCD into the front of the chassis to help the glue.

I was sending away for the brace designs to be 3D printed, but after two iterations, I convinced my boss it was worth buying a machine. We got a PRUSA MK3S (well technically it was a MK3 but I upgraded it when the 'S' variation came out).

With a printer in house, the iterations of design were fast and many. I tried brackets with hooks, press-fit, curved back, inverted backs, long flat surfaces, minimal surfaces…none of which worked great. Finally I 'bit the bullet' and designed an entire wrapper for the LCD. Enter the red Bracket, a bracket that, with hot-glue, held the LCD in place properly. Well that was until we took the prototypes to the Las Vegas NAB convention and the warm weather and constant running of the radios showed the glue failing. The LCDs were becoming misaligned. The corner kept rising. Hot Glue just isn't going to work but what do we do?

Then I saw it, a true mounting point that's always been there. Not just an alignment hole, it's one of the four PCB mounting screws. With a taller screw and a little help from the lid, I was able to take glue out of the equation and use physical mounting hardware instead. This design actually holds up. There is a little too much support material for my liking but I think the design is decent.

All in all, I think I wen't past 70 design iterations to get to this point. The fun isn't done though. The leading edge of the PCB is a little thick and that makes it harder for manufacturing to install the brackets quickly. Now that we have a winning design, the next iteration will be a PCB change with the alignment holes and leading edge pushed back.

The LIDAR arrived. I first used the associated PC software to test that it works and it does. While I was waiting for the part to arrive, I had been reading the about the protocol necessary to talk to it. Seems pretty straight forward. A quick and dirty test proves fruitful; I can read the Device ID and start the motor…yahoo!

Though meant to be a development kit, the LIDAR unit doesn't sit flat on my desk. It has a cable that sticks straight down. So I designed and printed a bracket to hold the device.

I ordered the LIDAR from Adafruit along with some other goodies. It's going to take about a week to get to me. No worries, there's plenty of planning and initialization I can do before I actually get the parts. Lots of reading to be done.

I have a STM32F767ZI development board I was gifted. That's a pretty powerful ARM M7 processor in there and it's just collecting dust. I am going to use it as the main MCU for the project. That's a big choice actually. I could just hook the LIDAR up to an Arduino, use a bunch of people's code libraries and say I built something...but what fun would that be?

I set up a repository that will hold my code, it's available on github here: https://github.com/actualsize/makenstuff

I did end up deciding to use some abstraction to start. ST has a code generation app called STM32CubeMX that helps with board initialization. There's board support files and examples so I don't have to do everything raw. While I am waiting for parts, I've gone ahead and made some tasks. There's a heartbeat timer (blinky light) and other timers, a couple UARTs and I2C. I set up and tested stdio's printf function to use UART3 as stdin. I'm not a big fan of printf for debugging (just set a break-point), but I don't have a problem with it for making console interaction. Just plug in the USB cable and open TeraTerm.