Award
Congratulations Rich, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

L298 Contoller Help

Assistance Requested

Help gwen4156 with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

gwen4156 claims to have checked these sources:
 
#1

Hi Guys,
I'm tinkering with the G-bot some more. I found out why I could not get the neon working before. It turns out my power system design did not supply adequate voltage to the neon transformer. Without boring you all with the details, it was only getting 11.3 volts which was just below the transformers minimum input threshold. That being said, I ordered a new voltage converter with plenty of oomph (100 watts - the transformer needs about 68 watts) directly from china... While I'm waiting for the slow boat (yawwnnn...) I decided to get around to installing a linear actuator I purchased long ago to act as the robot's bubble lifter. So far so good.

I have one of the L298 2.5 amp controllers that I want to use to control it. All I need is for the actuator to get full voltage and be able to switch polarity to raise or lower the bubble. There is no need to vary its speed, just full up or full down.

What is the simplest way to connect it to the EZB?

Thanks in advance!

Gwen

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Check my L298n H-Bridge tutorial, it tells you everything you need to know about the L298n and should help you out Smile

#3

Thanks @Rich I couldn't find that one.
I reread this one
www.ez-robot.com/Tutorials/Hardware.aspx?id=25
but I was trying to figure out if I really needed four ports to control only one motor with no speed control... Guess I'll learn to fish (again) myself and keep switching three inputs and ports around until it works (the truth table in your tutorial leads me to believe I should be able to control one motor with only three ports...)

#4

Yes, you can control 1 motor with 3 ports.

Alan

#5

You can control one motor with 2 ports if you don't want speed control.

Make sure the jumper is on linking EnA to +5V.
Port In1 to one digital port, i.e. D0
Port In2 to one digital port, i.e. D1
Vcc to Vcc from any port or direct battery connection
Ground to Ground from any port or direct battery connection
Push the switch to enable the voltage regulator

Simply set In1 to High and In2 to Low for one direction
In1 to Low and In2 to High for the other direction
In1 and In2 to Low to stop
In1 and In2 to High to enable the brake (if applicable)

So,

Code:


# Forward
Set(D0, On)
SetD1, Off)

# Reverse
Set(D0, Off)
Set(D1, On)

# Stop
Set(D0, Off)
Set(D1, Off)

#6

Awesome!
Port preservation is bocoming important. The G-Bot is kind of demanding and I have many more things I want to add or upgrade...

Thank you!