📜 ⬆️ ⬇️

Dumbbell as an instrument of the mind

Preamble


On Friday, March 31, we and our comrades are conducting intensively for teachers of robotics, heads of the Center of Central and International Literatures and in general to all who are interested in the applied aspects of pedagogy and equally applied questions of robotics. The seminar will focus on teaching and mentoring in the field of IoT and robotics in general, and on its specific form as a “project form”, in particular.

The concept of “project” has entered into the lexicon of teachers for a long time and is used, often, quite thoughtlessly. What is behind this concept, what problems are there in the teaching of the project form? We will try to answer these questions during the course of intensiveness.

image
')
To illustrate the theses, the Smart Dumbbell IoT project has been selected, which is under the cut.

Ambula


A variety of sports and near-sports gadgets penetrate into our lives more and more and take root in her all the more serious. You can trivially keep a schedule of sports workouts using the GymBoom mobile app (or any other, a million of them), you can count steps-calories-kilometers using a special tracker, you can even straighten your posture, hooking a sly controller onto a belt.

On the one hand, the trend of “smart sports equipment” is quite old and well-formed: it was born not today, it will not die tomorrow, but how it will develop depends largely on you and me. On the other hand, the trend thing is capricious, but in its aerodynamic quality it is very similar to a proud bird penguin: until you kick, it’s not that it flies, but it doesn’t move at all.

image

Keeping in mind this consideration, some time ago we, at our regular school as part of a group of young (and not very young) researchers, developed the project “Smart Dumbbell” .

Tasks were as follows:


Dumbbells got smarter


About the trend has already been said above, although, frankly, our intentions were slightly more modest than the tremor of mountains and coups in the industry. The overall goal was to create a smart dumbbell: it differs from the usual blunt cast iron in its ability to control the number of repetitions in the approach and the correctness of the performance trajectory for a number of selected exercises (this is the minimum task, note in brackets).

First things first. We had two bags of various Arduin shoots, seventy-five tablets of three volts each, five pieces of the latest Intel Genuino, an mp3 player that resembles half a spider, and a mountain of enthusiasm, creative ideas and all that. And a liter of coffee, a liter of coffee, a liter of coffee ... sorry, jammed. The only thing that bothered me was the accelerometer and the gyroscope. In the world there is no one more helpless, irresponsible and immoral than a programmer trying to master the work with such things in the documentation. And I knew that pretty soon we will plunge into it.

image

about the project


Okay, okay, just kidding. Everything was a little less enchanting than in the original source, a quote from which I processed with a crowbar and a file. However, the "quote" turned out to be amazingly accurate.

The new Genuino board from Intel has a number of interesting features that allow it to be used as a “brain” for a “smart” sports projectile. First of all, it is an accelerometer and a gyroscope - with their help, you can determine the position of the device in space. Secondly, it is the Bluetooth Low Energy module that implements the IoT-part of the functionality: connecting to the mobile “server” and exchanging data in low-power mode.

Each research task - and the “Smart Dumbbell” is just that - from a certain moment lives its own life. Another problem solved within the framework of a common task reveals a new branch of research - the purely “Civilization” of Sid Meier. Let's try to illustrate with a live example.

Historically, the problem of counting the number of repetitions was the first on the dumbbell horizon (for example, in the exercise “flexing the arm with dumbbells”). The dumbbell “lifting-lowering” cycle gives one repetition, therefore it is necessary to fix cyclically varying parameters: these can be initial-final angles characterizing the position of the dumbbell in space or a speed-acceleration link, demonstrating its change.

Having decided to push off from corners, we come to a natural conclusion that the data from the accelerometer will be required. Or from a gyroscope? Or from both at once? Hmm ...

Here we must make a methodical remark (on serious reasons): a person with a technical education, but poorly familiar with the specifics of using all these accelerometer gyroscopes is usually confident that the accelerometer returns acceleration - well, judging by the name, what else can it return? Documentation “helps” very much in this regard, I won’t keep from quoting:

image

It became immediately clearer, yes? On the other hand, well, the same acceleration, you can even convert to mg! ..

We will not bore you with an overly long story about how the views of researchers were transformed during the war with the accelerometer (and their own stupidity), we just mention in brackets that the accelerometer returns a coordinate. And here is the coordinate of what - we will bypass the figure of silence: we must leave some kind of riddle to the thoughtful reader.

Just in case: the “otgadka terrible secrets accelerometer” was not our only adventure. The most epic episode was when, with an already almost finished project that successfully counted the number of repetitions, the most intelligent researchers managed to burn Genuino with the ends - this, as it turned out, was much easier to make than it might seem at first glance. All anything, but it was almost the only Genuino in Russia at that time ...

And yet, “whether long, shortly,” as it is sung in these very epics, we received a prototype, successfully counting the number of repetitions. Problem solved? Long live a new task: can we set and control the trajectory of movement so as to signal an error when deviating from the standard? From one basic task we get two:


I would like to postpone a detailed story about the development of the project tree to a methodical seminar; the current story, however, will be incomplete without mentioning another distinctive feature of Genuino - working with Bluetooth Low Energy (BLE).

A couple of words about BLE


The task of interacting with the mobile application via the BLE protocol arose in the course of the process of the natural development of the dumbbell as an IoT project. The dumbbell should connect to the mobile "server", accept the exercise chosen by the user, the number of repetitions in the approach. In the course of the approach, the dumbbell sends out the total number of repetitions actually done and the number of errors — when the dumbbell came out of the optimal trajectory during the exercise.

Technical details of the implementation of little interest. The only non-trivial point here is, perhaps, the changes in the concept of permissions associated with the release of Android 6.0.
Much more interesting methodical details. BLE as an idea is very different from the “familiar” exchange via Bluetooth, which (externally) is nothing more than work with a serial port. Everyone who has worked with HC-05 knows how intuitive the Bluetooth sharing functionality is.

With BLE, everything is completely different: the concept of services and characteristics (simple in itself) will require, for example, a teacher (leading a dumbbell project) noticeable efforts to overcome the inertia of students' thinking. Here, the ability to briefly and affordably set out the main tenets of the theory and present examples that implement the necessary functionality, but not overloaded with details, comes to the fore.

By the way, in particular, we will talk about this at the methodological intensive.

From design prototype to prototype design


I would also like to mention such a non-trivial thing as prototyping and design. In educational robotics, the design often spit up - it works, and okay. Moving from pure uncluttered functionality with wires sticking out from everywhere to a finished product that is pleasant in all respects, we are faced with the following difficult questions:


An illustrative example: in the original TK, the dumbbell overlooked such a thing as ... a switch. When designing, accordingly, this moment was missed: simply because the “from pure functionality” approach does not provide for any switch — I pulled out the power cord and hello.

As a result, to restart the sketch, a series of difficult manipulations with the body is required (you need to unscrew the bolts securing the central part of the dumbbell handle - pad) and the power wires. Plus, the dumbbell constantly consumes current from the battery, which leads to a completely unreasonable reduction in "motor potential".

To eliminate this structural flaw, the switch had to be “embedded” in the already finished housing.

How to do without such unpleasant slips, we also tell on the intensive.

The planned event can be interesting both for teachers of robotics, curators of project activities in the field of IoT, and in general for anyone interested in non-trivial tasks in general. The workshop includes several discussion topics. In each topic there will be a theory (a story about how exactly ships plow the Bolshoi Theater) and practice (a smart dumbbell in da action - right on the spot). In the plans:


If you want to participate, register here .

Source: https://habr.com/ru/post/324962/


All Articles