How to make a Segway. How to make your own Segway. Electronic filling of the Segway

Is it possible to make a Segway with your own hands? How difficult is it, and what parts are required? Will it homemade apparatus perform all the same functions as a factory-made one? A bunch of similar questions arise in the head of a person who decides to build it with his own hands. The answer to the first question will be simple and clear: anyone who has at least a little understanding of electronics, physics and mechanics can make an “electric scooter” themselves. Moreover, the device will work no worse than one produced on a factory machine.

How to make a Segway with your own hands?

If you look closely at the hoverboard, you can see a rather simple structure in it: it is just a scooter equipped with an automatic balancing system. There are 2 wheels on both sides of the platform. To carry out effective balancing, Segway designs are equipped with an indicator stabilization system. Pulses coming from the tilt sensors are transported to microprocessors, which, in turn, produce electrical signals. As a result, the hoverboard moves in a given direction.

In order to make a Segway with your own hands, you will need the following elements:

  • 2 wheels;
  • 2 motors;
  • steering wheel;
  • aluminum blocks;
  • support steel or aluminum pipe;
  • 2 lead acid batteries;
  • aluminum plate;
  • resistors;
  • emergency brake;
  • steel axis 1.2 cm;
  • printed circuit board;
  • capacitors;
  • LiPo battery;
  • Gate drivers;
  • LED indicators;
  • 3 x ATmtga168;
  • voltage regulator;
  • ADXRS614;
  • 8 Mosfets;
  • two Springs;
  • and ADXL203.

Among the listed items there are both mechanical parts and electronic elements, and other equipment.

Segway assembly procedure

Assembling a Segway with your own hands is not as difficult as it seems at first glance. If you have all the necessary components, the process takes very little time.

Collection of mechanical parts

  1. Motors, wheels, gears and batteries can be borrowed from Chinese scooters, and there are no problems at all with finding an engine.
  2. The large gear located on the steering wheel receives transmission from the small gear on the engine.
  3. The gear on the wheel (12 inches) is free-wheeling - this requires some modifications to allow the rotating elements to work in both directions.
  4. A fixed axle, secured by three aluminum blocks (which can be secured with 5mm set screws), forms the base of the platform.
  5. Using the SolidWorks program, you need to draw a drawing of a part that will allow the hoverboard to turn to the sides while tilting your torso. After this, the part must be turned on a CNC machine. The machine used the CAMBAM program, which was also used in the manufacture of the box for the emergency brake unit.
  6. The handlebar is attached to a 2.5cm hollow steel tube.
  7. To ensure that the steering column is always centered and reverse thrust was more intense, you can use a pair of steel springs.
  8. The steering wheel is equipped with a special emergency button connected to a relay - this allows you to reduce engine power.
  9. Motor power supplies - rechargeable batteries at 24 V.

Collection of electronic parts

In order to assemble a Segway with your own hands, it is not enough just to fasten the mechanical parts. Electronic control no less important in a hoverboard, because it is a fairly important component of the unit.

  1. A printed circuit board with a computing function collects information from sensors - gyroscope, accelerometer, potentiometer, and then sets the direction of rotation.
  2. Without the ATmtga168 processor, the scooter will not be able to work normally. The connection to the computer is made via Bluetooth and RN-41.
  3. With the help of two H-bridges, control pulses from the base board are converted to the force of the motors. Each bridge is equipped with ATmtga168, the boards communicate with each other via UART.
  4. All electronics are powered by a separate battery.
  5. In order to quickly get to the batteries, as well as program the base board and change the parameters of the control loops, you need to make a small box with connectors, equip its body with a trimming potentiometer on top, and also equip it with an electronics power switch.

Segway software

How to make a Segway with your own hands so that it definitely works? Correct - install software(or software). Here are the necessary steps to complete this task:

  1. The microcontroller software includes a filter for the accelerometer and gyroscope and the PD control loop.
  2. Kalman and Complemenatry filters will do the job perfectly.
  3. Write applications using the Java programming language - this will allow you to see the battery charge level, all sensor readings and control parameters.

That, perhaps, is all that is required from a person who decides to make a Segway on his own. Understanding the topic and process, as well as the necessary components, will allow you to build an excellent hoverboard at home.

What do we need? To begin with, let’s take wheels from an abdominal exercise machine. Gearbox 12 volts and 160 rpm. Powerbank for 15,000 milliamp hours. In order to be able to control the vehicle, that is, turn right or left, accelerate and slow down, we will use modules that we have already used in the manufacture of a homemade lawn mower. This way you can regulate the engine speed. Accordingly, 2 modules, 2 engines, 2 power banks.

The two sets work separately. Suppose we add speed to the right engine, the Segway will turn left. The same thing, but mirrored, when turning right. If you add speed to two motors at the same time, the product will accelerate.

