containsmachine

【Smart Car】The big car turns around

 
Overview

Update instructions: 1.1: Optimized the wiring, changed the fixed hole distance of the car's universal wheel to M3, and corrected the wrong pull-down of the remote control LC12S SET pin.

 

Introduction to the car:

The car PCB is divided into upper and lower layers . The upper layer is the 18650 battery holder and WS2812 dot matrix. Copper pillars must be used to connect the upper and lower layers! Because M3 copper pillars are used to connect the upper and lower power and signal lines. Do not use M3 screw posts of other non-conductive materials.

2-wheel drive, using a swivel wheel at the front and rear.
The car's main board reserves a battery socket.
The caster may not be able to touch the ground, so you need to consider using spacers to make the caster touch the ground.
Both the remote control and the car main control use Arduino nano , which is easy to develop.
The car has on-board steering LED lights, lights, speakers, 5X5RGB dot matrix, and LC12S module .
The remote control is powered by a 9V battery . Just solder the 9V battery buckle to the J5 port of the remote control. Pay attention to the positive and negative poles! ! !
The remote control has an IIC OLED interface reserved , which can optionally display the car battery voltage and other data (you need to design the program yourself for this part, this function is not provided in the routine).

The MCU is not fully integrated on the PCB because I am afraid that the boot program cannot be burned (I have encountered this situation before), and it is easy to debug independently.

M3 screws, M3 copper posts, N20 motors, wheels, 18650 batteries and battery holders, and universal wheels need to be purchased by yourself. The joystick needs to be purchased by yourself. The joystick in the BOM is different from the actual pad, and be careful to purchase a joystick with button function (the actual button function needs to be designed by yourself, and the buttons are not used in the routine).

 

develop software:

ARDUINO IDE really requires a good hand, but I use VSC to type code because the coding experience of ARDUINO IDE is too poor.

For other software, you can try the graphical MIND+, which is very easy to use, but it seems that you cannot install third-party libraries.

 

2.4G module description:

Before using the LC12S module, you need to use the serial port module to configure it (mainly the network ID). When entering the setting mode, you need to pull down SET and CS. At this time, the indicator light is always on.

In working mode, it needs to be left floating or pulled up SET. The indicator light flashes when sending or receiving data.

It must be configured in advance before use, otherwise it will have to be disassembled and debugged repeatedly.

Configuration software has been added in the attachment.

 

As follows↓

Configure LC12S interface↓

 

After the configuration is completed, float SET or pull it high, and then test it. If the function is normal, weld it to the PCB. ↓

 

Introduction to the physical functions of the remote control:

Left joystick: ↑ is the speaker, ↓ is undetermined, ← is to switch the left lighting, → is to switch the right lighting.

Right joystick: ↑ means forward, ↓ means backward, ← means turn left on the spot, → turns right on the spot.

The D6 and D7 indicator lights are not used yet, and the joystick button function is not used (because I bought the wrong joystick and it has no button function).

 

The OLED displays the content. The first line is the name of the car, and the remaining four sets of numbers are the values ​​of the joystick in each direction. The highest is 1023, the lowest is 0, and the median value is around 500.

To develop using ARDUINO IDE, you need to install the FastLED library and u8g2 library. (To be honest, U8G2 really takes up space. Without U8G2, it takes up 20% of the ROM, but with U8G2 Chinese library, it takes up 103%.)

 

Actual picture ↓ ( WS2812 is missing one solder because it was accidentally melted with an air gun and no materials were prepared==, LC12S has a pin that is not soldered or has pins serialized together because of a design error in the initial version (now corrected), You need to leave SET floating or pull up to make LC12S work

 

As for why Chinese is not displayed, the reason is that the Chinese library of U8G2 is too large and cannot be installed in the ARDUINO ROM, so it can only install the English library.

When driving, the corresponding direction arrow will be displayed through the WS2812 matrix.

Physical demonstration video:

I wrote a simple program for demonstration. The reason why the OLED screen flashes is that the joystick value needs to be refreshed in a timely manner, and I think it slightly affects the response time of the MCU.

The chassis of the car is a bit low and can easily get stuck on the terrain==

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 18:09:52

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号