Show Posts
Pages: [1] 2 3 ... 5
1  Development / Other Hardware Development / Re: Proto Board Dimensions needed: DXF - PDF - PCB-ST on: March 05, 2014, 01:27:40 pm
Another approach is to use the free version of Eagle. Then use the Eagle files that are in the products area of this website for your Arduino.

Once you are in the Eagle file, you can print to your PDF printer.

If you google arduino uno dimensions; you will find various dimension schematics. There are different versions of the boards, and sometimes the mounting hole arrangements changed, so double check.

2  Using Arduino / Project Guidance / Re: Counting Pulses on: February 06, 2014, 02:51:49 pm
Without understanding your problem completely...

Can you use an interrupt pin and increment a counter each time your sensor is FALLING or RISING?

As far as your sketch goes, what if you declare:
unsigned long count = 0;
3  Development / Other Hardware Development / Re: Arduino PCB Shield Design Tips on: January 15, 2014, 11:13:20 am
This is a link to another thread.

There is a video there, might help explain what my project is.
http://forum.arduino.cc/index.php?topic=173325.msg1438425#msg1438425

Questions?
You can see my PCB has resistors, capacitors, a reset button, power block and mostly connectors.
Connectors are generic arduino male and female and some polarized, male, shrouded board to wire connectors.

Could I buy something like this assembled? In a small quantity (25). If yes, where? It's a simple shield and really just used to simplify and make a wiring mess more reliable. Then it could be all surface mount resistors! Then it is really a question of what is my time worth to solder all those pretty striped things... It takes about an hour for me to solder a shield.

Even if some of it assembled would be worthwhile. For example those smooth, striped, colorful tubes of resistance. So, question is, what on my PCB is a problem for assembly businesses?
4  Using Arduino / Programming Questions / Re: Copy a STRUCT record to SD ? on: January 13, 2014, 09:52:45 pm
PaulS,

My question was off topic. I just thought you are PaulS - after all. And I don't know about hair or lack of such.

 smiley-cool

That last & did help my sketch to compile and I was able to save something to SD. And as you said, reading such a binary file was not something I can easily do.

I'm not sure how to mark this thread solved?

Thanks !!!
5  Development / Other Hardware Development / Re: Arduino PCB Shield Design Tips on: January 13, 2014, 09:41:05 pm
Crossroads,
That picture doesn't look like a shield. It looks like a standalone PCB. But I can't see the bottom.

Doesn't really matter for this topic though, it looks like you know what you're doing.

Same can be said for greynomad's board, yikes! That is "heavy duty".
:-)


6  Development / Other Hardware Development / Re: Arduino PCB Shield Design Tips on: January 12, 2014, 07:59:14 pm
Quote
Hire a professional
I second that, given that I'm one of those professionals smiley

Trouble is everyone seems to think because electronics is fun the "professional" should design the Steve Jobs wannabe's project for the love of it.

If I'm going to work for naff all I'll work on my own dream.

_______
Rob



I'd enjoy reading your tips! If I came to you for a shield, what could I do that would help you? What experiences have you had with Arduino PCB shields that you can share? Is there somewhere on this site (or elsewhere) where one can contact professionals for their services?
7  Development / Other Hardware Development / Re: Arduino PCB Shield Design Tips on: January 12, 2014, 07:54:06 pm
Quote
B.   Hire a professional (like Dr. Liu at Inmojo.com) to design your Shield, based upon your requirements. You will end up saving time and money without a painful, learning curve.
Quote
I have not designed any PCB shields. I commissioned a few.
Huh.  Can you go into more details on how this worked, and how much it cost?  I mean, it's not "bad" advice, but in my experience "higher a professional" is usually MUCH more expensive than most Arduino-class users expect, unless you can somehow convince them to do it "for the good of the open source community" or something.

Quote
C.   If you start your shield design with the sparkfun mega shield file, make sure you move...
Maybe you should just find a starting point that isn't broken.

Quote
C.   Limit your Shield size to common PCB sizes e.g 5cm x 5cm; 10cm, etc. Check with your PCB manufacturer for size / price breaks.
The "normal" Arduino shield size (about 55x70mm) is a bit unfortunate in that respect!



Thanks for the tips and for reading!

