Hi, I am looking to use an Arduino mega in such a way that I want it to have its pins (not pin holes) sticking out the bottom so that it can socket into another, larger PCB. The other, more important thing I am looking for is one with an offboard program loader. Since, in my specific use case, the board itself is going to be in a rather tight area and having the ttl conversion happen on the host PCB, as apposed to the mega would be really helpful for space saving. Lastly, in my (admittedly specific) case, I need to be able to load programs onto the Arduino using either usb or rs232. Does anybody know of a way to do this, or maybe tweak the PCB of the mega somehow to support this?
If it would be too much of a hassle to remove the ttl converter from the board, is there at lease a way to load programs onto the chip using rs232. (optimally without a usb->rs232 converter), maybe with something like aa max232?
ok, that looks pretty good. only a few questions,
1: would I be able to program it with rs232 using a max232 to one of ttl ports, or would i need to do the "reset button dance" that some people said I need to do to get ttl serial programming working.
2: would it be possible to get a footprint of the pins or something that I could put into some kind of pcb design software, since I want to make the larger host board have all the the pin holes to be able to socket this board without any soldering.
3: what is "dtr enable" and "ftdi header" that were mentioned in the listing for this board? (sorry I am a bit of an idiot)
4: since this one doesn't have any kind of usb port baked in, is there still a way to send data to a usb port on a PC (maybe using some of the digital pins?
5: is there a documentation anywhere that would give a bit better pin labeling when working to design the host board in kicad or something?
(1) and (3)
The communication for an upload via serial requires 3 signals; obviously TX and RX but also DTR; this line connects to the reset pin of the micro (see original schematics for Uno and Mega) so the boot loader is activated when a serial connection is opened.
Note that factory 2560 processors don't come with a boot loader; you'll have to burn that via the SPI pins and a dedicated programmer (an other Arduino can be used for that) first; you can also directly load your program via the SPI pins (again, see the original schematics).
(4)
How were you planning to use the MAX232; sounded to me like that would provide the interface to the computer.
I am planning to use MAX232 as an interface to the PC (thank god for com headers still being on motherboards) however, I don't see the dtr header on the max232, so I assume I would be wiring that pin directly from the rs232 port. However wouldn't the dtr from the rs232 serial port be transmitting 12v, which would kill the board?
I want to use the max232 both for programming, a computer interface (for serial println output and stuff) as well as potentially for the computer sending commands to the device while the code is running.
as for not having the bootloader, I know. I am trying to get my parallel port programmer to work so i can do that but it is being really finicky, not sure if you could help with this
On my board, there are two dedicated headers, one for ICSP that is used to bootload the chip and set the fuses, or program it via Upload Using Programmer, that is the 2x3 gray cable in the picture
and the FTDI header, for connecting a USB/Serial adapter, that is the red adapter board in the picture, for serial downloads.
Serial downloads require the DTR connection on the serial port to reset the board and start the downloader.
If you connect a MAX232 kind of chip for RS232 to Serial, then you'll have to play the reset button dance to make the reset happen at the right time if you are using the bootloader.
DTR Enable connects the DTR signal from the FTDI header. There may be times when you don't want the PC resetting the board, so you would the DTR enable jumper off.
I could certainly send you the more info on the layout. As you can see, it is simply a 15 x 15 grid on 0.1" spacing.
pins_arduino.h (13.0 KB)
Installing MegaCore to the IDE will also give you access to all pins.
I didn't put D0 to D85 type numbers on the board so prevent any confusion as to what mapping was used, at the time nothing had been standardized for the extra pins.
ok, thank you for the information. The DTR jumper sounds very useful, especially if I could wire it to a switch on the back of my device (that could also be connected to the dtr from the serial port) next to the serial port as like a "programming toggle" switch and just to confirm, all pins 0-49 can be used a simple digital IO pin
thanks for the spacing as well. Since it is uniformed I suppose, if I wanted to be really over the top I could make an AMD style socket with a retention arm lol.
ok, that looks good, I assume those would be more durable than the pin holes found on normal boards, for example, the UNO connections. And when implementing this socket into the pcb design, I would just want a bunch of holes 2.54mm spacing in the above mentioned layout. How wide should each pin hole be though?
Sorry if any of these questions are basic, I am very much a noob to pcb design so I just want to be sure I get everything right.
I also would like to have a socket for the iscp and dtr enable header if possible, what would be the spacing of those relative to the rest of the board?
Here is the info on the placements of the thru holes
Part
Value
Package
Library
Position (inch)
Orientation
ICSP
3x2M
2X03
SmartPrj
(1.78220005 1.294)
R270
JP1
M02PTH
1X02
SparkFun-Connectors
(1.722 0.184)
R270
JP2
M02PTH
1X02
SparkFun-Connectors
(1.822 0.794)
R90
U1
ATMEGA2560_DIP
ATMEGA2560_DIP
ATMEGA2560_DIP
(1.642 1.642)
R180
USB
FTDI_BASICPTH
FTDI_BASIC
SparkFun-Connectors
(1.822 0.584)
R270
Numbers are relative to 0,0 at the lower left corner.
If you use 0.039" for hole diameters, they will accept 0.025" square posts.
Review the diameter of the socket pins you select and see what diameter they need. For example, for 0.02" diameter pin you might use a 0.025" or 0.03" hole.
ok, this is good thank you, do you have a kicad object footprint/object for the SIP socket/socket pins? because I couldn't find ATMEGA2560_DIP in kicad objects or online, and I assume there is no kicad footprint for it
from what I can tell, no, but there are some online tools that can supposedly convert eagle to kicad are there any universal libraries that would be just the single per pin SIP sockets?
If so, what sized pins do you recommend I have socketing into the socket (I was thinking 0.03" round pins?)
*I assume eagle is better and easier to work with, but I don't think I could afford it
Any tool can be easy to work with, with enough practice. I've been using Eagle since late 2010, and had used other schematic capture only tools before that (futurenet back in the late 80s early 90s).
Pretty sure you can create your own symbols in Kicad. I don't know it well, it seemed too toylike for me without the hard connection between electrical symbol and board footprint that Eagle enforces.
In Eagle, you start with the schematic, and the board file is created from there with the footprints for you to place and then route the schematic connections. Traces to be made are shown airwires that disappear as nets are connected, either with the autorouter, or manually.
well an autorouter does sound nice, especially since the pcb I am making will involve a 105 keyboard which I'm sure will be a joy to wire by hand... I see that kicad allows the creation of custom symbols. To make the symbol for just one of the SIP socket pins would I make a 0.1"box with a 0.025 hole in the middle?
In terms of pin size, what do you recommend for the board you have? (note that I will be soldering by hand, so pins that are nearly the same size as the holes in the board would be best)
Yes, 0.1" box with 0.025" hole for the machine sockets would be okay.
I think I these as pins in the board.
Larger side goes in the board, smaller side goes into the machine socket.
Ok, so the pins you just linked would go into the socket you linked a while ago then?
by larger side goes in the board, I assume you mean the ticker side, not the longer side, right?
would the sizing of 0.019" pins in 0.025" holes provide a certain amount of tension in the socket, so the board wouldn't fall out if the host board were to be upside down or something?
and lastly, in relation to 0.024" pins that will be soldered to the board, how big are the holes in the board? since I don't want some pins to be offset in the hole
Yes, the smaller diameter pins go into the sockets, the larger diameter pins go into the 2560 board.
The holes are sized to accept 0.025" square posts.
The larger round pins fit nicely, the smaller diameter plugs snugly into the machine sockets.
This picture shows the 3 types.
Ok, I understand. Now I just have to get to designing the board, which will be quite a learning experience for me. I'm having a real hard time understanding footprints Vs symbols and the difference no between the PCB designer and circuit designer. I also have to figure out where and how to connect an SDL 6 port to run xt protocol as one of the board functions.
If you have any tips for designing the board or circuits surrounding this, please let me know:)
Ok, other programs may be different, here is how Eagle does it:
Each part that is used has a library (.lbr file) that captures what it is:
The electrical Symbol. That is the part you see on a schematic.
Here is one I made for a N-channel MOSFET
The circles are the pins that get connected to other symbols. Those connections are called nets. For example, all the VCC connections would be made and called the 5V net. If you ran a netlist report, the 5V net would list all the pins on all the devices that were connected to 5V.
Next is the Package, or Footprint, of the physical device. If you right click on a pad, you will see its properties: name, layer of the board it is on, size, etc. This is the part you see on the board layout.
A library may consist of several parts. I can not keep track of what inside different libraries, so I make each part its own library.
Now, when you start a schematic, you open the library for a part, select a part,
and the symbol gets added to the schematic, and the package gets added to the board. As connections are made in the schematic, airwires show up on the board that need to be routed.
Here is an example of 2 MOSFETs with some schematic connections; I routed one on the board, and left the other as an airwire.
I have tried working boards that were made in Kicad and needed changes. I finally gave up and redid them in Eagle because whoever created them in the first place did not understand the need to map the schematic to the board, so changes made on one did not show up in the other, so documenting what was done became impossible.
So before I retired as an Electrical Engineer, I would create the schematic, the Mechanical Engineers would create all the footprints, and a PCB engineer would tie them together and make all the connections on the board, which I would then review for completeness, bring up any routing concerns, like clock lines running too close to sensitive data lines or something.
Now, I do all three. Create the schematic, layout the parts, make all the connections, use the error checking tools to make sure there are no open connections, no traces overlapping, nothing too close to the edges of the board, any marking like names are correct, legible, and not going to overlap vias or other holes in the board, etc.