├── .gitignore ├── AVR-LORA-805.jpg ├── AVR-LORA-805.kicad_pcb ├── AVR-LORA-805.kicad_prl ├── AVR-LORA-805.kicad_pro ├── AVR-LORA-805.kicad_sch ├── AVR-LORA-805.pdf ├── AVR-LORA.kicad_pcb ├── AVR-LORA.kicad_prl ├── AVR-LORA.kicad_pro ├── AVR-LORA.kicad_sch ├── AVR-LORA.pdf ├── AVR-LORA.png ├── AVR.dcm ├── AVR.lib ├── AVR128DB └── AVR128DB.ino ├── AVR128DBLora ├── AVR128DBLora.ino └── compile.sh ├── AVR128_RadioLib ├── AVR128_RadioLib.ino ├── compile.sh └── config.h ├── LICENSE ├── Lora_RadioLib ├── Lora_RadioLib.ino └── config.h ├── README.md ├── RFM ├── RFM95.dcm ├── RFM95.kicad_mod └── RFM95.lib ├── STM-LORA-rescue.lib ├── STM-LORA.kicad_pcb ├── STM-LORA.kicad_prl ├── STM-LORA.kicad_pro ├── STM-LORA.kicad_sch ├── STM-LORA.png ├── STM32China ├── stm32f103c8t6-module-china.bck ├── stm32f103c8t6-module-china.dcm ├── stm32f103c8t6-module-china.kicad_mod ├── stm32f103c8t6-module-china.kicad_sym └── stm32f103c8t6-module-china.lib ├── fp-lib-table └── sym-lib-table /.gitignore: -------------------------------------------------------------------------------- 1 | *cache 2 | secrets.h 3 | my_lora.h 4 | build 5 | *-cache.lib 6 | *-backups 7 | *prl 8 | *.net 9 | *hex 10 | *lst 11 | *map 12 | -------------------------------------------------------------------------------- /AVR-LORA-805.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomtor/STM32-RFM95-PCB/5bc3abfc7fafb9c0257237f01dd81a30a5f4eddf/AVR-LORA-805.jpg -------------------------------------------------------------------------------- /AVR-LORA-805.kicad_prl: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "active_layer": 0, 4 | "active_layer_preset": "", 5 | "auto_track_width": true, 6 | "hidden_netclasses": [], 7 | "hidden_nets": [], 8 | "high_contrast_mode": 0, 9 | "net_color_mode": 1, 10 | "opacity": { 11 | "images": 0.6, 12 | "pads": 1.0, 13 | "shapes": 1.0, 14 | "tracks": 1.0, 15 | "vias": 1.0, 16 | "zones": 0.6 17 | }, 18 | "selection_filter": { 19 | "dimensions": true, 20 | "footprints": true, 21 | "graphics": true, 22 | "keepouts": true, 23 | "lockedItems": false, 24 | "otherItems": true, 25 | "pads": true, 26 | "text": true, 27 | "tracks": true, 28 | "vias": true, 29 | "zones": true 30 | }, 31 | "visible_items": [ 32 | "vias", 33 | "footprint_text", 34 | "footprint_anchors", 35 | "ratsnest", 36 | "grid", 37 | "footprints_front", 38 | "footprints_back", 39 | "footprint_values", 40 | "footprint_references", 41 | "tracks", 42 | "drc_errors", 43 | "drawing_sheet", 44 | "bitmaps", 45 | "pads", 46 | "zones", 47 | "drc_warnings", 48 | "locked_item_shadows", 49 | "conflict_shadows", 50 | "shapes" 51 | ], 52 | "visible_layers": "00000000_00000000_00000000_aaaaaaaf", 53 | "zone_display_mode": 0 54 | }, 55 | "git": { 56 | "repo_type": "", 57 | "repo_username": "", 58 | "ssh_key": "" 59 | }, 60 | "meta": { 61 | "filename": "AVR-LORA-805.kicad_prl", 62 | "version": 5 63 | }, 64 | "net_inspector_panel": { 65 | "col_hidden": [ 66 | false, 67 | false, 68 | false, 69 | false, 70 | false, 71 | false, 72 | false, 73 | false, 74 | false, 75 | false 76 | ], 77 | "col_order": [ 78 | 0, 79 | 1, 80 | 2, 81 | 3, 82 | 4, 83 | 5, 84 | 6, 85 | 7, 86 | 8, 87 | 9 88 | ], 89 | "col_widths": [ 90 | 0, 91 | 0, 92 | 0, 93 | 0, 94 | 0, 95 | 0, 96 | 0, 97 | 0, 98 | 0, 99 | 0 100 | ], 101 | "custom_group_rules": [], 102 | "expanded_rows": [], 103 | "filter_by_net_name": true, 104 | "filter_by_netclass": true, 105 | "filter_text": "", 106 | "group_by_constraint": false, 107 | "group_by_netclass": false, 108 | "show_unconnected_nets": false, 109 | "show_zero_pad_nets": false, 110 | "sort_ascending": true, 111 | "sorting_column": 0 112 | }, 113 | "open_jobsets": [], 114 | "project": { 115 | "files": [] 116 | }, 117 | "schematic": { 118 | "selection_filter": { 119 | "graphics": true, 120 | "images": true, 121 | "labels": true, 122 | "lockedItems": false, 123 | "otherItems": true, 124 | "pins": true, 125 | "symbols": true, 126 | "text": true, 127 | "wires": true 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /AVR-LORA-805.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "3dviewports": [], 4 | "design_settings": { 5 | "defaults": { 6 | "apply_defaults_to_fp_fields": false, 7 | "apply_defaults_to_fp_shapes": false, 8 | "apply_defaults_to_fp_text": false, 9 | "board_outline_line_width": 0.15, 10 | "copper_line_width": 0.2, 11 | "copper_text_italic": false, 12 | "copper_text_size_h": 1.5, 13 | "copper_text_size_v": 1.5, 14 | "copper_text_thickness": 0.3, 15 | "copper_text_upright": false, 16 | "courtyard_line_width": 0.05, 17 | "dimension_precision": 4, 18 | "dimension_units": 3, 19 | "dimensions": { 20 | "arrow_length": 1270000, 21 | "extension_offset": 500000, 22 | "keep_text_aligned": true, 23 | "suppress_zeroes": true, 24 | "text_position": 0, 25 | "units_format": 0 26 | }, 27 | "fab_line_width": 0.1, 28 | "fab_text_italic": false, 29 | "fab_text_size_h": 1.0, 30 | "fab_text_size_v": 1.0, 31 | "fab_text_thickness": 0.15, 32 | "fab_text_upright": false, 33 | "other_line_width": 0.1, 34 | "other_text_italic": false, 35 | "other_text_size_h": 1.0, 36 | "other_text_size_v": 1.0, 37 | "other_text_thickness": 0.15, 38 | "other_text_upright": false, 39 | "pads": { 40 | "drill": 0.0, 41 | "height": 0.6, 42 | "width": 1.325 43 | }, 44 | "silk_line_width": 0.15, 45 | "silk_text_italic": false, 46 | "silk_text_size_h": 1.0, 47 | "silk_text_size_v": 1.0, 48 | "silk_text_thickness": 0.15, 49 | "silk_text_upright": false, 50 | "zones": { 51 | "min_clearance": 0.3 52 | } 53 | }, 54 | "diff_pair_dimensions": [], 55 | "drc_exclusions": [], 56 | "meta": { 57 | "filename": "board_design_settings.json", 58 | "version": 2 59 | }, 60 | "rule_severities": { 61 | "annular_width": "error", 62 | "clearance": "error", 63 | "connection_width": "warning", 64 | "copper_edge_clearance": "error", 65 | "copper_sliver": "warning", 66 | "courtyards_overlap": "error", 67 | "creepage": "error", 68 | "diff_pair_gap_out_of_range": "error", 69 | "diff_pair_uncoupled_length_too_long": "error", 70 | "drill_out_of_range": "error", 71 | "duplicate_footprints": "warning", 72 | "extra_footprint": "warning", 73 | "footprint": "error", 74 | "footprint_filters_mismatch": "warning", 75 | "footprint_symbol_mismatch": "warning", 76 | "footprint_type_mismatch": "warning", 77 | "hole_clearance": "error", 78 | "hole_to_hole": "warning", 79 | "holes_co_located": "warning", 80 | "invalid_outline": "error", 81 | "isolated_copper": "warning", 82 | "item_on_disabled_layer": "error", 83 | "items_not_allowed": "error", 84 | "length_out_of_range": "error", 85 | "lib_footprint_issues": "warning", 86 | "lib_footprint_mismatch": "warning", 87 | "malformed_courtyard": "error", 88 | "microvia_drill_out_of_range": "error", 89 | "mirrored_text_on_front_layer": "warning", 90 | "missing_courtyard": "warning", 91 | "missing_footprint": "warning", 92 | "net_conflict": "warning", 93 | "nonmirrored_text_on_back_layer": "warning", 94 | "npth_inside_courtyard": "warning", 95 | "padstack": "warning", 96 | "pth_inside_courtyard": "warning", 97 | "shorting_items": "error", 98 | "silk_edge_clearance": "warning", 99 | "silk_over_copper": "warning", 100 | "silk_overlap": "warning", 101 | "skew_out_of_range": "error", 102 | "solder_mask_bridge": "error", 103 | "starved_thermal": "ignore", 104 | "text_height": "ignore", 105 | "text_thickness": "warning", 106 | "through_hole_pad_without_hole": "error", 107 | "too_many_vias": "error", 108 | "track_angle": "error", 109 | "track_dangling": "warning", 110 | "track_segment_length": "error", 111 | "track_width": "error", 112 | "tracks_crossing": "error", 113 | "unconnected_items": "error", 114 | "unresolved_variable": "error", 115 | "via_dangling": "warning", 116 | "zones_intersect": "error" 117 | }, 118 | "rules": { 119 | "max_error": 0.005, 120 | "min_clearance": 0.0, 121 | "min_connection": 0.0, 122 | "min_copper_edge_clearance": 0.05, 123 | "min_groove_width": 0.0, 124 | "min_hole_clearance": 0.25, 125 | "min_hole_to_hole": 0.25, 126 | "min_microvia_diameter": 0.2, 127 | "min_microvia_drill": 0.1, 128 | "min_resolved_spokes": 2, 129 | "min_silk_clearance": 0.0, 130 | "min_text_height": 0.8, 131 | "min_text_thickness": 0.08, 132 | "min_through_hole_diameter": 0.3, 133 | "min_track_width": 0.2, 134 | "min_via_annular_width": 0.1, 135 | "min_via_diameter": 0.4, 136 | "solder_mask_to_copper_clearance": 0.0, 137 | "use_height_for_length_calcs": true 138 | }, 139 | "teardrop_options": [ 140 | { 141 | "td_onpthpad": true, 142 | "td_onroundshapesonly": false, 143 | "td_onsmdpad": true, 144 | "td_ontrackend": false, 145 | "td_onvia": true 146 | } 147 | ], 148 | "teardrop_parameters": [ 149 | { 150 | "td_allow_use_two_tracks": true, 151 | "td_curve_segcount": 0, 152 | "td_height_ratio": 1.0, 153 | "td_length_ratio": 0.5, 154 | "td_maxheight": 2.0, 155 | "td_maxlen": 1.0, 156 | "td_on_pad_in_zone": false, 157 | "td_target_name": "td_round_shape", 158 | "td_width_to_size_filter_ratio": 0.9 159 | }, 160 | { 161 | "td_allow_use_two_tracks": true, 162 | "td_curve_segcount": 0, 163 | "td_height_ratio": 1.0, 164 | "td_length_ratio": 0.5, 165 | "td_maxheight": 2.0, 166 | "td_maxlen": 1.0, 167 | "td_on_pad_in_zone": false, 168 | "td_target_name": "td_rect_shape", 169 | "td_width_to_size_filter_ratio": 0.9 170 | }, 171 | { 172 | "td_allow_use_two_tracks": true, 173 | "td_curve_segcount": 0, 174 | "td_height_ratio": 1.0, 175 | "td_length_ratio": 0.5, 176 | "td_maxheight": 2.0, 177 | "td_maxlen": 1.0, 178 | "td_on_pad_in_zone": false, 179 | "td_target_name": "td_track_end", 180 | "td_width_to_size_filter_ratio": 0.9 181 | } 182 | ], 183 | "track_widths": [ 184 | 0.0, 185 | 0.5 186 | ], 187 | "tuning_pattern_settings": { 188 | "diff_pair_defaults": { 189 | "corner_radius_percentage": 80, 190 | "corner_style": 1, 191 | "max_amplitude": 1.0, 192 | "min_amplitude": 0.2, 193 | "single_sided": false, 194 | "spacing": 1.0 195 | }, 196 | "diff_pair_skew_defaults": { 197 | "corner_radius_percentage": 80, 198 | "corner_style": 1, 199 | "max_amplitude": 1.0, 200 | "min_amplitude": 0.2, 201 | "single_sided": false, 202 | "spacing": 0.6 203 | }, 204 | "single_track_defaults": { 205 | "corner_radius_percentage": 80, 206 | "corner_style": 1, 207 | "max_amplitude": 1.0, 208 | "min_amplitude": 0.2, 209 | "single_sided": false, 210 | "spacing": 0.6 211 | } 212 | }, 213 | "via_dimensions": [], 214 | "zones_allow_external_fillets": false 215 | }, 216 | "ipc2581": { 217 | "dist": "", 218 | "distpn": "", 219 | "internal_id": "", 220 | "mfg": "", 221 | "mpn": "" 222 | }, 223 | "layer_pairs": [], 224 | "layer_presets": [], 225 | "viewports": [] 226 | }, 227 | "boards": [], 228 | "cvpcb": { 229 | "equivalence_files": [] 230 | }, 231 | "erc": { 232 | "erc_exclusions": [], 233 | "meta": { 234 | "version": 0 235 | }, 236 | "pin_map": [ 237 | [ 238 | 0, 239 | 0, 240 | 0, 241 | 0, 242 | 0, 243 | 0, 244 | 1, 245 | 0, 246 | 0, 247 | 0, 248 | 0, 249 | 2 250 | ], 251 | [ 252 | 0, 253 | 2, 254 | 0, 255 | 1, 256 | 0, 257 | 0, 258 | 1, 259 | 0, 260 | 2, 261 | 2, 262 | 2, 263 | 2 264 | ], 265 | [ 266 | 0, 267 | 0, 268 | 0, 269 | 0, 270 | 0, 271 | 0, 272 | 1, 273 | 0, 274 | 1, 275 | 0, 276 | 1, 277 | 2 278 | ], 279 | [ 280 | 0, 281 | 1, 282 | 0, 283 | 0, 284 | 0, 285 | 0, 286 | 1, 287 | 1, 288 | 2, 289 | 1, 290 | 1, 291 | 2 292 | ], 293 | [ 294 | 0, 295 | 0, 296 | 0, 297 | 0, 298 | 0, 299 | 0, 300 | 1, 301 | 0, 302 | 0, 303 | 0, 304 | 0, 305 | 2 306 | ], 307 | [ 308 | 0, 309 | 0, 310 | 0, 311 | 0, 312 | 0, 313 | 0, 314 | 0, 315 | 0, 316 | 0, 317 | 0, 318 | 0, 319 | 2 320 | ], 321 | [ 322 | 1, 323 | 1, 324 | 1, 325 | 1, 326 | 1, 327 | 0, 328 | 1, 329 | 1, 330 | 1, 331 | 1, 332 | 1, 333 | 2 334 | ], 335 | [ 336 | 0, 337 | 0, 338 | 0, 339 | 1, 340 | 0, 341 | 0, 342 | 1, 343 | 0, 344 | 0, 345 | 0, 346 | 0, 347 | 2 348 | ], 349 | [ 350 | 0, 351 | 2, 352 | 1, 353 | 2, 354 | 0, 355 | 0, 356 | 1, 357 | 0, 358 | 2, 359 | 2, 360 | 2, 361 | 2 362 | ], 363 | [ 364 | 0, 365 | 2, 366 | 0, 367 | 1, 368 | 0, 369 | 0, 370 | 1, 371 | 0, 372 | 2, 373 | 0, 374 | 0, 375 | 2 376 | ], 377 | [ 378 | 0, 379 | 2, 380 | 1, 381 | 1, 382 | 0, 383 | 0, 384 | 1, 385 | 0, 386 | 2, 387 | 0, 388 | 0, 389 | 2 390 | ], 391 | [ 392 | 2, 393 | 2, 394 | 2, 395 | 2, 396 | 2, 397 | 2, 398 | 2, 399 | 2, 400 | 2, 401 | 2, 402 | 2, 403 | 2 404 | ] 405 | ], 406 | "rule_severities": { 407 | "bus_definition_conflict": "error", 408 | "bus_entry_needed": "error", 409 | "bus_to_bus_conflict": "error", 410 | "bus_to_net_conflict": "error", 411 | "different_unit_footprint": "error", 412 | "different_unit_net": "error", 413 | "duplicate_reference": "error", 414 | "duplicate_sheet_names": "error", 415 | "endpoint_off_grid": "warning", 416 | "extra_units": "error", 417 | "footprint_filter": "ignore", 418 | "footprint_link_issues": "warning", 419 | "four_way_junction": "ignore", 420 | "global_label_dangling": "warning", 421 | "hier_label_mismatch": "error", 422 | "label_dangling": "error", 423 | "label_multiple_wires": "warning", 424 | "lib_symbol_issues": "warning", 425 | "lib_symbol_mismatch": "warning", 426 | "missing_bidi_pin": "warning", 427 | "missing_input_pin": "warning", 428 | "missing_power_pin": "error", 429 | "missing_unit": "warning", 430 | "multiple_net_names": "warning", 431 | "net_not_bus_member": "warning", 432 | "no_connect_connected": "warning", 433 | "no_connect_dangling": "warning", 434 | "pin_not_connected": "error", 435 | "pin_not_driven": "error", 436 | "pin_to_pin": "warning", 437 | "power_pin_not_driven": "error", 438 | "same_local_global_label": "warning", 439 | "similar_label_and_power": "warning", 440 | "similar_labels": "warning", 441 | "similar_power": "warning", 442 | "simulation_model_issue": "ignore", 443 | "single_global_label": "ignore", 444 | "unannotated": "error", 445 | "unconnected_wire_endpoint": "warning", 446 | "unit_value_mismatch": "error", 447 | "unresolved_variable": "error", 448 | "wire_dangling": "error" 449 | } 450 | }, 451 | "libraries": { 452 | "pinned_footprint_libs": [], 453 | "pinned_symbol_libs": [] 454 | }, 455 | "meta": { 456 | "filename": "AVR-LORA-805.kicad_pro", 457 | "version": 3 458 | }, 459 | "net_settings": { 460 | "classes": [ 461 | { 462 | "bus_width": 12, 463 | "clearance": 0.2, 464 | "diff_pair_gap": 0.25, 465 | "diff_pair_via_gap": 0.25, 466 | "diff_pair_width": 0.2, 467 | "line_style": 0, 468 | "microvia_diameter": 0.3, 469 | "microvia_drill": 0.1, 470 | "name": "Default", 471 | "pcb_color": "rgba(0, 0, 0, 0.000)", 472 | "priority": -1, 473 | "schematic_color": "rgba(0, 0, 0, 0.000)", 474 | "track_width": 0.25, 475 | "via_diameter": 0.6, 476 | "via_drill": 0.4, 477 | "wire_width": 6 478 | }, 479 | { 480 | "bus_width": 12, 481 | "clearance": 0.2, 482 | "diff_pair_gap": 0.25, 483 | "diff_pair_via_gap": 0.25, 484 | "diff_pair_width": 0.2, 485 | "line_style": 0, 486 | "microvia_diameter": 0.4, 487 | "microvia_drill": 0.2, 488 | "name": "Power", 489 | "pcb_color": "rgba(0, 0, 0, 0.000)", 490 | "priority": -1, 491 | "schematic_color": "rgba(0, 0, 0, 0.000)", 492 | "track_width": 0.5, 493 | "via_diameter": 0.7, 494 | "via_drill": 0.5, 495 | "wire_width": 6 496 | } 497 | ], 498 | "meta": { 499 | "version": 4 500 | }, 501 | "net_colors": null, 502 | "netclass_assignments": null, 503 | "netclass_patterns": [ 504 | { 505 | "netclass": "Default", 506 | "pattern": "/A0" 507 | }, 508 | { 509 | "netclass": "Default", 510 | "pattern": "/A1" 511 | }, 512 | { 513 | "netclass": "Default", 514 | "pattern": "/A2" 515 | }, 516 | { 517 | "netclass": "Default", 518 | "pattern": "/A3" 519 | }, 520 | { 521 | "netclass": "Default", 522 | "pattern": "/A4" 523 | }, 524 | { 525 | "netclass": "Default", 526 | "pattern": "/A5" 527 | }, 528 | { 529 | "netclass": "Default", 530 | "pattern": "/A6" 531 | }, 532 | { 533 | "netclass": "Default", 534 | "pattern": "/A7" 535 | }, 536 | { 537 | "netclass": "Default", 538 | "pattern": "/C0" 539 | }, 540 | { 541 | "netclass": "Default", 542 | "pattern": "/C1" 543 | }, 544 | { 545 | "netclass": "Default", 546 | "pattern": "/C2" 547 | }, 548 | { 549 | "netclass": "Default", 550 | "pattern": "/C3" 551 | }, 552 | { 553 | "netclass": "Default", 554 | "pattern": "/CA0" 555 | }, 556 | { 557 | "netclass": "Default", 558 | "pattern": "/CA1" 559 | }, 560 | { 561 | "netclass": "Default", 562 | "pattern": "/CF0" 563 | }, 564 | { 565 | "netclass": "Default", 566 | "pattern": "/CF1" 567 | }, 568 | { 569 | "netclass": "Default", 570 | "pattern": "/D1" 571 | }, 572 | { 573 | "netclass": "Default", 574 | "pattern": "/D2" 575 | }, 576 | { 577 | "netclass": "Default", 578 | "pattern": "/D3" 579 | }, 580 | { 581 | "netclass": "Default", 582 | "pattern": "/D4" 583 | }, 584 | { 585 | "netclass": "Default", 586 | "pattern": "/D5" 587 | }, 588 | { 589 | "netclass": "Default", 590 | "pattern": "/D6" 591 | }, 592 | { 593 | "netclass": "Default", 594 | "pattern": "/D7" 595 | }, 596 | { 597 | "netclass": "Default", 598 | "pattern": "/F0" 599 | }, 600 | { 601 | "netclass": "Default", 602 | "pattern": "/F1" 603 | }, 604 | { 605 | "netclass": "Default", 606 | "pattern": "/F6" 607 | }, 608 | { 609 | "netclass": "Default", 610 | "pattern": "/UPDI" 611 | }, 612 | { 613 | "netclass": "Default", 614 | "pattern": "Net-(D2-Pad2)" 615 | }, 616 | { 617 | "netclass": "Default", 618 | "pattern": "Net-(J3-Pad1)" 619 | }, 620 | { 621 | "netclass": "Default", 622 | "pattern": "Net-(U2-Pad11)" 623 | }, 624 | { 625 | "netclass": "Default", 626 | "pattern": "Net-(U2-Pad12)" 627 | }, 628 | { 629 | "netclass": "Default", 630 | "pattern": "Net-(U2-Pad7)" 631 | }, 632 | { 633 | "netclass": "Power", 634 | "pattern": "/3V3" 635 | }, 636 | { 637 | "netclass": "Power", 638 | "pattern": "/Solar" 639 | }, 640 | { 641 | "netclass": "Power", 642 | "pattern": "GND" 643 | }, 644 | { 645 | "netclass": "Power", 646 | "pattern": "VCC" 647 | } 648 | ] 649 | }, 650 | "pcbnew": { 651 | "last_paths": { 652 | "gencad": "", 653 | "idf": "", 654 | "netlist": "", 655 | "plot": "", 656 | "pos_files": "", 657 | "specctra_dsn": "", 658 | "step": "", 659 | "svg": "", 660 | "vrml": "" 661 | }, 662 | "page_layout_descr_file": "" 663 | }, 664 | "schematic": { 665 | "annotate_start_num": 0, 666 | "bom_export_filename": "${PROJECTNAME}.csv", 667 | "bom_fmt_presets": [], 668 | "bom_fmt_settings": { 669 | "field_delimiter": ",", 670 | "keep_line_breaks": false, 671 | "keep_tabs": false, 672 | "name": "CSV", 673 | "ref_delimiter": ",", 674 | "ref_range_delimiter": "", 675 | "string_delimiter": "\"" 676 | }, 677 | "bom_presets": [], 678 | "bom_settings": { 679 | "exclude_dnp": false, 680 | "fields_ordered": [ 681 | { 682 | "group_by": false, 683 | "label": "Reference", 684 | "name": "Reference", 685 | "show": true 686 | }, 687 | { 688 | "group_by": false, 689 | "label": "Qty", 690 | "name": "${QUANTITY}", 691 | "show": true 692 | }, 693 | { 694 | "group_by": true, 695 | "label": "Value", 696 | "name": "Value", 697 | "show": true 698 | }, 699 | { 700 | "group_by": true, 701 | "label": "DNP", 702 | "name": "${DNP}", 703 | "show": true 704 | }, 705 | { 706 | "group_by": true, 707 | "label": "Exclude from BOM", 708 | "name": "${EXCLUDE_FROM_BOM}", 709 | "show": true 710 | }, 711 | { 712 | "group_by": true, 713 | "label": "Exclude from Board", 714 | "name": "${EXCLUDE_FROM_BOARD}", 715 | "show": true 716 | }, 717 | { 718 | "group_by": true, 719 | "label": "Footprint", 720 | "name": "Footprint", 721 | "show": true 722 | }, 723 | { 724 | "group_by": false, 725 | "label": "Datasheet", 726 | "name": "Datasheet", 727 | "show": true 728 | } 729 | ], 730 | "filter_string": "", 731 | "group_symbols": true, 732 | "include_excluded_from_bom": true, 733 | "name": "Default Editing", 734 | "sort_asc": true, 735 | "sort_field": "Reference" 736 | }, 737 | "connection_grid_size": 50.0, 738 | "drawing": { 739 | "dashed_lines_dash_length_ratio": 12.0, 740 | "dashed_lines_gap_length_ratio": 3.0, 741 | "default_line_thickness": 6.0, 742 | "default_text_size": 50.0, 743 | "field_names": [], 744 | "intersheets_ref_own_page": false, 745 | "intersheets_ref_prefix": "", 746 | "intersheets_ref_short": false, 747 | "intersheets_ref_show": false, 748 | "intersheets_ref_suffix": "", 749 | "junction_size_choice": 3, 750 | "label_size_ratio": 0.375, 751 | "operating_point_overlay_i_precision": 3, 752 | "operating_point_overlay_i_range": "~A", 753 | "operating_point_overlay_v_precision": 3, 754 | "operating_point_overlay_v_range": "~V", 755 | "overbar_offset_ratio": 1.23, 756 | "pin_symbol_size": 25.0, 757 | "text_offset_ratio": 0.15 758 | }, 759 | "legacy_lib_dir": "", 760 | "legacy_lib_list": [], 761 | "meta": { 762 | "version": 1 763 | }, 764 | "net_format_name": "", 765 | "page_layout_descr_file": "", 766 | "plot_directory": "", 767 | "space_save_all_events": true, 768 | "spice_current_sheet_as_root": false, 769 | "spice_external_command": "spice \"%I\"", 770 | "spice_model_current_sheet_as_root": true, 771 | "spice_save_all_currents": false, 772 | "spice_save_all_dissipations": false, 773 | "spice_save_all_voltages": false, 774 | "subpart_first_id": 65, 775 | "subpart_id_separator": 0 776 | }, 777 | "sheets": [ 778 | [ 779 | "5f100a18-1835-4eb6-9a44-b9154f034e06", 780 | "Root" 781 | ] 782 | ], 783 | "text_variables": {} 784 | } 785 | -------------------------------------------------------------------------------- /AVR-LORA-805.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomtor/STM32-RFM95-PCB/5bc3abfc7fafb9c0257237f01dd81a30a5f4eddf/AVR-LORA-805.pdf -------------------------------------------------------------------------------- /AVR-LORA.kicad_prl: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "active_layer": 5, 4 | "active_layer_preset": "", 5 | "auto_track_width": true, 6 | "hidden_netclasses": [], 7 | "hidden_nets": [], 8 | "high_contrast_mode": 0, 9 | "net_color_mode": 1, 10 | "opacity": { 11 | "images": 0.6, 12 | "pads": 1.0, 13 | "shapes": 1.0, 14 | "tracks": 1.0, 15 | "vias": 1.0, 16 | "zones": 0.6 17 | }, 18 | "selection_filter": { 19 | "dimensions": true, 20 | "footprints": true, 21 | "graphics": true, 22 | "keepouts": true, 23 | "lockedItems": false, 24 | "otherItems": true, 25 | "pads": true, 26 | "text": true, 27 | "tracks": true, 28 | "vias": true, 29 | "zones": true 30 | }, 31 | "visible_items": [ 32 | "vias", 33 | "footprint_text", 34 | "footprint_anchors", 35 | "ratsnest", 36 | "grid", 37 | "footprints_front", 38 | "footprints_back", 39 | "footprint_values", 40 | "footprint_references", 41 | "tracks", 42 | "drc_errors", 43 | "drawing_sheet", 44 | "bitmaps", 45 | "pads", 46 | "zones", 47 | "drc_warnings", 48 | "locked_item_shadows", 49 | "conflict_shadows", 50 | "shapes" 51 | ], 52 | "visible_layers": "00000000_00000000_00000000_aaaaaaaf", 53 | "zone_display_mode": 0 54 | }, 55 | "git": { 56 | "repo_password": "", 57 | "repo_type": "", 58 | "repo_username": "", 59 | "ssh_key": "" 60 | }, 61 | "meta": { 62 | "filename": "AVR-LORA.kicad_prl", 63 | "version": 5 64 | }, 65 | "net_inspector_panel": { 66 | "col_hidden": [ 67 | false, 68 | false, 69 | false, 70 | false, 71 | false, 72 | false, 73 | false, 74 | false, 75 | false, 76 | false 77 | ], 78 | "col_order": [ 79 | 0, 80 | 1, 81 | 2, 82 | 3, 83 | 4, 84 | 5, 85 | 6, 86 | 7, 87 | 8, 88 | 9 89 | ], 90 | "col_widths": [ 91 | 0, 92 | 0, 93 | 0, 94 | 0, 95 | 0, 96 | 0, 97 | 0, 98 | 0, 99 | 0, 100 | 0 101 | ], 102 | "custom_group_rules": [], 103 | "expanded_rows": [], 104 | "filter_by_net_name": true, 105 | "filter_by_netclass": true, 106 | "filter_text": "", 107 | "group_by_constraint": false, 108 | "group_by_netclass": false, 109 | "show_unconnected_nets": false, 110 | "show_zero_pad_nets": false, 111 | "sort_ascending": true, 112 | "sorting_column": 0 113 | }, 114 | "open_jobsets": [], 115 | "project": { 116 | "files": [] 117 | }, 118 | "schematic": { 119 | "selection_filter": { 120 | "graphics": true, 121 | "images": true, 122 | "labels": true, 123 | "lockedItems": false, 124 | "otherItems": true, 125 | "pins": true, 126 | "symbols": true, 127 | "text": true, 128 | "wires": true 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /AVR-LORA.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "3dviewports": [], 4 | "design_settings": { 5 | "defaults": { 6 | "apply_defaults_to_fp_fields": false, 7 | "apply_defaults_to_fp_shapes": false, 8 | "apply_defaults_to_fp_text": false, 9 | "board_outline_line_width": 0.15, 10 | "copper_line_width": 0.2, 11 | "copper_text_italic": false, 12 | "copper_text_size_h": 1.5, 13 | "copper_text_size_v": 1.5, 14 | "copper_text_thickness": 0.3, 15 | "copper_text_upright": false, 16 | "courtyard_line_width": 0.05, 17 | "dimension_precision": 4, 18 | "dimension_units": 3, 19 | "dimensions": { 20 | "arrow_length": 1270000, 21 | "extension_offset": 500000, 22 | "keep_text_aligned": true, 23 | "suppress_zeroes": true, 24 | "text_position": 0, 25 | "units_format": 0 26 | }, 27 | "fab_line_width": 0.1, 28 | "fab_text_italic": false, 29 | "fab_text_size_h": 1.0, 30 | "fab_text_size_v": 1.0, 31 | "fab_text_thickness": 0.15, 32 | "fab_text_upright": false, 33 | "other_line_width": 0.1, 34 | "other_text_italic": false, 35 | "other_text_size_h": 1.0, 36 | "other_text_size_v": 1.0, 37 | "other_text_thickness": 0.15, 38 | "other_text_upright": false, 39 | "pads": { 40 | "drill": 0.0, 41 | "height": 0.6, 42 | "width": 1.325 43 | }, 44 | "silk_line_width": 0.15, 45 | "silk_text_italic": false, 46 | "silk_text_size_h": 1.0, 47 | "silk_text_size_v": 1.0, 48 | "silk_text_thickness": 0.15, 49 | "silk_text_upright": false, 50 | "zones": { 51 | "min_clearance": 0.3 52 | } 53 | }, 54 | "diff_pair_dimensions": [], 55 | "drc_exclusions": [], 56 | "meta": { 57 | "filename": "board_design_settings.json", 58 | "version": 2 59 | }, 60 | "rule_severities": { 61 | "annular_width": "error", 62 | "clearance": "error", 63 | "connection_width": "warning", 64 | "copper_edge_clearance": "error", 65 | "copper_sliver": "warning", 66 | "courtyards_overlap": "error", 67 | "creepage": "error", 68 | "diff_pair_gap_out_of_range": "error", 69 | "diff_pair_uncoupled_length_too_long": "error", 70 | "drill_out_of_range": "error", 71 | "duplicate_footprints": "warning", 72 | "extra_footprint": "warning", 73 | "footprint": "error", 74 | "footprint_filters_mismatch": "ignore", 75 | "footprint_symbol_mismatch": "warning", 76 | "footprint_type_mismatch": "ignore", 77 | "hole_clearance": "error", 78 | "hole_near_hole": "error", 79 | "hole_to_hole": "error", 80 | "holes_co_located": "warning", 81 | "invalid_outline": "error", 82 | "isolated_copper": "warning", 83 | "item_on_disabled_layer": "error", 84 | "items_not_allowed": "error", 85 | "length_out_of_range": "error", 86 | "lib_footprint_issues": "warning", 87 | "lib_footprint_mismatch": "warning", 88 | "malformed_courtyard": "error", 89 | "microvia_drill_out_of_range": "error", 90 | "mirrored_text_on_front_layer": "warning", 91 | "missing_courtyard": "ignore", 92 | "missing_footprint": "warning", 93 | "net_conflict": "warning", 94 | "nonmirrored_text_on_back_layer": "warning", 95 | "npth_inside_courtyard": "ignore", 96 | "padstack": "warning", 97 | "pth_inside_courtyard": "ignore", 98 | "shorting_items": "error", 99 | "silk_edge_clearance": "warning", 100 | "silk_over_copper": "warning", 101 | "silk_overlap": "warning", 102 | "skew_out_of_range": "error", 103 | "solder_mask_bridge": "error", 104 | "starved_thermal": "ignore", 105 | "text_height": "ignore", 106 | "text_thickness": "warning", 107 | "through_hole_pad_without_hole": "error", 108 | "too_many_vias": "error", 109 | "track_angle": "error", 110 | "track_dangling": "warning", 111 | "track_segment_length": "error", 112 | "track_width": "error", 113 | "tracks_crossing": "error", 114 | "unconnected_items": "error", 115 | "unresolved_variable": "error", 116 | "via_dangling": "warning", 117 | "zones_intersect": "error" 118 | }, 119 | "rule_severitieslegacy_courtyards_overlap": true, 120 | "rule_severitieslegacy_no_courtyard_defined": false, 121 | "rules": { 122 | "allow_blind_buried_vias": false, 123 | "allow_microvias": false, 124 | "max_error": 0.005, 125 | "min_clearance": 0.0, 126 | "min_connection": 0.0, 127 | "min_copper_edge_clearance": 0.05, 128 | "min_groove_width": 0.0, 129 | "min_hole_clearance": 0.25, 130 | "min_hole_to_hole": 0.25, 131 | "min_microvia_diameter": 0.2, 132 | "min_microvia_drill": 0.1, 133 | "min_resolved_spokes": 2, 134 | "min_silk_clearance": 0.0, 135 | "min_text_height": 0.8, 136 | "min_text_thickness": 0.08, 137 | "min_through_hole_diameter": 0.3, 138 | "min_track_width": 0.2, 139 | "min_via_annular_width": 0.1, 140 | "min_via_diameter": 0.4, 141 | "solder_mask_clearance": 0.0, 142 | "solder_mask_min_width": 0.0, 143 | "solder_mask_to_copper_clearance": 0.0, 144 | "solder_paste_clearance": 0.0, 145 | "solder_paste_margin_ratio": -0.0, 146 | "use_height_for_length_calcs": true 147 | }, 148 | "teardrop_options": [ 149 | { 150 | "td_onpthpad": true, 151 | "td_onroundshapesonly": false, 152 | "td_onsmdpad": true, 153 | "td_ontrackend": false, 154 | "td_onvia": true 155 | } 156 | ], 157 | "teardrop_parameters": [ 158 | { 159 | "td_allow_use_two_tracks": true, 160 | "td_curve_segcount": 0, 161 | "td_height_ratio": 1.0, 162 | "td_length_ratio": 0.5, 163 | "td_maxheight": 2.0, 164 | "td_maxlen": 1.0, 165 | "td_on_pad_in_zone": false, 166 | "td_target_name": "td_round_shape", 167 | "td_width_to_size_filter_ratio": 0.9 168 | }, 169 | { 170 | "td_allow_use_two_tracks": true, 171 | "td_curve_segcount": 0, 172 | "td_height_ratio": 1.0, 173 | "td_length_ratio": 0.5, 174 | "td_maxheight": 2.0, 175 | "td_maxlen": 1.0, 176 | "td_on_pad_in_zone": false, 177 | "td_target_name": "td_rect_shape", 178 | "td_width_to_size_filter_ratio": 0.9 179 | }, 180 | { 181 | "td_allow_use_two_tracks": true, 182 | "td_curve_segcount": 0, 183 | "td_height_ratio": 1.0, 184 | "td_length_ratio": 0.5, 185 | "td_maxheight": 2.0, 186 | "td_maxlen": 1.0, 187 | "td_on_pad_in_zone": false, 188 | "td_target_name": "td_track_end", 189 | "td_width_to_size_filter_ratio": 0.9 190 | } 191 | ], 192 | "track_widths": [ 193 | 0.0, 194 | 0.5 195 | ], 196 | "tuning_pattern_settings": { 197 | "diff_pair_defaults": { 198 | "corner_radius_percentage": 80, 199 | "corner_style": 1, 200 | "max_amplitude": 1.0, 201 | "min_amplitude": 0.2, 202 | "single_sided": false, 203 | "spacing": 1.0 204 | }, 205 | "diff_pair_skew_defaults": { 206 | "corner_radius_percentage": 80, 207 | "corner_style": 1, 208 | "max_amplitude": 1.0, 209 | "min_amplitude": 0.2, 210 | "single_sided": false, 211 | "spacing": 0.6 212 | }, 213 | "single_track_defaults": { 214 | "corner_radius_percentage": 80, 215 | "corner_style": 1, 216 | "max_amplitude": 1.0, 217 | "min_amplitude": 0.2, 218 | "single_sided": false, 219 | "spacing": 0.6 220 | } 221 | }, 222 | "via_dimensions": [], 223 | "zones_allow_external_fillets": false 224 | }, 225 | "ipc2581": { 226 | "dist": "", 227 | "distpn": "", 228 | "internal_id": "", 229 | "mfg": "", 230 | "mpn": "" 231 | }, 232 | "layer_pairs": [], 233 | "layer_presets": [], 234 | "viewports": [] 235 | }, 236 | "boards": [], 237 | "cvpcb": { 238 | "equivalence_files": [] 239 | }, 240 | "erc": { 241 | "erc_exclusions": [], 242 | "meta": { 243 | "version": 0 244 | }, 245 | "pin_map": [ 246 | [ 247 | 0, 248 | 0, 249 | 0, 250 | 0, 251 | 0, 252 | 0, 253 | 1, 254 | 0, 255 | 0, 256 | 0, 257 | 0, 258 | 2 259 | ], 260 | [ 261 | 0, 262 | 2, 263 | 0, 264 | 1, 265 | 0, 266 | 0, 267 | 1, 268 | 0, 269 | 2, 270 | 2, 271 | 2, 272 | 2 273 | ], 274 | [ 275 | 0, 276 | 0, 277 | 0, 278 | 0, 279 | 0, 280 | 0, 281 | 1, 282 | 0, 283 | 1, 284 | 0, 285 | 1, 286 | 2 287 | ], 288 | [ 289 | 0, 290 | 1, 291 | 0, 292 | 0, 293 | 0, 294 | 0, 295 | 1, 296 | 1, 297 | 2, 298 | 1, 299 | 1, 300 | 2 301 | ], 302 | [ 303 | 0, 304 | 0, 305 | 0, 306 | 0, 307 | 0, 308 | 0, 309 | 1, 310 | 0, 311 | 0, 312 | 0, 313 | 0, 314 | 2 315 | ], 316 | [ 317 | 0, 318 | 0, 319 | 0, 320 | 0, 321 | 0, 322 | 0, 323 | 0, 324 | 0, 325 | 0, 326 | 0, 327 | 0, 328 | 2 329 | ], 330 | [ 331 | 1, 332 | 1, 333 | 1, 334 | 1, 335 | 1, 336 | 0, 337 | 1, 338 | 1, 339 | 1, 340 | 1, 341 | 1, 342 | 2 343 | ], 344 | [ 345 | 0, 346 | 0, 347 | 0, 348 | 1, 349 | 0, 350 | 0, 351 | 1, 352 | 0, 353 | 0, 354 | 0, 355 | 0, 356 | 2 357 | ], 358 | [ 359 | 0, 360 | 2, 361 | 1, 362 | 2, 363 | 0, 364 | 0, 365 | 1, 366 | 0, 367 | 2, 368 | 2, 369 | 2, 370 | 2 371 | ], 372 | [ 373 | 0, 374 | 2, 375 | 0, 376 | 1, 377 | 0, 378 | 0, 379 | 1, 380 | 0, 381 | 2, 382 | 0, 383 | 0, 384 | 2 385 | ], 386 | [ 387 | 0, 388 | 2, 389 | 1, 390 | 1, 391 | 0, 392 | 0, 393 | 1, 394 | 0, 395 | 2, 396 | 0, 397 | 0, 398 | 2 399 | ], 400 | [ 401 | 2, 402 | 2, 403 | 2, 404 | 2, 405 | 2, 406 | 2, 407 | 2, 408 | 2, 409 | 2, 410 | 2, 411 | 2, 412 | 2 413 | ] 414 | ], 415 | "rule_severities": { 416 | "bus_definition_conflict": "error", 417 | "bus_entry_needed": "error", 418 | "bus_to_bus_conflict": "error", 419 | "bus_to_net_conflict": "error", 420 | "conflicting_netclasses": "error", 421 | "different_unit_footprint": "error", 422 | "different_unit_net": "error", 423 | "duplicate_reference": "error", 424 | "duplicate_sheet_names": "error", 425 | "endpoint_off_grid": "warning", 426 | "extra_units": "error", 427 | "footprint_filter": "ignore", 428 | "footprint_link_issues": "warning", 429 | "four_way_junction": "ignore", 430 | "global_label_dangling": "warning", 431 | "hier_label_mismatch": "error", 432 | "label_dangling": "error", 433 | "label_multiple_wires": "warning", 434 | "lib_symbol_issues": "warning", 435 | "lib_symbol_mismatch": "warning", 436 | "missing_bidi_pin": "warning", 437 | "missing_input_pin": "warning", 438 | "missing_power_pin": "error", 439 | "missing_unit": "warning", 440 | "multiple_net_names": "warning", 441 | "net_not_bus_member": "warning", 442 | "no_connect_connected": "warning", 443 | "no_connect_dangling": "warning", 444 | "pin_not_connected": "error", 445 | "pin_not_driven": "error", 446 | "pin_to_pin": "warning", 447 | "power_pin_not_driven": "error", 448 | "same_local_global_label": "warning", 449 | "similar_label_and_power": "warning", 450 | "similar_labels": "warning", 451 | "similar_power": "warning", 452 | "simulation_model_issue": "ignore", 453 | "single_global_label": "ignore", 454 | "unannotated": "error", 455 | "unconnected_wire_endpoint": "warning", 456 | "unit_value_mismatch": "error", 457 | "unresolved_variable": "error", 458 | "wire_dangling": "error" 459 | } 460 | }, 461 | "libraries": { 462 | "pinned_footprint_libs": [], 463 | "pinned_symbol_libs": [] 464 | }, 465 | "meta": { 466 | "filename": "AVR-LORA.kicad_pro", 467 | "version": 3 468 | }, 469 | "net_settings": { 470 | "classes": [ 471 | { 472 | "bus_width": 12, 473 | "clearance": 0.2, 474 | "diff_pair_gap": 0.25, 475 | "diff_pair_via_gap": 0.25, 476 | "diff_pair_width": 0.2, 477 | "line_style": 0, 478 | "microvia_diameter": 0.3, 479 | "microvia_drill": 0.1, 480 | "name": "Default", 481 | "pcb_color": "rgba(0, 0, 0, 0.000)", 482 | "priority": -1, 483 | "schematic_color": "rgba(0, 0, 0, 0.000)", 484 | "track_width": 0.25, 485 | "via_diameter": 0.6, 486 | "via_drill": 0.4, 487 | "wire_width": 6 488 | }, 489 | { 490 | "bus_width": 12, 491 | "clearance": 0.2, 492 | "diff_pair_gap": 0.25, 493 | "diff_pair_via_gap": 0.25, 494 | "diff_pair_width": 0.2, 495 | "line_style": 0, 496 | "microvia_diameter": 0.4, 497 | "microvia_drill": 0.2, 498 | "name": "Power", 499 | "pcb_color": "rgba(0, 0, 0, 0.000)", 500 | "priority": -1, 501 | "schematic_color": "rgba(0, 0, 0, 0.000)", 502 | "track_width": 0.5, 503 | "via_diameter": 0.7, 504 | "via_drill": 0.5, 505 | "wire_width": 6 506 | } 507 | ], 508 | "meta": { 509 | "version": 4 510 | }, 511 | "net_colors": null, 512 | "netclass_assignments": null, 513 | "netclass_patterns": [ 514 | { 515 | "netclass": "Default", 516 | "pattern": "/A0" 517 | }, 518 | { 519 | "netclass": "Default", 520 | "pattern": "/A1" 521 | }, 522 | { 523 | "netclass": "Default", 524 | "pattern": "/A2" 525 | }, 526 | { 527 | "netclass": "Default", 528 | "pattern": "/A3" 529 | }, 530 | { 531 | "netclass": "Default", 532 | "pattern": "/A4" 533 | }, 534 | { 535 | "netclass": "Default", 536 | "pattern": "/A5" 537 | }, 538 | { 539 | "netclass": "Default", 540 | "pattern": "/A6" 541 | }, 542 | { 543 | "netclass": "Default", 544 | "pattern": "/A7" 545 | }, 546 | { 547 | "netclass": "Default", 548 | "pattern": "/C0" 549 | }, 550 | { 551 | "netclass": "Default", 552 | "pattern": "/C1" 553 | }, 554 | { 555 | "netclass": "Default", 556 | "pattern": "/C2" 557 | }, 558 | { 559 | "netclass": "Default", 560 | "pattern": "/C3" 561 | }, 562 | { 563 | "netclass": "Default", 564 | "pattern": "/CA0" 565 | }, 566 | { 567 | "netclass": "Default", 568 | "pattern": "/CA1" 569 | }, 570 | { 571 | "netclass": "Default", 572 | "pattern": "/CF0" 573 | }, 574 | { 575 | "netclass": "Default", 576 | "pattern": "/CF1" 577 | }, 578 | { 579 | "netclass": "Default", 580 | "pattern": "/D1" 581 | }, 582 | { 583 | "netclass": "Default", 584 | "pattern": "/D2" 585 | }, 586 | { 587 | "netclass": "Default", 588 | "pattern": "/D3" 589 | }, 590 | { 591 | "netclass": "Default", 592 | "pattern": "/D4" 593 | }, 594 | { 595 | "netclass": "Default", 596 | "pattern": "/D5" 597 | }, 598 | { 599 | "netclass": "Default", 600 | "pattern": "/D6" 601 | }, 602 | { 603 | "netclass": "Default", 604 | "pattern": "/D7" 605 | }, 606 | { 607 | "netclass": "Default", 608 | "pattern": "/F0" 609 | }, 610 | { 611 | "netclass": "Default", 612 | "pattern": "/F1" 613 | }, 614 | { 615 | "netclass": "Default", 616 | "pattern": "/F6" 617 | }, 618 | { 619 | "netclass": "Default", 620 | "pattern": "/UPDI" 621 | }, 622 | { 623 | "netclass": "Default", 624 | "pattern": "Net-(D2-Pad2)" 625 | }, 626 | { 627 | "netclass": "Default", 628 | "pattern": "Net-(J3-Pad1)" 629 | }, 630 | { 631 | "netclass": "Default", 632 | "pattern": "Net-(U2-Pad11)" 633 | }, 634 | { 635 | "netclass": "Default", 636 | "pattern": "Net-(U2-Pad12)" 637 | }, 638 | { 639 | "netclass": "Default", 640 | "pattern": "Net-(U2-Pad7)" 641 | }, 642 | { 643 | "netclass": "Power", 644 | "pattern": "/3V3" 645 | }, 646 | { 647 | "netclass": "Power", 648 | "pattern": "/Solar" 649 | }, 650 | { 651 | "netclass": "Power", 652 | "pattern": "GND" 653 | }, 654 | { 655 | "netclass": "Power", 656 | "pattern": "VCC" 657 | } 658 | ] 659 | }, 660 | "pcbnew": { 661 | "last_paths": { 662 | "gencad": "", 663 | "idf": "", 664 | "netlist": "AVR-LORA.net", 665 | "plot": "", 666 | "pos_files": "", 667 | "specctra_dsn": "", 668 | "step": "", 669 | "svg": "", 670 | "vrml": "" 671 | }, 672 | "page_layout_descr_file": "" 673 | }, 674 | "schematic": { 675 | "annotate_start_num": 0, 676 | "bom_export_filename": "", 677 | "bom_fmt_presets": [], 678 | "bom_fmt_settings": { 679 | "field_delimiter": ",", 680 | "keep_line_breaks": false, 681 | "keep_tabs": false, 682 | "name": "CSV", 683 | "ref_delimiter": ",", 684 | "ref_range_delimiter": "", 685 | "string_delimiter": "\"" 686 | }, 687 | "bom_presets": [], 688 | "bom_settings": { 689 | "exclude_dnp": false, 690 | "fields_ordered": [ 691 | { 692 | "group_by": false, 693 | "label": "Reference", 694 | "name": "Reference", 695 | "show": true 696 | }, 697 | { 698 | "group_by": true, 699 | "label": "Value", 700 | "name": "Value", 701 | "show": true 702 | }, 703 | { 704 | "group_by": false, 705 | "label": "Datasheet", 706 | "name": "Datasheet", 707 | "show": true 708 | }, 709 | { 710 | "group_by": false, 711 | "label": "Footprint", 712 | "name": "Footprint", 713 | "show": true 714 | }, 715 | { 716 | "group_by": false, 717 | "label": "Qty", 718 | "name": "${QUANTITY}", 719 | "show": true 720 | }, 721 | { 722 | "group_by": true, 723 | "label": "DNP", 724 | "name": "${DNP}", 725 | "show": true 726 | } 727 | ], 728 | "filter_string": "", 729 | "group_symbols": true, 730 | "include_excluded_from_bom": false, 731 | "name": "Grouped By Value", 732 | "sort_asc": true, 733 | "sort_field": "Reference" 734 | }, 735 | "connection_grid_size": 50.0, 736 | "drawing": { 737 | "dashed_lines_dash_length_ratio": 12.0, 738 | "dashed_lines_gap_length_ratio": 3.0, 739 | "default_line_thickness": 6.0, 740 | "default_text_size": 50.0, 741 | "field_names": [], 742 | "intersheets_ref_own_page": false, 743 | "intersheets_ref_prefix": "", 744 | "intersheets_ref_short": false, 745 | "intersheets_ref_show": false, 746 | "intersheets_ref_suffix": "", 747 | "junction_size_choice": 3, 748 | "label_size_ratio": 0.25, 749 | "operating_point_overlay_i_precision": 3, 750 | "operating_point_overlay_i_range": "~A", 751 | "operating_point_overlay_v_precision": 3, 752 | "operating_point_overlay_v_range": "~V", 753 | "overbar_offset_ratio": 1.23, 754 | "pin_symbol_size": 0.0, 755 | "text_offset_ratio": 0.08 756 | }, 757 | "legacy_lib_dir": "", 758 | "legacy_lib_list": [], 759 | "meta": { 760 | "version": 1 761 | }, 762 | "net_format_name": "Pcbnew", 763 | "page_layout_descr_file": "", 764 | "plot_directory": "", 765 | "space_save_all_events": true, 766 | "spice_adjust_passive_values": false, 767 | "spice_current_sheet_as_root": false, 768 | "spice_external_command": "spice \"%I\"", 769 | "spice_model_current_sheet_as_root": true, 770 | "spice_save_all_currents": false, 771 | "spice_save_all_dissipations": false, 772 | "spice_save_all_voltages": false, 773 | "subpart_first_id": 65, 774 | "subpart_id_separator": 0 775 | }, 776 | "sheets": [ 777 | [ 778 | "5f100a18-1835-4eb6-9a44-b9154f034e06", 779 | "Root" 780 | ] 781 | ], 782 | "text_variables": {} 783 | } 784 | -------------------------------------------------------------------------------- /AVR-LORA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomtor/STM32-RFM95-PCB/5bc3abfc7fafb9c0257237f01dd81a30a5f4eddf/AVR-LORA.pdf -------------------------------------------------------------------------------- /AVR-LORA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomtor/STM32-RFM95-PCB/5bc3abfc7fafb9c0257237f01dd81a30a5f4eddf/AVR-LORA.png -------------------------------------------------------------------------------- /AVR.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP AVR128DB28 4 | D 24MHz, 128kB Flash, 4kB Boot, 16kB SRAM, 512B EEPROM, SOIC-28 5 | K AVR 8/16bit Microcontroller AVR 6 | F https://www.microchip.com/content/dam/mchp/documents/MCU08/ProductDocuments/DataSheets/AVR128DB28-32-48-64-DataSheet-DS40002247A.pdf 7 | $ENDCMP 8 | # 9 | #End Doc Library 10 | -------------------------------------------------------------------------------- /AVR.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # AVR128DB28 5 | # 6 | DEF AVR128DB28 U 0 20 Y Y 1 F N 7 | F0 "U" -600 1100 50 H V L BNN 8 | F1 "AVR128DB28" 100 -1150 50 H V L TNN 9 | F2 "Package_SO:SOIC-28W_7.5x17.9mm_P1.27mm" 50 -800 50 H I C CIN 10 | F3 "" 0 -250 50 H I C CNN 11 | DRAW 12 | S -600 1050 600 -1100 0 1 10 f 13 | X PF1/XTAL32K2 17 -700 -450 100 R 50 50 0 0 B 14 | X PF6 18 -700 -550 100 R 50 50 0 0 B 15 | X PA7 1 700 -50 100 L 50 50 1 1 B 16 | X PD4 10 -700 150 100 R 50 50 1 1 B 17 | X PD5 11 -700 50 100 R 50 50 1 1 B 18 | X PD6 12 -700 -50 100 R 50 50 1 1 B 19 | X PD7 13 -700 -150 100 R 50 50 1 1 B 20 | X AVDD 14 150 1150 100 D 50 50 1 1 W 21 | X GND 15 -100 -1200 100 U 50 50 1 1 W 22 | X PF0/XTAL32K1 16 -700 -350 100 R 50 50 1 1 B 23 | X UPDI 19 -700 650 100 R 50 50 1 1 B 24 | X PC0 2 700 -350 100 L 50 50 1 1 B 25 | X VDD 20 -200 1150 100 D 50 50 1 1 W 26 | X GND 21 0 -1200 100 U 50 50 1 1 W 27 | X PA0/XTALHF1 22 700 650 100 L 50 50 1 1 B 28 | X PA1/XTALHF2 23 700 550 100 L 50 50 1 1 B 29 | X PA2 24 700 450 100 L 50 50 1 1 B 30 | X PA3 25 700 350 100 L 50 50 1 1 B 31 | X PA4 26 700 250 100 L 50 50 1 1 B 32 | X PA5 27 700 150 100 L 50 50 1 1 B 33 | X PA6 28 700 50 100 L 50 50 1 1 B 34 | X PC1 3 700 -450 100 L 50 50 1 1 B 35 | X PC2 4 700 -550 100 L 50 50 1 1 B 36 | X PC3 5 700 -650 100 L 50 50 1 1 B 37 | X VDDIO2 6 -100 1150 100 D 50 50 1 1 W 38 | X PD1 7 -700 450 100 R 50 50 1 1 B 39 | X PD2 8 -700 350 100 R 50 50 1 1 B 40 | X PD3 9 -700 250 100 R 50 50 1 1 B 41 | ENDDRAW 42 | ENDDEF 43 | # 44 | #End Library 45 | -------------------------------------------------------------------------------- /AVR128DB/AVR128DB.ino: -------------------------------------------------------------------------------- 1 | #define led PIN_PA7 2 | 3 | #define ON_TIME 4 4 | 5 | #define USE_OSC 1 6 | 7 | // Slowdown 2 sec every 24 hours: 8 | // 24 * 3600 / 2 = 43200 ticks with 2 second interval in 24 hours. 9 | // Adjustment is in steps of 2 seconds (a tick increments the clock with 2 seconds). 10 | 11 | #if USE_OSC 12 | #define ADJUST -(43200/46) // about 100s slow each 24 hrs 13 | #else 14 | #define ADJUST 17200 // About 5s fast in 24hrs 15 | #endif 16 | 17 | 18 | #include 19 | 20 | void RTC_init(void) 21 | { 22 | /* Initialize RTC: */ 23 | while (RTC.STATUS > 0) 24 | { 25 | ; /* Wait for all register to be synchronized */ 26 | } 27 | #if USE_OSC 28 | RTC.CLKSEL = RTC_CLKSEL_OSC32K_gc; /* 32.768kHz Internal Ultra-Low-Power Oscillator (OSCULP32K) */ 29 | #else 30 | _PROTECTED_WRITE(CLKCTRL.XOSC32KCTRLA, 0x3); 31 | 32 | while (RTC.STATUS > 0) ; 33 | 34 | RTC.CLKSEL = RTC_CLKSEL_XOSC32K_gc; /* 32.768kHz External Oscillator */ 35 | #endif 36 | 37 | RTC.PITINTCTRL = RTC_PI_bm; /* PIT Interrupt: enabled */ 38 | 39 | // For 2s overflow ticks while sleeping: 40 | RTC.INTCTRL = RTC_OVF_bm; 41 | 42 | RTC.CTRLA = RTC_PRESCALER_DIV1_gc | RTC_RUNSTDBY_bm | RTC_RTCEN_bm; 43 | } 44 | 45 | 46 | volatile uint16_t ticks; 47 | 48 | ISR(RTC_PIT_vect) 49 | { 50 | if (ticks) 51 | ticks--; 52 | 53 | RTC.PITINTFLAGS = RTC_PI_bm; /* Clear interrupt flag by writing '1' (required) */ 54 | } 55 | 56 | 57 | volatile uint8_t sec2s, hours, minutes; // 2s ticks 58 | 59 | 60 | ISR(RTC_CNT_vect) 61 | { 62 | static unsigned int adjust_ticks; 63 | #if ADJUST > 0 64 | if (++adjust_ticks == ADJUST) { 65 | adjust_ticks = 0; 66 | } else { 67 | #elif ADJUST < 0 68 | if (++adjust_ticks >= -ADJUST && sec2s == 2) { // Do not skip the 0s beat, adjust at 2s beat, skips 4s beat 69 | adjust_ticks = 0; 70 | sec2s = 6; 71 | } else { 72 | #else 73 | { 74 | #endif 75 | if (sec2s < 58) 76 | sec2s += 2; 77 | else { 78 | sec2s = 0; 79 | if (minutes < 59) 80 | minutes++; 81 | else { 82 | minutes = 0; 83 | if (hours < 23) 84 | hours++; 85 | else 86 | hours = 0; 87 | } 88 | } 89 | } 90 | 91 | RTC.INTFLAGS = RTC_OVF_bm; /* Clear interrupt flag by writing '1' (required) */ 92 | } 93 | 94 | 95 | void sleepDelay(uint16_t n) 96 | { 97 | uint8_t period; 98 | uint16_t cticks; 99 | 100 | // Before sleeping, disable ADC 101 | ADC0.CTRLA &= ~ADC_ENABLE_bm; // Very important on the tinyAVR 2-series 102 | 103 | if (n < 100) { 104 | period = RTC_PERIOD_CYC8_gc; // 1/4 ms 105 | cticks = (n << 1); // Why NOT (n << 2) !?!?! 106 | } else if (n < 1000) { 107 | period = RTC_PERIOD_CYC64_gc; // 2 ms 108 | cticks = (n >> 1); 109 | } else if (n < 5000) { 110 | period = RTC_PERIOD_CYC1024_gc; // 32 ms 111 | cticks = (n >> 5); 112 | } else { 113 | period = RTC_PERIOD_CYC8192_gc; // 256 ms 114 | cticks = (n >> 8); 115 | } 116 | 117 | while (RTC.PITSTATUS & RTC_CTRLBUSY_bm) // Wait for new settings to synchronize 118 | ; 119 | 120 | RTC.PITCTRLA = period | RTC_PITEN_bm; // Enable PIT counter: enabled 121 | 122 | while (RTC.PITSTATUS & RTC_CTRLBUSY_bm) // Wait for new settings to synchronize 123 | ; 124 | ticks = cticks; 125 | uint32_t start = millis(); 126 | 127 | while (ticks) 128 | sleep_cpu(); 129 | 130 | set_millis(start + n); 131 | 132 | RTC.PITCTRLA = 0; /* Disable PIT counter */ 133 | 134 | // upon waking if you plan to use the ADC 135 | ADC0.CTRLA |= ~ADC_ENABLE_bm; 136 | } 137 | 138 | #if 1 139 | unsigned int getBandgap () 140 | { 141 | analogReference(INTERNAL1V024); 142 | return 10 * analogRead(ADC_VDDDIV10); 143 | } // end of getBandgap 144 | #endif 145 | 146 | #if 1 147 | unsigned int getBattery () 148 | { 149 | unsigned int val = analogRead(PIN_PD1); 150 | 151 | // 3.0v regulator with voltage divider (820k/820k): 152 | const float Vref = 3000, 153 | R = 820000, 154 | Rintern = 100000000, // ATtiny ADC internalresistance 155 | Rpar = (R * Rintern) / (R + Rintern); 156 | const unsigned long scale = Vref * (R + Rpar) / Rpar; 157 | unsigned int results = scale * val / 0x400; 158 | 159 | return results; 160 | } // end of getBattery 161 | #endif 162 | 163 | 164 | void blinkN(uint8_t n, uint8_t l = led) 165 | { 166 | for (uint8_t i = 0; i < n; i++) { 167 | digitalWrite(l, HIGH); 168 | sleepDelay(ON_TIME); 169 | digitalWrite(l, LOW); 170 | sleepDelay(700); 171 | } 172 | } 173 | 174 | 175 | void blinkDec(uint8_t d) 176 | { 177 | blinkN(d / 10); 178 | sleepDelay(1500); 179 | blinkN(d % 10); 180 | sleepDelay(3000); 181 | } 182 | 183 | void blinkDec3(uint16_t d) 184 | { 185 | blinkN(d / 100); 186 | sleepDelay(1500); 187 | blinkDec(d % 100); 188 | } 189 | 190 | 191 | // the setup routine runs once when you press reset: 192 | void setup() { 193 | RTC_init(); /* Initialize the RTC timer */ 194 | //set_sleep_mode(SLEEP_MODE_PWR_DOWN); /* Set sleep mode to POWER DOWN mode */ 195 | set_sleep_mode(SLEEP_MODE_STANDBY); 196 | sleep_enable(); /* Enable sleep mode, but not going to sleep yet */ 197 | 198 | pinMode(PIN_PA0, INPUT_PULLUP); 199 | pinMode(PIN_PA1, INPUT_PULLUP); 200 | pinMode(PIN_PA2, INPUT_PULLUP); 201 | pinMode(PIN_PA3, INPUT_PULLUP); 202 | pinMode(PIN_PA4, INPUT_PULLUP); 203 | pinMode(PIN_PA5, INPUT_PULLUP); 204 | pinMode(PIN_PA6, INPUT_PULLUP); 205 | pinMode(PIN_PA7, INPUT_PULLUP); 206 | 207 | pinMode(PIN_PD1, INPUT_PULLUP); 208 | pinMode(PIN_PD2, INPUT_PULLUP); 209 | pinMode(PIN_PD3, INPUT_PULLUP); 210 | pinMode(PIN_PD4, INPUT_PULLUP); 211 | pinMode(PIN_PD5, INPUT_PULLUP); 212 | pinMode(PIN_PD6, INPUT_PULLUP); 213 | pinMode(PIN_PD7, INPUT_PULLUP); 214 | 215 | pinMode(PIN_PC0, INPUT_PULLUP); 216 | pinMode(PIN_PC1, INPUT_PULLUP); 217 | pinMode(PIN_PC2, INPUT_PULLUP); 218 | pinMode(PIN_PC3, INPUT_PULLUP); 219 | 220 | pinMode(PIN_PF0, INPUT_PULLUP); 221 | pinMode(PIN_PF1, INPUT_PULLUP); 222 | 223 | pinMode(led, OUTPUT); 224 | 225 | for (byte i = 0; i < 3; i++) { 226 | blinkN(1, led); 227 | } 228 | 229 | sleepDelay(5000); 230 | 231 | getBandgap(); // drop first 232 | 233 | // while (1) { 234 | // digitalWriteFast(led, (sec2s & 0x2) ? HIGH : LOW); 235 | // } 236 | } 237 | 238 | 239 | unsigned voltage; 240 | 241 | volatile unsigned cnt; 242 | 243 | 244 | // the loop routine runs over and over again forever: 245 | void loop() { 246 | 247 | //unsigned int v = voltage = getBattery(); 248 | unsigned int v = voltage = getBandgap(); 249 | blinkDec((v + 50) / 100); 250 | // blinkDec3((v + 5) / 10); 251 | 252 | blinkDec(minutes); 253 | 254 | // sleepDelay(5000); return; 255 | while (sec2s != 0) { 256 | if (sec2s % 10 == 0 && sec2s <= 55) { 257 | blinkN(1); 258 | sleepDelay(9000); 259 | } else 260 | sleepDelay(100); 261 | } 262 | 263 | } 264 | -------------------------------------------------------------------------------- /AVR128DBLora/AVR128DBLora.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This example AVR128DB script for LORA counts events on a specified pin and sends the count with LoraWAN. 3 | 4 | I use it for a rain bucket counter. 5 | 6 | The script is tuned for low power consumption (4 microampere sleep current including RFM95 chip) 7 | 8 | Tom Vijlbrief (C) 2025 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #define RTC_PERIOD 0x8000 // Overflow at 32768 ticks from RTC 23 | #define RTC_MILLIS 1000 // That matches 1000ms 24 | 25 | #define LED PIN_PA7 26 | 27 | #define COUNT_PIN PIN_PA2 28 | 29 | #define GET_BATTERY 0 // Read battery when using a voltage regulator 30 | 31 | #define USE_LORA // Activate LORA RFM95 chip 32 | 33 | #define USE_TIMER // Use timer in idle sleep, instead of standby sleep 34 | #define SLEEPINT // Do not count PIT interrupts but use RTC interrupt at exact time 35 | 36 | #undef Serial 37 | #define Serial Serial1 // I use serial port 1 (C0/C1 = Tx/Rx) 38 | 39 | unsigned TX_INTERVAL = 300; 40 | 41 | #define ON_TIME 3 // LED ON blink time in ms 42 | 43 | //#define SLEEP_ADJUST 1070 // My 32768 clock is 4.5% to fast, so 1024 millis should be 1070 44 | 45 | #include "my_lora.h" // this file has my APP settings 46 | 47 | //static const u1_t APPEUI[8] PROGMEM = { }; // reversed 8 bytes of AppEUI registered with ttnctl 48 | void os_getArtEui (u1_t* buf) { memcpy_P(buf, APPEUI, 8);} 49 | 50 | //static const unsigned char APPKEY[16] PROGMEM = { }; // non-reversed 16 bytes of the APPKEY used when registering a device with ttnctl register DevEUI AppKey 51 | void os_getDevKey (u1_t* buf) { memcpy_P(buf, APPKEY, 16);} 52 | 53 | static u1_t DEVEUI[8]={ }; // Filled by fillDEVUI() 54 | void os_getDevEui (u1_t* buf) { memcpy(buf, DEVEUI, 8);} 55 | 56 | void fillDEVEUI (u1_t* buf) { 57 | // use chip ID: 58 | u1_t *serial= (u1_t*)&SIGROW.SERNUM0; 59 | for (byte i= 0; i <= 7; i++) 60 | buf[i] = serial[i] ^ serial[8+i]; 61 | // Make locally registered: 62 | buf[0] = (buf[0] & ~0x3) | 0x1; 63 | 64 | Serial.print("DevEui: "); 65 | for (int i = 7; i >= 0; i--) { 66 | Serial.printHex((uint8_t)buf[i]); 67 | Serial.print(' '); 68 | } 69 | Serial.println(""); 70 | } 71 | 72 | struct { 73 | unsigned short temp; 74 | unsigned short rain; 75 | byte power; 76 | byte rate2; 77 | } mydata; 78 | 79 | volatile unsigned counter; // Counts pin transitions to low 80 | 81 | static osjob_t sendjob; 82 | 83 | // Pin mapping 84 | const lmic_pinmap lmic_pins = { 85 | .nss = PIN_PD6, 86 | .rxtx = LMIC_UNUSED_PIN, 87 | .rst = PIN_PD5, 88 | .dio = {PIN_PD2, PIN_PD3, PIN_PD4}, 89 | }; 90 | 91 | void do_send(osjob_t* j){ 92 | // Check if there is not a current TX/RX job running 93 | if (LMIC.opmode & OP_TXRXPEND) { 94 | Serial.println(F("OP_TXRXPEND, not sending")); 95 | } else { 96 | static unsigned long last_send; 97 | // Serial.println(TX_INTERVAL); 98 | // Serial.println(last_send); 99 | // Serial.println(millis()); 100 | if (last_send && counter == 0 101 | && ((unsigned long) (millis() - last_send)) < (unsigned long)(TX_INTERVAL * 2500L)) { // send every 2.5 intervals (rounds to 3) when counter == 0 (no rain) 102 | Serial.println("Skip"); 103 | os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(TX_INTERVAL), do_send); 104 | return; 105 | } 106 | mydata.power = getBandgap() - 100; 107 | noInterrupts(); // prevent race condition with rain interrupts 108 | mydata.rain = counter; 109 | counter = 0; 110 | interrupts(); 111 | // Prepare upstream data transmission at the next possible time. 112 | LMIC_setTxData2(1, (uint8_t*)&mydata, sizeof(mydata), 0); 113 | Serial.println(F("Packet queued")); 114 | last_send= millis(); 115 | } 116 | // Next TX is scheduled after TX_COMPLETE event. 117 | } 118 | 119 | 120 | bool in_tx; 121 | 122 | void onEvent (ev_t ev) { 123 | Serial.print(os_getTime()); 124 | Serial.print(": "); 125 | switch(ev) { 126 | case EV_SCAN_TIMEOUT: 127 | Serial.println(F("EV_SCAN_TIMEOUT")); 128 | break; 129 | case EV_BEACON_FOUND: 130 | Serial.println(F("EV_BEACON_FOUND")); 131 | break; 132 | case EV_BEACON_MISSED: 133 | Serial.println(F("EV_BEACON_MISSED")); 134 | break; 135 | case EV_BEACON_TRACKED: 136 | Serial.println(F("EV_BEACON_TRACKED")); 137 | break; 138 | case EV_JOINING: 139 | Serial.println(F("EV_JOINING")); 140 | break; 141 | case EV_JOINED: 142 | Serial.println(F("EV_JOINED")); 143 | in_tx = false; 144 | { 145 | u4_t netid = 0; 146 | devaddr_t devaddr = 0; 147 | u1_t nwkKey[16]; 148 | u1_t artKey[16]; 149 | LMIC_getSessionKeys(&netid, &devaddr, nwkKey, artKey); 150 | Serial.print("netid: "); 151 | Serial.println(netid, DEC); 152 | Serial.print("devaddr: "); 153 | Serial.println(devaddr, HEX); 154 | Serial.print("AppSKey: "); 155 | for (size_t i=0; i 1) { 200 | switch ((LMIC.frame + LMIC.dataBeg)[1]) { 201 | case 7: LMIC_setDrTxpow(DR_SF7, 14); break; 202 | case 8: LMIC_setDrTxpow(DR_SF8, 14); break; 203 | case 9: LMIC_setDrTxpow(DR_SF9, 14); break; 204 | case 10: LMIC_setDrTxpow(DR_SF10, 14); break; 205 | case 11: LMIC_setDrTxpow(DR_SF11, 14); break; 206 | case 12: LMIC_setDrTxpow(DR_SF12, 14); break; 207 | } 208 | } 209 | } 210 | // Schedule next transmission 211 | os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(TX_INTERVAL - 6), do_send); // adjust - 6 for time to send 212 | break; 213 | case EV_LOST_TSYNC: 214 | Serial.println(F("EV_LOST_TSYNC")); 215 | break; 216 | case EV_RESET: 217 | Serial.println(F("EV_RESET")); 218 | break; 219 | case EV_RXCOMPLETE: 220 | // data received in ping slot 221 | Serial.println(F("EV_RXCOMPLETE")); 222 | break; 223 | case EV_LINK_DEAD: 224 | Serial.println(F("EV_LINK_DEAD")); 225 | break; 226 | case EV_LINK_ALIVE: 227 | Serial.println(F("EV_LINK_ALIVE")); 228 | break; 229 | /* 230 | || This event is defined but not used in the code. No 231 | || point in wasting codespace on it. 232 | || 233 | || case EV_SCAN_FOUND: 234 | || Serial.println(F("EV_SCAN_FOUND")); 235 | || break; 236 | */ 237 | case EV_TXSTART: 238 | in_tx = true; 239 | Serial.println(F("EV_TXSTART")); 240 | break; 241 | case EV_TXCANCELED: 242 | Serial.println(F("EV_TXCANCELED")); 243 | break; 244 | case EV_RXSTART: 245 | /* do not print anything -- it wrecks timing */ 246 | break; 247 | case EV_JOIN_TXCOMPLETE: 248 | Serial.println(F("EV_JOIN_TXCOMPLETE: no JoinAccept")); 249 | break; 250 | 251 | default: 252 | Serial.print(F("Unknown event: ")); 253 | Serial.println((unsigned) ev); 254 | break; 255 | } 256 | } 257 | 258 | 259 | #define SLEEPINT // Do not count PIT interrupts but use RTC interrupt at exact time 260 | 261 | void RTC_init(void) 262 | { 263 | /* Initialize RTC: */ 264 | while (RTC.STATUS > 0) 265 | ; /* Wait for all register to be synchronized */ 266 | RTC.PER = RTC_PERIOD - 1; /* 1 sec overflow */ 267 | RTC.CLKSEL = RTC_CLKSEL_OSC32K_gc; /* 32.768kHz Internal Ultra-Low-Power Oscillator (OSCULP32K) */ 268 | //RTC.PITINTCTRL = RTC_PI_bm; /* PIT Interrupt: enabled */ 269 | 270 | // For overflow ticks while sleeping: 271 | RTC.INTCTRL = RTC_OVF_bm; 272 | 273 | RTC.CTRLA |= RTC_PRESCALER_DIV1_gc | RTC_RUNSTDBY_bm | RTC_RTCEN_bm; 274 | } 275 | 276 | 277 | #ifndef SLEEPINT 278 | volatile uint16_t ticks; 279 | 280 | ISR(RTC_PIT_vect) 281 | { 282 | if (ticks) 283 | ticks--; 284 | 285 | RTC.PITINTFLAGS = RTC_PI_bm; /* Clear interrupt flag by writing '1' (required) */ 286 | } 287 | #else 288 | volatile uint8_t sleep_cnt; 289 | #endif 290 | 291 | volatile uint8_t secs, hours, minutes; 292 | volatile uint16_t time_s; 293 | 294 | ISR(RTC_CNT_vect) 295 | { 296 | #ifdef SLEEPINT 297 | if (RTC.INTFLAGS & RTC_CMP_bm) { 298 | sleep_cnt--; 299 | RTC.INTFLAGS = RTC_CMP_bm; /* Clear interrupt flag by writing '1' (required) */ 300 | } 301 | #endif 302 | 303 | if (RTC.INTFLAGS & RTC_OVF_bm) { 304 | time_s++; 305 | if (secs < 59) 306 | secs += 1; 307 | else { 308 | secs = 0; 309 | if (minutes < 59) 310 | minutes++; 311 | else { 312 | minutes = 0; 313 | if (hours < 23) 314 | hours++; 315 | else 316 | hours = 0; 317 | } 318 | } 319 | RTC.INTFLAGS = RTC_OVF_bm; /* Clear interrupt flag by writing '1' (required) */ 320 | } 321 | } 322 | 323 | #ifdef USE_TIMER 324 | bool idle_mode = true; 325 | 326 | void sleep_idle() // We do not use real idle mode, but just keep TCB2 running in standby 327 | { 328 | idle_mode = true; 329 | TCB2.CTRLA = TCB2.CTRLA | TCB_RUNSTDBY_bm; 330 | } 331 | 332 | void sleep_standby() 333 | { 334 | idle_mode = false; 335 | TCB2.CTRLA = TCB2.CTRLA & ~TCB_RUNSTDBY_bm; 336 | } 337 | #endif 338 | 339 | void sleepDelay(uint16_t orgn, bool precise=false) 340 | { 341 | #ifndef SLEEPINT 342 | uint8_t period; 343 | uint16_t cticks; 344 | uint16_t n = orgn; 345 | 346 | #if SLEEP_ADJUST 347 | if (n >= 50) { 348 | n = (n * (unsigned long)SLEEP_ADJUST) >> 8; 349 | n >>= 2; // prefer faster shift over codesize 350 | } 351 | #endif 352 | 353 | int nudge; 354 | if (n < 10) { 355 | period = RTC_PERIOD_CYC8_gc; // 1/4 ms 356 | cticks = (n << 1); // Why NOT (n << 2) !?!?! 357 | nudge = 0; 358 | } else if (n <= 1000 || precise) { 359 | period = RTC_PERIOD_CYC32_gc; // 1 ms 360 | cticks = n; 361 | nudge = 1; 362 | #if 0 363 | } else if (n < 5000) { 364 | period = RTC_PERIOD_CYC1024_gc; // 32 ms 365 | cticks = (n >> 5); 366 | nudge = 32; 367 | #endif 368 | } else { 369 | period = RTC_PERIOD_CYC8192_gc; // 256 ms 370 | cticks = (n >> 8); 371 | nudge = 256; 372 | } 373 | 374 | while (RTC.PITSTATUS & RTC_CTRLBUSY_bm) // Wait for new settings to synchronize 375 | ; 376 | 377 | RTC.PITCTRLA = period | RTC_PITEN_bm; // Enable PIT counter: enabled 378 | 379 | RTC.PITINTCTRL |= RTC_PI_bm; /* PIT Interrupt: enabled */ 380 | 381 | //while (RTC.PITSTATUS & RTC_CTRLBUSY_bm) // Wait for new settings to synchronize 382 | //; 383 | ticks = cticks; 384 | uint32_t start = millis(); 385 | 386 | while (ticks) { 387 | sleep_cpu(); 388 | #ifndef USE_TIMER 389 | if (nudge) 390 | nudge_millis(nudge); 391 | #else 392 | if (!idle_mode) 393 | if (nudge) 394 | nudge_millis(nudge); 395 | #endif 396 | } 397 | 398 | //RTC.PITCTRLA = 0; /* Disable PIT counter, should not be done, see erratum */ 399 | RTC.PITINTCTRL &= ~RTC_PI_bm; /* PIT Interrupt: disabled */ 400 | 401 | #ifndef USE_TIMER 402 | if (!nudge) 403 | set_millis(start + orgn); 404 | #else 405 | if (!idle_mode) 406 | if (!nudge) 407 | set_millis(start + orgn); 408 | #endif 409 | 410 | #else 411 | 412 | while (RTC.STATUS /* & RTC_CMPBUSY_bm */) // Wait for new settings to synchronize 413 | ; 414 | 415 | uint32_t tdelay; 416 | noInterrupts(); 417 | uint16_t cnt = RTC.CNT; 418 | RTC.CMP = (cnt + (tdelay = (orgn * 32UL) + uint16_t(orgn / 4 * 3))) & (RTC_PERIOD-1); // With this calculation every multiple of 4ms is exact! 419 | // Note 20011 ms = 655360 ticks = 20 overflows exactly, so CMP will be set to the current CNT and this works OK 420 | // 9005 will set CMP to CNT+1 421 | 422 | #if 1 423 | if (RTC.CNT == RTC.CMP) { 424 | tdelay -= RTC_PERIOD; 425 | } else if (((RTC.CMP - cnt) & (RTC_PERIOD-1)) <= 2) { // overflow is/was near, 4Mhz clock or faster 426 | while (RTC.CNT != RTC.CMP) // Wait for it... 427 | ; 428 | tdelay -= RTC_PERIOD; 429 | } 430 | #endif 431 | 432 | interrupts(); 433 | 434 | RTC.INTCTRL |= RTC_CMP_bm; // This might trigger a pending interrupt, so do this before assigning sleep_cnt! 435 | sleep_cnt = tdelay / RTC_PERIOD + 1; // Calculate number of wrap arounds (overflows) 436 | uint64_t start = millis(); 437 | while (sleep_cnt) { 438 | sleep_cpu(); 439 | } 440 | #ifndef USE_TIMER 441 | set_millis(start + orgn); 442 | #else 443 | if (!idle_mode) 444 | set_millis(start + orgn); 445 | #endif 446 | 447 | RTC.INTCTRL &= ~RTC_CMP_bm; 448 | #endif 449 | } 450 | 451 | #if 1 452 | unsigned int getBandgap () 453 | { 454 | analogReference(INTERNAL1V024); 455 | analogRead(ADC_VDDDIV10); // drop first 456 | return analogRead(ADC_VDDDIV10); 457 | } // end of getBandgap 458 | #endif 459 | 460 | #if GET_BATTERY 461 | unsigned int getBattery () 462 | { 463 | analogReference(VDD); 464 | 465 | analogRead(PIN_PD1); 466 | unsigned int val = analogRead(PIN_PD1); 467 | 468 | // 3.3v regulator with voltage divider (820k/820k): 469 | const float Vref = 3300; 470 | const unsigned long scale = Vref*2; 471 | unsigned int results = scale * val / 0x400; 472 | 473 | return results; 474 | } // end of getBattery 475 | #endif 476 | 477 | #if 0 478 | unsigned int getTemp() 479 | { 480 | analogReference(INTERNAL2V048); 481 | analogRead(ADC_TEMPERATURE); 482 | uint16_t adc_reading = analogRead(ADC_TEMPERATURE); 483 | uint16_t sigrow_offset = SIGROW.TEMPSENSE1; // Read unsigned value from signature row 484 | uint16_t sigrow_slope = SIGROW.TEMPSENSE0; // Read unsigned value from signature row 485 | uint32_t temp = sigrow_offset - adc_reading; 486 | temp *= sigrow_slope; // Result will overflow 16-bit variable 487 | temp += 0x0800; // Add 4096/2 to get correct rounding on division below 488 | temp >>= 12; // Round off to nearest degree in Kelvin, by dividing with 2^12 (4096) 489 | return temp-273; 490 | } 491 | #endif 492 | 493 | void blinkN(uint8_t n, uint8_t l = LED) 494 | { 495 | for (uint8_t i = 0; i < n; i++) { 496 | digitalWriteFast(l, HIGH); 497 | sleepDelay(ON_TIME); 498 | digitalWriteFast(l, LOW); 499 | sleepDelay(700); 500 | } 501 | } 502 | 503 | void blinkDec(uint8_t d) 504 | { 505 | blinkN(d / 10); 506 | sleepDelay(1500); 507 | blinkN(d % 10); 508 | sleepDelay(3000); 509 | } 510 | 511 | void blinkDec3(uint16_t d) 512 | { 513 | blinkN(d / 100); 514 | sleepDelay(1500); 515 | blinkDec(d % 100); 516 | } 517 | 518 | 519 | // the setup routine runs once when you press reset: 520 | void setup() { 521 | 522 | Serial.begin(38400, SERIAL_TX_ONLY); 523 | Serial.println("Starting"); 524 | delay(100); 525 | 526 | TCA0.SPLIT.CTRLA = 0; // If you aren't using TCA0 for anything 527 | 528 | RTC_init(); /* Initialize the RTC timer */ 529 | set_sleep_mode(SLEEP_MODE_STANDBY); 530 | #ifdef USE_TIMER 531 | sleep_standby(); 532 | #endif 533 | sleep_enable(); /* Enable sleep mode, but not going to sleep yet */ 534 | 535 | pinMode(PIN_PA0, INPUT_PULLUP); 536 | pinMode(PIN_PA1, INPUT_PULLUP); 537 | pinMode(PIN_PA2, INPUT_PULLUP); 538 | pinMode(PIN_PA3, INPUT_PULLUP); 539 | pinMode(PIN_PA4, INPUT_PULLUP); 540 | pinMode(PIN_PA5, INPUT_PULLUP); 541 | pinMode(PIN_PA6, INPUT_PULLUP); 542 | pinMode(PIN_PA7, INPUT_PULLUP); 543 | 544 | #if GET_BATTERY 545 | pinMode(PIN_PD1, INPUT); 546 | #else 547 | pinMode(PIN_PD1, INPUT_PULLUP); 548 | #endif 549 | pinMode(PIN_PD2, INPUT_PULLUP); 550 | pinMode(PIN_PD3, INPUT_PULLUP); 551 | pinMode(PIN_PD4, INPUT_PULLUP); 552 | pinMode(PIN_PD5, INPUT_PULLUP); 553 | pinMode(PIN_PD6, INPUT_PULLUP); 554 | pinMode(PIN_PD7, INPUT_PULLUP); 555 | 556 | //pinMode(PIN_PC0, INPUT_PULLUP); // Serial out 557 | pinMode(PIN_PC1, INPUT_PULLUP); 558 | pinMode(PIN_PC2, INPUT_PULLUP); 559 | pinMode(PIN_PC3, INPUT_PULLUP); 560 | 561 | pinMode(PIN_PF0, INPUT_PULLUP); 562 | pinMode(PIN_PF1, INPUT_PULLUP); 563 | 564 | pinMode(LED, OUTPUT); 565 | pinConfigure(COUNT_PIN, (PIN_DIR_INPUT | PIN_PULLUP | PIN_ISC_FALL)); 566 | 567 | for (byte i = 0; i < 3; i++) { 568 | blinkN(1, LED); 569 | } 570 | 571 | fillDEVEUI(DEVEUI); 572 | Serial.flush(); 573 | 574 | #ifdef USE_LORA 575 | // LMIC init 576 | os_init(); 577 | // Reset the MAC state. Session and pending data transfers will be discarded. 578 | LMIC_reset(); 579 | #ifndef USE_TIMER 580 | LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100); 581 | #else 582 | LMIC_setClockError(MAX_CLOCK_ERROR * 2 / 100); 583 | #endif 584 | 585 | // Start job (sending automatically starts OTAA too) 586 | do_send(&sendjob); 587 | #endif 588 | } 589 | 590 | ISR(PORTA_PORT_vect) 591 | { 592 | #if COUNT_PIN != PIN_PA2 593 | #error Adapt this code fragment! 594 | #endif 595 | //check flags, this code is from the DxCore documentation 596 | byte flags = VPORTA.INTFLAGS; 597 | if (flags & (1 << 2)) { 598 | PORTA.PIN2CTRL &= ~PORT_ISC_gm; 599 | VPORTA.INTFLAGS |= (1 << 2); 600 | } 601 | if (flags & (1 << 2)) { 602 | // Handle flag 2 interrupt. 603 | static uint16_t prev; 604 | if (counter == 0) 605 | time_s = 0; 606 | if (time_s - prev > 1 || counter == 0) { 607 | counter++; 608 | prev = time_s; 609 | } 610 | } 611 | } 612 | 613 | 614 | // the loop routine runs over and over again forever: 615 | void loop() { 616 | static int loopcnt; 617 | 618 | loopcnt++; 619 | os_runloop_once(); 620 | 621 | if (in_tx) { 622 | if ((loopcnt & 0x7FF) == 1) { 623 | Serial.print('+'); 624 | } 625 | Serial.flush(); 626 | #ifdef USE_TIMER 627 | digitalWriteFast(LED, (loopcnt & 0x3F) == 0); 628 | sleep_idle(); 629 | if (!os_queryTimeCriticalJobs(ms2osticks(65))) 630 | sleepDelay(64); 631 | #else 632 | digitalWriteFast(LED, (loopcnt & 0xF) == 0); 633 | #endif 634 | return; 635 | } 636 | digitalWriteFast(LED, LOW); 637 | #ifdef USE_TIMER 638 | sleep_standby(); 639 | #endif 640 | 641 | //Serial.print(millis()); Serial.print(':'); 642 | //unsigned int v = voltage = getBattery(); 643 | // unsigned int v = voltage = getBandgap(); 644 | // mydata.power = v - 100; 645 | 646 | #if GET_BATTERY 647 | Serial.print(getBattery()); 648 | Serial.print(' '); 649 | #endif 650 | // Serial.println(getBandgap()); 651 | // Serial.print(' '); 652 | // Serial.print(counter); 653 | // Serial.print(' '); 654 | // Serial.println(digitalRead(COUNT_PIN)); 655 | // Serial.flush(); 656 | 657 | // blinkN(mydata.power/10, led); 658 | 659 | if (!os_queryTimeCriticalJobs(ms2osticks(4000))) { 660 | if ((loopcnt & 0x3) == 0) 661 | blinkN(1, LED); 662 | Serial.print('-'); Serial.flush(); 663 | sleepDelay(3000); 664 | } else if (!os_queryTimeCriticalJobs(ms2osticks(101))) 665 | sleepDelay(100); 666 | 667 | #ifdef USE_TIMER 668 | sleep_idle(); 669 | #endif 670 | } 671 | -------------------------------------------------------------------------------- /AVR128DBLora/compile.sh: -------------------------------------------------------------------------------- 1 | rm -rf build 2 | rm *.lst *.map 3 | arduino-cli compile -e --fqbn DxCore:megaavr:avrdb 4 | -------------------------------------------------------------------------------- /AVR128_RadioLib/AVR128_RadioLib.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Adapted RadioLib example for AVR128DB with rain bucket counter 3 | * 4 | * Power usage 2uA in sleep mode. Also enters 2uA (radio) sleep when waiting for LoraWan reply. 5 | */ 6 | 7 | #include "config.h" 8 | 9 | #include 10 | 11 | int uplinkIntervalSeconds = 1 * 60; // minutes x seconds 12 | 13 | #define LED PIN_PA7 14 | #define COUNT_PIN PIN_PA2 15 | 16 | //#define TIMING_PIN PIN_PD7 17 | 18 | #define ON_TIME 3 // LED ON blink time in ms 19 | 20 | #define RTC_PERIOD 0x8000 // Overflow at 32768 ticks from RTC 21 | #define RTC_MILLIS 1000 // That matches 1000ms 22 | 23 | #define USE_OSC 0 // 1 if no crystal or 0 when using a 32768 crystal 24 | 25 | volatile unsigned counter; // Counts pin transitions to low 26 | 27 | typedef uint8_t u1_t; 28 | 29 | void fillDEVEUI (u1_t* buf) { // Fetch AVR128 serial numbers 30 | // use chip ID: 31 | u1_t *serial= (u1_t*)&SIGROW.SERNUM0; 32 | for (byte i= 0; i <= 7; i++) 33 | buf[i] = serial[i] ^ serial[8+i]; 34 | // Make locally registered: 35 | buf[0] = (buf[0] & ~0x3) | 0x1; 36 | 37 | Serial.print(F("DevEui: ")); 38 | for (int i = 7; i >= 0; i--) { 39 | Serial.printHex((uint8_t)buf[i]); 40 | Serial.print(' '); 41 | } 42 | Serial.println(""); 43 | } 44 | 45 | void wdt_enable() { 46 | while (WDT.STATUS & WDT_SYNCBUSY_bm) 47 | ; 48 | _PROTECTED_WRITE(WDT.CTRLA, WDT_PERIOD_8KCLK_gc); // no window, 8 seconds 49 | } 50 | 51 | void wdt_reset() { 52 | __asm__ __volatile__ ("wdr"::); 53 | } 54 | 55 | void wdt_disable() { 56 | while (WDT.STATUS & WDT_SYNCBUSY_bm) 57 | ; 58 | _PROTECTED_WRITE(WDT.CTRLA, 0); 59 | } 60 | 61 | void RTC_init(void) 62 | { 63 | /* Initialize RTC: */ 64 | while (RTC.STATUS > 0) 65 | ; /* Wait for all register to be synchronized */ 66 | RTC.PER = RTC_PERIOD - 1; /* 1 sec overflow */ 67 | #if USE_OSC 68 | RTC.CLKSEL = RTC_CLKSEL_OSC32K_gc; /* 32.768kHz Internal Ultra-Low-Power Oscillator (OSCULP32K) */ 69 | #else 70 | _PROTECTED_WRITE(CLKCTRL.XOSC32KCTRLA, CLKCTRL_ENABLE_bm | CLKCTRL_LPMODE_bm); 71 | 72 | while (RTC.STATUS > 0) ; 73 | 74 | RTC.CLKSEL = RTC_CLKSEL_XOSC32K_gc; /* 32.768kHz External Oscillator */ 75 | #endif 76 | 77 | // For overflow ticks while sleeping: 78 | RTC.INTCTRL = RTC_OVF_bm; 79 | 80 | RTC.CTRLA |= RTC_PRESCALER_DIV1_gc | RTC_RUNSTDBY_bm | RTC_RTCEN_bm; 81 | } 82 | 83 | volatile uint8_t sleep_cnt; 84 | 85 | volatile uint8_t secs, minutes; 86 | volatile uint8_t hours; 87 | volatile uint16_t time_s; 88 | 89 | ISR(RTC_CNT_vect) 90 | { 91 | if (RTC.INTFLAGS & RTC_CMP_bm) { 92 | sleep_cnt--; 93 | RTC.INTFLAGS = RTC_CMP_bm; /* Clear interrupt flag by writing '1' (required) */ 94 | } 95 | 96 | if (RTC.INTFLAGS & RTC_OVF_bm) { 97 | time_s++; 98 | if (secs < 59) 99 | secs += 1; 100 | else { 101 | secs = 0; 102 | if (minutes < 59) 103 | minutes++; 104 | else { 105 | minutes = 0; 106 | #if 1 107 | if (hours < 23) 108 | hours++; 109 | else 110 | hours = 0; 111 | #endif 112 | } 113 | } 114 | RTC.INTFLAGS = RTC_OVF_bm; /* Clear interrupt flag by writing '1' (required) */ 115 | } 116 | } 117 | 118 | void sleepDelay(uint16_t n) 119 | { 120 | #ifdef TIMING_PIN 121 | digitalWriteFast(TIMING_PIN, HIGH); 122 | #endif 123 | while (RTC.STATUS /* & RTC_CMPBUSY_bm */) // Wait for new settings to synchronize 124 | ; 125 | 126 | uint32_t tdelay; 127 | noInterrupts(); 128 | uint16_t cnt = RTC.CNT; 129 | RTC.CMP = (cnt + (tdelay = (n * 32UL) + uint16_t(n / 4 * 3))) & (RTC_PERIOD-1); // With this calculation every multiple of 4ms is exact! 130 | // Note 20011 ms = 655360 ticks = 20 overflows exactly, so CMP will be set to the current CNT and this works OK 131 | // 9005 will set CMP to CNT+1 132 | 133 | if (RTC.CNT == RTC.CMP) { 134 | tdelay -= RTC_PERIOD; 135 | } else if (((RTC.CMP - cnt) & (RTC_PERIOD-1)) <= 2) { // overflow is/was near, 4Mhz clock or faster 136 | while (RTC.CNT != RTC.CMP) // Wait for it... 137 | ; 138 | tdelay -= RTC_PERIOD; 139 | } 140 | 141 | interrupts(); 142 | 143 | RTC.INTCTRL |= RTC_CMP_bm; // This might trigger a pending interrupt, so do this before assigning sleep_cnt! 144 | #if RTC_PERIOD != 0x8000 145 | sleep_cnt = tdelay / RTC_PERIOD + 1; // Calculate number of wrap arounds (overflows) 146 | #else 147 | sleep_cnt = 2 * (tdelay >> 16) + ((tdelay & 0x8000) ? 2 : 1); // 10 times faster... 148 | #endif 149 | uint64_t start = millis(); 150 | while (sleep_cnt) { 151 | sleep_cpu(); 152 | wdt_reset(); 153 | } 154 | set_millis(start + n); 155 | 156 | RTC.INTCTRL &= ~RTC_CMP_bm; 157 | #ifdef TIMING_PIN 158 | digitalWriteFast(TIMING_PIN, LOW); 159 | #endif 160 | } 161 | 162 | void count_rain() 163 | { 164 | static uint16_t prev; 165 | if (counter == 0) 166 | time_s = 0; 167 | if (time_s - prev > 1 || counter == 0) { 168 | counter++; 169 | prev = time_s; 170 | } 171 | } 172 | 173 | #if 1 174 | unsigned int getBandgap () 175 | { 176 | analogReference(INTERNAL1V024); 177 | analogRead(ADC_VDDDIV10); // drop first 178 | return analogRead(ADC_VDDDIV10); 179 | } 180 | #endif 181 | 182 | #if GET_BATTERY 183 | unsigned int getBattery () 184 | { 185 | analogReference(VDD); 186 | 187 | analogRead(PIN_PD1); 188 | unsigned int val = analogRead(PIN_PD1); 189 | 190 | // 3.3v regulator with voltage divider (820k/820k): 191 | const float Vref = 3300; 192 | const unsigned long scale = Vref*2; 193 | unsigned int results = scale * val / 0x400; 194 | 195 | return results; 196 | } 197 | #endif 198 | 199 | #if 0 200 | unsigned int getTemp() 201 | { 202 | analogReference(INTERNAL2V048); 203 | analogRead(ADC_TEMPERATURE); 204 | uint16_t adc_reading = analogRead(ADC_TEMPERATURE); 205 | uint16_t sigrow_offset = SIGROW.TEMPSENSE1; // Read unsigned value from signature row 206 | uint16_t sigrow_slope = SIGROW.TEMPSENSE0; // Read unsigned value from signature row 207 | uint32_t temp = sigrow_offset - adc_reading; 208 | temp *= sigrow_slope; // Result will overflow 16-bit variable 209 | temp += 0x0800; // Add 4096/2 to get correct rounding on division below 210 | temp >>= 12; // Round off to nearest degree in Kelvin, by dividing with 2^12 (4096) 211 | return temp-273; 212 | } 213 | #endif 214 | 215 | void blinkN(uint8_t n, uint8_t l = LED) 216 | { 217 | for (uint8_t i = 0; i < n; i++) { 218 | digitalWriteFast(l, HIGH); 219 | sleepDelay(ON_TIME); 220 | digitalWriteFast(l, LOW); 221 | sleepDelay(700); 222 | } 223 | } 224 | 225 | void blinkDec(uint8_t d) 226 | { 227 | blinkN(d / 10); 228 | sleepDelay(1500); 229 | blinkN(d % 10); 230 | sleepDelay(3000); 231 | } 232 | 233 | void blinkDec3(uint16_t d) 234 | { 235 | blinkN(d / 100); 236 | sleepDelay(1500); 237 | blinkDec(d % 100); 238 | } 239 | 240 | void sleepDelayRadio(uint32_t t) 241 | { 242 | if (t > 500) 243 | radio.sleep(); 244 | sleepDelay(t); 245 | } 246 | 247 | void sleepDelayLong(uint32_t t) 248 | { 249 | const int interval = 16000; 250 | while (t > interval) { 251 | sleepDelay(interval); 252 | t -= interval; 253 | blinkN(1); 254 | } 255 | sleepDelay(t); 256 | blinkN(1); 257 | } 258 | 259 | 260 | void setup() { 261 | Serial.begin(38400, SERIAL_TX_ONLY); 262 | Serial.println("Starting"); 263 | delay(100); 264 | wdt_enable(); 265 | 266 | TCA0.SPLIT.CTRLA = 0; // If you aren't using TCA0 for anything 267 | 268 | RTC_init(); /* Initialize the RTC timer */ 269 | set_sleep_mode(SLEEP_MODE_STANDBY); 270 | sleep_enable(); /* Enable sleep mode, but not going to sleep yet */ 271 | 272 | pinMode(PIN_PA0, INPUT_PULLUP); 273 | pinMode(PIN_PA1, INPUT_PULLUP); 274 | pinMode(PIN_PA2, INPUT_PULLUP); 275 | pinMode(PIN_PA3, INPUT_PULLUP); 276 | pinMode(PIN_PA4, INPUT_PULLUP); 277 | pinMode(PIN_PA5, INPUT_PULLUP); 278 | pinMode(PIN_PA6, INPUT_PULLUP); 279 | pinMode(PIN_PA7, INPUT_PULLUP); 280 | 281 | #if GET_BATTERY 282 | pinMode(PIN_PD1, INPUT); 283 | #else 284 | pinMode(PIN_PD1, INPUT_PULLUP); 285 | #endif 286 | pinMode(PIN_PD2, INPUT_PULLUP); 287 | pinMode(PIN_PD3, INPUT_PULLUP); 288 | pinMode(PIN_PD4, INPUT); // DIO2 289 | pinMode(PIN_PD5, INPUT_PULLUP); 290 | pinMode(PIN_PD6, INPUT_PULLUP); 291 | pinMode(PIN_PD7, INPUT_PULLUP); 292 | #ifdef TIMING_PIN 293 | pinMode(TIMING_PIN, OUTPUT); 294 | #endif 295 | 296 | //pinMode(PIN_PC0, INPUT_PULLUP); // Serial out 297 | pinMode(PIN_PC1, INPUT_PULLUP); 298 | pinMode(PIN_PC2, INPUT_PULLUP); 299 | pinMode(PIN_PC3, INPUT_PULLUP); 300 | 301 | pinMode(PIN_PF0, INPUT_PULLUP); 302 | pinMode(PIN_PF1, INPUT_PULLUP); 303 | 304 | pinMode(LED, OUTPUT); 305 | 306 | pinConfigure(COUNT_PIN, (PIN_DIR_INPUT | PIN_PULLUP | PIN_ISC_FALL)); 307 | attachInterrupt(digitalPinToInterrupt(COUNT_PIN), count_rain, FALLING); 308 | 309 | for (byte i = 0; i < 3; i++) { 310 | blinkN(1, LED); 311 | } 312 | 313 | Serial.flush(); 314 | Serial.println(F("\nSetup ... ")); 315 | 316 | Serial.println(F("Initialise the radio")); 317 | radio.reset(); 318 | int16_t state = radio.begin(); 319 | debug(state != RADIOLIB_ERR_NONE, F("Initialise radio failed"), state, true); 320 | 321 | fillDEVEUI((uint8_t*)&devEUI); 322 | // Setup the OTAA session information 323 | //state = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey); 324 | state = node.beginOTAA(joinEUI, devEUI, NULL, appKey); 325 | debug(state != RADIOLIB_ERR_NONE, F("Initialise node failed"), state, true); 326 | 327 | Serial.println(F("Join ('login') the LoRaWAN Network")); 328 | state = node.activateOTAA(); 329 | debug(state != RADIOLIB_LORAWAN_NEW_SESSION, F("Join failed"), state, true); 330 | 331 | Serial.println(F("Ready!\n")); 332 | #if !USE_OSC 333 | Serial.println(F("Using 32768 crystal!")); 334 | node.setSleepFunction(sleepDelayRadio); // Needs a 32768 crystal 335 | #endif 336 | } 337 | 338 | struct { 339 | unsigned short temp; 340 | unsigned short rain; 341 | byte power; 342 | byte rate2; 343 | } mydata; 344 | 345 | #define voltagePin PA1 346 | 347 | void readData() 348 | { 349 | mydata.power = getBandgap() - 100; 350 | noInterrupts(); // prevent race condition with rain interrupts 351 | mydata.rain = counter; 352 | mydata.temp = (hours << 11) | (minutes << 5) | (secs >> 1); 353 | counter = 0; 354 | interrupts(); 355 | } 356 | 357 | void loop() { 358 | Serial.println(F("Sending uplink")); 359 | 360 | readData(); 361 | 362 | // Perform an uplink 363 | uint8_t reply[4]; 364 | size_t replylen; 365 | int16_t state = node.sendReceive((uint8_t*)&mydata, sizeof(mydata), 1, reply, &replylen); 366 | debug(state < RADIOLIB_ERR_NONE, F("Error in sendReceive"), state, false); 367 | 368 | // Check if a downlink was received 369 | // (state 0 = no downlink, state 1/2 = downlink in window Rx1/Rx2) 370 | if(state > 0) { 371 | Serial.println(F("Received a downlink")); 372 | if (replylen == 1) { 373 | mydata.rate2= reply[0]; 374 | uplinkIntervalSeconds= (1 << reply[0]); 375 | } else if (replylen == 3) { 376 | hours = reply[0]; 377 | minutes = reply[1]; 378 | secs = reply[2]; 379 | } 380 | } else { 381 | Serial.println(F("No downlink received")); 382 | } 383 | 384 | Serial.print(F("Next uplink in ")); 385 | Serial.print(uplinkIntervalSeconds); 386 | Serial.println(F(" seconds\n")); 387 | Serial.flush(); 388 | 389 | radio.sleep(); 390 | 391 | // Wait until next uplink - observing legal & TTN FUP constraints 392 | for (byte w= 0; w <= 2; w++) { 393 | sleepDelayLong(uplinkIntervalSeconds * 1000UL); // delay needs milli-seconds 394 | if (counter) 395 | break; 396 | } 397 | 398 | Serial.printf(F("Time: %02d:%02d:%02d\r\n"), hours, minutes, secs); 399 | } 400 | -------------------------------------------------------------------------------- /AVR128_RadioLib/compile.sh: -------------------------------------------------------------------------------- 1 | rm -rf build 2 | rm *.lst *.map 3 | arduino-cli compile -e --fqbn DxCore:megaavr:avrdb 4 | -------------------------------------------------------------------------------- /AVR128_RadioLib/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _RADIOLIB_EX_LORAWAN_CONFIG_H 2 | #define _RADIOLIB_EX_LORAWAN_CONFIG_H 3 | 4 | #undef Serial 5 | #define Serial Serial1 6 | 7 | #include 8 | 9 | #define DIO1_PIN PIN_PD3 10 | #define DIO0_PIN PIN_PD2 11 | #define RESET_PIN PIN_PD5 12 | #define SCK_PIN PIN_PA6 // SCK for SPI 13 | #define MOSI_PIN PIN_PA4 // MOSI for SPI 14 | #define MISO_PIN PIN_PA5 // MISO for SPI 15 | #define CS_PIN PIN_PD6 // CS for SPI1 === NSS 16 | 17 | // first you have to set your radio model and pin configuration 18 | // this is provided just as a default example 19 | SX1276 radio = new Module(CS_PIN, DIO0_PIN, RESET_PIN, DIO1_PIN); 20 | 21 | // if you have RadioBoards (https://github.com/radiolib-org/RadioBoards) 22 | // and are using one of the supported boards, you can do the following: 23 | /* 24 | #define RADIO_BOARD_AUTO 25 | #include 26 | 27 | Radio radio = new RadioModule(); 28 | */ 29 | 30 | // how often to send an uplink - consider legal & FUP constraints - see notes 31 | //const uint32_t uplinkIntervalSeconds = 1UL * 60UL; // minutes x seconds 32 | 33 | #include "secrets.h" 34 | 35 | // joinEUI - previous versions of LoRaWAN called this AppEUI 36 | // for development purposes you can use all zeros - see wiki for details 37 | #ifndef RADIOLIB_LORAWAN_JOIN_EUI 38 | #define RADIOLIB_LORAWAN_JOIN_EUI REPLACE 39 | #endif 40 | 41 | // the Device EUI & two keys can be generated on the TTN console 42 | #ifndef RADIOLIB_LORAWAN_DEV_EUI // Replace with your Device EUI 43 | #define RADIOLIB_LORAWAN_DEV_EUI 0 44 | #endif 45 | #ifndef RADIOLIB_LORAWAN_APP_KEY // Replace with your App Key 46 | #define RADIOLIB_LORAWAN_APP_KEY REPLACE 47 | #endif 48 | #ifndef RADIOLIB_LORAWAN_NWK_KEY // Put your Nwk Key here 49 | #define RADIOLIB_LORAWAN_NWK_KEY NULL 50 | #endif 51 | 52 | // for the curious, the #ifndef blocks allow for automated testing &/or you can 53 | // put your EUI & keys in to your platformio.ini - see wiki for more tips 54 | 55 | // regional choices: EU868, US915, AU915, AS923, AS923_2, AS923_3, AS923_4, IN865, KR920, CN470 56 | const LoRaWANBand_t Region = EU868; 57 | 58 | // subband choice: for US915/AU915 set to 2, for CN470 set to 1, otherwise leave on 0 59 | const uint8_t subBand = 0; 60 | 61 | // ============================================================================ 62 | // Below is to support the sketch - only make changes if the notes say so ... 63 | 64 | // copy over the EUI's & keys in to the something that will not compile if incorrectly formatted 65 | uint64_t joinEUI = RADIOLIB_LORAWAN_JOIN_EUI; 66 | uint64_t devEUI = RADIOLIB_LORAWAN_DEV_EUI; 67 | uint8_t appKey[] = { RADIOLIB_LORAWAN_APP_KEY }; 68 | uint8_t nwkKey[] = { RADIOLIB_LORAWAN_NWK_KEY }; 69 | 70 | // create the LoRaWAN node 71 | LoRaWANNode node(&radio, &Region, subBand); 72 | 73 | // result code to text - these are error codes that can be raised when using LoRaWAN 74 | // however, RadioLib has many more - see https://jgromes.github.io/RadioLib/group__status__codes.html for a complete list 75 | String stateDecode(const int16_t result) { 76 | switch (result) { 77 | case RADIOLIB_ERR_NONE: 78 | return "ERR_NONE"; 79 | case RADIOLIB_ERR_CHIP_NOT_FOUND: 80 | return "ERR_CHIP_NOT_FOUND"; 81 | case RADIOLIB_ERR_PACKET_TOO_LONG: 82 | return "ERR_PACKET_TOO_LONG"; 83 | case RADIOLIB_ERR_RX_TIMEOUT: 84 | return "ERR_RX_TIMEOUT"; 85 | case RADIOLIB_ERR_CRC_MISMATCH: 86 | return "ERR_CRC_MISMATCH"; 87 | case RADIOLIB_ERR_INVALID_BANDWIDTH: 88 | return "ERR_INVALID_BANDWIDTH"; 89 | case RADIOLIB_ERR_INVALID_SPREADING_FACTOR: 90 | return "ERR_INVALID_SPREADING_FACTOR"; 91 | case RADIOLIB_ERR_INVALID_CODING_RATE: 92 | return "ERR_INVALID_CODING_RATE"; 93 | case RADIOLIB_ERR_INVALID_FREQUENCY: 94 | return "ERR_INVALID_FREQUENCY"; 95 | case RADIOLIB_ERR_INVALID_OUTPUT_POWER: 96 | return "ERR_INVALID_OUTPUT_POWER"; 97 | case RADIOLIB_ERR_NETWORK_NOT_JOINED: 98 | return "RADIOLIB_ERR_NETWORK_NOT_JOINED"; 99 | case RADIOLIB_ERR_DOWNLINK_MALFORMED: 100 | return "RADIOLIB_ERR_DOWNLINK_MALFORMED"; 101 | case RADIOLIB_ERR_INVALID_REVISION: 102 | return "RADIOLIB_ERR_INVALID_REVISION"; 103 | case RADIOLIB_ERR_INVALID_PORT: 104 | return "RADIOLIB_ERR_INVALID_PORT"; 105 | case RADIOLIB_ERR_NO_RX_WINDOW: 106 | return "RADIOLIB_ERR_NO_RX_WINDOW"; 107 | case RADIOLIB_ERR_INVALID_CID: 108 | return "RADIOLIB_ERR_INVALID_CID"; 109 | case RADIOLIB_ERR_UPLINK_UNAVAILABLE: 110 | return "RADIOLIB_ERR_UPLINK_UNAVAILABLE"; 111 | case RADIOLIB_ERR_COMMAND_QUEUE_FULL: 112 | return "RADIOLIB_ERR_COMMAND_QUEUE_FULL"; 113 | case RADIOLIB_ERR_COMMAND_QUEUE_ITEM_NOT_FOUND: 114 | return "RADIOLIB_ERR_COMMAND_QUEUE_ITEM_NOT_FOUND"; 115 | case RADIOLIB_ERR_JOIN_NONCE_INVALID: 116 | return "RADIOLIB_ERR_JOIN_NONCE_INVALID"; 117 | case RADIOLIB_ERR_N_FCNT_DOWN_INVALID: 118 | return "RADIOLIB_ERR_N_FCNT_DOWN_INVALID"; 119 | case RADIOLIB_ERR_A_FCNT_DOWN_INVALID: 120 | return "RADIOLIB_ERR_A_FCNT_DOWN_INVALID"; 121 | case RADIOLIB_ERR_DWELL_TIME_EXCEEDED: 122 | return "RADIOLIB_ERR_DWELL_TIME_EXCEEDED"; 123 | case RADIOLIB_ERR_CHECKSUM_MISMATCH: 124 | return "RADIOLIB_ERR_CHECKSUM_MISMATCH"; 125 | case RADIOLIB_ERR_NO_JOIN_ACCEPT: 126 | return "RADIOLIB_ERR_NO_JOIN_ACCEPT"; 127 | case RADIOLIB_LORAWAN_SESSION_RESTORED: 128 | return "RADIOLIB_LORAWAN_SESSION_RESTORED"; 129 | case RADIOLIB_LORAWAN_NEW_SESSION: 130 | return "RADIOLIB_LORAWAN_NEW_SESSION"; 131 | case RADIOLIB_ERR_NONCES_DISCARDED: 132 | return "RADIOLIB_ERR_NONCES_DISCARDED"; 133 | case RADIOLIB_ERR_SESSION_DISCARDED: 134 | return "RADIOLIB_ERR_SESSION_DISCARDED"; 135 | } 136 | return "See https://jgromes.github.io/RadioLib/group__status__codes.html"; 137 | } 138 | 139 | // helper function to display any issues 140 | void debug(bool failed, const __FlashStringHelper* message, int state, bool halt) { 141 | if(failed) { 142 | Serial.print(message); 143 | Serial.print(" - "); 144 | Serial.print(stateDecode(state)); 145 | Serial.print(" ("); 146 | Serial.print(state); 147 | Serial.println(")"); 148 | while(halt) { delay(1); } 149 | } 150 | } 151 | 152 | // helper function to display a byte array 153 | void arrayDump(uint8_t *buffer, uint16_t len) { 154 | for(uint16_t c = 0; c < len; c++) { 155 | char b = buffer[c]; 156 | if(b < 0x10) { Serial.print('0'); } 157 | Serial.print(b, HEX); 158 | } 159 | Serial.println(); 160 | } 161 | 162 | #endif 163 | -------------------------------------------------------------------------------- /Lora_RadioLib/Lora_RadioLib.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Adapted RadioLib example 3 | */ 4 | 5 | #include "config.h" 6 | 7 | int uplinkIntervalSeconds = 1 * 60; // minutes x seconds 8 | 9 | 10 | // STM32 Unique Chip IDs 11 | #define STM32_ID ((uint8_t *) 0x1FFFF7E8) 12 | 13 | void os_getDevEui (uint8_t* buf) 14 | { 15 | // use chip ID: 16 | memcpy(buf, &STM32_ID[1], 8); 17 | // Make locally registered: 18 | buf[0] = buf[0] & ~0x3 | 0x1; 19 | 20 | Serial.print("DevEui: "); 21 | for (int i = 7; i >= 0; i--) { 22 | char str[8]; 23 | sprintf(str, "%02x", buf[i]); 24 | Serial.print(str); 25 | } 26 | Serial.println(""); 27 | } 28 | 29 | #if 1 30 | #include 31 | 32 | // Defined for power and sleep functions pwr.h and scb.h 33 | #include 34 | #include 35 | 36 | #include 37 | 38 | RTClock rt(RTCSEL_LSI, 39); // 1 milli second alarm 39 | 40 | // Define the Base address of the RTC registers (battery backed up CMOS Ram), so we can use them for config of touch screen or whatever. 41 | // See http://stm32duino.com/viewtopic.php?f=15&t=132&hilit=rtc&start=40 for a more details about the RTC NVRam 42 | // 10x 16 bit registers are available on the STM32F103CXXX more on the higher density device. 43 | #define BKP_REG_BASE ((uint32_t *)(0x40006C00 +0x04)) 44 | 45 | void storeBR(int i, uint32_t v) { 46 | BKP_REG_BASE[2 * i] = (v << 16); 47 | BKP_REG_BASE[2 * i + 1] = (v & 0xFFFF); 48 | } 49 | 50 | uint32_t readBR(int i) { 51 | return ((BKP_REG_BASE[2 * i] & 0xFFFF) >> 16) | (BKP_REG_BASE[2 * i + 1] & 0xFFFF); 52 | } 53 | 54 | bool next = false; 55 | 56 | void sleepMode(bool deepSleepFlag) 57 | { 58 | // Clear PDDS and LPDS bits 59 | PWR_BASE->CR &= PWR_CR_LPDS | PWR_CR_PDDS | PWR_CR_CWUF; 60 | 61 | // Set PDDS and LPDS bits for standby mode, and set Clear WUF flag (required per datasheet): 62 | PWR_BASE->CR |= PWR_CR_CWUF; 63 | // Enable wakeup pin bit. 64 | PWR_BASE->CR |= PWR_CSR_EWUP; 65 | 66 | SCB_BASE->SCR |= SCB_SCR_SLEEPDEEP; 67 | 68 | // System Control Register Bits. See... 69 | // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/Cihhjgdh.html 70 | if (deepSleepFlag) { 71 | // Set Power down deepsleep bit. 72 | PWR_BASE->CR |= PWR_CR_PDDS; 73 | // Unset Low-power deepsleep. 74 | PWR_BASE->CR &= ~PWR_CR_LPDS; 75 | } else { 76 | adc_disable(ADC1); 77 | adc_disable(ADC2); 78 | #if STM32_HAVE_DAC 79 | dac_disable_channel(DAC, 1); 80 | dac_disable_channel(DAC, 2); 81 | #endif 82 | // Unset Power down deepsleep bit. 83 | PWR_BASE->CR &= ~PWR_CR_PDDS; 84 | // set Low-power deepsleep. 85 | PWR_BASE->CR |= PWR_CR_LPDS; 86 | } 87 | 88 | // Now go into stop mode, wake up on interrupt 89 | asm(" wfi"); 90 | 91 | // Clear SLEEPDEEP bit so we can use SLEEP mode 92 | SCB_BASE->SCR &= ~SCB_SCR_SLEEPDEEP; 93 | } 94 | 95 | int sleepTime; 96 | 97 | void AlarmFunction () { 98 | // We always wake up with the 8Mhz HSI clock! 99 | // So adjust the clock if needed... 100 | 101 | #if F_CPU == 8000000UL 102 | // nothing to do, using about 8 mA 103 | #elif F_CPU == 16000000UL 104 | rcc_clk_init(RCC_CLKSRC_HSI, RCC_PLLSRC_HSE , RCC_PLLMUL_2); 105 | #elif F_CPU == 48000000UL 106 | rcc_clk_init(RCC_CLKSRC_HSI, RCC_PLLSRC_HSE , RCC_PLLMUL_6); 107 | #elif F_CPU == 72000000UL 108 | rcc_clk_init(RCC_CLKSRC_HSI, RCC_PLLSRC_HSE , RCC_PLLMUL_9); 109 | #else 110 | #error "Unknown F_CPU!?" 111 | #endif 112 | 113 | extern volatile uint32 systick_uptime_millis; 114 | noInterrupts(); 115 | systick_uptime_millis += sleepTime; 116 | interrupts(); 117 | } 118 | 119 | void mdelay(int n, bool mode = false) 120 | { 121 | sleepTime = n; 122 | const int interval = 10000; 123 | while (n > 0) { 124 | time_t nextAlarm = rt.getTime() + (n > interval ? interval : n); // Calculate from time now. 125 | rt.createAlarm(&AlarmFunction, nextAlarm); 126 | iwdg_feed(); 127 | sleepMode(mode); 128 | n -= interval; 129 | } 130 | } 131 | 132 | void msleep(uint32_t ms) 133 | { 134 | uint32_t start = rt.getTime(); 135 | 136 | while (rt.getTime() - start < ms) { 137 | asm(" wfi"); 138 | } 139 | } 140 | #endif 141 | 142 | void blinkN(int n, int d = 400, int t = 800) 143 | { 144 | pinMode(LED_BUILTIN, OUTPUT); 145 | for (int i = 0; i < n; i++) { 146 | digitalWrite(LED_BUILTIN, 0); 147 | mdelay(5); 148 | digitalWrite(LED_BUILTIN, 1); 149 | mdelay(d); 150 | } 151 | pinMode(LED_BUILTIN, INPUT_ANALOG); 152 | mdelay(t); 153 | } 154 | 155 | void allInput() 156 | { 157 | adc_disable(ADC1); 158 | adc_disable(ADC2); 159 | 160 | pinMode(PA0, INPUT_ANALOG); 161 | pinMode(PA1, INPUT_ANALOG); 162 | pinMode(PA2, INPUT_ANALOG); 163 | pinMode(PA3, INPUT_ANALOG); 164 | pinMode(PA4, INPUT_ANALOG); 165 | pinMode(PA5, INPUT_ANALOG); 166 | pinMode(PA6, INPUT_ANALOG); 167 | pinMode(PA7, INPUT_ANALOG); 168 | pinMode(PA8, INPUT_ANALOG); 169 | pinMode(PA9, INPUT_ANALOG); 170 | pinMode(PA10, INPUT_ANALOG); 171 | 172 | pinMode(PA11, INPUT_ANALOG); 173 | pinMode(PA12, INPUT_ANALOG); 174 | pinMode(PA13, INPUT_ANALOG); 175 | pinMode(PA14, INPUT_ANALOG); 176 | pinMode(PA15, INPUT_ANALOG); 177 | 178 | pinMode(PB0, INPUT_ANALOG); 179 | pinMode(PB1, INPUT_ANALOG); 180 | pinMode(PB2, INPUT_ANALOG); 181 | pinMode(PB3, INPUT_ANALOG); 182 | pinMode(PB4, INPUT_ANALOG); 183 | pinMode(PB5, INPUT_ANALOG); 184 | pinMode(PB6, INPUT_ANALOG); 185 | pinMode(PB7, INPUT_ANALOG); 186 | pinMode(PB8, INPUT_ANALOG); 187 | pinMode(PB9, INPUT_ANALOG); 188 | pinMode(PB10, INPUT_ANALOG); 189 | pinMode(PB11, INPUT_ANALOG); 190 | pinMode(PB12, INPUT_ANALOG); 191 | pinMode(PB13, INPUT_ANALOG); 192 | pinMode(PB14, INPUT_ANALOG); 193 | pinMode(PB15, INPUT_ANALOG); 194 | } 195 | 196 | void mdelay_long(long unsigned int m) 197 | { 198 | if (m <100) 199 | return; 200 | mdelay(m - 100); 201 | } 202 | 203 | #include 204 | 205 | #define WAKE_PIN PB12 206 | #define ADDR 0x5A 207 | 208 | CCS811 sensor; 209 | 210 | void setup() { 211 | iwdg_init(IWDG_PRE_256, 4095); // 26s watchdog 212 | 213 | allInput(); 214 | 215 | pinMode(LED_BUILTIN, OUTPUT); 216 | blinkN(3); 217 | 218 | Serial.begin(115200); 219 | while(!Serial); 220 | delay(5000); // Give time to switch to the serial monitor 221 | Serial.println(F("\nSetup ... ")); 222 | 223 | while (1) { 224 | blinkN(1); 225 | if (!sensor.begin(uint8_t(ADDR), uint8_t(WAKE_PIN))) { 226 | Serial.println("Initialization failed."); 227 | Serial.flush(); 228 | mdelay(300); 229 | } else { 230 | Serial.println("CCS811 OK"); 231 | sensor.sleep(); 232 | break; 233 | } 234 | } 235 | 236 | // radio.begin(); 237 | // radio.sleep(); 238 | // pinMode(WAKE_PIN, OUTPUT); 239 | // // pinMode(CS_PIN, OUTPUT); 240 | // pinMode(PB6, INPUT_ANALOG); 241 | // pinMode(PB7, INPUT_ANALOG); 242 | // while (1) { 243 | // blinkN(1); 244 | // digitalWrite(WAKE_PIN, HIGH); // set WAKE_PIN high - this puts sensor in sleep mode (~2uA) and all I2C communications are ignored 245 | // //digitalWrite(CS_PIN, LOW); 246 | // mdelay(3000, false); 247 | // } 248 | 249 | Serial.println(F("Initialise the radio")); 250 | int16_t state = radio.begin(); 251 | debug(state != RADIOLIB_ERR_NONE, F("Initialise radio failed"), state, true); 252 | 253 | os_getDevEui((uint8_t*)&devEUI); 254 | // Setup the OTAA session information 255 | //state = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey); 256 | state = node.beginOTAA(joinEUI, devEUI, NULL, appKey); 257 | debug(state != RADIOLIB_ERR_NONE, F("Initialise node failed"), state, true); 258 | 259 | Serial.println(F("Join ('login') the LoRaWAN Network")); 260 | state = node.activateOTAA(); 261 | debug(state != RADIOLIB_LORAWAN_NEW_SESSION, F("Join failed"), state, true); 262 | 263 | Serial.println(F("Ready!\n")); 264 | //node.setSleepFunction(mdelay_long); 265 | } 266 | 267 | struct { 268 | unsigned short co2; 269 | unsigned short tvoc; 270 | byte power; 271 | byte rate2; 272 | signed short temp; 273 | } mydata; 274 | 275 | #define voltagePin PA1 276 | 277 | void readData() 278 | { 279 | adc_enable(ADC1); 280 | 281 | pinMode(voltagePin, INPUT_ANALOG); 282 | const int vref = 4095; 283 | 284 | analogRead(voltagePin); 285 | int v = analogRead(voltagePin); 286 | //mydata.power = (2 * (VREF * v / vref) / 10) - 200; 287 | 288 | adc_reg_map *regs = ADC1->regs; 289 | regs->CR2 |= ADC_CR2_TSVREFE; // enable VREFINT and temp sensor 290 | regs->SMPR1 = (ADC_SMPR1_SMP17 | ADC_SMPR1_SMP16); // sample rate for VREFINT/TMP ADC channel 291 | 292 | int vrefi = 1210 * 4096 / adc_read(ADC1, 17); // ADC sample to millivolts 293 | mydata.power = (2 * (vrefi * v / vref) / 10) - 200; 294 | } 295 | 296 | void loop() { 297 | Serial.println(F("Sending uplink")); 298 | 299 | readData(); 300 | 301 | // Perform an uplink 302 | uint8_t reply[2]; 303 | size_t replylen; 304 | int16_t state = node.sendReceive((uint8_t*)&mydata, sizeof(mydata), 1, reply, &replylen); 305 | debug(state < RADIOLIB_ERR_NONE, F("Error in sendReceive"), state, false); 306 | 307 | // Check if a downlink was received 308 | // (state 0 = no downlink, state 1/2 = downlink in window Rx1/Rx2) 309 | if(state > 0) { 310 | Serial.println(F("Received a downlink")); 311 | if (replylen == 1) { 312 | mydata.rate2= reply[0]; 313 | uplinkIntervalSeconds= (1 << reply[0]); 314 | } 315 | } else { 316 | Serial.println(F("No downlink received")); 317 | } 318 | 319 | Serial.print(F("Next uplink in ")); 320 | Serial.print(uplinkIntervalSeconds); 321 | Serial.println(F(" seconds\n")); 322 | Serial.flush(); 323 | 324 | radio.sleep(); 325 | SPI.end(); 326 | #if 1 // Do we need all this? 327 | digitalWrite(SCK_PIN, LOW); 328 | pinMode(SCK_PIN, OUTPUT); 329 | 330 | digitalWrite(MOSI_PIN, LOW); 331 | pinMode(MOSI_PIN, OUTPUT); 332 | 333 | pinMode(MISO_PIN, INPUT_ANALOG); 334 | 335 | digitalWrite(CS_PIN, LOW); // NSS 336 | pinMode(CS_PIN, OUTPUT); 337 | #endif 338 | 339 | // DIO Inputs 340 | pinMode(DIO1_PIN, INPUT_ANALOG); 341 | pinMode(DIO0_PIN, INPUT_ANALOG); 342 | 343 | //pinMode(RESET_PIN, INPUT_ANALOG); 344 | 345 | // Serial 346 | pinMode(PA9, INPUT_ANALOG); 347 | pinMode(PA10, INPUT_ANALOG); 348 | 349 | // Wait until next uplink - observing legal & TTN FUP constraints 350 | mdelay(uplinkIntervalSeconds * 1000UL); // delay needs milli-seconds 351 | 352 | //digitalWrite(RESET_PIN, 1); // prevent reset 353 | pinMode(DIO1_PIN, INPUT); 354 | pinMode(DIO0_PIN, INPUT); 355 | 356 | SPI.begin(); 357 | Serial.begin(115200); 358 | 359 | blinkN(1); 360 | } 361 | -------------------------------------------------------------------------------- /Lora_RadioLib/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _RADIOLIB_EX_LORAWAN_CONFIG_H 2 | #define _RADIOLIB_EX_LORAWAN_CONFIG_H 3 | 4 | #define Serial Serial1 5 | 6 | #include 7 | 8 | #define DIO1_PIN PB5 9 | #define DIO0_PIN PA3 10 | #define RESET_PIN PB1 11 | #define SCK_PIN PA5 // SCK for SPI1 12 | #define MOSI_PIN PA7 // MOSI for SPI1 13 | #define MISO_PIN PA6 // MISO for SPI1 14 | #define CS_PIN PB0 // CS for SPI1 === NSS 15 | 16 | // first you have to set your radio model and pin configuration 17 | // this is provided just as a default example 18 | SX1276 radio = new Module(CS_PIN, DIO0_PIN, RESET_PIN, DIO1_PIN); 19 | 20 | // if you have RadioBoards (https://github.com/radiolib-org/RadioBoards) 21 | // and are using one of the supported boards, you can do the following: 22 | /* 23 | #define RADIO_BOARD_AUTO 24 | #include 25 | 26 | Radio radio = new RadioModule(); 27 | */ 28 | 29 | // how often to send an uplink - consider legal & FUP constraints - see notes 30 | //const uint32_t uplinkIntervalSeconds = 1UL * 60UL; // minutes x seconds 31 | 32 | #include "secrets.h" 33 | 34 | // joinEUI - previous versions of LoRaWAN called this AppEUI 35 | // for development purposes you can use all zeros - see wiki for details 36 | #ifndef RADIOLIB_LORAWAN_JOIN_EUI 37 | #define RADIOLIB_LORAWAN_JOIN_EUI REPLACE 38 | #endif 39 | 40 | // the Device EUI & two keys can be generated on the TTN console 41 | #ifndef RADIOLIB_LORAWAN_DEV_EUI // Replace with your Device EUI 42 | #define RADIOLIB_LORAWAN_DEV_EUI 0 43 | #endif 44 | #ifndef RADIOLIB_LORAWAN_APP_KEY // Replace with your App Key 45 | #define RADIOLIB_LORAWAN_APP_KEY REPLACE 46 | #endif 47 | #ifndef RADIOLIB_LORAWAN_NWK_KEY // Put your Nwk Key here 48 | #define RADIOLIB_LORAWAN_NWK_KEY NULL 49 | #endif 50 | 51 | // for the curious, the #ifndef blocks allow for automated testing &/or you can 52 | // put your EUI & keys in to your platformio.ini - see wiki for more tips 53 | 54 | // regional choices: EU868, US915, AU915, AS923, AS923_2, AS923_3, AS923_4, IN865, KR920, CN470 55 | const LoRaWANBand_t Region = EU868; 56 | 57 | // subband choice: for US915/AU915 set to 2, for CN470 set to 1, otherwise leave on 0 58 | const uint8_t subBand = 0; 59 | 60 | // ============================================================================ 61 | // Below is to support the sketch - only make changes if the notes say so ... 62 | 63 | // copy over the EUI's & keys in to the something that will not compile if incorrectly formatted 64 | uint64_t joinEUI = RADIOLIB_LORAWAN_JOIN_EUI; 65 | uint64_t devEUI = RADIOLIB_LORAWAN_DEV_EUI; 66 | uint8_t appKey[] = { RADIOLIB_LORAWAN_APP_KEY }; 67 | uint8_t nwkKey[] = { RADIOLIB_LORAWAN_NWK_KEY }; 68 | 69 | // create the LoRaWAN node 70 | LoRaWANNode node(&radio, &Region, subBand); 71 | 72 | // result code to text - these are error codes that can be raised when using LoRaWAN 73 | // however, RadioLib has many more - see https://jgromes.github.io/RadioLib/group__status__codes.html for a complete list 74 | String stateDecode(const int16_t result) { 75 | switch (result) { 76 | case RADIOLIB_ERR_NONE: 77 | return "ERR_NONE"; 78 | case RADIOLIB_ERR_CHIP_NOT_FOUND: 79 | return "ERR_CHIP_NOT_FOUND"; 80 | case RADIOLIB_ERR_PACKET_TOO_LONG: 81 | return "ERR_PACKET_TOO_LONG"; 82 | case RADIOLIB_ERR_RX_TIMEOUT: 83 | return "ERR_RX_TIMEOUT"; 84 | case RADIOLIB_ERR_CRC_MISMATCH: 85 | return "ERR_CRC_MISMATCH"; 86 | case RADIOLIB_ERR_INVALID_BANDWIDTH: 87 | return "ERR_INVALID_BANDWIDTH"; 88 | case RADIOLIB_ERR_INVALID_SPREADING_FACTOR: 89 | return "ERR_INVALID_SPREADING_FACTOR"; 90 | case RADIOLIB_ERR_INVALID_CODING_RATE: 91 | return "ERR_INVALID_CODING_RATE"; 92 | case RADIOLIB_ERR_INVALID_FREQUENCY: 93 | return "ERR_INVALID_FREQUENCY"; 94 | case RADIOLIB_ERR_INVALID_OUTPUT_POWER: 95 | return "ERR_INVALID_OUTPUT_POWER"; 96 | case RADIOLIB_ERR_NETWORK_NOT_JOINED: 97 | return "RADIOLIB_ERR_NETWORK_NOT_JOINED"; 98 | case RADIOLIB_ERR_DOWNLINK_MALFORMED: 99 | return "RADIOLIB_ERR_DOWNLINK_MALFORMED"; 100 | case RADIOLIB_ERR_INVALID_REVISION: 101 | return "RADIOLIB_ERR_INVALID_REVISION"; 102 | case RADIOLIB_ERR_INVALID_PORT: 103 | return "RADIOLIB_ERR_INVALID_PORT"; 104 | case RADIOLIB_ERR_NO_RX_WINDOW: 105 | return "RADIOLIB_ERR_NO_RX_WINDOW"; 106 | case RADIOLIB_ERR_INVALID_CID: 107 | return "RADIOLIB_ERR_INVALID_CID"; 108 | case RADIOLIB_ERR_UPLINK_UNAVAILABLE: 109 | return "RADIOLIB_ERR_UPLINK_UNAVAILABLE"; 110 | case RADIOLIB_ERR_COMMAND_QUEUE_FULL: 111 | return "RADIOLIB_ERR_COMMAND_QUEUE_FULL"; 112 | case RADIOLIB_ERR_COMMAND_QUEUE_ITEM_NOT_FOUND: 113 | return "RADIOLIB_ERR_COMMAND_QUEUE_ITEM_NOT_FOUND"; 114 | case RADIOLIB_ERR_JOIN_NONCE_INVALID: 115 | return "RADIOLIB_ERR_JOIN_NONCE_INVALID"; 116 | case RADIOLIB_ERR_N_FCNT_DOWN_INVALID: 117 | return "RADIOLIB_ERR_N_FCNT_DOWN_INVALID"; 118 | case RADIOLIB_ERR_A_FCNT_DOWN_INVALID: 119 | return "RADIOLIB_ERR_A_FCNT_DOWN_INVALID"; 120 | case RADIOLIB_ERR_DWELL_TIME_EXCEEDED: 121 | return "RADIOLIB_ERR_DWELL_TIME_EXCEEDED"; 122 | case RADIOLIB_ERR_CHECKSUM_MISMATCH: 123 | return "RADIOLIB_ERR_CHECKSUM_MISMATCH"; 124 | case RADIOLIB_ERR_NO_JOIN_ACCEPT: 125 | return "RADIOLIB_ERR_NO_JOIN_ACCEPT"; 126 | case RADIOLIB_LORAWAN_SESSION_RESTORED: 127 | return "RADIOLIB_LORAWAN_SESSION_RESTORED"; 128 | case RADIOLIB_LORAWAN_NEW_SESSION: 129 | return "RADIOLIB_LORAWAN_NEW_SESSION"; 130 | case RADIOLIB_ERR_NONCES_DISCARDED: 131 | return "RADIOLIB_ERR_NONCES_DISCARDED"; 132 | case RADIOLIB_ERR_SESSION_DISCARDED: 133 | return "RADIOLIB_ERR_SESSION_DISCARDED"; 134 | } 135 | return "See https://jgromes.github.io/RadioLib/group__status__codes.html"; 136 | } 137 | 138 | // helper function to display any issues 139 | void debug(bool failed, const __FlashStringHelper* message, int state, bool halt) { 140 | if(failed) { 141 | Serial.print(message); 142 | Serial.print(" - "); 143 | Serial.print(stateDecode(state)); 144 | Serial.print(" ("); 145 | Serial.print(state); 146 | Serial.println(")"); 147 | while(halt) { delay(1); } 148 | } 149 | } 150 | 151 | // helper function to display a byte array 152 | void arrayDump(uint8_t *buffer, uint16_t len) { 153 | for(uint16_t c = 0; c < len; c++) { 154 | char b = buffer[c]; 155 | if(b < 0x10) { Serial.print('0'); } 156 | Serial.print(b, HEX); 157 | } 158 | Serial.println(); 159 | } 160 | 161 | #endif 162 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AVR128DB28 2 | AVR Printed Circuit Board for creating IOT nodes with the RFM95 LORA chip. 3 | 4 | See: 5 | - https://www.thethingsnetwork.org/forum/t/avr128db28-pcb-with-rfm95/50864 6 | - https://www.thethingsnetwork.org/labs/story/a-cheap-stm32-arduino-node 7 | 8 | for background and old software samples. 9 | 10 | This repository now has tested LMIC (https://github.com/tomtor/STM32-RFM95-PCB/tree/master/AVR128DBLora) and RadioLib (https://github.com/tomtor/STM32-RFM95-PCB/tree/master/AVR128_RadioLib) Arduino code for the AVR128DB board with the RFM95W. 11 | 12 | ![3D rendering](AVR-LORA-805.jpg) 13 | 14 | Schema: https://github.com/tomtor/STM32-RFM95-PCB/raw/master/AVR-LORA.pdf 15 | 16 | Note that most components are optional: 17 | 18 | - A LED to flash 19 | - I2C 4K7 pull up resistors 20 | - A lot of capacitors (mounting a single 1uF will do in most situations) 21 | - 32.768kHz crystal 22 | - 24MHz crystal 23 | - MCP1700 regulator with 1uA idle current 24 | - Schottky diode for charging NiMH batteries from a solar panel 25 | - Voltage divider for measuring battery voltage 26 | 27 | Aisler link for producing 1206 board: https://aisler.net/p/EAZHDDHF 28 | 29 | Aisler link for producing 0805 board: https://aisler.net/p/ZRKAROVP 30 | 31 | # STM32-RFM95-PCB 32 | STM32 Printed Circuit Board for creating IOT nodes with the RFM95 LORA chip 33 | 34 | ![3D rendering](STM-LORA.png) 35 | 36 | See: 37 | - https://www.thethingsnetwork.org/labs/story/a-cheap-stm32-arduino-node 38 | - https://gist.github.com/tomtor/c754355f1b98370e78b4025f236d990e (Arduino sketch) 39 | 40 | You can order this board here: 41 | 42 | https://aisler.net/p/CZGCIFFH 43 | 44 | 45 | Credits: 46 | 47 | https://github.com/myelin/myelin-kicad-libraries (STM32 module KiCad library) 48 | 49 | https://github.com/mysensors-kicad/mysensors_symbols (RFM95 KiCad library) 50 | 51 | https://github.com/novirium/ESPilot/blob/master/lib/ESPilot.pretty/RFM95.kicad_mod (RFM95 KiCad footprint) 52 | -------------------------------------------------------------------------------- /RFM/RFM95.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP NRF24L01 4 | D NRF24L01+ 5 | K NRF 2G4 radio module 6 | $ENDCMP 7 | # 8 | $CMP RFM69HW 9 | D RFM69HW, 868Mhz +20dBm HopeRF Wireless Transceiver, Vcc=3.3V 10 | K RF69 868Mhz RF69 RFM69 11 | F http://modtronicsaustralia.com/wp-content/uploads/2014/11/RFM69HW-V1.3.pdf 12 | $ENDCMP 13 | # 14 | $CMP RFM95HW 15 | D RFM95HW, LORA +20dBm HopeRF Wireless Transceiver, Vcc=3.3V 16 | K RF95 LORA RF95 RFM95 17 | F https://cdn-learn.adafruit.com/assets/assets/000/031/659/original/RFM95_96_97_98W.pdf?1460518717 18 | $ENDCMP 19 | # 20 | #End Doc Library 21 | -------------------------------------------------------------------------------- /RFM/RFM95.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RFM95 (layer F.Cu) (tedit 585E5D4C) 2 | (fp_text reference REF** (at 2 -2) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value RFM95 (at 13.5 -1.8) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 0 15) (end 0 14.8) (layer F.SilkS) (width 0.2)) 9 | (fp_line (start 16 15) (end 0 15) (layer F.SilkS) (width 0.2)) 10 | (fp_line (start 16 14.8) (end 16 15) (layer F.SilkS) (width 0.2)) 11 | (fp_line (start 16 12.8) (end 16 13.2) (layer F.SilkS) (width 0.2)) 12 | (fp_line (start 16 10.8) (end 16 11.2) (layer F.SilkS) (width 0.2)) 13 | (fp_line (start 16 8.8) (end 16 9.2) (layer F.SilkS) (width 0.2)) 14 | (fp_line (start 16 6.8) (end 16 7.2) (layer F.SilkS) (width 0.2)) 15 | (fp_line (start 16 4.8) (end 16 5.2) (layer F.SilkS) (width 0.2)) 16 | (fp_line (start 16 2.8) (end 16 3.2) (layer F.SilkS) (width 0.2)) 17 | (fp_line (start 16 0.8) (end 16 1.2) (layer F.SilkS) (width 0.2)) 18 | (fp_line (start 16 -1) (end 16 -0.8) (layer F.SilkS) (width 0.2)) 19 | (fp_line (start 0 12.8) (end 0 13.2) (layer F.SilkS) (width 0.2)) 20 | (fp_line (start 0 -0.8) (end 0 -1) (layer F.SilkS) (width 0.2)) 21 | (fp_line (start -1 -0.8) (end 0 -0.8) (layer F.SilkS) (width 0.2)) 22 | (fp_line (start 0 1.2) (end 0 0.8) (layer F.SilkS) (width 0.2)) 23 | (fp_line (start 0 3.2) (end 0 2.8) (layer F.SilkS) (width 0.2)) 24 | (fp_line (start 0 4.8) (end 0 5.2) (layer F.SilkS) (width 0.2)) 25 | (fp_line (start 0 6.8) (end 0 7.2) (layer F.SilkS) (width 0.2)) 26 | (fp_line (start 0 8.8) (end 0 9.2) (layer F.SilkS) (width 0.2)) 27 | (fp_line (start 0 10.8) (end 0 11.2) (layer F.SilkS) (width 0.2)) 28 | (fp_line (start 0 -1) (end 16 -1) (layer F.SilkS) (width 0.2)) 29 | (pad 1 smd oval (at 0 0) (size 2 1) (layers F.Cu F.Paste F.Mask)) 30 | (pad 2 smd oval (at 0 2) (size 2 1) (layers F.Cu F.Paste F.Mask)) 31 | (pad 3 smd oval (at 0 4) (size 2 1) (layers F.Cu F.Paste F.Mask)) 32 | (pad 4 smd oval (at 0 6) (size 2 1) (layers F.Cu F.Paste F.Mask)) 33 | (pad 5 smd oval (at 0 8) (size 2 1) (layers F.Cu F.Paste F.Mask)) 34 | (pad 6 smd oval (at 0 10) (size 2 1) (layers F.Cu F.Paste F.Mask)) 35 | (pad 7 smd oval (at 0 12) (size 2 1) (layers F.Cu F.Paste F.Mask)) 36 | (pad 8 smd oval (at 0 14) (size 2 1) (layers F.Cu F.Paste F.Mask)) 37 | (pad 9 smd oval (at 16 14) (size 2 1) (layers F.Cu F.Paste F.Mask)) 38 | (pad 10 smd oval (at 16 12) (size 2 1) (layers F.Cu F.Paste F.Mask)) 39 | (pad 11 smd oval (at 16 10) (size 2 1) (layers F.Cu F.Paste F.Mask)) 40 | (pad 12 smd oval (at 16 8) (size 2 1) (layers F.Cu F.Paste F.Mask)) 41 | (pad 13 smd oval (at 16 6) (size 2 1) (layers F.Cu F.Paste F.Mask)) 42 | (pad 14 smd oval (at 16 4) (size 2 1) (layers F.Cu F.Paste F.Mask)) 43 | (pad 15 smd oval (at 16 2) (size 2 1) (layers F.Cu F.Paste F.Mask)) 44 | (pad 16 smd oval (at 16 0) (size 2 1) (layers F.Cu F.Paste F.Mask)) 45 | ) 46 | -------------------------------------------------------------------------------- /RFM/RFM95.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # NRF24L01 5 | # 6 | DEF NRF24L01 U 0 40 Y Y 1 F N 7 | F0 "U" 100 250 60 H V C CNN 8 | F1 "NRF24L01" 250 -250 60 H V C CNN 9 | F2 "" 0 -150 60 H V C CNN 10 | F3 "" 0 -150 60 H V C CNN 11 | DRAW 12 | S -250 200 250 -200 0 1 0 f 13 | X GND 1 0 -350 150 U 40 40 1 1 W 14 | X VCC 2 0 350 150 D 40 40 1 1 W 15 | X CE 3 400 -100 150 L 40 40 1 1 I 16 | X CSN 4 400 100 150 L 40 40 1 1 I 17 | X SCK 5 -400 -100 150 R 40 40 1 1 I 18 | X MOSI 6 -400 0 150 R 40 40 1 1 I 19 | X MISO 7 -400 100 150 R 40 40 1 1 I 20 | X IRQ 8 400 0 150 L 40 40 1 1 O 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | # RFM69HW 25 | # 26 | DEF RFM69HW U 0 40 Y Y 1 F N 27 | F0 "U" -350 250 40 H V C CNN 28 | F1 "RFM69HW" 250 -750 40 H V C CNN 29 | F2 "mysensors_radios:RFM69HW_SMD_ThroughHole_Handsoldering" 0 0 30 H I C CIN 30 | F3 "" 0 0 60 H V C CNN 31 | $FPLIST 32 | RFM69* 33 | $ENDFPLIST 34 | DRAW 35 | S -400 200 400 -700 0 1 10 f 36 | X RESET 1 -550 -550 150 R 40 40 1 1 B 37 | X DIO0 2 550 0 150 L 40 40 1 1 B 38 | X DIO1 3 550 -100 150 L 40 40 1 1 B 39 | X DIO2 4 550 -200 150 L 40 40 1 1 B 40 | X DIO3 5 550 -300 150 L 40 40 1 1 B 41 | X DIO4 6 550 -400 150 L 40 40 1 1 B 42 | X DIO5 7 550 -500 150 L 40 40 1 1 B 43 | X 3.3V 8 0 350 150 D 40 40 1 1 W 44 | X GND 9 -100 -850 150 U 40 40 1 1 W 45 | X ANA 10 -550 150 150 R 40 40 1 1 P 46 | X GND 11 100 -850 150 U 40 40 1 1 W 47 | X SCK 12 -550 -350 150 R 40 40 1 1 I 48 | X MISO 13 -550 -250 150 R 40 40 1 1 T 49 | X MOSI 14 -550 -150 150 R 40 40 1 1 I 50 | X NSS 15 -550 -50 150 R 40 40 1 1 I 51 | X NC 16 -550 -650 150 R 40 40 1 1 P 52 | ENDDRAW 53 | ENDDEF 54 | # 55 | # RFM95HW 56 | # 57 | DEF RFM95HW U 0 40 Y Y 1 F N 58 | F0 "U" -350 250 40 H V C CNN 59 | F1 "RFM95HW" 250 -750 40 H V C CNN 60 | F2 "mysensors_radios:RFM69HW_SMD_ThroughHole_Handsoldering" 0 0 30 H I C CIN 61 | F3 "" 0 0 60 H V C CNN 62 | $FPLIST 63 | RFM95* 64 | $ENDFPLIST 65 | DRAW 66 | S -400 200 400 -700 0 1 10 f 67 | X GND 1 -100 -850 150 U 40 40 1 1 W 68 | X MISO 2 -550 -250 150 R 40 40 1 1 T 69 | X MOSI 3 -550 -150 150 R 40 40 1 1 I 70 | X SCK 4 -550 -350 150 R 40 40 1 1 I 71 | X NSS 5 -550 -50 150 R 40 40 1 1 I 72 | X RESET 6 -550 -550 150 R 40 40 1 1 B 73 | X DIO5 7 550 -500 150 L 40 40 1 1 B 74 | X GND 8 0 -850 150 U 40 40 1 1 W 75 | X ANA 9 -550 150 150 R 40 40 1 1 P 76 | X GND 10 100 -850 150 U 40 40 1 1 W 77 | X DIO3 11 550 -300 150 L 40 40 1 1 B 78 | X DIO4 12 550 -400 150 L 40 40 1 1 B 79 | X 3.3V 13 0 350 150 D 40 40 1 1 W 80 | X DIO0 14 550 0 150 L 40 40 1 1 B 81 | X DIO1 15 550 -100 150 L 40 40 1 1 B 82 | X DIO2 16 550 -200 150 L 40 40 1 1 B 83 | ENDDRAW 84 | ENDDEF 85 | # 86 | #End Library 87 | -------------------------------------------------------------------------------- /STM-LORA-rescue.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # C 5 | # 6 | DEF C C 0 10 N Y 1 F N 7 | F0 "C" 25 100 50 H V L CNN 8 | F1 "C" 25 -100 50 H V L CNN 9 | F2 "" 38 -150 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | $FPLIST 12 | C_* 13 | $ENDFPLIST 14 | DRAW 15 | P 2 0 1 20 -80 -30 80 -30 N 16 | P 2 0 1 20 -80 30 80 30 N 17 | X ~ 1 0 150 110 D 50 50 1 1 P 18 | X ~ 2 0 -150 110 U 50 50 1 1 P 19 | ENDDRAW 20 | ENDDEF 21 | # 22 | # CONN_01X01 23 | # 24 | DEF CONN_01X01 J 0 40 Y N 1 F N 25 | F0 "J" 0 100 50 H V C CNN 26 | F1 "CONN_01X01" 100 0 50 V V C CNN 27 | F2 "" 0 0 50 H I C CNN 28 | F3 "" 0 0 50 H I C CNN 29 | $FPLIST 30 | Pin_Header_Straight_1X* 31 | Pin_Header_Angled_1X* 32 | Socket_Strip_Straight_1X* 33 | Socket_Strip_Angled_1X* 34 | $ENDFPLIST 35 | DRAW 36 | S -50 5 10 -5 0 1 0 N 37 | S -50 50 50 -50 0 1 0 N 38 | X P1 1 -200 0 150 R 50 50 1 1 P 39 | ENDDRAW 40 | ENDDEF 41 | # 42 | # CONN_01X02 43 | # 44 | DEF CONN_01X02 J 0 40 Y N 1 F N 45 | F0 "J" 0 150 50 H V C CNN 46 | F1 "CONN_01X02" 100 0 50 V V C CNN 47 | F2 "" 0 0 50 H I C CNN 48 | F3 "" 0 0 50 H I C CNN 49 | $FPLIST 50 | Pin_Header_Straight_1X* 51 | Pin_Header_Angled_1X* 52 | Socket_Strip_Straight_1X* 53 | Socket_Strip_Angled_1X* 54 | $ENDFPLIST 55 | DRAW 56 | S -50 -45 10 -55 0 1 0 N 57 | S -50 55 10 45 0 1 0 N 58 | S -50 100 50 -100 0 1 0 N 59 | X P1 1 -200 50 150 R 50 50 1 1 P 60 | X P2 2 -200 -50 150 R 50 50 1 1 P 61 | ENDDRAW 62 | ENDDEF 63 | # 64 | # CONN_01X02_MALE 65 | # 66 | DEF CONN_01X02_MALE J 0 40 Y N 1 F N 67 | F0 "J" 0 175 50 H V C CNN 68 | F1 "CONN_01X02_MALE" 0 -200 50 H V C CNN 69 | F2 "" 0 100 50 H I C CNN 70 | F3 "" 0 100 50 H I C CNN 71 | DRAW 72 | S -100 -75 100 -125 0 1 0 F 73 | S -100 125 -100 125 0 1 0 N 74 | S 100 125 -100 75 0 1 0 F 75 | X 1 1 300 100 200 L 50 50 1 1 P 76 | X 2 2 300 -100 200 L 50 50 1 1 P 77 | ENDDRAW 78 | ENDDEF 79 | # 80 | # CONN_01X03 81 | # 82 | DEF CONN_01X03 J 0 40 Y N 1 F N 83 | F0 "J" 0 200 50 H V C CNN 84 | F1 "CONN_01X03" 100 0 50 V V C CNN 85 | F2 "" 0 0 50 H I C CNN 86 | F3 "" 0 0 50 H I C CNN 87 | $FPLIST 88 | Pin_Header_Straight_1X* 89 | Pin_Header_Angled_1X* 90 | Socket_Strip_Straight_1X* 91 | Socket_Strip_Angled_1X* 92 | $ENDFPLIST 93 | DRAW 94 | S -50 -95 10 -105 0 1 0 N 95 | S -50 5 10 -5 0 1 0 N 96 | S -50 105 10 95 0 1 0 N 97 | S -50 150 50 -150 0 1 0 N 98 | X P1 1 -200 100 150 R 50 50 1 1 P 99 | X P2 2 -200 0 150 R 50 50 1 1 P 100 | X P3 3 -200 -100 150 R 50 50 1 1 P 101 | ENDDRAW 102 | ENDDEF 103 | # 104 | # CONN_01X05 105 | # 106 | DEF CONN_01X05 J 0 40 Y N 1 F N 107 | F0 "J" 0 300 50 H V C CNN 108 | F1 "CONN_01X05" 100 0 50 V V C CNN 109 | F2 "" 0 0 50 H I C CNN 110 | F3 "" 0 0 50 H I C CNN 111 | $FPLIST 112 | Pin_Header_Straight_1X* 113 | Pin_Header_Angled_1X* 114 | Socket_Strip_Straight_1X* 115 | Socket_Strip_Angled_1X* 116 | $ENDFPLIST 117 | DRAW 118 | S -50 -195 10 -205 0 1 0 N 119 | S -50 -95 10 -105 0 1 0 N 120 | S -50 5 10 -5 0 1 0 N 121 | S -50 105 10 95 0 1 0 N 122 | S -50 205 10 195 0 1 0 N 123 | S -50 250 50 -250 0 1 0 N 124 | X P1 1 -200 200 150 R 50 50 1 1 P 125 | X P2 2 -200 100 150 R 50 50 1 1 P 126 | X P3 3 -200 0 150 R 50 50 1 1 P 127 | X P4 4 -200 -100 150 R 50 50 1 1 P 128 | X P5 5 -200 -200 150 R 50 50 1 1 P 129 | ENDDRAW 130 | ENDDEF 131 | # 132 | # CONN_01X14 133 | # 134 | DEF CONN_01X14 J 0 40 Y N 1 F N 135 | F0 "J" 0 750 50 H V C CNN 136 | F1 "CONN_01X14" 100 0 50 V V C CNN 137 | F2 "" 0 0 50 H I C CNN 138 | F3 "" 0 0 50 H I C CNN 139 | $FPLIST 140 | Pin_Header_Straight_1X* 141 | Pin_Header_Angled_1X* 142 | Socket_Strip_Straight_1X* 143 | Socket_Strip_Angled_1X* 144 | $ENDFPLIST 145 | DRAW 146 | S -50 -645 10 -655 0 1 0 N 147 | S -50 -545 10 -555 0 1 0 N 148 | S -50 -445 10 -455 0 1 0 N 149 | S -50 -345 10 -355 0 1 0 N 150 | S -50 -245 10 -255 0 1 0 N 151 | S -50 -145 10 -155 0 1 0 N 152 | S -50 -45 10 -55 0 1 0 N 153 | S -50 55 10 45 0 1 0 N 154 | S -50 155 10 145 0 1 0 N 155 | S -50 255 10 245 0 1 0 N 156 | S -50 355 10 345 0 1 0 N 157 | S -50 455 10 445 0 1 0 N 158 | S -50 555 10 545 0 1 0 N 159 | S -50 655 10 645 0 1 0 N 160 | S -50 700 50 -700 0 1 0 N 161 | X P1 1 -200 650 150 R 50 50 1 1 P 162 | X P10 10 -200 -250 150 R 50 50 1 1 P 163 | X P11 11 -200 -350 150 R 50 50 1 1 P 164 | X P12 12 -200 -450 150 R 50 50 1 1 P 165 | X P13 13 -200 -550 150 R 50 50 1 1 P 166 | X P14 14 -200 -650 150 R 50 50 1 1 P 167 | X P2 2 -200 550 150 R 50 50 1 1 P 168 | X P3 3 -200 450 150 R 50 50 1 1 P 169 | X P4 4 -200 350 150 R 50 50 1 1 P 170 | X P5 5 -200 250 150 R 50 50 1 1 P 171 | X P6 6 -200 150 150 R 50 50 1 1 P 172 | X P7 7 -200 50 150 R 50 50 1 1 P 173 | X P8 8 -200 -50 150 R 50 50 1 1 P 174 | X P9 9 -200 -150 150 R 50 50 1 1 P 175 | ENDDRAW 176 | ENDDEF 177 | # 178 | # CONN_01X17 179 | # 180 | DEF CONN_01X17 J 0 40 Y N 1 F N 181 | F0 "J" 0 900 50 H V C CNN 182 | F1 "CONN_01X17" 100 0 50 V V C CNN 183 | F2 "" 0 0 50 H I C CNN 184 | F3 "" 0 0 50 H I C CNN 185 | $FPLIST 186 | Pin_Header_Straight_1X* 187 | Pin_Header_Angled_1X* 188 | Socket_Strip_Straight_1X* 189 | Socket_Strip_Angled_1X* 190 | $ENDFPLIST 191 | DRAW 192 | S -50 -795 10 -805 0 1 0 N 193 | S -50 -695 10 -705 0 1 0 N 194 | S -50 -595 10 -605 0 1 0 N 195 | S -50 -495 10 -505 0 1 0 N 196 | S -50 -395 10 -405 0 1 0 N 197 | S -50 -295 10 -305 0 1 0 N 198 | S -50 -195 10 -205 0 1 0 N 199 | S -50 -95 10 -105 0 1 0 N 200 | S -50 5 10 -5 0 1 0 N 201 | S -50 105 10 95 0 1 0 N 202 | S -50 205 10 195 0 1 0 N 203 | S -50 305 10 295 0 1 0 N 204 | S -50 405 10 395 0 1 0 N 205 | S -50 505 10 495 0 1 0 N 206 | S -50 605 10 595 0 1 0 N 207 | S -50 705 10 695 0 1 0 N 208 | S -50 805 10 795 0 1 0 N 209 | S -50 850 50 -850 0 1 0 N 210 | X P1 1 -200 800 150 R 50 50 1 1 P 211 | X P10 10 -200 -100 150 R 50 50 1 1 P 212 | X P11 11 -200 -200 150 R 50 50 1 1 P 213 | X P12 12 -200 -300 150 R 50 50 1 1 P 214 | X P13 13 -200 -400 150 R 50 50 1 1 P 215 | X P14 14 -200 -500 150 R 50 50 1 1 P 216 | X P15 15 -200 -600 150 R 50 50 1 1 P 217 | X P16 16 -200 -700 150 R 50 50 1 1 P 218 | X P17 17 -200 -800 150 R 50 50 1 1 P 219 | X P2 2 -200 700 150 R 50 50 1 1 P 220 | X P3 3 -200 600 150 R 50 50 1 1 P 221 | X P4 4 -200 500 150 R 50 50 1 1 P 222 | X P5 5 -200 400 150 R 50 50 1 1 P 223 | X P6 6 -200 300 150 R 50 50 1 1 P 224 | X P7 7 -200 200 150 R 50 50 1 1 P 225 | X P8 8 -200 100 150 R 50 50 1 1 P 226 | X P9 9 -200 0 150 R 50 50 1 1 P 227 | ENDDRAW 228 | ENDDEF 229 | # 230 | # CONN_02X07 231 | # 232 | DEF CONN_02X07 J 0 1 Y N 1 F N 233 | F0 "J" 0 400 50 H V C CNN 234 | F1 "CONN_02X07" 0 0 50 V V C CNN 235 | F2 "" 0 -1200 50 H I C CNN 236 | F3 "" 0 -1200 50 H I C CNN 237 | $FPLIST 238 | Pin_Header_Straight_2X* 239 | Pin_Header_Angled_2X* 240 | Socket_Strip_Straight_2X* 241 | Socket_Strip_Angled_2X* 242 | IDC_Header_Straight_* 243 | $ENDFPLIST 244 | DRAW 245 | S -100 -295 -50 -305 0 1 0 N 246 | S -100 -195 -50 -205 0 1 0 N 247 | S -100 -95 -50 -105 0 1 0 N 248 | S -100 5 -50 -5 0 1 0 N 249 | S -100 105 -50 95 0 1 0 N 250 | S -100 205 -50 195 0 1 0 N 251 | S -100 305 -50 295 0 1 0 N 252 | S -100 350 100 -350 0 1 0 N 253 | S 50 -295 100 -305 0 1 0 N 254 | S 50 -195 100 -205 0 1 0 N 255 | S 50 -95 100 -105 0 1 0 N 256 | S 50 5 100 -5 0 1 0 N 257 | S 50 105 100 95 0 1 0 N 258 | S 50 205 100 195 0 1 0 N 259 | S 50 305 100 295 0 1 0 N 260 | X P1 1 -250 300 150 R 50 50 1 1 P 261 | X P10 10 250 -100 150 L 50 50 1 1 P 262 | X P11 11 -250 -200 150 R 50 50 1 1 P 263 | X P12 12 250 -200 150 L 50 50 1 1 P 264 | X P13 13 -250 -300 150 R 50 50 1 1 P 265 | X P14 14 250 -300 150 L 50 50 1 1 P 266 | X P2 2 250 300 150 L 50 50 1 1 P 267 | X P3 3 -250 200 150 R 50 50 1 1 P 268 | X P4 4 250 200 150 L 50 50 1 1 P 269 | X P5 5 -250 100 150 R 50 50 1 1 P 270 | X P6 6 250 100 150 L 50 50 1 1 P 271 | X P7 7 -250 0 150 R 50 50 1 1 P 272 | X P8 8 250 0 150 L 50 50 1 1 P 273 | X P9 9 -250 -100 150 R 50 50 1 1 P 274 | ENDDRAW 275 | ENDDEF 276 | # 277 | # CONN_02X09 278 | # 279 | DEF CONN_02X09 J 0 1 Y N 1 F N 280 | F0 "J" 0 500 50 H V C CNN 281 | F1 "CONN_02X09" 0 0 50 V V C CNN 282 | F2 "" 0 -1200 50 H I C CNN 283 | F3 "" 0 -1200 50 H I C CNN 284 | $FPLIST 285 | Pin_Header_Straight_2X* 286 | Pin_Header_Angled_2X* 287 | Socket_Strip_Straight_2X* 288 | Socket_Strip_Angled_2X* 289 | $ENDFPLIST 290 | DRAW 291 | S -100 -395 -50 -405 0 1 0 N 292 | S -100 -295 -50 -305 0 1 0 N 293 | S -100 -195 -50 -205 0 1 0 N 294 | S -100 -95 -50 -105 0 1 0 N 295 | S -100 5 -50 -5 0 1 0 N 296 | S -100 105 -50 95 0 1 0 N 297 | S -100 205 -50 195 0 1 0 N 298 | S -100 305 -50 295 0 1 0 N 299 | S -100 405 -50 395 0 1 0 N 300 | S -100 450 100 -450 0 1 0 N 301 | S 50 -395 100 -405 0 1 0 N 302 | S 50 -295 100 -305 0 1 0 N 303 | S 50 -195 100 -205 0 1 0 N 304 | S 50 -95 100 -105 0 1 0 N 305 | S 50 5 100 -5 0 1 0 N 306 | S 50 105 100 95 0 1 0 N 307 | S 50 205 100 195 0 1 0 N 308 | S 50 305 100 295 0 1 0 N 309 | S 50 405 100 395 0 1 0 N 310 | X P1 1 -250 400 150 R 50 50 1 1 P 311 | X P10 10 250 0 150 L 50 50 1 1 P 312 | X P11 11 -250 -100 150 R 50 50 1 1 P 313 | X P12 12 250 -100 150 L 50 50 1 1 P 314 | X P13 13 -250 -200 150 R 50 50 1 1 P 315 | X P14 14 250 -200 150 L 50 50 1 1 P 316 | X P15 15 -250 -300 150 R 50 50 1 1 P 317 | X P16 16 250 -300 150 L 50 50 1 1 P 318 | X P17 17 -250 -400 150 R 50 50 1 1 P 319 | X P18 18 250 -400 150 L 50 50 1 1 P 320 | X P2 2 250 400 150 L 50 50 1 1 P 321 | X P3 3 -250 300 150 R 50 50 1 1 P 322 | X P4 4 250 300 150 L 50 50 1 1 P 323 | X P5 5 -250 200 150 R 50 50 1 1 P 324 | X P6 6 250 200 150 L 50 50 1 1 P 325 | X P7 7 -250 100 150 R 50 50 1 1 P 326 | X P8 8 250 100 150 L 50 50 1 1 P 327 | X P9 9 -250 0 150 R 50 50 1 1 P 328 | ENDDRAW 329 | ENDDEF 330 | # 331 | # CP 332 | # 333 | DEF CP C 0 10 N Y 1 F N 334 | F0 "C" 25 100 50 H V L CNN 335 | F1 "CP" 25 -100 50 H V L CNN 336 | F2 "" 38 -150 50 H I C CNN 337 | F3 "" 0 0 50 H I C CNN 338 | $FPLIST 339 | CP_* 340 | $ENDFPLIST 341 | DRAW 342 | S -90 20 -90 40 0 1 0 N 343 | S -90 20 90 20 0 1 0 N 344 | S 90 -20 -90 -40 0 1 0 F 345 | S 90 40 -90 40 0 1 0 N 346 | S 90 40 90 20 0 1 0 N 347 | P 2 0 1 0 -70 90 -30 90 N 348 | P 2 0 1 0 -50 110 -50 70 N 349 | X ~ 1 0 150 110 D 50 50 1 1 P 350 | X ~ 2 0 -150 110 U 50 50 1 1 P 351 | ENDDRAW 352 | ENDDEF 353 | # 354 | # D_Schottky 355 | # 356 | DEF D_Schottky D 0 40 N N 1 F N 357 | F0 "D" 0 100 50 H V C CNN 358 | F1 "D_Schottky" 0 -100 50 H V C CNN 359 | F2 "" 0 0 50 H I C CNN 360 | F3 "" 0 0 50 H I C CNN 361 | $FPLIST 362 | TO-???* 363 | *SingleDiode 364 | *_Diode_* 365 | *SingleDiode* 366 | D_* 367 | $ENDFPLIST 368 | DRAW 369 | P 2 0 1 0 50 0 -50 0 N 370 | P 4 0 1 8 50 50 50 -50 -50 0 50 50 N 371 | P 6 0 1 8 -75 25 -75 50 -50 50 -50 -50 -25 -50 -25 -25 N 372 | X K 1 -150 0 100 R 50 50 1 1 P 373 | X A 2 150 0 100 L 50 50 1 1 P 374 | ENDDRAW 375 | ENDDEF 376 | # 377 | # R 378 | # 379 | DEF R R 0 0 N Y 1 F N 380 | F0 "R" 80 0 50 V V C CNN 381 | F1 "R" 0 0 50 V V C CNN 382 | F2 "" -70 0 50 V I C CNN 383 | F3 "" 0 0 50 H I C CNN 384 | $FPLIST 385 | R_* 386 | R_* 387 | $ENDFPLIST 388 | DRAW 389 | S -40 -100 40 100 0 1 10 N 390 | X ~ 1 0 150 50 D 50 50 1 1 P 391 | X ~ 2 0 -150 50 U 50 50 1 1 P 392 | ENDDRAW 393 | ENDDEF 394 | # 395 | #End Library 396 | -------------------------------------------------------------------------------- /STM-LORA.kicad_prl: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "active_layer": 0, 4 | "active_layer_preset": "All Layers", 5 | "auto_track_width": true, 6 | "hidden_netclasses": [], 7 | "hidden_nets": [], 8 | "high_contrast_mode": 0, 9 | "net_color_mode": 1, 10 | "opacity": { 11 | "images": 0.6, 12 | "pads": 1.0, 13 | "shapes": 1.0, 14 | "tracks": 1.0, 15 | "vias": 1.0, 16 | "zones": 0.6 17 | }, 18 | "selection_filter": { 19 | "dimensions": true, 20 | "footprints": true, 21 | "graphics": true, 22 | "keepouts": true, 23 | "lockedItems": false, 24 | "otherItems": true, 25 | "pads": true, 26 | "text": true, 27 | "tracks": true, 28 | "vias": true, 29 | "zones": true 30 | }, 31 | "visible_items": [ 32 | "vias", 33 | "footprint_text", 34 | "footprint_anchors", 35 | "ratsnest", 36 | "grid", 37 | "footprints_front", 38 | "footprints_back", 39 | "footprint_values", 40 | "footprint_references", 41 | "tracks", 42 | "drc_errors", 43 | "drawing_sheet", 44 | "bitmaps", 45 | "pads", 46 | "zones", 47 | "drc_warnings", 48 | "locked_item_shadows", 49 | "conflict_shadows", 50 | "shapes" 51 | ], 52 | "visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff", 53 | "zone_display_mode": 0 54 | }, 55 | "git": { 56 | "repo_type": "", 57 | "repo_username": "", 58 | "ssh_key": "" 59 | }, 60 | "meta": { 61 | "filename": "STM-LORA.kicad_prl", 62 | "version": 5 63 | }, 64 | "net_inspector_panel": { 65 | "col_hidden": [ 66 | false, 67 | false, 68 | false, 69 | false, 70 | false, 71 | false, 72 | false, 73 | false, 74 | false, 75 | false 76 | ], 77 | "col_order": [ 78 | 0, 79 | 1, 80 | 2, 81 | 3, 82 | 4, 83 | 5, 84 | 6, 85 | 7, 86 | 8, 87 | 9 88 | ], 89 | "col_widths": [ 90 | 0, 91 | 0, 92 | 0, 93 | 0, 94 | 0, 95 | 0, 96 | 0, 97 | 0, 98 | 0, 99 | 0 100 | ], 101 | "custom_group_rules": [], 102 | "expanded_rows": [], 103 | "filter_by_net_name": true, 104 | "filter_by_netclass": true, 105 | "filter_text": "", 106 | "group_by_constraint": false, 107 | "group_by_netclass": false, 108 | "show_unconnected_nets": false, 109 | "show_zero_pad_nets": false, 110 | "sort_ascending": true, 111 | "sorting_column": 0 112 | }, 113 | "open_jobsets": [], 114 | "project": { 115 | "files": [] 116 | }, 117 | "schematic": { 118 | "selection_filter": { 119 | "graphics": true, 120 | "images": true, 121 | "labels": true, 122 | "lockedItems": false, 123 | "otherItems": true, 124 | "pins": true, 125 | "symbols": true, 126 | "text": true, 127 | "wires": true 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /STM-LORA.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "3dviewports": [], 4 | "design_settings": { 5 | "defaults": { 6 | "apply_defaults_to_fp_fields": false, 7 | "apply_defaults_to_fp_shapes": false, 8 | "apply_defaults_to_fp_text": false, 9 | "board_outline_line_width": 0.15, 10 | "copper_line_width": 0.2, 11 | "copper_text_italic": false, 12 | "copper_text_size_h": 1.5, 13 | "copper_text_size_v": 1.5, 14 | "copper_text_thickness": 0.3, 15 | "copper_text_upright": false, 16 | "courtyard_line_width": 0.05, 17 | "dimension_precision": 4, 18 | "dimension_units": 3, 19 | "dimensions": { 20 | "arrow_length": 1270000, 21 | "extension_offset": 500000, 22 | "keep_text_aligned": true, 23 | "suppress_zeroes": false, 24 | "text_position": 0, 25 | "units_format": 1 26 | }, 27 | "fab_line_width": 0.1, 28 | "fab_text_italic": false, 29 | "fab_text_size_h": 1.0, 30 | "fab_text_size_v": 1.0, 31 | "fab_text_thickness": 0.15, 32 | "fab_text_upright": false, 33 | "other_line_width": 0.1, 34 | "other_text_italic": false, 35 | "other_text_size_h": 1.0, 36 | "other_text_size_v": 1.0, 37 | "other_text_thickness": 0.15, 38 | "other_text_upright": false, 39 | "pads": { 40 | "drill": 2.2, 41 | "height": 3.8, 42 | "width": 3.8 43 | }, 44 | "silk_line_width": 0.15, 45 | "silk_text_italic": false, 46 | "silk_text_size_h": 1.0, 47 | "silk_text_size_v": 1.0, 48 | "silk_text_thickness": 0.15, 49 | "silk_text_upright": false, 50 | "zones": { 51 | "min_clearance": 0.508 52 | } 53 | }, 54 | "diff_pair_dimensions": [], 55 | "drc_exclusions": [], 56 | "meta": { 57 | "filename": "board_design_settings.json", 58 | "version": 2 59 | }, 60 | "rule_severities": { 61 | "annular_width": "error", 62 | "clearance": "error", 63 | "connection_width": "warning", 64 | "copper_edge_clearance": "error", 65 | "copper_sliver": "warning", 66 | "courtyards_overlap": "error", 67 | "creepage": "error", 68 | "diff_pair_gap_out_of_range": "error", 69 | "diff_pair_uncoupled_length_too_long": "error", 70 | "drill_out_of_range": "error", 71 | "duplicate_footprints": "warning", 72 | "extra_footprint": "warning", 73 | "footprint": "error", 74 | "footprint_filters_mismatch": "ignore", 75 | "footprint_symbol_mismatch": "warning", 76 | "footprint_type_mismatch": "ignore", 77 | "hole_clearance": "error", 78 | "hole_near_hole": "error", 79 | "hole_to_hole": "error", 80 | "holes_co_located": "warning", 81 | "invalid_outline": "error", 82 | "isolated_copper": "warning", 83 | "item_on_disabled_layer": "error", 84 | "items_not_allowed": "error", 85 | "length_out_of_range": "error", 86 | "lib_footprint_issues": "warning", 87 | "lib_footprint_mismatch": "warning", 88 | "malformed_courtyard": "error", 89 | "microvia_drill_out_of_range": "error", 90 | "mirrored_text_on_front_layer": "warning", 91 | "missing_courtyard": "ignore", 92 | "missing_footprint": "warning", 93 | "net_conflict": "warning", 94 | "nonmirrored_text_on_back_layer": "warning", 95 | "npth_inside_courtyard": "ignore", 96 | "padstack": "warning", 97 | "pth_inside_courtyard": "ignore", 98 | "shorting_items": "error", 99 | "silk_edge_clearance": "warning", 100 | "silk_over_copper": "warning", 101 | "silk_overlap": "warning", 102 | "skew_out_of_range": "error", 103 | "solder_mask_bridge": "error", 104 | "starved_thermal": "error", 105 | "text_height": "warning", 106 | "text_thickness": "warning", 107 | "through_hole_pad_without_hole": "error", 108 | "too_many_vias": "error", 109 | "track_angle": "error", 110 | "track_dangling": "warning", 111 | "track_segment_length": "error", 112 | "track_width": "error", 113 | "tracks_crossing": "error", 114 | "unconnected_items": "error", 115 | "unresolved_variable": "error", 116 | "via_dangling": "warning", 117 | "zones_intersect": "error" 118 | }, 119 | "rule_severitieslegacy_courtyards_overlap": true, 120 | "rule_severitieslegacy_no_courtyard_defined": false, 121 | "rules": { 122 | "max_error": 0.005, 123 | "min_clearance": 0.0, 124 | "min_connection": 0.0, 125 | "min_copper_edge_clearance": 0.075, 126 | "min_groove_width": 0.0, 127 | "min_hole_clearance": 0.25, 128 | "min_hole_to_hole": 0.25, 129 | "min_microvia_diameter": 0.2, 130 | "min_microvia_drill": 0.1, 131 | "min_resolved_spokes": 2, 132 | "min_silk_clearance": 0.0, 133 | "min_text_height": 0.8, 134 | "min_text_thickness": 0.08, 135 | "min_through_hole_diameter": 0.3, 136 | "min_track_width": 0.2, 137 | "min_via_annular_width": 0.1, 138 | "min_via_diameter": 0.4, 139 | "solder_mask_to_copper_clearance": 0.0, 140 | "use_height_for_length_calcs": true 141 | }, 142 | "teardrop_options": [ 143 | { 144 | "td_onpthpad": true, 145 | "td_onroundshapesonly": false, 146 | "td_onsmdpad": true, 147 | "td_ontrackend": false, 148 | "td_onvia": true 149 | } 150 | ], 151 | "teardrop_parameters": [ 152 | { 153 | "td_allow_use_two_tracks": true, 154 | "td_curve_segcount": 0, 155 | "td_height_ratio": 1.0, 156 | "td_length_ratio": 0.5, 157 | "td_maxheight": 2.0, 158 | "td_maxlen": 1.0, 159 | "td_on_pad_in_zone": false, 160 | "td_target_name": "td_round_shape", 161 | "td_width_to_size_filter_ratio": 0.9 162 | }, 163 | { 164 | "td_allow_use_two_tracks": true, 165 | "td_curve_segcount": 0, 166 | "td_height_ratio": 1.0, 167 | "td_length_ratio": 0.5, 168 | "td_maxheight": 2.0, 169 | "td_maxlen": 1.0, 170 | "td_on_pad_in_zone": false, 171 | "td_target_name": "td_rect_shape", 172 | "td_width_to_size_filter_ratio": 0.9 173 | }, 174 | { 175 | "td_allow_use_two_tracks": true, 176 | "td_curve_segcount": 0, 177 | "td_height_ratio": 1.0, 178 | "td_length_ratio": 0.5, 179 | "td_maxheight": 2.0, 180 | "td_maxlen": 1.0, 181 | "td_on_pad_in_zone": false, 182 | "td_target_name": "td_track_end", 183 | "td_width_to_size_filter_ratio": 0.9 184 | } 185 | ], 186 | "track_widths": [ 187 | 0.0, 188 | 0.5 189 | ], 190 | "tuning_pattern_settings": { 191 | "diff_pair_defaults": { 192 | "corner_radius_percentage": 80, 193 | "corner_style": 1, 194 | "max_amplitude": 1.0, 195 | "min_amplitude": 0.2, 196 | "single_sided": false, 197 | "spacing": 1.0 198 | }, 199 | "diff_pair_skew_defaults": { 200 | "corner_radius_percentage": 80, 201 | "corner_style": 1, 202 | "max_amplitude": 1.0, 203 | "min_amplitude": 0.2, 204 | "single_sided": false, 205 | "spacing": 0.6 206 | }, 207 | "single_track_defaults": { 208 | "corner_radius_percentage": 80, 209 | "corner_style": 1, 210 | "max_amplitude": 1.0, 211 | "min_amplitude": 0.2, 212 | "single_sided": false, 213 | "spacing": 0.6 214 | } 215 | }, 216 | "via_dimensions": [], 217 | "zones_allow_external_fillets": false 218 | }, 219 | "ipc2581": { 220 | "dist": "", 221 | "distpn": "", 222 | "internal_id": "", 223 | "mfg": "", 224 | "mpn": "" 225 | }, 226 | "layer_pairs": [], 227 | "layer_presets": [], 228 | "viewports": [] 229 | }, 230 | "boards": [], 231 | "cvpcb": { 232 | "equivalence_files": [] 233 | }, 234 | "erc": { 235 | "erc_exclusions": [], 236 | "meta": { 237 | "version": 0 238 | }, 239 | "pin_map": [ 240 | [ 241 | 0, 242 | 0, 243 | 0, 244 | 0, 245 | 0, 246 | 0, 247 | 1, 248 | 0, 249 | 0, 250 | 0, 251 | 0, 252 | 2 253 | ], 254 | [ 255 | 0, 256 | 2, 257 | 0, 258 | 1, 259 | 0, 260 | 0, 261 | 1, 262 | 0, 263 | 2, 264 | 2, 265 | 2, 266 | 2 267 | ], 268 | [ 269 | 0, 270 | 0, 271 | 0, 272 | 0, 273 | 0, 274 | 0, 275 | 1, 276 | 0, 277 | 1, 278 | 0, 279 | 1, 280 | 2 281 | ], 282 | [ 283 | 0, 284 | 1, 285 | 0, 286 | 0, 287 | 0, 288 | 0, 289 | 1, 290 | 1, 291 | 2, 292 | 1, 293 | 1, 294 | 2 295 | ], 296 | [ 297 | 0, 298 | 0, 299 | 0, 300 | 0, 301 | 0, 302 | 0, 303 | 1, 304 | 0, 305 | 0, 306 | 0, 307 | 0, 308 | 2 309 | ], 310 | [ 311 | 0, 312 | 0, 313 | 0, 314 | 0, 315 | 0, 316 | 0, 317 | 0, 318 | 0, 319 | 0, 320 | 0, 321 | 0, 322 | 2 323 | ], 324 | [ 325 | 1, 326 | 1, 327 | 1, 328 | 1, 329 | 1, 330 | 0, 331 | 1, 332 | 1, 333 | 1, 334 | 1, 335 | 1, 336 | 2 337 | ], 338 | [ 339 | 0, 340 | 0, 341 | 0, 342 | 1, 343 | 0, 344 | 0, 345 | 1, 346 | 0, 347 | 0, 348 | 0, 349 | 0, 350 | 2 351 | ], 352 | [ 353 | 0, 354 | 2, 355 | 1, 356 | 2, 357 | 0, 358 | 0, 359 | 1, 360 | 0, 361 | 2, 362 | 2, 363 | 2, 364 | 2 365 | ], 366 | [ 367 | 0, 368 | 2, 369 | 0, 370 | 1, 371 | 0, 372 | 0, 373 | 1, 374 | 0, 375 | 2, 376 | 0, 377 | 0, 378 | 2 379 | ], 380 | [ 381 | 0, 382 | 2, 383 | 1, 384 | 1, 385 | 0, 386 | 0, 387 | 1, 388 | 0, 389 | 2, 390 | 0, 391 | 0, 392 | 2 393 | ], 394 | [ 395 | 2, 396 | 2, 397 | 2, 398 | 2, 399 | 2, 400 | 2, 401 | 2, 402 | 2, 403 | 2, 404 | 2, 405 | 2, 406 | 2 407 | ] 408 | ], 409 | "rule_severities": { 410 | "bus_definition_conflict": "error", 411 | "bus_entry_needed": "error", 412 | "bus_to_bus_conflict": "error", 413 | "bus_to_net_conflict": "error", 414 | "conflicting_netclasses": "error", 415 | "different_unit_footprint": "error", 416 | "different_unit_net": "error", 417 | "duplicate_reference": "error", 418 | "duplicate_sheet_names": "error", 419 | "endpoint_off_grid": "warning", 420 | "extra_units": "error", 421 | "footprint_filter": "ignore", 422 | "footprint_link_issues": "warning", 423 | "four_way_junction": "ignore", 424 | "global_label_dangling": "warning", 425 | "hier_label_mismatch": "error", 426 | "label_dangling": "error", 427 | "label_multiple_wires": "warning", 428 | "lib_symbol_issues": "warning", 429 | "lib_symbol_mismatch": "warning", 430 | "missing_bidi_pin": "warning", 431 | "missing_input_pin": "warning", 432 | "missing_power_pin": "error", 433 | "missing_unit": "warning", 434 | "multiple_net_names": "warning", 435 | "net_not_bus_member": "warning", 436 | "no_connect_connected": "warning", 437 | "no_connect_dangling": "warning", 438 | "pin_not_connected": "error", 439 | "pin_not_driven": "error", 440 | "pin_to_pin": "warning", 441 | "power_pin_not_driven": "error", 442 | "same_local_global_label": "warning", 443 | "similar_label_and_power": "warning", 444 | "similar_labels": "warning", 445 | "similar_power": "warning", 446 | "simulation_model_issue": "ignore", 447 | "single_global_label": "ignore", 448 | "unannotated": "error", 449 | "unconnected_wire_endpoint": "warning", 450 | "unit_value_mismatch": "error", 451 | "unresolved_variable": "error", 452 | "wire_dangling": "error" 453 | } 454 | }, 455 | "libraries": { 456 | "pinned_footprint_libs": [], 457 | "pinned_symbol_libs": [] 458 | }, 459 | "meta": { 460 | "filename": "STM-LORA.kicad_pro", 461 | "version": 3 462 | }, 463 | "net_settings": { 464 | "classes": [ 465 | { 466 | "bus_width": 12, 467 | "clearance": 0.2, 468 | "diff_pair_gap": 0.25, 469 | "diff_pair_via_gap": 0.25, 470 | "diff_pair_width": 0.2, 471 | "line_style": 0, 472 | "microvia_diameter": 0.3, 473 | "microvia_drill": 0.1, 474 | "name": "Default", 475 | "pcb_color": "rgba(0, 0, 0, 0.000)", 476 | "priority": 2147483647, 477 | "schematic_color": "rgba(0, 0, 0, 0.000)", 478 | "track_width": 0.25, 479 | "via_diameter": 0.6, 480 | "via_drill": 0.4, 481 | "wire_width": 6 482 | }, 483 | { 484 | "bus_width": 12, 485 | "clearance": 0.2, 486 | "diff_pair_gap": 0.25, 487 | "diff_pair_via_gap": 0.25, 488 | "diff_pair_width": 0.2, 489 | "line_style": 0, 490 | "microvia_diameter": 0.4, 491 | "microvia_drill": 0.2, 492 | "name": "Power", 493 | "pcb_color": "rgba(0, 0, 0, 0.000)", 494 | "priority": 0, 495 | "schematic_color": "rgba(0, 0, 0, 0.000)", 496 | "track_width": 0.7, 497 | "via_diameter": 0.7, 498 | "via_drill": 0.5, 499 | "wire_width": 6 500 | } 501 | ], 502 | "meta": { 503 | "version": 4 504 | }, 505 | "net_colors": null, 506 | "netclass_assignments": null, 507 | "netclass_patterns": [ 508 | { 509 | "netclass": "Default", 510 | "pattern": "/P22" 511 | }, 512 | { 513 | "netclass": "Default", 514 | "pattern": "/P25" 515 | }, 516 | { 517 | "netclass": "Default", 518 | "pattern": "/P26" 519 | }, 520 | { 521 | "netclass": "Default", 522 | "pattern": "/P27" 523 | }, 524 | { 525 | "netclass": "Default", 526 | "pattern": "/P28" 527 | }, 528 | { 529 | "netclass": "Default", 530 | "pattern": "/P29" 531 | }, 532 | { 533 | "netclass": "Default", 534 | "pattern": "/P30" 535 | }, 536 | { 537 | "netclass": "Default", 538 | "pattern": "/P31" 539 | }, 540 | { 541 | "netclass": "Default", 542 | "pattern": "/P32" 543 | }, 544 | { 545 | "netclass": "Default", 546 | "pattern": "/P33" 547 | }, 548 | { 549 | "netclass": "Default", 550 | "pattern": "/P34" 551 | }, 552 | { 553 | "netclass": "Default", 554 | "pattern": "/P35" 555 | }, 556 | { 557 | "netclass": "Default", 558 | "pattern": "/P36" 559 | }, 560 | { 561 | "netclass": "Default", 562 | "pattern": "/P37" 563 | }, 564 | { 565 | "netclass": "Default", 566 | "pattern": "Net-(J10-Pad1)" 567 | }, 568 | { 569 | "netclass": "Default", 570 | "pattern": "Net-(J10-Pad10)" 571 | }, 572 | { 573 | "netclass": "Default", 574 | "pattern": "Net-(J10-Pad11)" 575 | }, 576 | { 577 | "netclass": "Default", 578 | "pattern": "Net-(J10-Pad13)" 579 | }, 580 | { 581 | "netclass": "Default", 582 | "pattern": "Net-(J10-Pad3)" 583 | }, 584 | { 585 | "netclass": "Default", 586 | "pattern": "Net-(J10-Pad5)" 587 | }, 588 | { 589 | "netclass": "Default", 590 | "pattern": "Net-(J10-Pad7)" 591 | }, 592 | { 593 | "netclass": "Default", 594 | "pattern": "Net-(J11-Pad1)" 595 | }, 596 | { 597 | "netclass": "Default", 598 | "pattern": "Net-(J11-Pad10)" 599 | }, 600 | { 601 | "netclass": "Default", 602 | "pattern": "Net-(J11-Pad11)" 603 | }, 604 | { 605 | "netclass": "Default", 606 | "pattern": "Net-(J11-Pad13)" 607 | }, 608 | { 609 | "netclass": "Default", 610 | "pattern": "Net-(J11-Pad15)" 611 | }, 612 | { 613 | "netclass": "Default", 614 | "pattern": "Net-(J11-Pad17)" 615 | }, 616 | { 617 | "netclass": "Default", 618 | "pattern": "Net-(J11-Pad3)" 619 | }, 620 | { 621 | "netclass": "Default", 622 | "pattern": "Net-(J11-Pad5)" 623 | }, 624 | { 625 | "netclass": "Default", 626 | "pattern": "Net-(J11-Pad7)" 627 | }, 628 | { 629 | "netclass": "Default", 630 | "pattern": "Net-(J12-Pad1)" 631 | }, 632 | { 633 | "netclass": "Default", 634 | "pattern": "Net-(J12-Pad2)" 635 | }, 636 | { 637 | "netclass": "Default", 638 | "pattern": "Net-(J13-Pad1)" 639 | }, 640 | { 641 | "netclass": "Default", 642 | "pattern": "Net-(J13-Pad2)" 643 | }, 644 | { 645 | "netclass": "Default", 646 | "pattern": "Net-(J14-Pad1)" 647 | }, 648 | { 649 | "netclass": "Default", 650 | "pattern": "Net-(J14-Pad2)" 651 | }, 652 | { 653 | "netclass": "Default", 654 | "pattern": "Net-(J15-Pad1)" 655 | }, 656 | { 657 | "netclass": "Default", 658 | "pattern": "Net-(J15-Pad2)" 659 | }, 660 | { 661 | "netclass": "Default", 662 | "pattern": "Net-(J15-Pad3)" 663 | }, 664 | { 665 | "netclass": "Default", 666 | "pattern": "Net-(J16-Pad1)" 667 | }, 668 | { 669 | "netclass": "Default", 670 | "pattern": "Net-(J3-Pad1)" 671 | }, 672 | { 673 | "netclass": "Default", 674 | "pattern": "Net-(J3-Pad10)" 675 | }, 676 | { 677 | "netclass": "Default", 678 | "pattern": "Net-(J3-Pad11)" 679 | }, 680 | { 681 | "netclass": "Default", 682 | "pattern": "Net-(J3-Pad12)" 683 | }, 684 | { 685 | "netclass": "Default", 686 | "pattern": "Net-(J3-Pad13)" 687 | }, 688 | { 689 | "netclass": "Default", 690 | "pattern": "Net-(J3-Pad14)" 691 | }, 692 | { 693 | "netclass": "Default", 694 | "pattern": "Net-(J3-Pad15)" 695 | }, 696 | { 697 | "netclass": "Default", 698 | "pattern": "Net-(J3-Pad16)" 699 | }, 700 | { 701 | "netclass": "Default", 702 | "pattern": "Net-(J3-Pad17)" 703 | }, 704 | { 705 | "netclass": "Default", 706 | "pattern": "Net-(J3-Pad2)" 707 | }, 708 | { 709 | "netclass": "Default", 710 | "pattern": "Net-(J3-Pad3)" 711 | }, 712 | { 713 | "netclass": "Default", 714 | "pattern": "Net-(J3-Pad4)" 715 | }, 716 | { 717 | "netclass": "Default", 718 | "pattern": "Net-(J3-Pad5)" 719 | }, 720 | { 721 | "netclass": "Default", 722 | "pattern": "Net-(J3-Pad6)" 723 | }, 724 | { 725 | "netclass": "Default", 726 | "pattern": "Net-(J3-Pad7)" 727 | }, 728 | { 729 | "netclass": "Default", 730 | "pattern": "Net-(J3-Pad8)" 731 | }, 732 | { 733 | "netclass": "Default", 734 | "pattern": "Net-(J3-Pad9)" 735 | }, 736 | { 737 | "netclass": "Default", 738 | "pattern": "Net-(J6-Pad1)" 739 | }, 740 | { 741 | "netclass": "Default", 742 | "pattern": "Net-(U1-Pad23)" 743 | }, 744 | { 745 | "netclass": "Default", 746 | "pattern": "Net-(U1-Pad24)" 747 | }, 748 | { 749 | "netclass": "Default", 750 | "pattern": "Net-(U2-Pad11)" 751 | }, 752 | { 753 | "netclass": "Default", 754 | "pattern": "Net-(U2-Pad12)" 755 | }, 756 | { 757 | "netclass": "Default", 758 | "pattern": "Net-(U2-Pad16)" 759 | }, 760 | { 761 | "netclass": "Default", 762 | "pattern": "Net-(U2-Pad7)" 763 | }, 764 | { 765 | "netclass": "Power", 766 | "pattern": "/3V3" 767 | }, 768 | { 769 | "netclass": "Power", 770 | "pattern": "/Solar" 771 | }, 772 | { 773 | "netclass": "Power", 774 | "pattern": "GND" 775 | }, 776 | { 777 | "netclass": "Power", 778 | "pattern": "VCC" 779 | } 780 | ] 781 | }, 782 | "pcbnew": { 783 | "last_paths": { 784 | "gencad": "", 785 | "idf": "", 786 | "netlist": "", 787 | "plot": "", 788 | "pos_files": "", 789 | "specctra_dsn": "", 790 | "step": "", 791 | "svg": "", 792 | "vrml": "" 793 | }, 794 | "page_layout_descr_file": "" 795 | }, 796 | "schematic": { 797 | "annotate_start_num": 0, 798 | "bom_export_filename": "", 799 | "bom_fmt_presets": [], 800 | "bom_fmt_settings": { 801 | "field_delimiter": ",", 802 | "keep_line_breaks": false, 803 | "keep_tabs": false, 804 | "name": "CSV", 805 | "ref_delimiter": ",", 806 | "ref_range_delimiter": "", 807 | "string_delimiter": "\"" 808 | }, 809 | "bom_presets": [], 810 | "bom_settings": { 811 | "exclude_dnp": false, 812 | "fields_ordered": [ 813 | { 814 | "group_by": false, 815 | "label": "Reference", 816 | "name": "Reference", 817 | "show": true 818 | }, 819 | { 820 | "group_by": true, 821 | "label": "Value", 822 | "name": "Value", 823 | "show": true 824 | }, 825 | { 826 | "group_by": false, 827 | "label": "Datasheet", 828 | "name": "Datasheet", 829 | "show": true 830 | }, 831 | { 832 | "group_by": false, 833 | "label": "Footprint", 834 | "name": "Footprint", 835 | "show": true 836 | }, 837 | { 838 | "group_by": false, 839 | "label": "Qty", 840 | "name": "${QUANTITY}", 841 | "show": true 842 | }, 843 | { 844 | "group_by": true, 845 | "label": "DNP", 846 | "name": "${DNP}", 847 | "show": true 848 | } 849 | ], 850 | "filter_string": "", 851 | "group_symbols": true, 852 | "include_excluded_from_bom": false, 853 | "name": "Grouped By Value", 854 | "sort_asc": true, 855 | "sort_field": "Reference" 856 | }, 857 | "connection_grid_size": 50.0, 858 | "drawing": { 859 | "dashed_lines_dash_length_ratio": 12.0, 860 | "dashed_lines_gap_length_ratio": 3.0, 861 | "default_line_thickness": 6.0, 862 | "default_text_size": 60.0, 863 | "field_names": [], 864 | "intersheets_ref_own_page": false, 865 | "intersheets_ref_prefix": "", 866 | "intersheets_ref_short": false, 867 | "intersheets_ref_show": false, 868 | "intersheets_ref_suffix": "", 869 | "junction_size_choice": 3, 870 | "label_size_ratio": 0.25, 871 | "operating_point_overlay_i_precision": 3, 872 | "operating_point_overlay_i_range": "~A", 873 | "operating_point_overlay_v_precision": 3, 874 | "operating_point_overlay_v_range": "~V", 875 | "overbar_offset_ratio": 1.23, 876 | "pin_symbol_size": 0.0, 877 | "text_offset_ratio": 0.08 878 | }, 879 | "legacy_lib_dir": "", 880 | "legacy_lib_list": [], 881 | "meta": { 882 | "version": 1 883 | }, 884 | "net_format_name": "Pcbnew", 885 | "page_layout_descr_file": "", 886 | "plot_directory": "", 887 | "space_save_all_events": true, 888 | "spice_current_sheet_as_root": false, 889 | "spice_external_command": "spice \"%I\"", 890 | "spice_model_current_sheet_as_root": true, 891 | "spice_save_all_currents": false, 892 | "spice_save_all_dissipations": false, 893 | "spice_save_all_voltages": false, 894 | "subpart_first_id": 65, 895 | "subpart_id_separator": 0 896 | }, 897 | "sheets": [ 898 | [ 899 | "695930cc-1fb6-4b00-ba58-2c1238f17f30", 900 | "Root" 901 | ] 902 | ], 903 | "text_variables": {} 904 | } 905 | -------------------------------------------------------------------------------- /STM-LORA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomtor/STM32-RFM95-PCB/5bc3abfc7fafb9c0257237f01dd81a30a5f4eddf/STM-LORA.png -------------------------------------------------------------------------------- /STM32China/stm32f103c8t6-module-china.bck: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /STM32China/stm32f103c8t6-module-china.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /STM32China/stm32f103c8t6-module-china.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "stm32f103c8t6-module-china" 2 | (version 20240108) 3 | (generator "pcbnew") 4 | (generator_version "8.0") 5 | (layer "F.Cu") 6 | (property "Reference" "REF**" 7 | (at 0 1.27 0) 8 | (layer "F.SilkS") 9 | (uuid "190ff618-a268-4c4b-94a4-192d9cf30d0b") 10 | (effects 11 | (font 12 | (size 1 1) 13 | (thickness 0.15) 14 | ) 15 | ) 16 | ) 17 | (property "Value" "stm32f103c8t6-module-china" 18 | (at 0 -1.27 0) 19 | (layer "F.SilkS") 20 | (uuid "3cd0c929-9f72-41b0-8daf-ca8abe9c1fa4") 21 | (effects 22 | (font 23 | (size 1 1) 24 | (thickness 0.15) 25 | ) 26 | ) 27 | ) 28 | (property "Footprint" "STM32China:stm32f103c8t6-module-china" 29 | (at 0 0 0) 30 | (layer "F.Fab") 31 | (hide yes) 32 | (uuid "71f69534-3fbf-4f02-930a-bd63b28bbfca") 33 | (effects 34 | (font 35 | (size 1.27 1.27) 36 | (thickness 0.15) 37 | ) 38 | ) 39 | ) 40 | (property "Datasheet" "" 41 | (at 0 0 0) 42 | (layer "F.Fab") 43 | (hide yes) 44 | (uuid "75955682-d9fe-4ac9-b3d3-116c21e503ff") 45 | (effects 46 | (font 47 | (size 1.27 1.27) 48 | (thickness 0.15) 49 | ) 50 | ) 51 | ) 52 | (property "Description" "" 53 | (at 0 0 0) 54 | (layer "F.Fab") 55 | (hide yes) 56 | (uuid "b2362d67-ec2f-422f-a855-4f0a0e0a50ad") 57 | (effects 58 | (font 59 | (size 1.27 1.27) 60 | (thickness 0.15) 61 | ) 62 | ) 63 | ) 64 | (attr through_hole) 65 | (fp_line 66 | (start -26.67 -11.43) 67 | (end -26.67 11.43) 68 | (stroke 69 | (width 0.15) 70 | (type solid) 71 | ) 72 | (layer "F.SilkS") 73 | (uuid "e57080bc-364e-4fdf-a9d8-573035af88cf") 74 | ) 75 | (fp_line 76 | (start -26.67 11.43) 77 | (end 26.67 11.43) 78 | (stroke 79 | (width 0.15) 80 | (type solid) 81 | ) 82 | (layer "F.SilkS") 83 | (uuid "3ae9898a-b7c6-4b65-b9c0-68e40bc903e8") 84 | ) 85 | (fp_line 86 | (start 26.67 -11.43) 87 | (end -26.67 -11.43) 88 | (stroke 89 | (width 0.15) 90 | (type solid) 91 | ) 92 | (layer "F.SilkS") 93 | (uuid "2b586492-4f84-496f-9282-0dfb32232814") 94 | ) 95 | (fp_line 96 | (start 26.67 11.43) 97 | (end 26.67 -11.43) 98 | (stroke 99 | (width 0.15) 100 | (type solid) 101 | ) 102 | (layer "F.SilkS") 103 | (uuid "61f10fdc-ebb7-4992-9169-fb46e43645e2") 104 | ) 105 | (fp_text user "i2" 106 | (at -19.05 10.16 0) 107 | (layer "F.SilkS") 108 | (uuid "04a20887-c07a-4c92-aeb0-f078bb88f329") 109 | (effects 110 | (font 111 | (size 1 1) 112 | (thickness 0.15) 113 | ) 114 | ) 115 | ) 116 | (fp_text user "R1" 117 | (at -8.89 10.16 0) 118 | (layer "F.SilkS") 119 | (uuid "04b5547a-d93b-4abd-9053-487c5f75cce0") 120 | (effects 121 | (font 122 | (size 1 1) 123 | (thickness 0.15) 124 | ) 125 | ) 126 | ) 127 | (fp_text user "d1" 128 | (at 11.43 10.16 0) 129 | (layer "F.SilkS") 130 | (uuid "04d58c0e-ab22-4ad3-b3fc-9d2c0195a9f2") 131 | (effects 132 | (font 133 | (size 1 1) 134 | (thickness 0.15) 135 | ) 136 | ) 137 | ) 138 | (fp_text user "CR" 139 | (at 13.97 10.16 0) 140 | (layer "F.SilkS") 141 | (uuid "0a3b3895-a7fe-4f2c-b572-1c5a821de23d") 142 | (effects 143 | (font 144 | (size 1 1) 145 | (thickness 0.15) 146 | ) 147 | ) 148 | ) 149 | (fp_text user "3.3" 150 | (at -19.05 -10.16 0) 151 | (layer "F.SilkS") 152 | (uuid "0de673db-f464-4eb0-9173-0361f921e02a") 153 | (effects 154 | (font 155 | (size 1 1) 156 | (thickness 0.15) 157 | ) 158 | ) 159 | ) 160 | (fp_text user "sc1" 161 | (at 8.89 10.16 0) 162 | (layer "F.SilkS") 163 | (uuid "113c8b38-b4c2-462b-9ad2-3feabdb11595") 164 | (effects 165 | (font 166 | (size 1 1) 167 | (thickness 0.15) 168 | ) 169 | ) 170 | ) 171 | (fp_text user "mo2" 172 | (at -16.51 10.16 0) 173 | (layer "F.SilkS") 174 | (uuid "17faa9e7-115c-43a0-9618-dab1961bb24e") 175 | (effects 176 | (font 177 | (size 1 1) 178 | (thickness 0.15) 179 | ) 180 | ) 181 | ) 182 | (fp_text user "GND" 183 | (at 22.86 -3.81 0) 184 | (layer "F.SilkS") 185 | (uuid "3d9c100f-e01a-48a7-bcbd-928c51e648bc") 186 | (effects 187 | (font 188 | (size 1 1) 189 | (thickness 0.15) 190 | ) 191 | ) 192 | ) 193 | (fp_text user "c1" 194 | (at 1.27 -10.16 0) 195 | (layer "F.SilkS") 196 | (uuid "3fc74bc5-6ec0-40d1-87d8-47739c71ed3b") 197 | (effects 198 | (font 199 | (size 1 1) 200 | (thickness 0.15) 201 | ) 202 | ) 203 | ) 204 | (fp_text user "T3" 205 | (at -11.43 -10.16 0) 206 | (layer "F.SilkS") 207 | (uuid "556a6cc5-c9fe-43dd-b723-8927743038bc") 208 | (effects 209 | (font 210 | (size 1 1) 211 | (thickness 0.15) 212 | ) 213 | ) 214 | ) 215 | (fp_text user "3.3" 216 | (at 24.13 10.16 0) 217 | (layer "F.SilkS") 218 | (uuid "5bf56b00-d730-411d-aa4e-9077299bf279") 219 | (effects 220 | (font 221 | (size 1 1) 222 | (thickness 0.15) 223 | ) 224 | ) 225 | ) 226 | (fp_text user "ss2" 227 | (at -24.13 10.16 0) 228 | (layer "F.SilkS") 229 | (uuid "6353b583-5bef-4392-9315-934df4ced0d3") 230 | (effects 231 | (font 232 | (size 1 1) 233 | (thickness 0.15) 234 | ) 235 | ) 236 | ) 237 | (fp_text user "/R" 238 | (at -16.51 -10.16 0) 239 | (layer "F.SilkS") 240 | (uuid "6ac7043b-dd35-440a-adb7-58aa97420ecc") 241 | (effects 242 | (font 243 | (size 1 1) 244 | (thickness 0.15) 245 | ) 246 | ) 247 | ) 248 | (fp_text user "5V" 249 | (at 19.05 10.16 0) 250 | (layer "F.SilkS") 251 | (uuid "6f28cd7b-eb5b-4497-a31b-638b2f0059a3") 252 | (effects 253 | (font 254 | (size 1 1) 255 | (thickness 0.15) 256 | ) 257 | ) 258 | ) 259 | (fp_text user "USB" 260 | (at -24.13 0 90) 261 | (layer "F.SilkS") 262 | (uuid "818cf455-ac16-45ef-8e0f-1d49faf174a5") 263 | (effects 264 | (font 265 | (size 1 1) 266 | (thickness 0.15) 267 | ) 268 | ) 269 | ) 270 | (fp_text user "T2" 271 | (at 8.89 -10.16 0) 272 | (layer "F.SilkS") 273 | (uuid "8b2e21b5-c71c-4392-b97c-b0190fb863fb") 274 | (effects 275 | (font 276 | (size 1 1) 277 | (thickness 0.15) 278 | ) 279 | ) 280 | ) 281 | (fp_text user "VB" 282 | (at 24.13 -10.16 0) 283 | (layer "F.SilkS") 284 | (uuid "9a96e110-afd0-43ef-8c70-a293b1820714") 285 | (effects 286 | (font 287 | (size 1 1) 288 | (thickness 0.15) 289 | ) 290 | ) 291 | ) 292 | (fp_text user "c2" 293 | (at -21.59 10.16 0) 294 | (layer "F.SilkS") 295 | (uuid "9b598c3c-1fdb-438e-9b02-7cde388aee56") 296 | (effects 297 | (font 298 | (size 1 1) 299 | (thickness 0.15) 300 | ) 301 | ) 302 | ) 303 | (fp_text user "i1" 304 | (at -1.27 -10.16 0) 305 | (layer "F.SilkS") 306 | (uuid "a348b9aa-0bb4-4d91-85c0-792db7dcd1e8") 307 | (effects 308 | (font 309 | (size 1 1) 310 | (thickness 0.15) 311 | ) 312 | ) 313 | ) 314 | (fp_text user "R2" 315 | (at 6.35 -10.16 0) 316 | (layer "F.SilkS") 317 | (uuid "a862caa8-9df3-4164-8e57-1d3797543fa3") 318 | (effects 319 | (font 320 | (size 1 1) 321 | (thickness 0.15) 322 | ) 323 | ) 324 | ) 325 | (fp_text user "U+" 326 | (at -3.81 10.16 0) 327 | (layer "F.SilkS") 328 | (uuid "b31bc3ee-21f2-4632-9f35-5e66d1ba0031") 329 | (effects 330 | (font 331 | (size 1 1) 332 | (thickness 0.15) 333 | ) 334 | ) 335 | ) 336 | (fp_text user "G" 337 | (at -24.13 -10.16 0) 338 | (layer "F.SilkS") 339 | (uuid "b3b9c507-c90c-4af9-ad06-e3227f0e7e1b") 340 | (effects 341 | (font 342 | (size 1 1) 343 | (thickness 0.15) 344 | ) 345 | ) 346 | ) 347 | (fp_text user "SWCLK" 348 | (at 22.86 -1.27 0) 349 | (layer "F.SilkS") 350 | (uuid "b4bf8a8f-8e0a-419f-9464-7413e1148cdb") 351 | (effects 352 | (font 353 | (size 1 1) 354 | (thickness 0.15) 355 | ) 356 | ) 357 | ) 358 | (fp_text user "sc2" 359 | (at -11.43 -5.08 90) 360 | (layer "F.SilkS") 361 | (uuid "b63acb2f-ad12-4b0f-a5e3-57c2133351c4") 362 | (effects 363 | (font 364 | (size 1 1) 365 | (thickness 0.15) 366 | ) 367 | ) 368 | ) 369 | (fp_text user "G" 370 | (at -21.59 -10.16 0) 371 | (layer "F.SilkS") 372 | (uuid "b7fb4c6f-f793-4d35-86b8-94e1c1b5e4c3") 373 | (effects 374 | (font 375 | (size 1 1) 376 | (thickness 0.15) 377 | ) 378 | ) 379 | ) 380 | (fp_text user "T1" 381 | (at -11.43 10.16 0) 382 | (layer "F.SilkS") 383 | (uuid "bd7871a9-0b47-45cb-afe5-8ad4cdbb5c3e") 384 | (effects 385 | (font 386 | (size 1 1) 387 | (thickness 0.15) 388 | ) 389 | ) 390 | ) 391 | (fp_text user "CT" 392 | (at 16.51 10.16 0) 393 | (layer "F.SilkS") 394 | (uuid "d0bc0214-a2ec-4bb4-832e-6b024499fa8d") 395 | (effects 396 | (font 397 | (size 1 1) 398 | (thickness 0.15) 399 | ) 400 | ) 401 | ) 402 | (fp_text user "U-" 403 | (at -6.35 10.16 0) 404 | (layer "F.SilkS") 405 | (uuid "d353851e-8c40-4016-839c-574209f3d2c8") 406 | (effects 407 | (font 408 | (size 1 1) 409 | (thickness 0.15) 410 | ) 411 | ) 412 | ) 413 | (fp_text user "3.3" 414 | (at 22.86 3.81 0) 415 | (layer "F.SilkS") 416 | (uuid "d4bec87e-f8eb-463e-b688-a69f929d367d") 417 | (effects 418 | (font 419 | (size 1 1) 420 | (thickness 0.15) 421 | ) 422 | ) 423 | ) 424 | (fp_text user "ss1" 425 | (at 3.81 -10.16 0) 426 | (layer "F.SilkS") 427 | (uuid "d5ed51b8-b0fd-443a-88e7-b926a4a86960") 428 | (effects 429 | (font 430 | (size 1 1) 431 | (thickness 0.15) 432 | ) 433 | ) 434 | ) 435 | (fp_text user "G" 436 | (at 21.59 10.16 0) 437 | (layer "F.SilkS") 438 | (uuid "f2a154ea-aabc-4642-950b-b602b1cff541") 439 | (effects 440 | (font 441 | (size 1 1) 442 | (thickness 0.15) 443 | ) 444 | ) 445 | ) 446 | (fp_text user "sd2" 447 | (at -13.97 -5.08 90) 448 | (layer "F.SilkS") 449 | (uuid "f3eca5fc-60b7-40a8-8329-9ed0ec7bac9d") 450 | (effects 451 | (font 452 | (size 1 1) 453 | (thickness 0.15) 454 | ) 455 | ) 456 | ) 457 | (fp_text user "SWDIO" 458 | (at 22.86 1.27 0) 459 | (layer "F.SilkS") 460 | (uuid "f630a5b2-b296-464d-b314-abe45cb8da1b") 461 | (effects 462 | (font 463 | (size 1 1) 464 | (thickness 0.15) 465 | ) 466 | ) 467 | ) 468 | (fp_text user "R3" 469 | (at -13.97 -10.16 0) 470 | (layer "F.SilkS") 471 | (uuid "f8470be7-3e58-4a57-925f-c57346213b9a") 472 | (effects 473 | (font 474 | (size 1 1) 475 | (thickness 0.15) 476 | ) 477 | ) 478 | ) 479 | (fp_text user "mo1" 480 | (at -3.81 -10.16 0) 481 | (layer "F.SilkS") 482 | (uuid "fbed5537-26b1-4246-883f-fd719d80c055") 483 | (effects 484 | (font 485 | (size 1 1) 486 | (thickness 0.15) 487 | ) 488 | ) 489 | ) 490 | (pad "1" thru_hole circle 491 | (at -24.13 7.62) 492 | (size 1.524 1.524) 493 | (drill 1.016) 494 | (layers "*.Cu" "*.Mask" "F.SilkS") 495 | (remove_unused_layers no) 496 | (uuid "74fbe26b-ac01-4cb2-8c27-9906482df9c4") 497 | ) 498 | (pad "2" thru_hole circle 499 | (at -21.59 7.62) 500 | (size 1.524 1.524) 501 | (drill 1.016) 502 | (layers "*.Cu" "*.Mask" "F.SilkS") 503 | (remove_unused_layers no) 504 | (uuid "b56f5c28-cff0-42e4-89a2-dca737440b87") 505 | ) 506 | (pad "3" thru_hole circle 507 | (at -19.05 7.62) 508 | (size 1.524 1.524) 509 | (drill 1.016) 510 | (layers "*.Cu" "*.Mask" "F.SilkS") 511 | (remove_unused_layers no) 512 | (uuid "3280149b-d092-4424-83bb-2a8e531d09b3") 513 | ) 514 | (pad "4" thru_hole circle 515 | (at -16.51 7.62) 516 | (size 1.524 1.524) 517 | (drill 1.016) 518 | (layers "*.Cu" "*.Mask" "F.SilkS") 519 | (remove_unused_layers no) 520 | (uuid "6b39294d-bfab-44a7-b10b-321dbd8ab5bf") 521 | ) 522 | (pad "5" thru_hole circle 523 | (at -13.97 7.62) 524 | (size 1.524 1.524) 525 | (drill 1.016) 526 | (layers "*.Cu" "*.Mask" "F.SilkS") 527 | (remove_unused_layers no) 528 | (uuid "8fc296ff-41c7-485c-8f62-7d2098c0b104") 529 | ) 530 | (pad "6" thru_hole circle 531 | (at -11.43 7.62) 532 | (size 1.524 1.524) 533 | (drill 1.016) 534 | (layers "*.Cu" "*.Mask" "F.SilkS") 535 | (remove_unused_layers no) 536 | (uuid "2213e435-66ea-489b-98da-153b5b1cbad9") 537 | ) 538 | (pad "7" thru_hole circle 539 | (at -8.89 7.62) 540 | (size 1.524 1.524) 541 | (drill 1.016) 542 | (layers "*.Cu" "*.Mask" "F.SilkS") 543 | (remove_unused_layers no) 544 | (uuid "6f1780ad-7dc3-4068-a0bd-ccfe83254843") 545 | ) 546 | (pad "8" thru_hole circle 547 | (at -6.35 7.62) 548 | (size 1.524 1.524) 549 | (drill 1.016) 550 | (layers "*.Cu" "*.Mask" "F.SilkS") 551 | (remove_unused_layers no) 552 | (uuid "2803e1e2-fbf0-4c2d-ab1b-32694979a3be") 553 | ) 554 | (pad "9" thru_hole circle 555 | (at -3.81 7.62) 556 | (size 1.524 1.524) 557 | (drill 1.016) 558 | (layers "*.Cu" "*.Mask" "F.SilkS") 559 | (remove_unused_layers no) 560 | (uuid "52bb7704-6f3f-44be-981d-4dc463f675d0") 561 | ) 562 | (pad "10" thru_hole circle 563 | (at -1.27 7.62) 564 | (size 1.524 1.524) 565 | (drill 1.016) 566 | (layers "*.Cu" "*.Mask" "F.SilkS") 567 | (remove_unused_layers no) 568 | (uuid "e998e8d2-a464-4318-80ed-244e2ebcedb2") 569 | ) 570 | (pad "11" thru_hole circle 571 | (at 1.27 7.62) 572 | (size 1.524 1.524) 573 | (drill 1.016) 574 | (layers "*.Cu" "*.Mask" "F.SilkS") 575 | (remove_unused_layers no) 576 | (uuid "c034cab8-ce6a-4d33-be07-c7953e6bf58b") 577 | ) 578 | (pad "12" thru_hole circle 579 | (at 3.81 7.62) 580 | (size 1.524 1.524) 581 | (drill 1.016) 582 | (layers "*.Cu" "*.Mask" "F.SilkS") 583 | (remove_unused_layers no) 584 | (uuid "f76cc775-b2b5-4093-9630-8adc9b6208c1") 585 | ) 586 | (pad "13" thru_hole circle 587 | (at 6.35 7.62) 588 | (size 1.524 1.524) 589 | (drill 1.016) 590 | (layers "*.Cu" "*.Mask" "F.SilkS") 591 | (remove_unused_layers no) 592 | (uuid "b7ad85cf-2485-4795-b489-23e38b563874") 593 | ) 594 | (pad "14" thru_hole circle 595 | (at 8.89 7.62) 596 | (size 1.524 1.524) 597 | (drill 1.016) 598 | (layers "*.Cu" "*.Mask" "F.SilkS") 599 | (remove_unused_layers no) 600 | (uuid "15d2ad7f-5022-4621-a468-60f9770651c1") 601 | ) 602 | (pad "15" thru_hole circle 603 | (at 11.43 7.62) 604 | (size 1.524 1.524) 605 | (drill 1.016) 606 | (layers "*.Cu" "*.Mask" "F.SilkS") 607 | (remove_unused_layers no) 608 | (uuid "db524606-89cc-4d41-8430-7c00bed15e74") 609 | ) 610 | (pad "16" thru_hole circle 611 | (at 13.97 7.62) 612 | (size 1.524 1.524) 613 | (drill 1.016) 614 | (layers "*.Cu" "*.Mask" "F.SilkS") 615 | (remove_unused_layers no) 616 | (uuid "253eae4a-0c89-415e-9194-302b09bf268d") 617 | ) 618 | (pad "17" thru_hole circle 619 | (at 16.51 7.62) 620 | (size 1.524 1.524) 621 | (drill 1.016) 622 | (layers "*.Cu" "*.Mask" "F.SilkS") 623 | (remove_unused_layers no) 624 | (uuid "c0844916-2a2b-436f-b2a5-d10f9115290e") 625 | ) 626 | (pad "18" thru_hole circle 627 | (at 19.05 7.62) 628 | (size 1.524 1.524) 629 | (drill 1.016) 630 | (layers "*.Cu" "*.Mask" "F.SilkS") 631 | (remove_unused_layers no) 632 | (uuid "057fe527-4fdb-4474-9d5e-9e6ce6010d6d") 633 | ) 634 | (pad "19" thru_hole circle 635 | (at 21.59 7.62) 636 | (size 1.524 1.524) 637 | (drill 1.016) 638 | (layers "*.Cu" "*.Mask" "F.SilkS") 639 | (remove_unused_layers no) 640 | (uuid "1be0f2ed-4570-4a19-bef0-ec75c331963f") 641 | ) 642 | (pad "20" thru_hole circle 643 | (at 24.13 7.62) 644 | (size 1.524 1.524) 645 | (drill 1.016) 646 | (layers "*.Cu" "*.Mask" "F.SilkS") 647 | (remove_unused_layers no) 648 | (uuid "7070bf2e-4de4-44f8-bae4-9a43f3d77e2f") 649 | ) 650 | (pad "21" thru_hole circle 651 | (at 24.13 -7.62) 652 | (size 1.524 1.524) 653 | (drill 1.016) 654 | (layers "*.Cu" "*.Mask" "F.SilkS") 655 | (remove_unused_layers no) 656 | (uuid "a37cb74e-8fc2-4867-80f9-166cfd4fb782") 657 | ) 658 | (pad "22" thru_hole circle 659 | (at 21.59 -7.62) 660 | (size 1.524 1.524) 661 | (drill 1.016) 662 | (layers "*.Cu" "*.Mask" "F.SilkS") 663 | (remove_unused_layers no) 664 | (uuid "5a64f6b6-29ee-4bab-8c51-d81911aedd41") 665 | ) 666 | (pad "23" thru_hole circle 667 | (at 19.05 -7.62) 668 | (size 1.524 1.524) 669 | (drill 1.016) 670 | (layers "*.Cu" "*.Mask" "F.SilkS") 671 | (remove_unused_layers no) 672 | (uuid "6377f281-2aee-4bd1-b00f-be906f063f1a") 673 | ) 674 | (pad "24" thru_hole circle 675 | (at 16.51 -7.62) 676 | (size 1.524 1.524) 677 | (drill 1.016) 678 | (layers "*.Cu" "*.Mask" "F.SilkS") 679 | (remove_unused_layers no) 680 | (uuid "2248d3f6-b836-4b03-9320-add53aa1b405") 681 | ) 682 | (pad "25" thru_hole circle 683 | (at 13.97 -7.62) 684 | (size 1.524 1.524) 685 | (drill 1.016) 686 | (layers "*.Cu" "*.Mask" "F.SilkS") 687 | (remove_unused_layers no) 688 | (uuid "da321324-7084-43e7-8a1f-2d3a212cd415") 689 | ) 690 | (pad "26" thru_hole circle 691 | (at 11.43 -7.62) 692 | (size 1.524 1.524) 693 | (drill 1.016) 694 | (layers "*.Cu" "*.Mask" "F.SilkS") 695 | (remove_unused_layers no) 696 | (uuid "c339ee23-4461-41c2-b8f7-b6115666caff") 697 | ) 698 | (pad "27" thru_hole circle 699 | (at 8.89 -7.62) 700 | (size 1.524 1.524) 701 | (drill 1.016) 702 | (layers "*.Cu" "*.Mask" "F.SilkS") 703 | (remove_unused_layers no) 704 | (uuid "b10015b7-a6d3-4bba-8c69-3e362fc44405") 705 | ) 706 | (pad "28" thru_hole circle 707 | (at 6.35 -7.62) 708 | (size 1.524 1.524) 709 | (drill 1.016) 710 | (layers "*.Cu" "*.Mask" "F.SilkS") 711 | (remove_unused_layers no) 712 | (uuid "ca77a3d7-4eb0-4047-afe1-638f2777a710") 713 | ) 714 | (pad "29" thru_hole circle 715 | (at 3.81 -7.62) 716 | (size 1.524 1.524) 717 | (drill 1.016) 718 | (layers "*.Cu" "*.Mask" "F.SilkS") 719 | (remove_unused_layers no) 720 | (uuid "dde671fd-6377-45b5-9978-d6d2f6b18372") 721 | ) 722 | (pad "30" thru_hole circle 723 | (at 1.27 -7.62) 724 | (size 1.524 1.524) 725 | (drill 1.016) 726 | (layers "*.Cu" "*.Mask" "F.SilkS") 727 | (remove_unused_layers no) 728 | (uuid "3acacb18-093d-4b57-824e-8eacb4c9becc") 729 | ) 730 | (pad "31" thru_hole circle 731 | (at -1.27 -7.62) 732 | (size 1.524 1.524) 733 | (drill 1.016) 734 | (layers "*.Cu" "*.Mask" "F.SilkS") 735 | (remove_unused_layers no) 736 | (uuid "6f362f1a-e190-4aef-b454-6722c47f5f43") 737 | ) 738 | (pad "32" thru_hole circle 739 | (at -3.81 -7.62) 740 | (size 1.524 1.524) 741 | (drill 1.016) 742 | (layers "*.Cu" "*.Mask" "F.SilkS") 743 | (remove_unused_layers no) 744 | (uuid "dae6a1dc-15ba-46e1-b991-b779ee967a92") 745 | ) 746 | (pad "33" thru_hole circle 747 | (at -6.35 -7.62) 748 | (size 1.524 1.524) 749 | (drill 1.016) 750 | (layers "*.Cu" "*.Mask" "F.SilkS") 751 | (remove_unused_layers no) 752 | (uuid "d04c63f2-2a70-4f91-adbc-6fb71717bd18") 753 | ) 754 | (pad "34" thru_hole circle 755 | (at -8.89 -7.62) 756 | (size 1.524 1.524) 757 | (drill 1.016) 758 | (layers "*.Cu" "*.Mask" "F.SilkS") 759 | (remove_unused_layers no) 760 | (uuid "304f4edf-5306-4573-bbaa-120b9edfe476") 761 | ) 762 | (pad "35" thru_hole circle 763 | (at -11.43 -7.62) 764 | (size 1.524 1.524) 765 | (drill 1.016) 766 | (layers "*.Cu" "*.Mask" "F.SilkS") 767 | (remove_unused_layers no) 768 | (uuid "2616cccd-948a-4d56-8441-af502370a7f3") 769 | ) 770 | (pad "36" thru_hole circle 771 | (at -13.97 -7.62) 772 | (size 1.524 1.524) 773 | (drill 1.016) 774 | (layers "*.Cu" "*.Mask" "F.SilkS") 775 | (remove_unused_layers no) 776 | (uuid "dbb38648-44c9-44cd-ad1f-75b118382077") 777 | ) 778 | (pad "37" thru_hole circle 779 | (at -16.51 -7.62) 780 | (size 1.524 1.524) 781 | (drill 1.016) 782 | (layers "*.Cu" "*.Mask" "F.SilkS") 783 | (remove_unused_layers no) 784 | (uuid "c5b2d51b-7ae5-4191-91f0-9fde06292e3b") 785 | ) 786 | (pad "38" thru_hole circle 787 | (at -19.05 -7.62) 788 | (size 1.524 1.524) 789 | (drill 1.016) 790 | (layers "*.Cu" "*.Mask" "F.SilkS") 791 | (remove_unused_layers no) 792 | (uuid "6f1f27f6-2a2f-46b2-98c3-3cc4ab6f4d18") 793 | ) 794 | (pad "39" thru_hole circle 795 | (at -21.59 -7.62) 796 | (size 1.524 1.524) 797 | (drill 1.016) 798 | (layers "*.Cu" "*.Mask" "F.SilkS") 799 | (remove_unused_layers no) 800 | (uuid "c4c2fe20-40aa-4452-834d-d6e6f1a086a6") 801 | ) 802 | (pad "40" thru_hole circle 803 | (at -24.13 -7.62) 804 | (size 1.524 1.524) 805 | (drill 1.016) 806 | (layers "*.Cu" "*.Mask" "F.SilkS") 807 | (remove_unused_layers no) 808 | (uuid "85dc075a-2390-458b-800b-ed9528cefa84") 809 | ) 810 | ) 811 | -------------------------------------------------------------------------------- /STM32China/stm32f103c8t6-module-china.kicad_sym: -------------------------------------------------------------------------------- 1 | (kicad_symbol_lib 2 | (version 20231120) 3 | (generator "kicad_symbol_editor") 4 | (generator_version "8.0") 5 | (symbol "stm32f103c8t6-module-china" 6 | (pin_names 7 | (offset 1.016) 8 | ) 9 | (exclude_from_sim no) 10 | (in_bom yes) 11 | (on_board yes) 12 | (property "Reference" "U" 13 | (at 0 34.29 0) 14 | (effects 15 | (font 16 | (size 1.524 1.524) 17 | ) 18 | ) 19 | ) 20 | (property "Value" "stm32f103c8t6-module-china" 21 | (at 0 0 90) 22 | (effects 23 | (font 24 | (size 1.524 1.524) 25 | ) 26 | ) 27 | ) 28 | (property "Footprint" "STM32China:stm32f103c8t6-module-china" 29 | (at 0 -43.18 0) 30 | (effects 31 | (font 32 | (size 1.524 1.524) 33 | ) 34 | (hide yes) 35 | ) 36 | ) 37 | (property "Datasheet" "" 38 | (at -10.16 6.35 0) 39 | (effects 40 | (font 41 | (size 1.524 1.524) 42 | ) 43 | ) 44 | ) 45 | (property "Description" "" 46 | (at 0 0 0) 47 | (effects 48 | (font 49 | (size 1.27 1.27) 50 | ) 51 | (hide yes) 52 | ) 53 | ) 54 | (symbol "stm32f103c8t6-module-china_0_0" 55 | (text "B5, C13-15, A0-7, B0-1 are not 5V tolerant" 56 | (at 2.54 -12.7 900) 57 | (effects 58 | (font 59 | (size 1.524 1.524) 60 | ) 61 | ) 62 | ) 63 | (text "not 5V" 64 | (at -12.7 -10.16 0) 65 | (effects 66 | (font 67 | (size 1.524 1.524) 68 | ) 69 | ) 70 | ) 71 | ) 72 | (symbol "stm32f103c8t6-module-china_0_1" 73 | (rectangle 74 | (start -21.59 39.37) 75 | (end 21.59 -40.64) 76 | (stroke 77 | (width 0) 78 | (type solid) 79 | ) 80 | (fill 81 | (type none) 82 | ) 83 | ) 84 | ) 85 | (symbol "stm32f103c8t6-module-china_1_1" 86 | (pin bidirectional line 87 | (at -26.67 35.56 0) 88 | (length 5.08) 89 | (name "B12/NSS2" 90 | (effects 91 | (font 92 | (size 1.27 1.27) 93 | ) 94 | ) 95 | ) 96 | (number "1" 97 | (effects 98 | (font 99 | (size 1.27 1.27) 100 | ) 101 | ) 102 | ) 103 | ) 104 | (pin bidirectional line 105 | (at -26.67 1.27 0) 106 | (length 5.08) 107 | (name "A15/JTDI" 108 | (effects 109 | (font 110 | (size 1.27 1.27) 111 | ) 112 | ) 113 | ) 114 | (number "10" 115 | (effects 116 | (font 117 | (size 1.27 1.27) 118 | ) 119 | ) 120 | ) 121 | ) 122 | (pin bidirectional line 123 | (at -26.67 -2.54 0) 124 | (length 5.08) 125 | (name "B3/JTDO" 126 | (effects 127 | (font 128 | (size 1.27 1.27) 129 | ) 130 | ) 131 | ) 132 | (number "11" 133 | (effects 134 | (font 135 | (size 1.27 1.27) 136 | ) 137 | ) 138 | ) 139 | ) 140 | (pin bidirectional line 141 | (at -26.67 -6.35 0) 142 | (length 5.08) 143 | (name "B4/JnTRST" 144 | (effects 145 | (font 146 | (size 1.27 1.27) 147 | ) 148 | ) 149 | ) 150 | (number "12" 151 | (effects 152 | (font 153 | (size 1.27 1.27) 154 | ) 155 | ) 156 | ) 157 | ) 158 | (pin bidirectional line 159 | (at -26.67 -10.16 0) 160 | (length 5.08) 161 | (name "B5" 162 | (effects 163 | (font 164 | (size 1.27 1.27) 165 | ) 166 | ) 167 | ) 168 | (number "13" 169 | (effects 170 | (font 171 | (size 1.27 1.27) 172 | ) 173 | ) 174 | ) 175 | ) 176 | (pin bidirectional line 177 | (at -26.67 -13.97 0) 178 | (length 5.08) 179 | (name "B6/SCL1a/U1TXb" 180 | (effects 181 | (font 182 | (size 1.27 1.27) 183 | ) 184 | ) 185 | ) 186 | (number "14" 187 | (effects 188 | (font 189 | (size 1.27 1.27) 190 | ) 191 | ) 192 | ) 193 | ) 194 | (pin bidirectional line 195 | (at -26.67 -17.78 0) 196 | (length 5.08) 197 | (name "B7/SDA1a/U1RXb" 198 | (effects 199 | (font 200 | (size 1.27 1.27) 201 | ) 202 | ) 203 | ) 204 | (number "15" 205 | (effects 206 | (font 207 | (size 1.27 1.27) 208 | ) 209 | ) 210 | ) 211 | ) 212 | (pin bidirectional line 213 | (at -26.67 -21.59 0) 214 | (length 5.08) 215 | (name "B8/SCL1b/CANRX" 216 | (effects 217 | (font 218 | (size 1.27 1.27) 219 | ) 220 | ) 221 | ) 222 | (number "16" 223 | (effects 224 | (font 225 | (size 1.27 1.27) 226 | ) 227 | ) 228 | ) 229 | ) 230 | (pin bidirectional line 231 | (at -26.67 -25.4 0) 232 | (length 5.08) 233 | (name "B9/SDA1b/CANTX" 234 | (effects 235 | (font 236 | (size 1.27 1.27) 237 | ) 238 | ) 239 | ) 240 | (number "17" 241 | (effects 242 | (font 243 | (size 1.27 1.27) 244 | ) 245 | ) 246 | ) 247 | ) 248 | (pin power_in line 249 | (at -26.67 -29.21 0) 250 | (length 5.08) 251 | (name "5V" 252 | (effects 253 | (font 254 | (size 1.27 1.27) 255 | ) 256 | ) 257 | ) 258 | (number "18" 259 | (effects 260 | (font 261 | (size 1.27 1.27) 262 | ) 263 | ) 264 | ) 265 | ) 266 | (pin passive line 267 | (at -26.67 -33.02 0) 268 | (length 5.08) 269 | (name "GND" 270 | (effects 271 | (font 272 | (size 1.27 1.27) 273 | ) 274 | ) 275 | ) 276 | (number "19" 277 | (effects 278 | (font 279 | (size 1.27 1.27) 280 | ) 281 | ) 282 | ) 283 | ) 284 | (pin bidirectional line 285 | (at -26.67 31.75 0) 286 | (length 5.08) 287 | (name "B13/SCK2" 288 | (effects 289 | (font 290 | (size 1.27 1.27) 291 | ) 292 | ) 293 | ) 294 | (number "2" 295 | (effects 296 | (font 297 | (size 1.27 1.27) 298 | ) 299 | ) 300 | ) 301 | ) 302 | (pin power_out line 303 | (at -26.67 -36.83 0) 304 | (length 5.08) 305 | (name "3V3" 306 | (effects 307 | (font 308 | (size 1.27 1.27) 309 | ) 310 | ) 311 | ) 312 | (number "20" 313 | (effects 314 | (font 315 | (size 1.27 1.27) 316 | ) 317 | ) 318 | ) 319 | ) 320 | (pin power_in line 321 | (at 26.67 -36.83 180) 322 | (length 5.08) 323 | (name "VBAT" 324 | (effects 325 | (font 326 | (size 1.27 1.27) 327 | ) 328 | ) 329 | ) 330 | (number "21" 331 | (effects 332 | (font 333 | (size 1.27 1.27) 334 | ) 335 | ) 336 | ) 337 | ) 338 | (pin bidirectional line 339 | (at 26.67 -33.02 180) 340 | (length 5.08) 341 | (name "C13" 342 | (effects 343 | (font 344 | (size 1.27 1.27) 345 | ) 346 | ) 347 | ) 348 | (number "22" 349 | (effects 350 | (font 351 | (size 1.27 1.27) 352 | ) 353 | ) 354 | ) 355 | ) 356 | (pin input line 357 | (at 26.67 -29.21 180) 358 | (length 5.08) 359 | (name "C14/OSC32_IN" 360 | (effects 361 | (font 362 | (size 1.27 1.27) 363 | ) 364 | ) 365 | ) 366 | (number "23" 367 | (effects 368 | (font 369 | (size 1.27 1.27) 370 | ) 371 | ) 372 | ) 373 | ) 374 | (pin input line 375 | (at 26.67 -25.4 180) 376 | (length 5.08) 377 | (name "C15/OSC32_OUT" 378 | (effects 379 | (font 380 | (size 1.27 1.27) 381 | ) 382 | ) 383 | ) 384 | (number "24" 385 | (effects 386 | (font 387 | (size 1.27 1.27) 388 | ) 389 | ) 390 | ) 391 | ) 392 | (pin bidirectional line 393 | (at 26.67 -21.59 180) 394 | (length 5.08) 395 | (name "A0/WKUP" 396 | (effects 397 | (font 398 | (size 1.27 1.27) 399 | ) 400 | ) 401 | ) 402 | (number "25" 403 | (effects 404 | (font 405 | (size 1.27 1.27) 406 | ) 407 | ) 408 | ) 409 | ) 410 | (pin bidirectional line 411 | (at 26.67 -17.78 180) 412 | (length 5.08) 413 | (name "A1" 414 | (effects 415 | (font 416 | (size 1.27 1.27) 417 | ) 418 | ) 419 | ) 420 | (number "26" 421 | (effects 422 | (font 423 | (size 1.27 1.27) 424 | ) 425 | ) 426 | ) 427 | ) 428 | (pin bidirectional line 429 | (at 26.67 -13.97 180) 430 | (length 5.08) 431 | (name "A2/U2TX" 432 | (effects 433 | (font 434 | (size 1.27 1.27) 435 | ) 436 | ) 437 | ) 438 | (number "27" 439 | (effects 440 | (font 441 | (size 1.27 1.27) 442 | ) 443 | ) 444 | ) 445 | ) 446 | (pin bidirectional line 447 | (at 26.67 -10.16 180) 448 | (length 5.08) 449 | (name "A3/U2RX" 450 | (effects 451 | (font 452 | (size 1.27 1.27) 453 | ) 454 | ) 455 | ) 456 | (number "28" 457 | (effects 458 | (font 459 | (size 1.27 1.27) 460 | ) 461 | ) 462 | ) 463 | ) 464 | (pin bidirectional line 465 | (at 26.67 -6.35 180) 466 | (length 5.08) 467 | (name "A4/NSS1" 468 | (effects 469 | (font 470 | (size 1.27 1.27) 471 | ) 472 | ) 473 | ) 474 | (number "29" 475 | (effects 476 | (font 477 | (size 1.27 1.27) 478 | ) 479 | ) 480 | ) 481 | ) 482 | (pin bidirectional line 483 | (at -26.67 27.94 0) 484 | (length 5.08) 485 | (name "B14/MISO2" 486 | (effects 487 | (font 488 | (size 1.27 1.27) 489 | ) 490 | ) 491 | ) 492 | (number "3" 493 | (effects 494 | (font 495 | (size 1.27 1.27) 496 | ) 497 | ) 498 | ) 499 | ) 500 | (pin bidirectional line 501 | (at 26.67 -2.54 180) 502 | (length 5.08) 503 | (name "A5/SCK1" 504 | (effects 505 | (font 506 | (size 1.27 1.27) 507 | ) 508 | ) 509 | ) 510 | (number "30" 511 | (effects 512 | (font 513 | (size 1.27 1.27) 514 | ) 515 | ) 516 | ) 517 | ) 518 | (pin bidirectional line 519 | (at 26.67 1.27 180) 520 | (length 5.08) 521 | (name "A6/MISO1" 522 | (effects 523 | (font 524 | (size 1.27 1.27) 525 | ) 526 | ) 527 | ) 528 | (number "31" 529 | (effects 530 | (font 531 | (size 1.27 1.27) 532 | ) 533 | ) 534 | ) 535 | ) 536 | (pin bidirectional line 537 | (at 26.67 5.08 180) 538 | (length 5.08) 539 | (name "A7/MOSI1" 540 | (effects 541 | (font 542 | (size 1.27 1.27) 543 | ) 544 | ) 545 | ) 546 | (number "32" 547 | (effects 548 | (font 549 | (size 1.27 1.27) 550 | ) 551 | ) 552 | ) 553 | ) 554 | (pin bidirectional line 555 | (at 26.67 8.89 180) 556 | (length 5.08) 557 | (name "B0" 558 | (effects 559 | (font 560 | (size 1.27 1.27) 561 | ) 562 | ) 563 | ) 564 | (number "33" 565 | (effects 566 | (font 567 | (size 1.27 1.27) 568 | ) 569 | ) 570 | ) 571 | ) 572 | (pin bidirectional line 573 | (at 26.67 12.7 180) 574 | (length 5.08) 575 | (name "B1" 576 | (effects 577 | (font 578 | (size 1.27 1.27) 579 | ) 580 | ) 581 | ) 582 | (number "34" 583 | (effects 584 | (font 585 | (size 1.27 1.27) 586 | ) 587 | ) 588 | ) 589 | ) 590 | (pin input line 591 | (at 26.67 16.51 180) 592 | (length 5.08) 593 | (name "B10/SCL2/U3TX" 594 | (effects 595 | (font 596 | (size 1.27 1.27) 597 | ) 598 | ) 599 | ) 600 | (number "35" 601 | (effects 602 | (font 603 | (size 1.27 1.27) 604 | ) 605 | ) 606 | ) 607 | ) 608 | (pin bidirectional line 609 | (at 26.67 20.32 180) 610 | (length 5.08) 611 | (name "B11/SDA2/U3RX" 612 | (effects 613 | (font 614 | (size 1.27 1.27) 615 | ) 616 | ) 617 | ) 618 | (number "36" 619 | (effects 620 | (font 621 | (size 1.27 1.27) 622 | ) 623 | ) 624 | ) 625 | ) 626 | (pin input line 627 | (at 26.67 24.13 180) 628 | (length 5.08) 629 | (name "nRESET" 630 | (effects 631 | (font 632 | (size 1.27 1.27) 633 | ) 634 | ) 635 | ) 636 | (number "37" 637 | (effects 638 | (font 639 | (size 1.27 1.27) 640 | ) 641 | ) 642 | ) 643 | ) 644 | (pin passive line 645 | (at 26.67 27.94 180) 646 | (length 5.08) 647 | (name "3V3" 648 | (effects 649 | (font 650 | (size 1.27 1.27) 651 | ) 652 | ) 653 | ) 654 | (number "38" 655 | (effects 656 | (font 657 | (size 1.27 1.27) 658 | ) 659 | ) 660 | ) 661 | ) 662 | (pin passive line 663 | (at 26.67 31.75 180) 664 | (length 5.08) 665 | (name "GND" 666 | (effects 667 | (font 668 | (size 1.27 1.27) 669 | ) 670 | ) 671 | ) 672 | (number "39" 673 | (effects 674 | (font 675 | (size 1.27 1.27) 676 | ) 677 | ) 678 | ) 679 | ) 680 | (pin bidirectional line 681 | (at -26.67 24.13 0) 682 | (length 5.08) 683 | (name "B15/MOSI2" 684 | (effects 685 | (font 686 | (size 1.27 1.27) 687 | ) 688 | ) 689 | ) 690 | (number "4" 691 | (effects 692 | (font 693 | (size 1.27 1.27) 694 | ) 695 | ) 696 | ) 697 | ) 698 | (pin passive line 699 | (at 26.67 35.56 180) 700 | (length 5.08) 701 | (name "GND" 702 | (effects 703 | (font 704 | (size 1.27 1.27) 705 | ) 706 | ) 707 | ) 708 | (number "40" 709 | (effects 710 | (font 711 | (size 1.27 1.27) 712 | ) 713 | ) 714 | ) 715 | ) 716 | (pin bidirectional line 717 | (at -26.67 20.32 0) 718 | (length 5.08) 719 | (name "A8/MCO" 720 | (effects 721 | (font 722 | (size 1.27 1.27) 723 | ) 724 | ) 725 | ) 726 | (number "5" 727 | (effects 728 | (font 729 | (size 1.27 1.27) 730 | ) 731 | ) 732 | ) 733 | ) 734 | (pin bidirectional line 735 | (at -26.67 16.51 0) 736 | (length 5.08) 737 | (name "A9/U1TXa" 738 | (effects 739 | (font 740 | (size 1.27 1.27) 741 | ) 742 | ) 743 | ) 744 | (number "6" 745 | (effects 746 | (font 747 | (size 1.27 1.27) 748 | ) 749 | ) 750 | ) 751 | ) 752 | (pin bidirectional line 753 | (at -26.67 12.7 0) 754 | (length 5.08) 755 | (name "A10/U1RXa" 756 | (effects 757 | (font 758 | (size 1.27 1.27) 759 | ) 760 | ) 761 | ) 762 | (number "7" 763 | (effects 764 | (font 765 | (size 1.27 1.27) 766 | ) 767 | ) 768 | ) 769 | ) 770 | (pin bidirectional line 771 | (at -26.67 8.89 0) 772 | (length 5.08) 773 | (name "A11/CANRX/USBDM" 774 | (effects 775 | (font 776 | (size 1.27 1.27) 777 | ) 778 | ) 779 | ) 780 | (number "8" 781 | (effects 782 | (font 783 | (size 1.27 1.27) 784 | ) 785 | ) 786 | ) 787 | ) 788 | (pin bidirectional line 789 | (at -26.67 5.08 0) 790 | (length 5.08) 791 | (name "A12/CANTX/USBDP" 792 | (effects 793 | (font 794 | (size 1.27 1.27) 795 | ) 796 | ) 797 | ) 798 | (number "9" 799 | (effects 800 | (font 801 | (size 1.27 1.27) 802 | ) 803 | ) 804 | ) 805 | ) 806 | ) 807 | ) 808 | ) 809 | -------------------------------------------------------------------------------- /STM32China/stm32f103c8t6-module-china.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # stm32f103c8t6-module-china 5 | # 6 | DEF stm32f103c8t6-module-china U 0 40 Y Y 1 F N 7 | F0 "U" 0 1350 60 H V C CNN 8 | F1 "stm32f103c8t6-module-china" 0 0 60 V V C CNN 9 | F2 "myelin-kicad:stm32f103c8t6-module-china" 0 -1700 60 H I C CNN 10 | F3 "" -400 250 60 H V C CNN 11 | DRAW 12 | T 900 100 -500 60 0 0 0 B5,~C13-15,~A0-7,~B0-1~are~not~5V~tolerant Normal 0 C C 13 | T 0 -500 -400 60 0 0 0 not~5V Normal 0 C C 14 | S -850 1550 850 -1600 0 1 0 N 15 | X B12/NSS2 1 -1050 1400 200 R 50 50 1 1 B 16 | X B13/SCK2 2 -1050 1250 200 R 50 50 1 1 B 17 | X B14/MISO2 3 -1050 1100 200 R 50 50 1 1 B 18 | X B15/MOSI2 4 -1050 950 200 R 50 50 1 1 B 19 | X A8/MCO 5 -1050 800 200 R 50 50 1 1 B 20 | X A9/U1TXa 6 -1050 650 200 R 50 50 1 1 B 21 | X A10/U1RXa 7 -1050 500 200 R 50 50 1 1 B 22 | X A11/CANRX/USBDM 8 -1050 350 200 R 50 50 1 1 B 23 | X A12/CANTX/USBDP 9 -1050 200 200 R 50 50 1 1 B 24 | X A15/JTDI 10 -1050 50 200 R 50 50 1 1 B 25 | X 3V3 20 -1050 -1450 200 R 50 50 1 1 w 26 | X A5/SCK1 30 1050 -100 200 L 50 50 1 1 B 27 | X GND 40 1050 1400 200 L 50 50 1 1 P 28 | X B3/JTDO 11 -1050 -100 200 R 50 50 1 1 B 29 | X VBAT 21 1050 -1450 200 L 50 50 1 1 W 30 | X A6/MISO1 31 1050 50 200 L 50 50 1 1 B 31 | X B4/JnTRST 12 -1050 -250 200 R 50 50 1 1 B 32 | X C13 22 1050 -1300 200 L 50 50 1 1 B 33 | X A7/MOSI1 32 1050 200 200 L 50 50 1 1 B 34 | X B5 13 -1050 -400 200 R 50 50 1 1 B 35 | X C14/OSC32_IN 23 1050 -1150 200 L 50 50 1 1 I 36 | X B0 33 1050 350 200 L 50 50 1 1 B 37 | X B6/SCL1a/U1TXb 14 -1050 -550 200 R 50 50 1 1 B 38 | X C15/OSC32_OUT 24 1050 -1000 200 L 50 50 1 1 I 39 | X B1 34 1050 500 200 L 50 50 1 1 B 40 | X B7/SDA1a/U1RXb 15 -1050 -700 200 R 50 50 1 1 B 41 | X A0/WKUP 25 1050 -850 200 L 50 50 1 1 B 42 | X B10/SCL2/U3TX 35 1050 650 200 L 50 50 1 1 I 43 | X B8/SCL1b/CANRX 16 -1050 -850 200 R 50 50 1 1 B 44 | X A1 26 1050 -700 200 L 50 50 1 1 B 45 | X B11/SDA2/U3RX 36 1050 800 200 L 50 50 1 1 B 46 | X B9/SDA1b/CANTX 17 -1050 -1000 200 R 50 50 1 1 B 47 | X A2/U2TX 27 1050 -550 200 L 50 50 1 1 B 48 | X nRESET 37 1050 950 200 L 50 50 1 1 I 49 | X 5V 18 -1050 -1150 200 R 50 50 1 1 W 50 | X A3/U2RX 28 1050 -400 200 L 50 50 1 1 B 51 | X 3V3 38 1050 1100 200 L 50 50 1 1 P 52 | X GND 19 -1050 -1300 200 R 50 50 1 1 P 53 | X A4/NSS1 29 1050 -250 200 L 50 50 1 1 B 54 | X GND 39 1050 1250 200 L 50 50 1 1 P 55 | ENDDRAW 56 | ENDDEF 57 | # 58 | #End Library 59 | -------------------------------------------------------------------------------- /fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name RFM)(type KiCad)(uri "$(KIPRJMOD)/RFM")(options "")(descr "")) 3 | (lib (name STM32China)(type KiCad)(uri "$(KIPRJMOD)/STM32China")(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (version 7) 3 | (lib (name "STM-LORA-rescue")(type "Legacy")(uri "${KIPRJMOD}/STM-LORA-rescue.lib")(options "")(descr "")) 4 | (lib (name "stm32f103c8t6-module-china")(type "KiCad")(uri "${KIPRJMOD}/STM32China/stm32f103c8t6-module-china.kicad_sym")(options "")(descr "")) 5 | (lib (name "RFM95")(type "Legacy")(uri "${KIPRJMOD}/RFM/RFM95.lib")(options "")(descr "")) 6 | (lib (name "AVR")(type "Legacy")(uri "${KIPRJMOD}/AVR.lib")(options "")(descr "")) 7 | ) 8 | --------------------------------------------------------------------------------