First, let's install the gearboxes. To do this, apply it in the center on plywood sheet, trace the outline and use a cutter to make a recess. In the same way as the gearbox was attached on the left side, we do it on the opposite side.

You need to cut out several of these bars and screw them on the sides. This is necessary so that the plywood does not sag.
We remove the wheels and put them on the axle. As you can see they are different from each other. You need to make two wooden bushings first. We will use a homemade one lathe on wood. The result was two wooden blanks.

Insert the workpiece. Drill a hole and glue the workpiece epoxy resin. (The author made an amendment at the end of the video, read below).

Now we will make the steering wheel. For this we will use a piece of sewer pipe. We took the handle from the simulator. We will make holes in the upper part of the plywood and secure the pipe and handle. The handlebars of a Segway should be slightly sloping, so we made a hole in the plywood at a slope and trimmed the plastic pipe.

All control modules will be installed on the steering wheel. You need to stretch 8 pieces of wires from the steering wheel to the gearboxes. To prevent them from sticking out from above, we first make through hole in the pipe and insert the wires.

And now again you need to glue everything with epoxy resin and wait 24 hours. The wheels turned out to be deformed; epoxy turned out to be not a very reliable material. I disassembled the gearboxes, removed the shafts and cut threads on them. I also drilled holes in the wooden bushings. I inserted metal bushings and now it all looks much more reliable. The wheels can also be screwed in very tightly. Plastic pipe It seemed not entirely reliable; a shovel handle was inserted inside it to strengthen it.

We put 2 modules in the panel. You need to drill holes in the pipe for the resistors. All that remains is to glue the buttons using hot glue. Route wires to the module, gearboxes, and power banks. Screw on the wheels.

For those who are afraid of connecting the wires incorrectly, everything is described in detail on the modules.

The Segway will also have a bike speedometer. The test version of the homemade Segway is ready. Let's test it.

Is it really possible to make such a complex device as a Segway yourself? It turns out that it is possible. If you apply enough diligence and use special knowledge. This is what a young engineer named Petter Forsberg did, who graduated Swedish Chalmers University of Technology with a degree in Automation and Mechatronics.

In addition to knowledge and skills, he would also need a lot of money, you say. Yes, money was needed, but not much, about 300 euros, to purchase a certain set of parts and equipment. The result of his efforts is in this video:

Mechanics

The motors, wheels, chains, gears and batteries were taken from two inexpensive Chinese electric scooters. The engines provide 24Volt, 300W, 2750 rpm.

The transmission is carried out from the small gear on the motor to the large gear on the steering wheel. The ratio is approximately 6:1, this high ratio is preferable to obtain better torque and reduced maximum speed. The transmission on the 12-inch wheel was based on a freewheel mechanism, so necessary modifications had to be made to allow the wheel to be driven in both directions.

The basis of the platform is a fixed axle on which both wheels must rotate. The axle is secured by three aluminum blocks, which are secured with 5mm set screws.

To be able to turn when controlling a Segway by tilting the steering column left and right, a drawing was made required part in the SolidWorks program, after which it was manufactured on a CNC machine. The machine program was written using CAMBAM. The same method was used to produce the electronics box and assemble the emergency braking unit.

The handlebar of the future Segway is a regular bicycle handlebar, the tube of which is attached to a 25 mm hollow steel pipe. To keep the steering column centered and provide some force to feedback two steel springs were used. There is also an emergency button on the steering wheel, which is connected to a standard relay from the car and can reduce engine power.

Two are used for power supply lead acid battery 12V 12Ah, which are used for 24V motors.

Electronics

All printed circuit boards were manufactured specifically for this development. The main board takes care of the calculations, collecting data from sensors such as the gyroscope (ADXRS614), accelerometer (ADXL203) and trimpot, based on which it can determine which direction you want to turn.

Main processor AVR ATmega168. The connection to the laptop is made via Bluetooth using RN-41. Two H-bridges convert control signals from the main board into power for the motors. Each H-bridge has an ATmega168, communication between boards is via UART. All electronics run on a separate battery (LiPo 7.4V 900mAh).

In order to have easy access to charging batteries, for programming the main board, changing control loop parameters, a small box was made with the necessary connectors, an electronics power switch and a trim potentiometer on the top side.

Software

The microcontroller software mainly consists of a filter for the gyroscope and accelerometer and a PD control loop. Two filters were taken for the test: Kalman and Complemenatry. It turned out that their performance was very similar, but the Complemenatry filter required less computation, so it was chosen for use. Applications were also written in Java so that you could see all the values ​​of sensors and control signals, battery status, etc.

The technical side of creating a Segway with your own hands in this video:

Hi all brainiacs! In my new brain project I will create a self-balancing vehicle or Segway. For this project you need basic knowledge in electronics and ability to work manually. All mechanical components can be purchased online or at your local store.