I can share more information. I commissioned a shield for the MEGA. Not incredibly complicated. I'd attach a picture but the upload folder is full?

Hiring a professional - $300. Revisions because MY original circuit didn't work as intended. $200.
Compared to buying the hobby version of Eagle @ $169 and learning that software and lots of trial and error.

I did search before posting this thread to try and find tips on designing a shield PCB for the Arduino. My comment about the sparkfun shield is based upon issues with mounting hole alignment. Again, I didn't design my shield. Just noted that it's worthwhile to check for the appropriate board revision.

I still think it's a good tip but really am hoping for MORE TIPS.  smiley
If one does go to a professional? What is the best way to get the most bang for the dollar? In my case, my breadboard circuit had flaws. I tested it with what I thought was a realistic scenario but should have used the ACTUAL devices I was trying to interface with. I know that doesn't make much sense.

My PCBs were purchased from Seeedstudio.com and their price breaks are based upon 5 cm increments. I definitely could have stated that more clearly. Other PCB manufacturers base their pricing differently.
8  Using Arduino / Programming Questions / Re: Copy a STRUCT record to SD ? on: January 12, 2014, 06:32:47 pm
I do appreciate the help.

Compiler didn't like that either...

Error is:
invalid cast from type 'previousgame' to type 'unit8_t*'

Unrelated question? Are you person that makes the teensy?
9  Using Arduino / Programming Questions / Re: Copy a STRUCT record to SD ? on: January 12, 2014, 04:08:11 pm
I was going to do it almost exactly as Paul did it, but lose the String:

Code:
struct previousgame { 
  byte PreviousGame;                 // 1 or 2
  byte PreviousGameNumberOfPlayers;  // 1, 2, 3, or 4
  char PreviousPlayer1Name[13];      // <= 12 characters + null termination char
  char PreviousPlayer2Name[13];      //         "
  char PreviousPlayer3Name[13];      //         "
  char PreviousPlayer4Name[13];      //         "
  int PreviousHS1;                   // <= 9999
  int PreviousHS2;                   //    "
  int PreviousHS3;                   //    "
  int PreviousHS4;                   //    " 
}
previousgame; // Creates a record

int recordSize = sizeof(byte) * 2
                 + sizeof(PreviousPlayer1) + sizeof(PreviousPlayer2)
                 + sizeof(PreviousPlayer3) + sizeof(PreviousPlayer4)
                 + sizeof(int) * 4;
                                 
// some code...

myFile.write(previousgame, recordSize);

Paul's solution also does away with the recordSize calculation.

This didn't compile for me:

Here is the code I used...
Code:
   int recordSize = sizeof(previousgame.PreviousGame) + sizeof(previousgame.PreviousGameNumberOfPlayers)
      + sizeof(previousgame.PreviousPlayer1Name) + sizeof(previousgame.PreviousPlayer2Name)
        + sizeof(previousgame.PreviousPlayer3Name) + sizeof(previousgame.PreviousPlayer4Name)
          + sizeof(previousgame.PreviousHS1) + sizeof(previousgame.PreviousHS2)
            + sizeof(previousgame.PreviousHS3)+ sizeof(previousgame.PreviousHS4);

    // some code...

    myFile.write(previousgame, recordSize);


Error was:
no matching function for call to 'File:write(previousgame&, int&)'
10  Using Arduino / Programming Questions / Re: Copy a STRUCT record to SD ? on: January 12, 2014, 03:54:43 pm
Quote
I don't understand how to write it in binary to the SD...
Code:
myFile.write(previousgame, sizeof(previousgame));

This didn't compile for me:
Error is:
no matching function for call to 'File:write(previousgame&, unsigned int)'
11  Using Arduino / Programming Questions / Re: Copy a STRUCT record to SD ? on: January 12, 2014, 12:56:34 pm
OK, Thanks.

If you have time to walk through the steps in general terms, I don't understand how to write it in binary to the SD...

CW
12  Using Arduino / Programming Questions / Copy a STRUCT record to SD ? on: January 12, 2014, 10:54:50 am
I'm trying to write to SD a struct record.

