top of page

Patient Bed

Purpose of the Project: To make a bed system that can be moved up or down as desired by using a Pinoo Control Card, a joystick module and a servo motor.

Duration:  2 lessons

Age group:  7 years and older

Pinoo Set:  Maker set, full set. 

Achievements:

  • Learns to code Pinoo control board.

  • Learns to use the joystick module.

  • Learns to use servo motor.

  • Develops algorithmic skills.

  • Coding skills develop.


Materials to be used:  Mblock 3 program, pinoo control card, servo motor, joystick module, connection cables.

 

 

Materials Required for Design:  White eva, white cardboard, scissors, tongue stick, glue gun and silicone.

 

Project Construction:

 

For our project, we first start by cutting our white cardboard into the shape of a bed.

 

 

Then we fix the tongue sticks in the shape of the foot of the bed with the help of a silicone gun.

 

 

 

 

 

 

 

 

 

 

 

 

 


We fix our servo motor to move the head of the bed. The part we need to pay attention to here is to be able to move the head of the bed by ensuring the correct movement of the servo motor brush.

 

 

 

We attach the white eva to the top of our bed and give it a quilt look.

 

 

 

We do the same step for the pillow.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then we complete our design part by connecting our servo motor to Gate 1 and our joystick module to Gate 9.

 

Adding Pinoo extension:

  

 

 

 

From the Extensions tab, click "Manage Extensions".

 

 

In the window that opens, we write “Pinoo” in the search engine and it is enough to say download to the result.

Installed on our computer.

 

Connecting the Pinoo control board to the computer:

 

 

 

In Mblock 3, we click on the "Connect" tab in the upper left. In the window that opens, we click on the "Serial Port" section and select the "COM4" option from the page that opens.

NOTE: As each computer has different port entries, the numbers next to COM may change.

 

 

Click on the Cards tab. From the window that opens, we select the "Arduino Nano" card option used by the Pinoo control card.

 

 

Click on the Extensions tab. In the window that opens, we select "Pinoo", the extension of the control card we use.

 

 

Click on the Connect tab. Click "Firmware Update" from the window that opens.

 

Coding part:

 

 

 

To start the servo motor, we run it under the command "when the key is pressed". Since the servo motor works between 0 and 180 degrees, we try both angles.

Note: Servo motor angles may vary depending on how you attach the servo motor's brush. For this, it is important to try the angles in this project.

 

 

 

 

 

 

 

 


Before we start our code, we define a variable named aci to hold the angle values and y because it only has up and down movement, that is, we will only use the y axis of our joystick module.

 

Under the Pinoo program event code, we add the code to get aci 90 because we want the angle of our servo motor to be flat at first. Then, we transfer the values from the joystick module to our variable y in the loop of continuous repeat so that we can use the variable y while writing our codes.

 

 


If the value of our variable y is less than 450, we increased our aci value by 5 and assigned it to the angle of our servo motor. In this way, our y variable will ensure that our servo motor, that is, our bed head, will move upwards.

The other condition is if our y variable is less than 550, that is, if my joystick module is moved downwards, the value of our aci variable will be reduced by 5 and transferred to the angle of our servo motor. In this way, our servo motor, that is, the bed head, will be moved downwards.

 

Right-click on the “Pinoo Program” command and select the “Install to Arduino” option in the window that opens.

 

 

On the page that opens, we click on the "Upload to Arduino" button, which is selected in red. Our codes are uploaded to our Pinoo control card.

After the “Installation Finished” message comes, click the “Close” button. After the installation is finished, the battery holder is inserted and the project is run.

 

Working Status of the Project:

 

 

When we pull our joystick module up, the headboard moves down when we pull it up and down.

IMG_4246.JPEG
IMG_4241.JPEG
IMG_4233.JPEG
IMG_4235.JPEG
IMG_4237.JPEG
IMG_4239.JPEG
IMG_4240.JPEG
1_a8314da2-edff-4525-979d-b2d3ff93364b_large.png
pinoo_uzanti_480x480.jpg
seri_port_480x480.jpg
KART_480x480.jpg
pinooo_480x480 (2).jpg
aygit_yazilim_480x480.jpg
llll_480x480.jpg
vvv_480x480.jpg
1.JPG
2.JPG
3.JPG
4.jpg
5.jpg
IMG_4245.JPEG
bottom of page