A SEGWAY consists of a platform on which you stand in an upright position, and two side electric motors driven by batteries. The control controller algorithm ensures a stable position. The movement of the Segway is controlled by the driver by tilting his torso, and a handle to select the direction of movement left/right. Therefore, you will need additional components such as a controller, motor drive and acceleration sensor/gyroscope. The mechanical structure is made of wood because it has a light weight, electrically insulated and easy to process. Now let's start making the Segway!

Step 1: Basic characteristics of the project

In this project, it is required to manufacture a device with the following characteristics:

— Sufficient power and stability for driving on the street, and even on a gravel path;
— 1 hour of continuous operation
– Total cost up to 500€ euros
— Possibility of wireless control
— Recording data to an SD card to detect breakdowns

Step 2: System Design

The tilt sensor is mounted horizontally along the x-axis and vertically along the y-axis.

Step 5: Testing and Configuration

Please note that the motors must have sufficient power. Test the device in a wide and safe area to avoid injury or damage. It is recommended to wear protective shields and a helmet.

Follow the step by step procedure. Start by programming the Arduino microcontroller (download), then check the communication with the sensors and bridge control circuit.

Arduino Terminal can be used to debug program code and test functionality. For example, the PID gain needs to be adjusted because it depends on the mechanical and electrical parameters of the motor.

Gain is adjusted using this procedure:
1. The Kp parameter is for balancing. Increase Kp until the balancing becomes unstable, Ki and Kp remain 0. Reduce Kp slightly to obtain a stable state.
2. Ki parameter is for accelerating/decreasing acceleration when tilting. Increase Ki to get the correct acceleration to avoid falling when leaning forward, Kp remains 0. The balance should now be stable.
3. The Kd parameter is used to compensate for switching on and return to a stable position.

In the Terminal program, you can execute various "?" commands.
? – Help with choosing commands
p,i,d [integer value] - Set/Get PID gain, value from 0 to 255
r [integer value] – forced increase in engine speed, value from -127 to 127
v – software version
With the "p" command you access the Kp parameter. The "p 10" command allows you to set Kp to a value of 10.

After power is applied to the Arduino, the sensors are initialized and enter the standby state. When the push button is pressed, a control signal is transmitted to the SEGWAY controller, which is in a vertical position, which is ready to activate the motors to move forward or backward depending on the initial position. From this point on, the button must be kept pressed constantly, otherwise the motors will turn off and the controller will go into a standby state. After reaching the vertical position, the controller waits for the “Driver in Place” load limit switch signal, which is usually pressed with the foot while the driver is on the platform. After this, the balancing algorithm starts and the motors are activated forward or backward in order to remain in an upright position. Leaning forward creates forward motion and vice versa. Being in an inclined position leads to faster movement. Leaning in the opposite direction results in a decrease in speed. Use the handle to move left and right.

Step 6: Demo

Watch the video below finished device and thanks for your attention!

If you think that it is impossible to make a hoverboard or mini-Segway at home with your own hands and strength, then you are far mistaken. Oddly enough, there are many videos on the Internet where many craftsmen make their own hoverboard. For some, it turns out to be very homemade, but there are also those who were able to really get closer to the creation technology itself and reproduce a truly interesting and high-quality thing. So is it possible to make a hoverboard with your own hands? Adrian Kundert, an engineer and just a good person, will tell us about this.

What is a hoverboard?

How to make a hoverboard with your own hands? In order to understand how to make a homemade hoverboard, you first need to understand what a hoverboard is, what it consists of, and what is needed to create this interesting means of transportation. A hoverboard is a self-balanced vehicle, the operating principle of which is based on a system of gyroscopic sensors and internal technology maintaining the balance of the working platform. That is, when we turn on the hoverboard, the balancing system also turns on. When a person stands on a hoverboard, the position of the platform begins to change; this information is read by gyroscopic sensors.

These sensors read any change in position relative to the earth's surface or the point from which gravitational influence comes. After reading, the information is sent to auxiliary boards, which are located on both sides of the platform. Since the sensors and the electric motors themselves operate independently of each other, in the future we will need two electric motors. From the auxiliary boards, the information in processed form already goes to the motherboard with a microprocessor. There, the balance retention program is already carried out with the necessary accuracy.

That is, if the platform tilts forward by about a few degrees, then the motors are given a signal to move in the opposite direction and the platform is leveled. The tilt in the other direction is also performed. If the hoverboard tilts to a greater degree, then the program immediately understands that there is a command to move the electric motors forward or backward. If the hoverboard tilts more than 45 degrees, the motors and the hoverboard itself turn off.