Code:
struct previousgame { 
  byte PreviousGame; // 1 or 2
  byte PreviousGameNumberOfPlayers; // 1, 2, 3, or 4
  String PreviousPlayer1Name; // <= 12 characters
  String PreviousPlayer2Name; // <= 12 characters
  String PreviousPlayer3Name; // <= 12 characters
  String PreviousPlayer4Name; // <= 12 characters
  int PreviousHS1; // <= 9999
  int PreviousHS2; // <= 9999
  int PreviousHS3; // <= 9999
  int PreviousHS4; // <= 9999 
}
previousgame; // Creates a record

void writepreviousgametoSD() {
myFile = SD.open("newprevi.txt", FILE_WRITE);
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to newprevi.txt...");

// Here is where I'd like to write to SD the record previousgame

    // close the file:
    myFile.close();
    Serial.println("done.");
    // if this was written successfully:
    // delete previous back up file
    // rename old file
    // rename new file   
  }
  else {
    // if the file didn't open, print an error:
    Serial.println("error opening newprevi.txt");
  }
return;
}


I can write the record one variable at a time but wondered if there was a better way.
Here is what it looks like writing one at a time:
Code:
myFile.println(previousgame.PreviousGame);
myFile.println(previousgame.PreviousGameNumberOfPlayers);
myFile.println(previousgame.PreviousPlayer1Name);
myFile.println(previousgame.PreviousPlayer2Name);
myFile.println(previousgame.PreviousPlayer3Name);
myFile.println(previousgame.PreviousPlayer4Name);
myFile.println(previousgame.PreviousHS1);
myFile.println(previousgame.PreviousHS2);
myFile.println(previousgame.PreviousHS3);
myFile.println(previousgame.PreviousHS4);
13  Development / Other Hardware Development / Re: Arduino PCB Shield Design Tips on: January 10, 2014, 03:07:46 pm
Thanks Crossroads,

I thought I spent a lot of time searching for tips on how to design a PCB shield for an Arduino on this site and other sites and didn't really find much information; I thought this might be the appropriate forum and do appreciate your feed back.

Any other tips?

To answer your question, I have not designed any PCB shields. I commissioned a few.
14  Development / Other Hardware Development / Arduino PCB Shield Design Tips on: January 10, 2014, 11:28:41 am
Just wanted to share my thoughts.

Please share your comments, advice and suggestions.

Arduino PCB Shield Design Tips

January 10, 2014

There are a lot of “Proto” Shields available. Proto Shields are useful for prototyping many different circuits but not very useful for creating a custom PCB Shield for a specific, dedicated purpose. Proto Shields are flexible, by design, and support a variety of uses. The same flexibility that is a strength for a Proto Shield is a weakness for a specific purpose, dedicated Shield.

 If you are designing your own Shield to accomplish a specific dedicated purpose, these are the tips, thought of to date, in order of priority:

