Lofence
kiu·lofence·rev_b/hardware/kicad/lofence.kicad_pcb
About the Lofence PCB
Lofence is an open source AVR/Arduino PCB design by kiu, published on GitHub under the MIT license. It is a 2-layer board measuring 78 × 130 mm, with 57 components from 31 distinct parts.
Its main chip is the ATmega328PB-AU, from the AVR/Arduino family. Other key parts include the Opamp_Dual_Generic, MIC5504-3.3YM5, RN2483 and MCP125x. By type, the board carries 21 resistors, 14 capacitors, 8 diodes, 6 connectors, 5 ICs and 1 crystal.
It belongs with the rf & radio and iot & wireless designs in this gallery.
From the project
LoFence is a LoRaWAN capable IoT electric fence monitoring system running on the The Things Network.
Too complicated for the initial build, let�s keep it simple by measuring voltage. Well, not a little voltage, but all the way up to 12 kV. Difficult, but a voltage divider with an op-amp will do fine. With this setup, we can measure any disconnects on the line between the energizer and the LoFence measuring point, even short circuits after the measuring point. Your mileage may vary though. This setup is heavily dependent on weather conditions, e.g. having dry soil will provide a different readout than after heavy rain.

Main components on the Lofence
Lofence bill of materials (BOM)
57 components, 31 distinct parts.
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | Opamp_Dual_Generic | SOIC-8_3.9x4.9mm_Pitch1.27mm | U1 |
| 1 | MIC5504-3.3YM5 | SOT-23-5_HandSoldering | U2 |
| 1 | ATmega328PB-AU | TQFP-32_7x7mm_Pitch0.8mm | U3 |
| 1 | RN2483 | RN2483_serial | U4 |
| 1 | MCP125x | MSOP-8_3x3mm_Pitch0.65mm | U5 |
| 1 | 32768 Hz | Crystal_Round_d3.0mm_Vertical | Y1 |
| 1 | ISP | Pin_Header_Straight_2x03_Pitch2.54mm | J3 |
| 1 | DEBUG RN | Pin_Header_Straight_1x04_Pitch2.54mm | J4 |
| 1 | DEBUG LED | Pin_Header_Straight_1x03_Pitch2.54mm | J5 |
| 1 | DEBUG MCU | Pin_Header_Straight_1x04_Pitch2.54mm | J6 |
| 1 | 868 | U.FL | J7 |
| 1 | PWR | Pin_Header_Straight_1x03_Pitch2.54mm | J8 |
| 1 | Battery_Cell | 18650HolderTHT | BT1 |
| 1 | RESET | SW_SPST_B3SL-1002P | SW1 |
| 1 | D_Schottky | D_SMA_Handsoldering | D1 |
| 2 | BAV70LT | SOT-23 | D2, D8 |
| 5 | LED | LED_0805_HandSoldering | D3, D4, D5, D6, D7 |
| 8 | 100nF | C_0805_HandSoldering | C1, C5, C6, C7, C8, C9, C10, C11 |
| 2 | 1.0uF | C_0805_HandSoldering | C2, C3 |
| 1 | 10uF | CP_Elec_4x5.7 | C4 |
Show 11 more
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | 1uF | C_0805_HandSoldering | C12 |
| 2 | 10uF | C_1206_HandSoldering | C13, C14 |
| 2 | 10M 6KV | R_Axial_DIN0516_L15.5mm_D5.0mm_P20.32mm_Horizontal | R1, R2 |
| 1 | 1M 700V | R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3 |
| 1 | 3k9 | R_0805_HandSoldering | R4 |
| 2 | 232R | R_0805_HandSoldering | R5, R6 |
| 6 | 100k | R_0805_HandSoldering | R7, R10, R16, R17, R18, R21 |
| 5 | R | R_0805_HandSoldering | R8, R11, R13, R14, R15 |
| 1 | 4k7 | R_0805_HandSoldering | R9 |
| 2 | 1M | R_0805_HandSoldering | R12, R19 |
| 1 | 47R | R_0805_HandSoldering | R20 |
Lofence design files
The KiCad project lives in the kiu/lofence repository on GitHub; these links point at the commit this page was built from.
Lofence: common questions
What microcontroller does the Lofence use?
The Lofence is built around the ATmega328PB-AU, from the AVR/Arduino family.
How big is the Lofence PCB?
The Lofence measures 78 × 130 mm, has 2 copper layers and is 1.6 mm thick.
How many components are on the Lofence?
57 components, from 31 distinct parts. The full bill of materials is listed on this page.
Where can I download the Lofence design files?
From the kiu/lofence repository on GitHub, which has the KiCad layout; the links under Design files point to each one.
Can I use the Lofence design in my own project?
Yes, under the terms of its MIT license, which kiu chose for the repository.
Can I test firmware for the Lofence without the hardware?
Yes. HardLabs builds a simulation of the board from its netlist and BOM, so you can run and debug AVR/Arduino firmware against it before you order a PCB.
Similar boards
AVR/Arduino
Magspoof
samyk
35 × 29 mm11 parts2LNo license4.2kAVR/Arduino
Redox keyboard
mattdibi
162.2 × 126.5 mm77 parts2LMIT2.0kAVR/Arduino
Labrador
espotek-org
36.8 × 34.7 mm75 parts2LNo license1.2kAVR/Arduino
V4
stuartpittaway
30 × 50 mm38 parts2LCC-BY-NC-4.01.1kAVR/Arduino
ModuleV450
stuartpittaway
30 × 61.4 mm39 parts2LCC-BY-NC-4.01.1kAVR/Arduino
Discipline
coseyfannitutti
304.9 × 122.8 mm170 parts2LCC-BY-NC-4.01.0k