The Deadly Coach

by Proty4liars in Circuits > Arduino

243 Views, 1 Favorites, 0 Comments

The Deadly Coach

thecoach.png

You need a little bit of motivation to work out? Your sofa isn't threatening enough, quite the opposite... Let's build your own frightening sports coach! Just put the wristband on and wait for the coach to tell you that you have worked enough.

The principal is to swear you are going to work out well until the end. You use a heartbeat sensor thanks to the wristband to measure your heartbeat. The coach is staring at you with a look of disapproval by moving his head until your heartbeat is high enough to stop working out. At that very moment, the coach alarm rings and he stops staring at you. Well done, you have achieved your goal!

Downloads

Supplies

  • 3D printer (Prusa Mini)
  • NinjaFlex
  • 3D printer (Creality Ender 3)
  • PLA
  • Laser Cutting machine
  • Plywood (thickness : 5 millimetres)
  • Computer
  • Arduino UNO board
  • Cables for the arduino board
  • Buzzer Octopus EF04031sur GoTroni (X2)
  • Heartbeat sensor (sensor KY039HS on GoTronic)
  • Servomotor

Making the Wristband

bracelet-attache.png
braceletcapteur.png
wristband.png
strap.png

In this step, you model and then print the wristband that will press the heartbeat sensor on your wrist.

A good set of dimensions we use to model the wristband is: width=2cm / length=25cm / thickness=0.3cm

We designed the wristband so that you can fix the heartbeat sensor between your skin and the bracelet by making the sensor cables pass through the diamond-shaped hole.

We chose the size of the hole so that it was big enough to make the cables pass but small enough to hide the sensor under the wristband. We used a diamond-shaped hole whose diagonals lengths are 0.8cm and 1.3cm. The hole was designed roughly in the center of the wristband so that the strap was on the opposite side.

We chose the strap dimensions so that the wristband can pass through it and be tight enough to keep the wristband well tied around the wrist. For that, you can play on the tolerance of your 3D printer.

After modeling the wristband and the strap, we printed them using a 3D printer (Prusa mini) and orange NinjaFlex because it is pretty flexible.

Give Your Coach a Head

Capture d’écran 2022-01-26 à 14.59.45.png

You can choose the head you want for your coach. Don't forget the coach has to be threatening !

We suggest you the skull head we picked for our head ( the stl file is given) but you are free to print a different head. For the dimensions you should target something like 5cm*5cm*5cm and since you will have to glue the head, make sure the bottom is enough flat.

Downloads

Give Your Coach a Body

body3.jpg
body1.jpg
body2.jpg
body4.jpg

To give your coach a body, it's simple.

Firstly, you have to choose an image of the body. Ideally, find an image in svg format. Otherwise, you can create your own svg as we did. We decided to have a body of 20 cm height. For that, we used Inkscape. Then, you can import it in Rhino to prepare the job for the laser cut. You assign the right colors to each part so that everything is cut in the right order.

For a better assembly, you can provide junctions. Only with wholes in the right places and rectangles cut thanks to the laser cut, you can make the body stands up.

Something you must not forget is a support for the servomotor. You cut the form of the servo in a rectangle that will come into the body. (You can find our model in the file coach_body.pdf).

Now, you just have to assemble everything together and adjust the support of your servo to place perfectly the head over the shoulders.

Downloads

How to Get the Coach's Head Moving

portant_stl.PNG
collage tete_portant.jpg
servo.png

In this step, you will design the mechanism that will allow the coach's head to move.To do this, you need a servomotor, the 3Dprinted head of the coach, the support given and superglue.

To create the rotation movement of the head you will use the servomotor which will be hidden in the body of the coach. Then, it will be necessary to transmit this movement of rotation to the head.

To do this, we suggest you to use our support that hangs on the servomotors and on which you will glue the head's coach with superglue. Try to center the support on the bottom of the head ! The support (whose stl file is given) is dimensioned to be posed on the servomotors provided with the cross-shaped tip as you can see in the photo provided. It is then just necessary to stick the head on the support and to clamp the other side of the support on the servomotor.

It is then a question of controlling the Servomotor in the arduino code, which will be done in a next step.

Downloads

Cut Out the Coach's Stage Box

la bible côté.jpeg
La bible face.jpeg

To help with your commitment to sport you need a motivation! What about swearing on something? And what about a Bible to do it?

We can even put all the electronic stuff in it so that it looks better!

First you need a box and the adequate size. We choose to do a 15cm x 20cm x 5cm box.

We are going to use a laser cutting machine.

You can search on the internet for a "box generator" (there are many!). Then enter the parameters of your box.

Download the patern in ".3dm" so that Rhino can read it. Then change the box so that it becomes a Bible:

- Write on the face "The Bible"

- put some lines on the sides to make it look like a book

- add the 2 holes for the cables to pass through

Choose the kind of craving you want for each part on up you go to the laser cutting part!

Let's Put It All Together!

schéma.png
140839EB-B10F-429E-B6BA-8750B5092162.jpeg
B726FC38-5181-4489-8417-79D8FEB8A463.jpeg

In this step, you now have in your hands the servomotor/support/head assembly, the coach body and the box.

First, you will have to fix the support of the servomotor in the right place inside the coach body.
A rough evaluation of the height you want for the head of the coach and this will give you the position of the servo motor. At this precise place, glue with wood glue the small support of the servo motor to the two parts of the body. Tighten the gluing with a clamp for a few minutes.

You can then put the servo motor on its support. Pass the wires to the feet of the coach body. You can then make the electrical assembly

Electronic assembly:

Supplies :

- 1 servomotor

- 1 arduino Uno

- 1 buzzer

- 1 pulse Sensor

Follow the assembly shown on the diagram in the photo.
Connect the grounds together and the wires connected to the 5V current. The buzzer can be connected to pin 8, the servomotor to pin 9 and the pulse sensor to analog pin A0.

Hide the electric assembly under the box and place the coach on the box, making sure to pass the wires through the hole provided for this purpose.

Make It Work With the Arduino Code

Okay, now, let's start the capricious part. Take a cup of tea, breath in breath out and let's begin.

The code must use the heartbeat sensor to calculate the pulse. The heartbeat sensor measures the magnitude of the beat. So we do an average on 4 measures to smooth the measures and we detect the pics defined by 4 consecutive measures upper than the one before. From this, it is easy to determine the pulse. However, we must warn you, when you use electronics, the results always depend on the sensors.

Now, we have the heart rate. We decide to take the first few seconds to determine the usual heart rate of the user. Then we decide a threshold of x per cent of this usual heart rate that will indicate when to stop the program. Until the heart rate is under the threshold, we make the servo move to rotate the head. When everything is finished, we stop the rotation of the head and we make the buzzer ring to show that this is the end of the training.

If you want to have more details, you can look at the code that is explained from the beginning to the end.

PS : Notice that the measuring time (of the initial heart rate) in the video attached in the introduction is a bit higher than in the video (a few seconds) because we have cut the video.