Friday, 13 January 2012

Not enough pins! (MEGA Screwshield)

After connecting up the ultrasonics and IR sensors to the board I started looking into how many I/O pins I had left on the Arduino Duemilanove board. The VNH 5019 Motor shield requires 8 digitals and 2 analogue pins. This left 6 digital pins and 4 analogues, of which 3 ultrasonics needed 3 digital pins and the IR sensor an analogue, not much room for expansion!


Something bigger and better was needed....the MEGA :) 54 digital pins and 16 analogues should allow plenty of expansion!




While playing about with the motors I realised that just pushing wires into the Arduino headers wasn't a great solution, any slight knock/bump and they'd fall out. While Screw Shields are common for the standard Arduino's I couldn't find one on the market for the Mega.

Setting about designing one I realised a small design issue with all Arduino's. The digital pin headers between Digital 10/9/8 and the next header 7/6/5/.. is a distance thats not a standard strip board pinout. All the other headers line up with a strip board apart from these two.


As I was planning on still using other shields, I just cut a section out. I didn't bother with bringing VCC and RESET pins into screw headers and originally planned to duplicate the 5v / 3V / GND pins on both sides of the shield however couldn't think of a tidy way of doing it. Not all pins are taken to screw terminals but this should give me enough I/O (famous last words!).



As I wanted to bring some analogues out to screw headers I kind of lost the space needed to bring both rows of digitals out.


All mounted, just needing the sensors wiring in then I can finally start programming something useful.

2 comments:

  1. my brother is crazy about these things. How you did the coding, please post the whole instruction to me. Thanks.

    Arduino

    ReplyDelete
  2. Still working on the coding for this. At the moment I'm using the VNH5019 example code, along with the Arduino PING tutorial as a basis.
    Just spent the weekend creating a function to use all 3 ultrasonics and I've added 2 Sharp IR sensors. Will hopefully put something up this week about them.

    ReplyDelete