Asked — Edited
Resolved Resolved by Rich!

Questionatic L298n Red Connection

Following the instruction video, i was able to set up the Hbridge L298N RED

the problem im facing is, it only controls the read motor, not the turning motor.

the video online shows dj setting up just one motor. am i missing something?


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#9  

thanks alan, have you seen the videos i posted? theyre both about modding a generic toys r us type rc car using an Hbridge.

mine looks like the car in the second video. i can probably add a servo but i want to try and do less harm to the chassis, by just keeping the current configuration. Any ideas?

if it is a servo, maybe i just need to treat it like one in ARC?

#10  

on second thought, looking at instructables i found this:

Quote:

The common circuit of RC car consist of : 1-Receiver circuit which is define the frequency that the car will work on( for example 40Mhz or 27 Mhz). 2-Controller chip (De-Multiplexer circuit). 3-Dual H-bridge circuit for driving two DC motor (one for backward ,forward and the other for the steering).
http://www.instructables.com/id/Fastest-way-to-Hack-RC-Car-H-Bridge-1/

United Kingdom
#11  

No microcontroller will be able to receive feedback from a H-Bridge without additional encoders or feedback pots. The H-Bridge does not have any inputs for any encoders or feedback pots, it is not physically possible for the H-Bridge (or any software or microcontroller controlling one) to know the motors position without feedback pots or encoders.

You are ill informed if you believe the Arduino can do this.

Once again I will refer you to the tutorial I wrote for the L298n H-Bridge. If covers everything to do with the H-Bridge and how it works. If you read it and understand how it works or at least how the controller using it works with the H-Bridge then you will see the error in assuming anything can control a motor without any type of feedback.

Unless the steering is spring return to the centre position and has physical switches to cut the power to the motor, setting a H-Bridge to move a motor for steering will both damage the motor and robot/chassis and not know where the centre position is therefore losing any ability to return to it.

The use of a servo or, if a H-Bridge is desired, a feedback pot or encoder is essential for the EZ-B, for the Arduino, for the Raspberry Pi, for anything.

#12  

i understand what you are trying to say.

can you explain how it works in the plethora of videos online

United Kingdom
#14  

No. At least not without repeating what's been said multiple times already.

A method for feedback for the position of the motor is essential for accurate movement of a motor. Without such feedback through encoders, feedback pots or limit switches the motor nor the motor controller will know it's position.

It will also be impossible to return to centre position without some means of position feedback or mechanically returning such as spring return.

With no limit switches and no feedback methods there is an extremely high chance of damage to the motor and to the robot/chassis. The H-Bridge will tell the motor to spin in one direction or the other (regardless of micro controller this is always done the same way which is through the in1 to in4 pins on the H-Bridge), without something to tell it to stop the motor will continue to spin or try to spin when it hits any physical limits therefore causing increased current demand and increased battery usage, increase stresses on the motor and in time will end up with a motor which has burnt out due to this.

To return to centre position is impossible as it doesn't know where it is or where centre position is. One poor method used is timings however these are extremely inaccurate.

The end result, regardless of motor controller, regardless of what videos you may have seen online, is a less than satisfactory result which will cause damage.

Read the tutorial on the H-Bridge, search the internet for H-Bridges and read up on how they work, what they do and their limits and you will see that what has been explained to you multiple times now is in fact correct.

The short answer is, and always has been, use a servo for steering or use the drivetrain method which the H-Bridge Movement Panel in ARC is set up for. A H-Bridge is not the correct device for the job regardless of micro controller.

#15  

Pretty sure they were designed to withstand that kind of damage, otherwise your local rc retailer wouldn't have cars that have motors for steering.

If you don't know, no one will look down on you when you admit it.

#16  

I am not saying there aren't steering motors, I am saying that they either have limit switches and centering springs, or encoders and sensors to give position feedback to stop the motor, or clutches to release the gearing at the limits.

The L298n doesn't have inputs for encoder sensors, so if you want to use a motor for steering you will need one of the other solutions. With one of those, you can use a custom Movement Panel to script the commands to give the h-bridge the proper commands to drive it. If you go the easier route of using a servo for steering, you'll still need a custom movement panel, but you will have significantly more precise steering control since you can precisely tell the servo exactly how far to turn and what its limits are with no risk of the motor tearing your front wheels or steering mechanism off or seeing the magic blue smoke as your motor burns itself up because it can't make the wheels turn any further and nothing told it to stop trying.

Alan