PiCar-X help and suggestions

I got the kit this morning. After assembling the car, I ran into problems trying to center the servos. I may have to write code that centers servos in Python. If the Raspberry Pi 4B board has heatsinks, the Robot Hat won’t go over the board fully seated. The board and hat need cooling fans because they get too warm. Is it possible to connect either different kinds of batteries or use plug-in power supply to the hat?

It is normal for the Raspberry Pi to get hot after working with a robot hat. It will not affect your normal work.
Regarding the type of battery, please follow the battery specifications provided in our tutorial to use the battery, all are OK:
https://docs.sunfounder.com/projects/picar-x/en/latest/appendix/battery.html
The plug-in power supply can also be used, but the DC input voltage can not exceed 9V, it is recommended to be 6V-9V.
It may not be good to find a power supply online. Or not compatible with the power supply interface of our robot hat.
So we recommend you use battery power.
Tip: If you want to try to plug in the power supply, there may be too much voltage, resulting in a short circuit, there is a risk that the robot hat will be burned or the Raspberry Pi will be burned.
The consequences of this, you need to bear yourself.

The EzBlock Studio for Arduino tablets doesn’t match what’s in the documents. I think that EzBlock Studio in the documents are for Apple Ipad. There is no Navigation Bar on the left side. The Ezblock for Raspberry Pi image file doesn’t show the desktop. How can I fix the problems?

  1. the EzBlock Studio for android tablet does not match the content in the documentation?
    Not quite understand what you mean, we tutorial on the connection product steps, is the use of iPad to complete the screenshot steps tutorial, but the operation of android devices and ipad is the same.
    There is no navigation bar on the left side? Don’t understand, please describe the problem you encountered in detail and provide us with screenshots or videos of the problem, so that we can analyze and solve the problem easily.
  2. The ezblock OS we specified is a system without desktop, if you
    want to make a system with desktop to install ezblock, install it by cloning the source code on github, some dependencies may be missing, you need to improve the dependencies according to the situation as follows
    cd ~
    git clone -b EzBlock3.1 GitHub - ezblockcode/ezb-pi
    cd ezb-pi
    sudo python3 install.py
    You also need to install opencv3 and its dependencies: cd ~ git clone -b EzBlock3.1
    OpenCV: Install OpenCV-Python in Ubuntu
    Use
    sudo systemctl stop ezblock
    sudo ezblock-service
    to run the test
    Again, some dependencies may be missing and you will need to work them out yourself, so if you are not familiar with linux, it is not recommended to try it.

I bought the Raspberry Pi Starter Kit (Raphael) before buying the Raspberry Pi Ai Car Kit (PiCar-X). When I got the car kit, I followed the instructions for downloading and installing the Ezblock for Raspberry Pi image file. I wanted the desktop so I followed the instructions at how2electronics website for installing RaspiOS with desktop but I had problems trying to connect the car to the Internet. I followed the instructions at SunFounder Ulimate Raphael Kit for Raspberry Pi website for installing the image and then followed the instructions at how2electronics for installing Installing Python Modules & Libraries and I can connect the car to the Internet. Will there be new versions of software that’s compatible with Bullseye OS?

I don’t quite understand the question you are asking, please describe the problem you are having in detail.
The Raspberry Pi Starter Kit (Raphael) is also for the Raspberry Pi system.
If you want to use python control on your picar-x, you need to install the required libraries on your Raspberry Pi system
https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_start/install_all_modules.html
Please follow our tutorial steps to install it.

I got a 5VDC fan with three wire that came from a Raspberry PI 4B case. The fan is connected:
red wire - 5V
black wire - ground
blue wire - GPIO14
How can I connect the fan to the Robot Hat?

You can link D0-D3 on Robot hat, these 4 are Raspberry Pi IO ports, their correspondence is like this
51901

Is it possible to remove the speaker from bottom of the Robot Hat? The speaker interferes with the heatsink on the Raspberry Pi 4B and prevents the Robot Hat from going all the way down on the Raspberry Pi 4B.

You can remove the speaker from the robot hat, but you can’t hear the sound when you execute the example about the sound.
The speaker is attached to the robot hat, please be careful when you remove it, when you want to attach it back, you need to prepare the glue to attach it by yourself.
So we still recommend that you do not remove the speaker.

Is there a way for the Raspberry Pi to query the Robot Hat for the battery charge state? The battery indicator LEDs on the Hat seem to know the batter charge, but I would like to automate a way to let the user know without having to look.
Thanks.

Sorry, currently the only way to determine the battery level is by looking at the battery indicator on the robot hat.
About Raspberry Pi is there any way to check the battery charging status to Robot Hat?
There is no way to solve it.

The robot hat has an ADC, couldn’t that be used?

Something like this: Raspberry Pi Pico Battery Voltmeter in Python – Kitronik Ltd with some wiring between the batteries and the ADC on the robot hat.

We do have a resistor set aside to divide the voltage of the battery to read. The battery voltage signal pin is A4
The battery voltage can be read by Python using Robot Hat’s ADC library

from robot_hat import ADC


def get_battery_voltage():
  bt = ADC("A4")
  value = bt.read() # Get ADC pin value
  voltage = value * 3.3 / 4095 # Calculate ADC pin voltage
  voltage = voltage * 3 # Calculate battery voltage
  return voltage

def get_battery_level():
  voltage = get_battery_voltage() # Get battery voltage
  percent = ( voltage - 6.6 ) / ( 8.4 - 6.6 ) * 100 # Map voltage from 6.6V to 8.4V to percentage
  percent = max(0, min(100, percent)) # Constrain percentage from 0 to 100
  return percent

voltage = get_battery_voltage()
level = get_battery_level()
print(f"Battery state: {voltage}V, {level}%")


Thank you.
I see A0 - A3 on the robot hat. Where is A4?
If I use A3, do I need my own resistor in series, if so what size?

It is internal A4, no need to connect resistors in series with the robot hat, you connect the battery normally, start the robot and go to the Raspberry Pi system terminal and run the script.
At this point you will see the battery voltage data printed out.

1 Like

Wow, that worked so easy. Thank you.

1 Like