Skip to main content

Excursions in Datalogging

Well, it’s been far too long since I’ve blogged… well, anything. So I wanted to drop a quick line to mention three interesting datalogging examples I’ve hit upon during the last few months. In some cases, these are only ideas to be built upon, but they should give you food for thought on datalogging with the NXT. All these images are up in my Brickshelf gallery if you want to look – plus more.

First, I was contacted by someone who wanted to know if it was possible to use the NXT to log the accelerations of a Hulahoop. So I said “I don’t know”… and tried it.

The first task was trying to get a semi-balanced hoop with the weight of the NXT. So I used the best thing I could to counterbalance an NXT… another NXT. Using duct tape (a lot of duct tape) I taped one NXT with a Hitechnic accelerometer to one side, and another NXT to the other side as a counterbalance. OK, now the next problem… I can’t Hula-hoop. At all. And a hula-hoop with a dozen AA batteries duct-taped to it isn’t the easiest thing to work with in the first place. But I was able to get it to at least spin around my neck… until the NXT slammed into my skull (note: this hurts. A lot. I was seeing stars for a few seconds, and had a huge goose-egg). In the end, I did get some interesting data from spinning it around my wrist in a vertical orientation (far safer), and found you could see both the rotation of the hoop (about one rotation every 4 seconds) as well as the revolution of the center of the hoop around my wrist (every fifth of a second or so… yes, I labeled the graph the wrong way around, I think). The folks who originally asked me about this work on electrically illuminated hula-hoops triggered by internal sensors, and I hope they were able to use some of this information practically… but even if they didn’t I had a lot of fun trying to get the data.

Another fun project was actually not mine, but my sons. I firmly believe that a science fair project should be the job of the student, not the parent. In this case Ben wanted to determine who was noisiest in the school hallway (his hunch was the 6th graders), and decided after watching me, to do it with an NXT. He and I played around with using the US sensor or the light sensor, and eventually came up with a way to both “count” people and keep the system very well hidden from curious students. The idea was to use a very low-power laser (class I – a very low-power laser similar to what you see in a supermarket barcode scanner, for safety) next to the NXT at floor level, directed off a tiny inconspicuous mirror on the far side of the hallway and back onto the light sensor (set in “ambient” mode). Now every time someone walking down the hallway broke the beam of light, the NXT would add one to a “count” variable, recording the value of that variable and the average sound level detected during that interval every so often. Since the “system” was just an NXT with two sensors (with an ingenuous sliding positioning system for the light sensor) and a separate “super laser pointer”, it was easy to hide behind a box or under a video cart, and the laser spot was so dim it wasn’t noticed by students on their feet. All in all, a really interesting automated way to get information about traffic flow in the school hallways. And everything was done by my 10-year-old: designing the hardware, selecting the method, programming the datalogging, downloading everything & analysis. Oh, and he found the morning announcements by the principle were the loudest thing on most days, a fact he gleefully pointed out to her. My only contribution was soldering up a laser system that would run off AA batteries – the rest was his, and I was very proud of the result.

Finally, for another project I’m working on (more later), I was curious if you could use the NXT as a simple pedometer, logging each footstep. Most pedometers simply keep a running count – by the end of the day, you might know how many footsteps you’ve taken, but you’d have no idea if you’d done those at the beginning, middle, or end of the day. Since the NXT can be fitted with an acceleration sensor, it should in theory be able to determine the moment every footstep happens, and record that information any way you like – not just the running total, but details like how the footstep frequency changes throughout the day (when you get tired), or when you were sitting still, etc. Here’s a quick test of this idea, with the NXT logging the total acceleration measured about 50 times a second. At this resolution each footstep is clearly visible, and you could probably pick out details like how the acceleration changes when walking up or down stairs. Now, can my NXT record an entire hike for later…

--
Brian Davis

Popular posts from this blog

MINDSTORMS Retires!

2023 is the 25th Anniversary of the MINDSTORMS brand. For 25 years, MINDSTORMS has educated and inspired a generation of robot builders, both children and adults. Unfortunately, the LEGO Group decided to end the line on December 2022. Many ROBOTMAK3RS have been passionately involved with the development of MINDSTORMS through the MUP and MCP programs. Even with the newest Robot Inventor line, several ROBOTMAK3RS were invited to submit additional bonus models that were included in the official app. Regardless of the retirement of a major LEGO robotics product line, ROBOTMAK3RS continue to MAKE-SHARE-INSPIRE using all LEGO robotics platforms available to us. Here is the official statement from LEGO. Since its launch in September 1998, LEGO MINDSTORMS has been one of the core ‘Build & Code’ experiences in the company’s portfolio, carrying with it significant brand equity and becoming a stand-out experience for the early days of consumer robotics and leading to current Build & Code

Celebrating MINDSTORMS with a Remix Part 1

In honor of the 25th Anniversary of MINDSTORMS, we asked ROBOTMAK3RS to combine a LEGO set of their choice with a MINDSTORMS set. Here is what these five ROBOTMAK3RS came up with.  MINDSTORMS Chess Assistant by Arvind Seshan Overview: When you are new to chess, it can be a challenge to remember which pieces go where. Now, you can use machine learning and LEGO MINDSTORMS Robot Inventor to build a tool to help you learn where all the chess pieces go on the chess board. Sets used: LEGO® Iconic Chess Set (40174) and MINDSTORMS Robot Inventor (51515) Review: I really like how the chess set base can store all the pieces underneath and that the board neatly splits in half for handy storage. The chess pieces themselves are very sturdy and well built. My only criticism is the building of the box itself. It was quite difficult to see what pieces to use and since the entire box is made mostly of thin plates, it took a lot of time and patience. I would have liked the storage area to be sliding dra

Celebrating 25 Years of MINDSTORMS

In celebration of the 25th Anniversary of MINDSTORMS, we take a trip through history. Please also visit ROBOTMAK3RS Community every week as we highlight different projects all through 2023 in celebration of the anniversary. Some of the early history is based on the content shared by  Coder Shah  in our  MINDSTORMS EV3 Community Group . Some of the text and links may have been edited from his original posts for consistency and clarity.  1984 - Kjeld Kirk Kristiansen watched a TV program called "Talking Turtle," where MIT professor Seymour Papert demonstrated how children could control robot "turtles" using LOGO, a programming language he developed. 1988 - The collaboration between MIT and LEGO resulted in LEGO TC Logo in 1988, which allowed students to control LEGO models using computer commands. The video shows Papert demonstrating TC Logo. 1990 - LEGO TC Logo was hampered since the robots you built had to be tethered to a personal computer. LEGO and MIT