H Bridge Matrix

Your MCU connects both +5 and 0 v
Ok, understand now. The input signal is going from 5 volts to float, by connecting the battery pack, then not connecting. Just ground the input, and you should see the floaty voltage go away. A micro can do all 3 states of output typically, the 0 volt ground, 5 volt high, and "floating" if set to.

To worry, or not to worry?

I suspect your data inputs are floating. Try touching gnd to each data input instead of +V to see if that stops the output.

If it does, you probably don’t need to make any changes, as the PIC output will pull down when asserted low anyway.

Gotter -Cotter

Makes complete sence!

If this were being controlled by a picaxe it would already be pulled down! I just tried it, I shorted the input to ground and success. With the input grounded, I am getting .03V on the output. --Close enough to 0V for me! --Thanks guys, this seems to be a complete success. --Well, that is until tomorrow when I hook up motors and actually pull some amps through this thing.

Oh, and congrats… 3 PAGES!! Woo-Hoo!

pwm motor control

HI,

How would one go about incorporating pwm for motor speed control while using the L293 ? I am using an arduino. Right now the arduino simply drives the H-bridge for motor direction. How do I use pwm from the arduino to control the speed of the motor? Thanks. I’ll continue to look for some suggestions in the hopes that someone can point me in the direction in this forum. Thanks.

PWM the pins of the L293

PWM simulates an effective voltage that the motor sees, so lower on-time or duty cycle gives less voltage to the motor, slowing it down.

Just connect the ouputs from your micro to the inputs of the L293, and you should be fine. Connect 1 PWM pin to the 1A input, and have a regular IO pin to the 2A, then have another PWM pin to the 3A input, and have the 4A conenctoed to an IO pin. THen JUst PWM on the motors while holding the other pin high or low for direction. You’ll need to remember the 75% duty PWM one direction will become 25% when the direction changes, and program accordingly.

Or you could connect PWM to 1A, and then add an inverter and connect the inverted PWM to the 2A pin and run locked antiphse PWM.

 

Eh?

You’ll need to remember the 75% duty PWM one direction will become 25% when the direction changes, and program accordingly.

Never seen this phenomenon before. Why would this be the case?

 

@BOA

This confused me for a while as well but I think I got it. --On your relay board, the reverse happens after the PWM signal and is seperated. It is the same as switching the leads going to the motor. When you are using the set-up described above, it is an issue of High/low.

Here we go.

PWM 1

Out 2 Low

This is FWD and 75% of the PWM pulses are High therefore 3/4 power.

__________

PWM 1

Out 2 High

This is reverse but now sence 75% of the PWM pulses are still high, 75% of the time you have a High/High situation and only a 25% Low/High situation. Now instead of the motor being on 75% of the time (3/4 power), it is only on 25% of the time AND in reverse. To get your 75% power the other direction, you need the PWM to be Low 75% of the time --Thus, 25% high!

Woo Hoo! Chris explains to BOA!!! --Had to happen sometime!!

You got it, CtC
Good explanation!

I don’t got it.

I’ve used my own circuit and it doesn’t behave as described. I’ve also used the 298 and 293 and they don’t behave as described either. If a switch is on for 75% of the time, it’s on for 75% pf the time and it doesn’t care what direction the electricity is going. Is this some bizzarre feature of PWM implementation in Picaxe?

I got it now

I see what you’ve done. Picaxe only gives you two PWM outputs, so you guys are only PWMing one low-side switch. The BOA L293/8 driver switches over to PWM the opposing LSS when direction changes, so 75%=75% regardless of direction.

The advantage of assembly code: you can make any pin PWM. Show me the raw ones and zeros any day. I will convert you all. I can see the code.

Explain to me how to weld stuff. Cheap.

THE code and welding…

That makes sence, boa… I was quite surprised that you didn’t get it -I forgot you are not a Picaxe basic guy! Damn 1’s and 0’s! --Now we do have a 4-pin PWM output, it’s a “Hpwm” output for h-bridges but no one has ever figured it out! Seriously, no one…

Ok, on to welding… (This is all in reference to Arc Welding)

