Power question: gopigo3 and ydlidar

My Lidar has two Microusbs, one for “data” and one for “power”. You need to have both connected to get it to spin. The data one must be to the raspbi. But the power can be to any power supply to supplement the power it can get from the pi. So, that’s what I have. A gopigo3 with it’s normal 8AA battery pack connected to the pi and the usb from the pi to the lidar data usb. And then an external phone battery with a usb to the lidar - power usb.

So far so good?

If i get a new power more powerful source to replace the 8AA battery pack say that can give 2 or 3000 mA, and then connect both the data and power usbs to two separate usb connectors on the Pi, what do you think about that? Is that a bad idea? Would it likely not even make a difference?

If you were to use 8 Eneloop Pro 2500mAH AAA batteries, you should be able to drive a GoPiGo3 (350mA) + RPi 3B computing (600mA) + lidar (350mA spinning after 500mA startup) for almost 2 hours.

(8 “Regular” NiMH can probably supply 1900mAH when new so you should get about an hour)

Did you try two usb cables from the pi to the lidar, and that did not work?

You are not running the ROS desktop on the bot, correct? The bot node should only be collecting data, broadcasting the data, and responding to command messages, with minimal local computing.

When you are running your ROS node on the GoPiGo3, with the lidar running for more than 5 minutes, type “uptime” in a command shell

A power meter might tell you more about the real loads you are putting on each component. I use this one:

Good info! Let me respond to your suggestions. I didn’t know about Eneloop Pro batteries. But looking at what I am using, which I got via the company, they are Tenergy Premium rechargeable AAs which say 2500 mAH.

Yes I did try to USBs to the PI from the Lidar and it didn’t work. But I was still troubleshooting other things. For example I discovered that one of the USB cables I was using for data was power only. But I just tried again and the 8 AA batteries are not enough to get the iidar to spin:
Error: [CYdLidar] Error starting scanning mode: fffffffe
“Warning: [CYdLidar::initialize] Error initializing YDLIDAR scanner.because of failure in scan mode.
Warning: [CYdLidar::initialize] Error initializing YDLIDAR scanner. Because the motor falied to start.”

Regarding the PI: I am just running the basics. the ydlidar and the gopigo3 nodes. A lot is working but slam is not yet. The map it generates is junk (random) and it cant localize itself from it. There’s something I am investigating right now about the odom topic because it is not showing anything other than zero. I assume it is supposed to be generating odom topics, right?

Also I ordered the suggested meter!

Thanks!

My guess is that the batteries are enough, but path from the batteries through the GoPiGo3 5v power regulator to the Raspberry Pi and then to the USB ports is not supporting the starting current (supposedly 500mA). The RPi supposedly can supply 600mA to any one USB and 1200mA to the total.

BTW, USB port 1 is different than USB ports 2,3,4 - I would try the power cable in port 1, and another time in port 2. (port1 is shared with the ethernet port somehow.)

How does the “Hands On ROS” book suggest wiring it all up?

1 Like

From the book:
Follow the instructions provided in the user manual to physically connect the device to your laptop or to the robot. The following screenshot shows what it looks like once the sensor itself has been wired to the control board via the set of five colored cables:

That picture doesn’t really help me, but from these pictures later in the book it looks like the YLIDAR is powered from a USB power bank and the GoPiGo is powered with a Dexter rechargeable battery pack:

-Kevin

2 Likes

Great eyes. I was going to write that the book doesn’t mention it but I see now. Also I read that dexter industries has recalled that particular battery pack: https://www.dexterindustries.com/modular-robotics-announces-recall-of-dexter-industries-rechargeable-battery-pack/

Is there such a thing as a bigger (LiPo?) battery that is connected using a barrel connector to the gopigo3 board and a micro usb to the lidar or other power hungry accessories?

1 Like

Some of the folks here have a real allergy to any kind of lithium ion power source, being afraid that it will burst into flames some dark night when the clock strikes twelve. :wink:

One of the projects I have in the queue is using a Ryobi One+ 18v lithium power battery with a buck/boost regulator to generate a stable, high capacity, high current, 12v supply.  I have all the materials and have done the preliminary research, but have not had time to begin construction.  There will  be an article about it when I’m done!

These things can be done if you don’t mind reading data sheets and working with current/power based hardware projects.

It’s not any more difficult than a software project, but - like with software - you need to know what you’re doing.

1 Like

You could hook up a car battery to the GoPiGo3 and it will not get you more amperage through to the USB connectors.

You cannot connect 8x cells or any other “non 5v” source direct to the Lidar - you will burn it!

2 Likes

It sounds like I will need to have two batteries on board then, one for the 5v for the Lidar and one for the robot itself (the 8x AA). Correct?

1 Like

That is the simplest. The other approach is to split the power from the battery pack two ways, one to the GoPiGo3 power jack as it is now, but routing a second +/- pair to a duplicate plug.

I purchased a set of these:

That second jack will plug into a socket connected to a 5v voltage regulator like:

that then connects to the ydlidar usb power connector. (The ydlidar claims to need 0.5A starting current so 1, 1.5, 2A voltage regulators are probably ok. You can use any “step-down” or “step-up/down” regulator that allows at least 7-14v input and 5v output at +/-4% or better.)

Using a Battery pack with two plugs

  • One plug goes to the GoPiGo3 board
  • The other plug is connected to "a jack connected to the 5v 2A voltage regulator, that is then connected to the ydlidar power usb connector.
     

Then when the battery pack needs to be recharged, shutdown the RPi, and

  • disconnect the one battery cable going to the ydlidar power jack
  • hook that plug to a jack that is connected to a tenergy smart charger such as:

When the light turns green, the battery pack is fully charged:

  • disconnect the battery pack from the charger
  • reconnect the battery pack cable to the ydlidar voltage regulator jack, and power up the RPi
     

This way you never have to remove the batteries from the battery pack to recharge them!

BTW, center of plug or jack is always connected to the positive/red wire, everywhere, and the “barrel” is always connected to the negative/ground/black wire everywhere.

2 Likes

Be careful of the word “always” - there are exceptions.

In the case of the GoPiGo, and many other items, the center is indeed positive, but that’s not “always” true. In fact, I keep a cheep voltmeter around for just that purpose, checking the polarity of things I want to plug into other things.

I say this because I have destroyed things in the past by “assuming” the center was positive.

1 Like