This is version 2 of a Simple compact RS485 node with support FOTA
You can order PCB from PCBs.io - 4pcs for $4.65, black 1.6mm PCB
D7 pin used for control RS485 DE/RE input.
A2 pin used as CS pin of flash Winbond W25X40.
On long side of board present 11-pin header include:
On short side of board present two pin header include:
On bottom side of board present MISO, MOSI, and SCK for programming bootloader to ATmega328.
Present place to solder crystal oscillator, if you need stability of UART working on high speed.
Present place to solder pull-up resistors for RES, D2, D3, SDA, SCL signals.
It is also possible to install LED connected between D6 pin and 5V through 510Ohm resistor.
!!! Attention !!!
You must use 3.3V to power the node because of not need locic level shifting when connect flash W25X40
(i used MAX3485 and LDO LP2950ACZ-30 to power from 12V)
For FOTA used custom DualOptiBoot with A2 pin for CS of flash builded from source for ATmega328P, 8Mhz, 38400 UART speed for upload).
Fuse setting for DualOptiboot:
For test you can use TestNode_RS485_OTA
!!! Attention !!!
For correct work of FOTA with flash chip Winbond W25X40CLSNIG you need to use patched lib SPIFlash.h
Here is the correction of code:
#ifndef SPIFLASH_BLOCKERASE_32K
//#define SPIFLASH_BLOCKERASE_32K 0x52 //!< erase one 32K block of flash memory
#define SPIFLASH_BLOCKERASE_32K 0xD8 // need same as 64K
#endif
#ifndef SPIFLASH_BLOCKERASE_64K
#define SPIFLASH_BLOCKERASE_64K 0xD8 //!< erase one 64K block of flash memory
#endif
Place to solder crystal oscillator:
ID | Name | Designator | Footprint | Quantity | Manufacturer Part | Manufacturer | Supplier | Supplier Part | LCSC Assembly |
---|---|---|---|---|---|---|---|---|---|
1 | ATMEGA328P-AU | U1 | TQFP-32_7X7X08P | 1 | ATMEGA328P-AU | MICROCHIP | LCSC | C14877 | |
2 | Header-Female-2.54_1x11 | P1 | HDR-11X1/2.54 | 1 | Header-Female-2.54_1x10 | LCSC | LCSC | ||
3 | 100n | C1,C2,C6 | 805 | 3 | ? | ||||
4 | 10k | R1,R2,R3,R4,R5 | 805 | 5 | ? | ||||
5 | 1uF | C4,C5 | 805 | 2 | ? | ||||
6 | Headers Pins 1*4P | P2,P4 | HDR-4X1/2.54 | 2 | Headers Pins 1*4P | ReliaPro | LCSC | ||
7 | Header2.54mm 1*3P | P3 | HDR-3X1/2.54 | 1 | Header2.54mm 1*3P | BOOMELE | LCSC | C49257 | |
8 | 510R | R6 | 805 | 1 | ? | ||||
9 | 120R | R7 | 805 | 1 | ? | ||||
10 | 20K | R8,R9 | 805 | 2 | ? | ||||
11 | 10K | R10,R11,R12,R13 | 805 | 4 | ? | ||||
12 | 10uF | C3 | CP_TANTALUM_CASE-A_EIA-3216-18_REFLOW | 1 | ? | ||||
13 | SCTA3A0103 | CN1,CN2,CN3 | PAD-1.4X1.4-ALPS-H1.6 | 3 | SCTA3A0103 | ALPS Electric | LCSC | C202386 | |
14 | 16MHz | X1 | OSC-SMD_3P-L3.2-W1.3-P0.95-L | 1 | CSTCE16M0V53-R0 | MuRata | LCSC | C32180 | |
15 | MAX485CSA+ | U5 | SOIC-8_150MIL | 1 | MAX485CSA+ | MAXIM | LCSC | C143494 | |
16 | FC-2012GHK-570A08 | LED1 | 1206-LED | 1 | FC-2012GHK-570A08 | NATIONSTAR | LCSC | C84257 | |
17 | LP2950ACZ-5.0/NOPB | U3 | TO-92(TO-92-3) | 1 | LP2950ACZ-5.0/NOPB | Texas Instruments | LCSC | C181969 | |
18 | W25X40CLSNIG | U2 | SOIC-8_L5.0-W4.0-P1.27-LS6.0-BL | 1 | W25X40CLSNIG | WINBOND | LCSC | C19617 | Yes |
Name | Size | # Downloads |
---|---|---|
Gerber_BoardOutline.GKO | 516 B | 261 |
Gerber_BottomLayer.GBL | 10.85 kB | 294 |
Gerber_BottomPasteMaskLayer.GBP | 5.37 kB | 302 |
Gerber_BottomSilkLayer.GBO | 17.96 kB | 275 |
Gerber_BottomSolderMaskLayer.GBS | 6.22 kB | 290 |
Gerber_Drill_PTH.DRL | 1.24 kB | 286 |
Gerber_TopLayer.GTL | 5.04 kB | 287 |
Gerber_TopPasteMaskLayer.GTP | 1.26 kB | 280 |
Gerber_TopSilkLayer.GTO | 27.5 kB | 297 |
Gerber_TopSolderMaskLayer.GTS | 2.54 kB | 287 |
MYSNodeRS485_Schematic_rev002.pdf | 47.56 kB | 327 |
Name | Size | # Downloads |
---|---|---|
TestNode_RS485_OTA.ino | 759 B | 1442 |
SPIFlash.h | 8.87 kB | 1566 |
dualoptiboot_atmega328_8000000_38400_A2.hex | 2.76 kB | 1387 |