You got really got two options: Mig and Stick (yeah, yeah I know there is Tig -skip it for now)

There is a high current arc that melts the metal and a filler material is fed into it. Also, it is important to keep oxygen from getting to the molten metal as this is a contaminate and will ruin the weld.

Stick welding uses an electrode (a stick) stuck in a little handle. You have to keep it a certain distance from the work, the right angle and be constantly feeding into the work as it melts away. Also the stick is covered in flux that burns in the arc and produces a shield of gas that keeps the oxygen out. For a begginer set-up I would go with mig.

MIG:

Mig welding uses a coil of wire which is fed to a gun and comes out when you pull the trigger. The amps and feed rate are adjustable at the machine. Unless you are a welding “purist” I would recomend a MIG for your first welder. You don’t need to worry about keeping an arc distance and the angle is less crutial than with stick welding. Now, in terms of the shielding some welders use a tank of inert gas (I use a mix of Argon and CO2) but you can also use flux-core wire. In a nut-shell, you can get a good, cheap welder for around $100 U.S. that will weld steel up to about 1/8" thick. This $100 welder will serve you quite well on 90% of what you would want it for and are GREAT to learn on! This is actually my first welder and I still have it. I welded 3 trailers and a couple truck beds with it. I used it for about 3 years before I decided to upgrade to a much more professional unit. --That being said, I still use it on the jobsite from time to time --Remeber, we use 110VAC around here and my big welder is 220VAC so having something I can plug into a regular wall socket is great to have!

Bottome line: Get one of these or something like it and just start burning metal --I promise, you will pick it up in only a few hours.

**Now the real question is: Were you serious about the welding question?

 

Are we ready to Rummmble !!!
<o:smarttagtype namespaceuri=“urn:schemas-microsoft-com:office:smarttags” name=“State”></o:smarttagtype><o:smarttagtype namespaceuri=“urn:schemas-microsoft-com:office:smarttags” name=“City”></o:smarttagtype><o:smarttagtype namespaceuri=“urn:schemas-microsoft-com:office:smarttags” name=“place”></o:smarttagtype> Are we ready to Rummmble !!!<o:p></o:p>

In this corner weighing in @ 95kg is BOA, inventor of the low side MOSFET topside relay switch H-bridge - “I done need no stinkin bootloader PIC”, whizzywriter, jet engineer, 2’s complement techy artist, laser wit from some undisclosed location in Northern Ireland <o:p></o:p>

VS.<o:p></o:p>

CTC, tattooed fingered Rototueur extraordinaire, craftsman beyond compare, only person man enough to show their face on <st1:place w:st=“on”><st1:city w:st=“on”>YouTube</st1:city>, <st1:state w:st=“on”>Massachusetts</st1:state></st1:place> robot madman !<o:p></o:p>

Whoooooooo!

I’m tingling all over again :slight_smile:

Bring it Baby ! <o:p></o:p>

insert battery here

 

V

picture-152.jpg

On to page 4…

I swear this is the thread that will not die… If it keeps going, I think we are just going to start talking about the weather and our kids and stuff sooner or later.

–I all ready finished the damn motor controller that started all this, for cryin’ out loud!!

what page are you on, today?
What paginator do you use, Chris? Mine (firefox 3) still shows this entire node on one (BIG) page.

Serious, yes

Serious enough that I would encourage you to delete the post above (and this one) and create a new Tip / Walkthrough: Beginner’s Guide to Welding for Roboteers. Something I wanna have a crack at but just need the starting point and a few technical names for stuff.

I have a lot of 1/10th angle which is crying out to be made into a robot chassis and I don’t fancy doing it with M4 bolts.

Touched
I’m touched that you remembered that I was foolish enough to post my weight.

So did CtC!

63.5 kg

Made me think of him as “The Tiny Carpenter” ever since. :wink:

8ik (75 kg)

No way!
No way. My wife’s not much lighter.

65.3 Kg…
… At just a few cm shy of 2 meters tall! --I lost a bunch of weight in the motorcycle accident… I did get a bunch of screws put in me, though!! 32 to be exact!