Before you begin testing, ensure all connections are properly made according to CONNECTIONS.md.
- All components are securely mounted on the chassis
- All wire connections are secure and properly insulated
- 12V battery pack is fully charged
- ESP32 is powered via USB or 5V supply
- All GND connections are common (shared ground)
- Motors are properly connected to BTS7960 drivers
- No loose wires or short circuits
- HC-06 Bluetooth module LED is blinking (indicating it's powered and ready)
- Arduino IDE is installed with ESP32 board support
- Code is uploaded to ESP32 successfully
- Serial monitor shows "ESP32 Robot Car Starting..." message
- Bluetooth device name "ESP32_RobotCar" is visible
-
Power on the ESP32 via USB cable
- Wait for the blue LED on ESP32 to indicate it's running
- Open Serial Monitor (115200 baud) to see initialization messages
-
Verify Serial Output
- You should see: "ESP32 Robot Car Starting..."
- Then: "Bluetooth device is ready to pair!"
- Then: "Device name: ESP32_RobotCar"
- Finally: "Setup complete! Waiting for Bluetooth commands..."
-
Power on the 12V battery pack
- Connect to B+ and B- terminals on both BTS7960 modules
- Verify no sparks or unusual sounds
- Check that motors don't move (they should be stopped)
-
Enable Bluetooth on your smartphone/tablet
- Go to Bluetooth settings
- Make sure Bluetooth is turned on
-
Scan for devices
- Look for "ESP32_RobotCar" in the available devices list
- If not visible, wait 10-20 seconds and scan again
- Ensure HC-06 module LED is blinking
-
Pair with the device
- Tap on "ESP32_RobotCar"
- Default pairing code is usually "1234" or "0000" (check HC-06 documentation)
- If pairing fails, try both codes
-
Verify connection
- Once paired, the device should show as "Connected"
- HC-06 LED should change from blinking to solid or slow blink
Recommended apps for Android:
- Arduino Bluetooth Controller (by Mightyohm)
- Bluetooth RC Controller (by SimpleSoft)
- Bluetooth Terminal (for manual command testing)
For iOS:
- LightBlue (for testing)
- BLE Scanner (if using BLE)
Configure your Bluetooth RC app with the following button mappings:
| Button/Control | Command | Function |
|---|---|---|
| Up Arrow / Forward | F | Move Forward |
| Down Arrow / Back | B | Move Backward |
| Left Arrow | L | Turn Left |
| Right Arrow | R | Turn Right |
| Up-Left Diagonal | G | Forward Left |
| Up-Right Diagonal | 1 | Forward Right |
| Down-Left Diagonal | H | Back Left |
| Down-Right Diagonal | J | Back Right |
| Center / Stop | S | Stop |
| Speed Slider 0% | 0 | Speed 0% |
| Speed Slider 10% | (Note: '1' conflict) | See note below |
| Speed Slider 20% | 2 | Speed 20% |
| Speed Slider 30% | 3 | Speed 30% |
| Speed Slider 40% | 4 | Speed 40% |
| Speed Slider 50% | 5 | Speed 50% |
| Speed Slider 60% | 6 | Speed 60% |
| Speed Slider 70% | 7 | Speed 70% |
| Speed Slider 80% | 8 | Speed 80% |
| Speed Slider 90% | 9 | Speed 90% |
| Speed Slider 100% | q | Speed 100% |
| Emergency Stop | D | Stop All |
Note on Speed 10%: There's a conflict - '1' is used for both "Forward Right" movement and "Speed 10%". In the current implementation, '1' triggers Forward Right movement. To set speed to 10%, you can:
- Use speed 0% (command '0') and then gradually increase
- Modify the app to send a different character for speed 10%
- Use the default speed (50%) which works well for most applications
Important: Start with the car elevated (wheels off the ground) to prevent accidents.
-
Test Stop Command
- Send 'S' command
- Verify all motors stop
- Check Serial Monitor for "Motors Stopped" message
-
Test Forward Movement
- Send 'F' command
- Verify both left and right motors rotate forward
- Check Serial Monitor for "Moving Forward" message
- Send 'S' to stop
-
Test Backward Movement
- Send 'B' command
- Verify both motors rotate backward
- Send 'S' to stop
-
Test Left Turn
- Send 'L' command
- Verify right motors forward, left motors backward
- Send 'S' to stop
-
Test Right Turn
- Send 'R' command
- Verify left motors forward, right motors backward
- Send 'S' to stop
-
Test Forward Left (G)
- Send 'G' command
- Verify right motors at full speed, left motors at reduced speed
- Send 'S' to stop
-
Test Forward Right (1)
- Send '1' command
- Verify left motors at full speed, right motors at reduced speed
- Send 'S' to stop
-
Test Back Left (H)
- Send 'H' command
- Verify right motors backward full, left motors backward reduced
- Send 'S' to stop
-
Test Back Right (J)
- Send 'J' command
- Verify left motors backward full, right motors backward reduced
- Send 'S' to stop
-
Set Speed to 0%
- Send '0' command
- Verify speed is set to 0%
- Try moving forward - motors should not move
-
Set Speed to 50%
- Send '5' command
- Verify Serial Monitor shows "Speed set to: 50%"
- Send 'F' to move forward at 50% speed
- Observe motor speed is moderate
-
Set Speed to 100%
- Send 'q' command
- Verify Serial Monitor shows "Speed set to: 100%"
- Send 'F' to move forward at full speed
- Observe motors are at maximum speed
-
Test Speed Changes During Movement
- Start moving forward ('F')
- Change speed to 30% ('3')
- Verify motors slow down while still moving forward
- Change speed to 80% ('8')
- Verify motors speed up
- Test Emergency Stop (D)
- Start any movement (e.g., 'F')
- Send 'D' command
- Verify all motors stop immediately
- Verify Serial Monitor shows "Emergency Stop - All motors stopped"
- Verify speed is reset to default (50%)
Now test with the car on the ground:
-
Place car on smooth, open surface
- Ensure there's enough space to move
- Remove any obstacles
-
Start with low speed
- Set speed to 20% ('2')
- Test forward movement ('F')
- Verify car moves forward smoothly
- Stop ('S')
-
Test all directions
- Forward, backward, left, right
- Diagonal movements
- Verify car responds correctly to all commands
-
Test speed variations
- Gradually increase speed from 20% to 100%
- Verify smooth acceleration
- Test at different speeds
-
Test turning radius
- Test left and right turns
- Verify car can turn in place
- Test diagonal movements for smooth cornering
Possible Causes:
-
12V battery not connected or discharged
- Check battery voltage with multimeter (should be ~12V)
- Verify B+ and B- connections on BTS7960 modules
- Ensure battery is charged
-
Enable pins not activated
- Check that L_EN and R_EN pins are receiving HIGH signal
- Verify GPIO connections to enable pins
- Check Serial Monitor for movement commands being received
-
Motor connections incorrect
- Verify motors are connected to M+ and M- terminals
- Check that motors are connected in parallel correctly
- Test motors directly with battery to verify they work
-
PWM signals not working
- Verify PWM pins are connected correctly
- Check Serial Monitor for PWM channel setup messages
- Test with multimeter if PWM signals are present
Solution:
- Double-check all connections per CONNECTIONS.md
- Verify power supplies are working
- Test each component individually
Possible Causes:
- Motor wires reversed on BTS7960
- Code logic reversed
Solution:
- Swap M+ and M- connections on the affected motor driver
- Or modify the code to reverse the direction in the movement functions
Possible Causes:
-
HC-06 not powered
- Check VCC is connected to 3.3V (not 5V)
- Verify GND connection
- Check if LED is blinking
-
Wrong baud rate
- HC-06 default is 9600 baud
- Verify code uses 9600 baud rate
- Some HC-06 modules may need different baud rate
-
Pairing code incorrect
- Try "1234"
- Try "0000"
- Try "1111" or "1234"
-
Device not in range
- Ensure device is within 10 meters
- Remove obstacles between devices
Solution:
- Check HC-06 connections
- Verify Serial Monitor shows Bluetooth initialization
- Try unpairing and pairing again
- Check HC-06 module documentation for default settings
Solution:
- Adjust speed using speed commands (0-9, q)
- Modify default speed in code (change
currentSpeedinitial value) - Adjust PWM frequency if needed (currently 1000 Hz)
Possible Causes:
- Speed difference between sides too large
- Motors not balanced
Solution:
- Adjust speed ratio in
forwardLeft(),forwardRight(),backLeft(),backRight()functions - Currently set to 50% reduction - try 30% or 40% for smoother movement
Possible Causes:
-
Insufficient power
- ESP32 needs stable 5V supply
- USB cable may not provide enough current
- Use quality USB cable and power adapter
-
Short circuit
- Check for loose wires touching
- Verify no connections are reversed
-
Overheating
- Ensure proper ventilation
- Check if motors are drawing too much current
Solution:
- Use quality power supply for ESP32
- Check all connections for shorts
- Monitor Serial output for error messages
Possible Causes:
- Bluetooth not connected
- Wrong app or app not configured correctly
- Commands being sent as strings instead of single characters
Solution:
- Verify Bluetooth connection status
- Check Serial Monitor for "Received command: X" messages
- Ensure app sends single ASCII characters, not strings
- Test with Bluetooth Terminal app to send commands manually
- ✅ Power on and verify initialization
- ✅ Pair Bluetooth device
- ✅ Test stop command (S)
- ✅ Test forward (F) - wheels off ground
- ✅ Test backward (B) - wheels off ground
- ✅ Test left turn (L) - wheels off ground
- ✅ Test right turn (R) - wheels off ground
- ✅ Test speed control (0, 5, q)
- ✅ Test diagonal movements (G, 1, H, J)
- ✅ Test emergency stop (D)
- ✅ Ground test at low speed (20%)
- ✅ Ground test all movements
- ✅ Ground test at various speeds
- ✅ Final performance test
After initial testing, you may want to adjust:
- Default Speed: Modify
currentSpeedinitial value in code - PWM Frequency: Adjust
PWM_FREQUENCYif motors are noisy - Diagonal Speed Ratio: Adjust speed reduction in diagonal movement functions
- Response Time: Adjust delay in main loop if needed
Once testing is complete:
- Fine-tune speed settings for your application
- Adjust movement patterns if needed
- Add any custom features or modifications
- Document any changes made for future reference