Using 4x4 driver board with Mega2560

Ok, so I got a Mega2560 and a 4x4 driver bard for x-mas in hopes to drive a BLDC motor with them. So, the first thing I do is to solder all of the connectors onto the board, only to find the board doesn’t fit onto the Mega2560 Arduino. I also noticed right off that the user manual states how to connect it using the 8-pin header to the SPI bus, but the signals which are listed out don’t match the signals of the Mega2560.

So much for the first bullet on the website states - “Arduino shield form factor compatible with all shield compatible Arduino variants and clones”. Seems like I ran across something which states it was designed for the Uno. I was hoping to piggy-back the board, but I am guessing that will be completely impossible. If it is possible, any help would be great - currently the pins don’t seem to line up at all…

Anyway, the 8-pin header pinout shows:

1 +5V +5V power for shift registers

2 SCK Serial Clock (positive edge)

3 GND Ground

4 MR Master Reset (active low)

5 DAT Data Return

6 LAT Register Clock (positive edge)

7 SOUT Serial Data Out (to next board)

8 SIN Serial Data In (from last board/host)

The question would be what pins do I connect them to on a Mega2560?

Thanks,

-Kevin

Read the manual.

Uh, right. Please don’t bother posting unless you have something useful to say. I have already RTFMed the user manual several times. Just plugging the daughter board on when it obviously doesn’t fit just doesn’t seem to work out. I compared the pinouts of the Uno to the Mega2560 to use the external connector, and I still don’t see how the signal names match up. I guess since I have read the users manual, and scoured both spec sheets, that I need to resort to the schematic to see if there is some hope that any of these signals except +5V, reset and ground match up.

Sorry, re-read your post again and it finally occurred to me that you were talking about the 4x4 board. Attached is the pinout.

The pin between Serial In and Serial Clock is the way you connect more 4x4 boards to the first one. So if you just have one board then you don’t need this one.

I cannot believe that the board isn’t labeled. Also, that the signal traces are not named in Eagle. This is just bad practice.

Thanks. Since the connectors didn’t mate up right, I figured I had to resort to the black EXP connector on the end, so I was trying to actually find the pinouts on the Mega2560 board which matched above, or any references which mention the SPI bus. I did a bunch of searching last night and found:

From http://www.arduino.cc/en/Main/arduinoBoardUno:

Revision 3 of the board has the following new features:

1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not connected pin, that is reserved for future purposes.

From http://arduino.cc/en/uploads/Main/ardui … ematic.pdf:

SCK is PB1

From http://arduino.cc/en/uploads/Main/Ardui … ematic.pdf"

SCK is PB5

From http://arduino.cc/en/Main/arduinoBoardMega2560:

SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.

So, I re-looked over the Uno/Mega2560 drawings, and wondered why they didn’t match better. This morning, when I looked over your post, matching the VCC and GND pins from your drawing, I made what was probably the twentieth time to re-mate the boards. Then I realized that if I skip the first two pins, the VCC and GND pins match up, as do the splits in the pins on both sides, and I was able to plug the two boards together! The way the 4x4 board is laid out (not sure if this is the same for all shields), the far-side pin connectors on the 4x4 board are identical to the near-side connectors of the Mega2560. I am glad I tried to re-fit the board (and had your post to reference), because I also had the idea at the very same time that I had soldered all of the connectors onto the wrong side of the board - I can’t recall if that was part of the instructions or not. That would have sucked to unsolder and re-solder all of the connectors only to smoke the board in the end…

Is the difference between PB1 and PB5 for SCK enough to make a difference in operation? Looking at the pin names seems to be a match, and the important stuff seems to mate up, so I am guessing the sample software files should point me to the right direction.

Anyway, thanks for the post - it jarred me into the right direction. I thought BTW, that it was funny in their documentation they have a copy/paste error naming pins “power supple” everywhere.

I thought BTW, that it was funny in their documentation they have a copy/paste error naming pins “power supple” everywhere.

I don’t think it’s a typo. You can run a lot of motors off this board and the different power supplies can power a wide range of DC motors. He used the DB-25 because the pins can handle high amperage. It seems funny that the same connector is meant for connecting the power supply to the board and for powering the motor. I, personally, don’t like the design of this board. It could have been much simpler with out sacrificing functionality.