zt07elecfreaks 发表于 2018-1-10 18:57:32

Make A Cool Micro:bit Hovercraft Together气垫船

Introduction

Most of time the cars we made can only run on the surface of the ground. Today we are going to create a hovercraft, which runs both in the water and on the ground, or even in the air. We use two motors to blow air underneath to support the hovercraft body and two motors in the end to control its moving directions.



Tools & Materials needed:



2 x Micro:bit Board

1 x DIY Soldering Kit ELECFREAKS Joystick:bit for Micro:bit

1 x ELECFREAKS Motor:bit for Micro:bit

4 x Hollow Cup Motor

2 x Positive Propeller

2 x Negative Propeller

1 x 7.4V Li battery

1 x 3.7V Battery

1 x Foam board

1 x Glue



Procedure:



Step 1: Cut Foam Board



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade1.jpg


Step 2: Fix two motors in the center of the hovercraft body. (Because motors will generate heat, so you cannot use hot melting glue to fix motors.)

In order to reduce hull spinning by itself, we have used a positive propeller and a negative propeller to make the two motor rotate in different directions.



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade2.jpg
https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade3.jpg


Step 3: Fix the tail motors. (Same to use positive and negative propellers)



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade4.jpg


Step 4: Fix driver board and batteries.(Pay attention to balance, or your hovercraft will deviate.)



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade5.jpg


Step 5: Install apron. (We use soft platic film to wrap around the hovercraft edges to reduce the air loss.



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade6.jpgStep 6: Connect cables according to the schematic figure below.
https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade7.jpg
Completed
https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade8.jpg


Now, we have finished our hovercraft production. Next, we are going to program for our hovercraft.



Programming



Click to open Microsoft Makecode, write your code in the edit area. I would like to suggest you to program by yourself first.

Of course, you can see the whole program in the links below. Just click Edit on the right top corner to start edit your program, and then click Download in the bottom to download your code into micro:bit directly.




Code for Hovercraft


Code for remote controller



Code Explain

https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade9.png
Set group IDs to tell your program to send or receive radio. A group is like a cable channel (a micro:bit can only send or receive in one group at a time). A group ID is like the cable channel number.

If you do not tell your program which group ID to use, it will figure out its own group ID by itself. If you load the very same program onto two different micro:bits, they will be able to talk to each other because they will have the same group ID.

https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade10.png


P8 controls the direction of motor M1, while P1controls the speed of motor M1.



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade11.png


P12 controls the direction of M1, while P2 controls the speed of M1.

(The speed can not surpass 500, or the motors will be burned out.)



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade12.png


Read the value of joystick in Y axle to control the front and back of your hovercraft.



https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade13.png


Read the values of six keys



Operations


The Y axle of joystick controls the forward and backward movement of your hovercraft.

3 is for turning left, while 2 is for turning right.

5 is for spinning in the left direction in the same place, while 6 is for spinning right in the same place.
https://www.elecfreaks.com/wp-content/uploads/2017/11/113017_1028_TodayWeMade14.jpg


Let's download the code and take a look of the final effect!








Amazing! It flies above the ground! That's pretty cool! Now hurry up to move your hands to create a similar hovercraft! I would like to run a hovercraft competition with your own creations. I'm looking forward to it!



Think:

How to turn around when your hovercraft moves backward?


https://www.elecfreaks.com/11518.html
页: [1]
查看完整版本: Make A Cool Micro:bit Hovercraft Together气垫船