vachtang
Posts: 3
Joined: Wed Jun 29, 2016 12:30 pm

Power PI from L298N Driver board

Wed Jun 29, 2016 12:48 pm

Hi,

I'm beginner in Raspberry. I bought robot parts and trying to connect parts for motor test.
So I attached schema to this post. This is how I connect.
L298NNN.jpg
My connection schema attached
L298NNN.jpg (48.29 KiB) Viewed 1884 times
I want test motor and power my PI 2 B+ from 4 battery pack. Now then I turn on power my Raspberry restarting always and not booting to final state.
What I'm doing wrong? Should I disconnect inserted 5V and ENB swithes? Should I disconnect kabels from ENA?
Please help me understand how I should connect my schema with powered PI from one battery pack. Is it possible?

Thank you in advance

dgordon42
Posts: 754
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Power PI from L298N Driver board

Wed Jun 29, 2016 1:48 pm

You need a separate power supply for your Pi. The 4 x AAA batteries you are using won't power a Pi.

Disconnect the 5V line between the Pi's pin 2 and the L298N, and power your Pi normally.

You should also be aware that the L298N device is a 5V device, and the Pi's GPIO pins operate at 3.3V. They are not 5V tolerant, 5V can destroy a Pi.
Are you following a guide, or do you have some source which says that the L298N's digital pins will work with the 3.3V from the Pi, and won't put out 5V?

Hope this helps,
Dave.

vachtang
Posts: 3
Joined: Wed Jun 29, 2016 12:30 pm

Re: Power PI from L298N Driver board

Wed Jun 29, 2016 6:53 pm

I follow this guide on youtube.com https://www.youtube.com/watch?v=b4uhh_j8uR0
Am I good understand that my motor driver is not supporting my PI?
Can you recommend power supply, motor driver for pi 2 B+ and maybe some good books or guides?



Thank you

dgordon42
Posts: 754
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Power PI from L298N Driver board

Wed Jun 29, 2016 8:50 pm

OK, I had a look at your youtube link.
At 8:30 minutes in, the author says that the Pi supplies 5V power to the L298n, not the other way around.
At 17:04 minutes, when the author has the motor running, you can see the microUSB power lead plugged into the Pi.

Note the warnings about the video being out of date at 9:35 minutes.

How do you normally power your Pi?

The MagPi is a good place to start looking for Pi projects, all issues and books are free to download.

Hope this helps,
Dave.

vachtang
Posts: 3
Joined: Wed Jun 29, 2016 12:30 pm

Re: Power PI from L298N Driver board

Thu Jun 30, 2016 4:44 am

I am powering my PI with usb charger, so now I need external battery for it.
Is it L298N not usable for my pi?

dgordon42
Posts: 754
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Power PI from L298N Driver board

Thu Jun 30, 2016 10:18 am

You should be able to use the L289N if you set it up as shown in the youtube link you posted. The batteries shown in that video only power the electric motor, not the Pi. You should power the Pi with your USB charger as normal.

If you want a separate battery power supply for the Pi, have a look through the Adafruit website for some ideas. You will probably want something like a PowerBoost 1000, and a Li battery with more than 2000mAh capacity. You could then recharge your Li battery with your USB charger when you are not using your Pi.

Hope this helps,
Dave.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Power PI from L298N Driver board

Thu Jun 30, 2016 12:25 pm

dgordon42 wrote:Note the warnings about the video being out of date at 9:35 minutes.
Oh, the L298N tutorial that tells you how to blow up your Pi, after he said he would remove it. :shock:

Don't follow that video, it can damage your raspberry pi.

A L298N can be used with the raspberry pi, it is capable of generating 5V. Unfortunately the voltage regulator on the L298N isn't able to provide enough current for the Pi, so if you try to run the Pi from the L298N your Pi will stop working when you try to drive the motors.

A 5V 3A UBEC will be able to run the Pi from the battery you use for your motors, they are pretty cheap.
Doug.
Building Management Systems Engineer.

haldot1994
Posts: 2
Joined: Mon May 11, 2015 6:26 pm

RPI & L298N Driver board

Sat Jul 09, 2016 2:33 pm

Hay can anyone tell me how to connect my rpi3 and the l298n with harming my pi. Any suggestions on a different motor controler. Thank you.

Return to “Beginners”