PCB Design and more.questions to manufacture a product.

Hi all,

I am planning on manufacturing a product and I am looking to lower my fabrication cost by making my own PCB instead of using a Mega2560 inside my product.

I am wondering.. There is a file in Eagle Called Arduino Mega2560 and this is the board I use for my project. Can I erase everything I don't need from the design and expect it to work?

How will I program the microcontroller chip?

I am using 2 Hardware Serial from the mega, can I use a different microcontroller chip than the one used on the mega2560?

How do I program the PCB? (Firmware?)

I really appreciate all your inputs. meanwhile I will make further research on the subject.
Thanks You!

chris442:
I am wondering.. There is a file in Eagle Called Arduino Mega2560 and this is the board I use for my project. Can I erase everything I don't need from the design and expect it to work?

What is the file? We can't see the file that you have, so can't really give an accurate answer. I would say though, that by definition you can delete the parts you don't need and expect it too work- if it doesn't work then you have delete parts that you do need.

chris442:
How will I program the microcontroller chip?

By using some sort of ISP programmer to program the microcontroller. Normally people put a 2x3 pin programming header on their boards (just like is on the Arduino) to make it convenient to plus a programmer in. You can either use the programmer to burn the Arduino bootloader and then program over the Serial connection like you do with a normal Arduino, or just use the programmer to upload code each time you need to change it.

chris442:
I am using 2 Hardware Serial from the mega, can I use a different microcontroller chip than the one used on the mega2560?

That depends on what other hardware requirements you have. There are certainly other microcontrollers that are compatible with the Arduino IDE and have more than one serial port.
[/quote]

chris442:
Hi all,

I am planning on manufacturing a product and I am looking to lower my fabrication cost by making my own PCB instead of using a Mega2560 inside my product.

I am wondering.. There is a file in Eagle Called Arduino Mega2560 and this is the board I use for my project. Can I erase everything I don't need from the design and expect it to work?

How will I program the microcontroller chip?

I am using 2 Hardware Serial from the mega, can I use a different microcontroller chip than the one used on the mega2560?

How do I program the PCB? (Firmware?)

I really appreciate all your inputs. meanwhile I will make further research on the subject.
Thanks You!

By definition you can remove everything you dont 'need'.

An ATMEGA2560 can be put down on a board as a 'bare bones' Arduino, you just need a regulator circuit for the power, a crystal, some capacitors and the circuit to plug in an external serial adapter.

Designing products suct as this is not an A,B,C tutorial, and some of your questions suggest you dont have a lot of experience in this area ..................

chris442:
I am planning on manufacturing a product and I am looking to lower my fabrication cost by making my own PCB instead of using a Mega2560 inside my product.

How much are you currently paying for the Mega2560 inside the product ?

Hi, I am paying 65$ for the Mega but I seen some on banggood for 8$/ unit

I do not have any experience at all but I am determined to learn. This is my first project and I will have many more coming.

I have two tf mini sensor measuring distances and 10 LED's, and 2 piezo. That's it.

Start sketching out a schematic diagram of your circuit and get that reviewed (here) to ensure that any components you buy are relevant to the final design.

You could probably drive the Leds by shift registers, then you may not need such an expensive MCU.

Edit:

I've just found this regarding the 2 Serial ports:
https://learn.sparkfun.com/tutorials/tfmini---micro-lidar-module-hookup-guide#hardware-overview

You could get an I2C version which would allow multiple devices on the same bus, eliminating the requirement for multiple serial ports.

Thank you. I will look into it after work

https://forum.arduino.cc/index.php?topic=656464.0

There is my code. On the last page

Note that there are many other processors out there as well - the '2560 is so old that even Atmel doesn't show it in their product selector. If all you want is the extra Serial port, maybe the new ATmega328PB is enough. It has two hardware Serial ports and is much cheaper than the '2560. All supported well by the Arduino IDE, so very easy to switch between them.

Or drop down to the Atmega 328 which is used in the UNO and available as a DIL package , which if you are starting out, might be easier to build into a pcb.

You could use a socket , program up in a UNO , then swap the chip over into your new board

" the '2560 is so old that even Atmel doesn't show it in their product selector. "

Looks to me to still be listed, 25th line. Where did you look that you are not seeing it?

Some months ago I was looking in the parametric product selection guide, picking all the right parameters for pin count and Serial ports but it just wouldn't come up. Product page also still has issues: in the "parametrics" list it says operates at 1.8-5.5V, in the "summary" it says 4.5-5.5V (which I remember also seeing in the data sheet).

Anyway, based on OPs earlier thread the only reason they went for the Mega over the Uno or Nano was the need for two hardware UARTs, not the extra memory or other I/O. The ATmega328PB lists at the Atmel site for less than 1 USD each (significantly cheaper than the ATmega328P as used in the Arduinos - an upgrade to that line would be more than nice!), while the Mega2560 lists at over USD 8 each.