I.   Shield Tips
A.   Verify your circuit design and arduino sketch with breadboards before you design a Shield! Use more than one breadboard if needed. Finalize your software and test your circuit design with the actual items your circuit is interfacing with.
B.   Hire a professional (like Dr. Liu at Inmojo.com) to design your Shield, based upon your requirements. You will end up saving time and money without a painful, learning curve.
C.   If you start your shield design with the sparkfun mega shield file, make sure you move the bottom left mounting hole 0.05 inches to the left to make it 3.25 inches to the left of the bottom right mounting hole. Arduino team went from 3.20 inches for MEGA1280 (sparkfun designed it) to the 3.25 inches for MEGA2560 (Arduino team designed it - ? -). Check for board revisions as well; e.g. UNO R3
D.   Place a power block on your Shield to power the Arduino; this could be used for a hardwired connection to your Arduino / Shield in case the Arduino power jack is covered or in some cases, just for convenience. Your Shield could also have an inline fuse.
E.   Proto Shields typically have strips of 5V pins and ground pins. If the devices on your circuit are using a lot of power; consider powering your devices with a separate power supply and provide a separate power path on your Shield for your devices. Sharing a ground is usually a good idea. Allow for another power block or use an additional female power plug similar to the Arduino. Don’t exceed the recommended power rating of your Arduino.
F.   Don’t place Shield connections near the Arduino’s USB connector, power connector. You can add the dimensions of the USB connector and power jack (and other stuff you want to avoid) to the “keepout” layer (as polygons) in EAGLE to remind yourself to avoid these locations. This works very well if you want to hang parts below your shield design to save space (not recommended – especially near male header pins e.g. ICSP).
G.   Place mounting holes in your Shield that correspond with the location and size of the mounting holes in your Arduino. Use the outer most four holes; if you can’t place holes in all of the Arduino’s mounting hole positions. Use nylon (plastic) mounting hardware to avoid contacting metal to your Shield or metal to your Arduino.
H.   Make your Shield larger than your arduino and place your device connections on the outer edges. It is easy to place male pins DOWN from your Shield into your Arduino and then to solder these DOWN pins. These DOWN pins will be perfectly aligned. It is more difficult to use long pin, female headers. The long pin, female headers need to be held in place (upside down) to solder and it is difficult to assure the pins align with the Arduino. The long pin female headers use flat pins instead of the square pins on male headers and don’t “fit” as snugly as the male pins. One set of Arduino pins to consider for a long pin, female header is the Arduino header with VIN, GND, 5V, 3V3, RES. On the MEGA R3; this would be an 8 position, long pin, female header. One way to stabilize female headers with long pins (for soldering) is to stack another shield above the female headers you want to solder.
I.   Place shrouded or short pin, female headers on the top of your Shield for your device connections. Your devices would then use male pins that are inserted into these female headers.
J.   Provide a reset button on your Shield.
K.   Provide an ICSP header on your Shield. Place a text dot at pin 1 on your Shield just like the dot on your Arduino’s ICSP header.
L.   If your circuit has a lot of resistors, capacitors or other components soldered directly to the Shield, try to place devices with the same value near each other, so that there is less possibility of mixing up values.
M.   Avoid using specialized Arduino pins - if at all possible. For example: if your Arduino application can use pins 8 and 9 instead of 0 and 1, it is better to avoid using pins 0 and 1. Examples of specialized pins abound on the Arduino: Serial pins, Analog pins, Interrupt pins, ICSP pins, SS, or other pins that official Arduino shields and popular shields use such as pin 4 and 10 for SD card and Ethernet/wifi chip select (or 10 for SD select for adafruit and 8 sparkfun shields) and 7 for Arduino wifi shield handshake etc. (e.g. if other pins are available; don’t use the MOSI pin to drive a LED).

 II   Wiring Tips
A.   Use pre-crimped wires and connectors (like those available from Pololu.com) to connect your devices to your Shield. This is assuming your devices can not be soldered directly to your Shield. These wires and connectors are not polarized but do fit snugly onto or into generic Arduino connectors.
B.   Use prefabricated cables (like those available from Digikey.com) with polarized connectors and use different number of positions for different connectors. For example: if three of your devices are three differently colored LEDs with two wires each; contrast 3 two positions connectors versus 1 six position connector. The 1 six position connector is more likely to be disconnected and reconnected properly as compared to 3 identical two position connectors. If each of your devices has a different number of positions; there is less confusion when disconnecting and reconnecting. It is ok to use an eight position connector and to only utilize six positions; if that helps avoid confusion.
C.   If your Shield does use identical, non-polarized connectors: use a paint marker pen to color code one end of each connection. Mark both the male and female connector and/or place a colored paint dot on your Shield’s PCB. Use different colors for different connectors. The color coding will aid in distinguishing one connection from another and by simply lining up the “painted” ends, polarity can be maintained.

III   Other
A.   If your Shield has room; bring up every unused pin to headers. For example if pins 0 through 7 are not used in your application. Use male headers DOWN from your Shield into your Arduino for those pins. On your Shield; bring UP a short pinned, female header for those same pins, on the edge of your Shield. In this example; you could use 1 two position UP header for pins 0 and 1 and 1 six position UP header for pins 2 through 7.
B.   If your Shield has room; locate a header of grounds. And if there is even more room; locate a couple of power headers (5V & 3.3V)
C.   Limit your Shield size to common PCB sizes e.g 5cm x 5cm; 10cm, etc. Check with your PCB manufacturer for size / price breaks.
15  Using Arduino / Storage / Re: Additional storage for mega 2650 on: January 07, 2014, 01:48:07 pm
 smiley-wink

Small attempt at humor... you are Musicboy, must need SD to play music...
Pages: [1] 2 3 ... 5