In this design of all-in-one microcontroller board the purpose is to be more functional than Arduino, after about 100 hours of design I have decided to share it with the community, I hope you appreciate the effort and support it (Any questions or information will be welcome).
Step 1: Objectives
any project there are different needs: sensors, actuators and calculation, the most economical way is with a microcontroller like any Arduino, in this case I use one of the PIC16F range Microcontroler since I am better familiar.
The PIC16F1829 info:
Internal 32 MHz
UART or USB interface (ch340)
SPI or I2C x2
Timers (8/16-bit) x4 x1
10-bit ADC x12
I / O's x18
and many more things (info in datasheet)
There are different packages but when make a non-handmade PCB production the smallest one is also the cheapest
Step 2: Upgrades for MCU
the microcontroller needs a capacitor and a Hardware configuration for the reset pin, but is not enough
- Power Supply Circuit
- Hardware Upgrades
- Human Interface
- Pin Configuration
Step 3: Power Supply Circuit
- antipolarity protection of Power Supply (MOSFET-P)
I take advantage of the internal diode of the mosfet to drive and when that happens Gate Voltage is enough to have a very low RDSon link_info
- voltage regulator (VCO)
typical regulator i use LD1117AG and pakaging TO-252-2(DPAK) same to lm7805 but cheaper and LDO
- typical capacitive filters (100n)
- Fuse for USB power
to prevent more than 1A
- Ferrite filter for USB power
Step 4: Hardware Upgrades
for general purpose i decide to add:
- Soft-Start Reset
if other things are controlled, With a delay in the initial reset it does not start the microcontroller, after powering and stability the voltage are secure to control other things
the reset pin is denied, this resets the MCU when it is 0V, the RC circuit (capacitor resistance) makes the pulse longer and the diode discharges the capacitor when VCC is 0V
- N-Channel Mosfet AO3400A
because a standard microcontroller can not give more than 20mA or 3mA per pin plus the power limits the total consumption to 800mA and mosfets can use 5V to 3.3V conversion comunication.
- OP-AMP LMV358A
to amplify very weak signals, outputs with low resistance and instrumentation to sense current, etc ...
Step 5: Bootloader
the bootloader gives to write an instructable, but in summary its function is to load the program.
in the Arduino One for example there is another microcontroller with native USB support, in the case of all PICs the bootloader is the PICKIT3 even if we have the CH340C (it will not be bootloader, it will be USB to Serial microcontroler called UART).
PICKIT3 -> bootloader via ICSP (In-Circuit Serial Programming)
CH340C -> Serial USB communication
all is in development, but bootloader works.
Step 6: Human Interface
- USB suport
the CH340C is a embeded USB to Serial converter
Standart Configuration of serial at 9600bauds, 8bits, 1 stop bit, no parity, least significant bit sent first and non inverted
- Reset Button
implemented in Soft-Start Reset circuit to reset the microcontroler, but the ICSP RST prevail
typical 10k to pull down in output pin's
- 3mm blue leds x8
5V - 2.7 Vled = 2.3 Vres
2.3 Vres / 1500 Rres = 1.5 mA ( you can get more brightness )
2.3 Vres * 1.5 mA => 4 mW ( less than 1/8W )
Step 7: Pin Configuration
The solution whith a little space, is to indicate the pin layer and solder them parallel to the board, double row pins and the corresponding thickness of the board, similar a pci express connector
but the typical center pin to pin is 100mils = 2.55mm
the distance is aprox 2mm = 2.55 - 0.6 ( pin )
also the typical thickness of the board is 1.6 that's okay
this is an example with 2 boards of 1mm
Step 8: The End
Each part that I have integrated has been tested separately with other components (TH) and prototype version, I designed it with the easyEDA platform and ordered in JLC and LCSC (so that the order comes together first you have to order in JLC and once ordered with the same session you do the purchase in LCSC and added)
It is a pity that I do not have any photograph and I have not been able to prove it together, for the time it takes the order to china and make all the documentation, but it is for the following instructables since it covers the general design here,
Any questions you can leave it in the comments.
And this is it, when the order arrives I will solder it, try it together, report the issues, update, documentation, program, and probably make a video.
thanks, goodbye and support !