Hardware or software? Should be simple...

Having issues with my actuator and my UNO again today.

Sending a simple PWM to my TLE5206 H-bridge. It worked yesterday, so I'm thinking it is a hardware issue, but thought I'd run it by you guys first.

Simple code- pins 9 and 10 are the "IN" pins on the H-bridge IC. The code simply cycles the actuator back and forth.

I put a meter on the output pins of the H-bridge. When the software is in the "RETRACT IN" mode, I get 12V from the H-Bridge output as I should, but when the software gets to "EXTEND OUT", zero voltage. Any ideas?? Thanks.

void loop() {
  
  analogWrite(9,255);        //RETRACT IN SECTION
  analogWrite(10,150);  
  delay(10000);
 
  analogWrite(9,0);             //EXTEND OUT SECTION
  analogWrite(10,150);
   delay(10000);
}

I even changed the code to digitalWrite (9,HIGH) and digitalWrite (9,LOW) and there is no difference. With pin 9 HIGH, 12V, with pin 9 LOW, zero V.

EDIT: something weird happened. I pulled the wire to pin 10 and suddenly I'm getting -12V (and the actuator extended), and then zero volts (actuator stays extended).

Assuming that you're driving your motor with 12V then it makes sense that you will see 12V on the output pin after this call:

analogWrite(9,255);

It also makes sense that you will see 0V after this call:

analogWrite(9,0);

Which part of this is unexpected?

HMM. Apparently pin 10 on my UNO is bad. I didn't know you could blow out just one pin. I put it on pin 8 and 9 and did digitalWrite for both ways and it worked well.

I find it hard to believe that it works at all, or ever has! and my not suprised that to have blown a pin and I think you about to kill a second one.

First provide a link to the accuator you are using.

Second provide a circuit diagram.

Normally when using an h-bridge the two pins are speed which you set using analogwrite and direction which is a simple digitalWrite.

Mark

PeterH:
Which part of this is unexpected?

Pin 10 is opposite, so if 9 is high or 255, it puts out 5 V and 10 is ground. IF 9 is low or 0, pin 10 is high (5V). That's how the H-bridge reverses the motor.

It works now. I just used different pins.

holmes4:
I find it hard to believe that it works at all, or ever has! and my not suprised that to have blown a pin and I think you about to kill a second one.

First provide a link to the accuator you are using.

Second provide a circuit diagram.

Normally when using an h-bridge the two pins are speed which you set using analogwrite and direction which is a simple digitalWrite.

Mark

Not sure I follow you. H-bridge IC is TLE5206

http://www.infineon.com/dgdl/TLE5206-2_DS_11[1].pdf?folderId=db3a30431b3e89eb011bb632994f065b&fileId=db3a30431f848401011fc753a71779a7&ack=t

The 12V never sees the UNO, the UNO is powered by my USB cable. The 5206 uses two input pins and PWM to determine speed. Polarity determines direction. I do not have any resistors in the circuit. Is that why the pin blew (I figured it was because of my clumsy fingers with the multimeter probe)?

Here is a really bad schematic:

Here you go, from the datasheet of the H-Bridge:

Ok i see (I think). From the data sheet (see also the truth table in section 1.6

  1. Simple CW/CCW-Control
    For low-cost application simple CW/CCW-Control without any speed regulation is
    recommended. A low-speed two-line interface is sufficient for the brake low,
    clockwise, counter clockwise and brake high command.
  2. Sign/Magnitude Control
    For this mode two ports with PWM capability are necessary. Motor turns clockwise
    (current flows from OUT1 to OUT2; means: OUT1 is switched HIGH continuously and
    OUT2 is PWM controlled.
    To achieve motor counter clockwise turning change input signals to:
    IN1 = PWM; IN2 = H.

So for "forward" it should be

analogWrite(pinA,speed);
digialWrite(pinB,High);

and strangely

analogWrite(pinB,speed);
digialWrite(pinA,High);

Note that current flows fron out1 to out2 when going in one direct and from out2 to out 2 in the other. This will affect where you take your voltage reading! and explains why you got 0 volts.

Mark

No, I got zero volts because pin 10 was dead. I have it on two different pins with the exact same code and now I get 12V one way and -12V the other, just as I should.