Schematic error in Motor Shield?

Hello -

In the schematic .pdf linked from
http://arduino.cc/en/Main/ArduinoMotorShieldR3
I see what appears to be a discrepancy between the symbol and the IC type.
The IC that’s called out is a 4077D, a quad XNOR gate chip, but the symbols show NAND gates.
The XNOR would make sense, as the controlling brake input being pulled to 0 would correctly drive the DIR# to its complement and setting the brake input would work; a NAND gate would not do this.
Could someone clarify this ?

Thanks.

  • Laurie

I'm guessing you found some archaic datasheet that uses the term XNOR for an OR gate that inverts the inputs before OR'ing. Today that is called a NAND gate: an AND gate with an inverted output. They are the same thing:

A B not-A||not-B not(A&B) 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0

Thanks for your help! Actually, what I'm reading is the Arduino schematic that sure look like NAND gates to me. Looking again, I see an 'e' inside the gate symbol; that notation is new to me. But an XNOR, which is realized by the 4077 would be the inverted output of an XOR:

A B A(xor)B invert 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1

The logic of the schematic appears correct if one abides by the 4077 designation. It's what looks like a NAND with an 'e' that looks funky.

I guess the 'e' in the middle and the input leads extending across the body is supposed to signify "exclusive or". I was able to find one other page on the net that uses that type of symbol: it's used for a 4077N gate and without the output inversion for a 4070N gate: http://electro-music.com/forum/topic-52066.html It looks like the schematics there were generated by the same unnamed program.

Wow - good detective work!
Prolly time for me to play with Eagle.
Thanks!

  • Laurie

Yes, it is an error. The schematic clearly shows a NAND gate. A 4077D is an Exclusive NOR Gate. Now that I now this, I can update my code accordingly so I can get my stepper motor to work correctly.

Since this board is supposed to be able to drive stepper motors, they should bring out DIRA# and DIRB# to some unused header pins. This would make trouble shooting for new users much easier.

Thanks, AnAnalyst, your comment just made me understand what I'm running into.....I think. I'm trying to use a 4-wire stepper motor with this shield, along with the Stepper library. I'm starting to think I can't use the library here to instantiate using the 4-pin constructor. It would need to be instantiated with dirA, dirA#, dirB, and dirB#, but, as you stated, since dirA# and dirB# aren't brought out to pins, that presents a problem. Instead, I'm resorting to using digitalWrites on dirA, dirB, brakeA, and brakeB.

4-pin constructor from the Stepper class: Stepper(int number_of_steps, int motor_pin_1, int motor_pin_2, int motor_pin_3, int motor_pin_4)

Here's what I've worked out. Let me know if I'm remotely close here. Since both dirA and brakeA are used as inputs in the XNOR 4077d to get dirA#, I need to toggle brakeA accordingly (based on dirA), to get the proper dirA#. So, here is a sequence to drive the stepper, showing the input needed to the L298P.

Input to L298P dirA dirA# dirB dirB# 0011 0110 1100 1001

But since I don't have direct access to dirA# and dirB# as inputs, I have to use brakeA and brakeB through the 4077d's. So based on XNOR, this would be the corresponding sequence to achieve the above input to the L298P.

Pin settings to achieve above input - XNOR dirA brakeA dirB brakeB 0011 0010 1101 1000

So in this case, I should be able to set dirA, brakeA, dirB, and brakeB in this sequence, correct? That will give me the proper input to the L298P? If this isn't correct, please let me know how you will update your code to get your stepper working correctly.

Thanks!