Raspberry Pi Robot 4 with unlimited updates

Went to a friend's studio on weekends. The goal is to get the motor spinning.

Thank you Uncle Chen for all your help!laughing out loudlaughing out loudlaughing out loud

A friend helped me with a motor ESC, a stm8 development board, an ultrasonic module, a gyroscope, and a Raspberry Pi 3. Also help with wiring and testing. Really helpful!

A lot of trouble happened when hooking up the vacuum motor.

First, I used a four-axis drone ESC and flight control. The speed is very low. My friend is very experienced. I changed it to a fixed-wing ESC and flight control, and now I'm working. It turns out that high-speed motor ESCs and low-speed motor ESCs are different. I only have three eyeballs from the owner of Taobao. . .

There is no manual for the motor. It has a built-in detection device. It cannot be started without passing the start-up verification. I wrote a simple PWM wave generation and directly output a duty cycle of 75 to the motor. The motor does not work, and later found out Sending nothing to work? ? ? But the flight control can start him. Why, or a friend with experience, he suggested that I first send a 50% duty cycle to the motor, and then slowly accelerate the duty cycle after a period of time. This still does not work. Later, it was found that because the PWM duty cycle control accuracy is not high, the actual output is not 50%, but 51%. After fine-tuning the duty cycle, it is finally good. Once again, the Taobao shop owner has three eyes. . .

The wheel motor works just fine, a success. It's just going a bit fast. Can be fine-tuned.

7 hours driving on weekends is just too time consuming. Fortunately, everything can move. Next, you can directly use the Raspberry Pi to control the stm8 through the serial port to change the motor duty cycle. oye!

Do the chassis first this week and attach the contact switches. Also need to buy a network cable, a st-link.

Ultrasonic words are also connected to stm8, a level control plus an interrupt interception time. Data is sent back through the serial port. This can form a closed loop, so that the car does not hit the wall directly. In fact, it takes time to adjust the ultrasonic wave, you can put it in the car and run it first and then add it in.

Make plans for the next week first: get the car running.

Next week's plan: Join the ultrasound and don't slam the wall.

There is not much time every day, in fact, the progress is very slow. These have been expected. Do it slowly, don't give up! come on!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324809813&siteId=291194637