The hoverboard consists of a body, a steel or metal base, on which all the electronics will be attached. Then there are two electric motors with enough power to be able to drive under a person’s weight of up to 80-90 kg. Next comes the motherboard with a processor and two auxiliary boards, on which there are gyroscopic sensors. And of course, a battery and two wheels with the same diameter. How to make a hoverboard? To solve this issue, we will need to obtain certain design details of the hoverboard itself.

What do we need?

How to make a hoverboard with your own hands? The first and main thing you need is two electric motor, with the power to carry the weight of an adult. The average power of factory models is 350 Watts, so we will try to find engines of this power.

Next, of course, you need to find two identical wheels, approximately 10-12 inches. It’s better to have more, since we will have a lot of electronics. So that the cross-country ability is higher and the distance between the platform and the ground is at the required level.

Two batteries, lead-acid, you need to choose a rated power of at least 4400 mAh, and preferably more. Since we will not do metal structure, but it will weigh more than the original mini-segway or hoverboard.

Production and process

How to make a hoverboard that is powerful and so that it can keep its balance while riding? First we need to make a plan for what kind of vehicle we will need. We need to do quite powerful tool movement with large wheels and high maneuverability on different roads. The minimum value of continuous driving should be 1-1.5 hours. We will spend approximately 500 euros. Let's install a wireless control system for our hoverboard. We will install a reading device for problems and errors, all information will go to the SD card.

Hoverboard diagram

In the diagram above you can clearly see everything: electric motors, batteries, etc. First you need to select exactly the microcontroller that will carry out the control. Of all the Arduino microcontrollers on the market, we will choose UnoNano, and the ATmega 328 will act as an additional information processing chip.

But how to make a hoverboard safe? We will have two batteries connected in series, so we will get the required voltage. For electric motors, a double bridge circuit is precisely what is needed. A ready button will be installed, when pressed, power will be supplied to the engines. When you press this button, the motors and the hoverboard itself will turn off. This is necessary for the safe driving of the driver himself and our vehicle.

The Arduino microcontroller will run at about 38400 baud, using serial communication with the XBee circuit. We will use two InvenSense MPU 6050 gyro sensors based on GY-521 modules. They, in turn, will read information about the position of the platform. These sensors are accurate enough to make a mini Segway. These sensors will be located on two additional auxiliary boards that will perform the primary processing.

We will use the I2C bus, it has enough bandwidth to quickly communicate with the Arduino microcontroller. The gyroscopic sensor with address 0x68 has an information update rate of once every 15 ms. The second address sensor 0x68 works directly from the microcontroller. We also have a load switch; it puts the hoverboard into balance mode when the platform is in a level position. In this mode, the hoverboard remains in place.

Three wooden parts, on which our wheels and electric motors will be located. The steering column is made from an ordinary wooden stick and will be attached to the front of the hoverboard itself. Here you can take any stick, even a mop handle. It is necessary to take into account the fact that batteries and other circuits will produce pressure on the platform and thus the balancing will be slightly reconfigured, precisely in the part where there will be more pressure.

The engines need to be evenly distributed on the right and left sides of the platform, and the battery should be maximally in the middle in a special box. We attach the steering post to the usual feints and attach the ready button to the top of the stick. That is, if something goes wrong and the button is pressed, the hoverboard will turn off. In the future, this button can be converted into a foot part or adjusted to a certain inclination of the platform itself, but we will not do this for now.

The internal circuit and soldering of all wires is carried out according to the same scheme. Next we need to connect two gyroscopic sensors to our microcontroller, using a bridge circuit with a motor, according to this table.

The balancing sensors should be installed parallel to the ground or along the platform itself, but the right and left turn sensors should be installed perpendicular to the gyroscopic sensors.

Configuring sensors

Next, we configure the microcontroller and download the source code. Next you need to check the correct relationship between the gyroscopic sensors and the rotation sensors. Use the Arduino Terminal program to program and configure the hoverboard. It is necessary to configure the PID balance controller. The fact is that you can choose engines with different power and characteristics, for them the tuning will be different.

There are several options in this program. The first most important parameter is the Kp parameter, it is responsible for balancing. First, increase this indicator in order to make the hoverboard unstable, and then reduce the indicator to the desired parameter.

The next parameter is the Ki parameter, it is responsible for the acceleration of the hoverboard. As the angle of inclination decreases, the speed decreases or increases with reverse action. and the last parameter is the Kd parameter, it returns the platform itself to a level position, and puts the engines in hold mode. In this mode, the hoverboard simply stands still.

Next, you turn on the power button of the Arduino microcontroller and the hoverboard goes into standby mode. After you stand on the hoverboard itself, you stand with your feet on the push button, so the hoverboard goes into “stationary” mode. Balancing sensors turn on and when the angle of inclination changes, the hoverboard moves forward or backward. In case of any breakdowns, you can easily repair the hoverboard yourself.

Share