From db0e457450fa9ba14a52c7b514dc4d7800f73a21 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 23 Jan 2020 11:59:07 -0800 Subject: [PATCH 01/18] trying to eliminate those pesky lbr temp files again #bugfix --- .gitignore | 1 + Eagle_Files/lbr/PiezoFFC.l#1 | 46273 --------------------------------- 2 files changed, 1 insertion(+), 46273 deletions(-) delete mode 100644 Eagle_Files/lbr/PiezoFFC.l#1 diff --git a/.gitignore b/.gitignore index 0d7fe64..85e60a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ Eagle_Files/**/*.B\#* Eagle_Files/**/*.s\#* +Eagle_Files/**/*.l\#* docs/**/*.odt\#* site/* diff --git a/Eagle_Files/lbr/PiezoFFC.l#1 b/Eagle_Files/lbr/PiezoFFC.l#1 deleted file mode 100644 index 5e2df23..0000000 --- a/Eagle_Files/lbr/PiezoFFC.l#1 +++ /dev/null @@ -1,46273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -slot drills with copper ->NAME ->VALUE - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->value -2 slot drills with copper - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>Solder jumper</b> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - -<b>Solder jumper</b> - - - - - - ->NAME - - - - - - - - -<b>Solder jumper</b> - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - -PCB Edge ->NAME ->VALUE - - - - - - - - - - - - - - - - - -<b>SMALL OUTLINE DIODE</b> - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - -<b>DO41</b> 7.6mm x 2mm<p> -Source: http://www.diodes.com/datasheets/ds23001.pdf - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>KK® 254 Solid Header, Vertical, with Friction Lock, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022232031_sd.pdf>Datasheet </a> - - - - - - - - - - ->NAME - - -<B>INDUCTOR</B><p> -manufacturer Siemens - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -Single-row, 4-pin Receptacle Header (Female) Straight, 2.54 mm (0.10 in) col pitch, 5.75 mm insulator length, 10.16 X 2.54 X 5.75 mm body -<p>Single-row (1X4), 4-pin Receptacle Header (Female) Straight package with 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.75 mm insulator length with overall size 10.16 X 2.54 X 5.75 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - - - - ->NAME - - -<b>TO 18</b> - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - -<b>KK® 396 Header, Vertical, Friction Lock, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/026604020_sd.pdf>Datasheet </a> - - - - - - - - - - - ->NAME ->VALUE - - -<b>0.5mm Pitch Connectors For FPC/FFC</b><p> -Source: <a href= "http://www.hirose.co.jp/cataloge_hp/e58605370.pdf">Data sheet</a><p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>TO-18</b> - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - -<b>TO-3</b> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -C -E -B - - -SOT-93<p> -grid 5.45 mm - - - - - - - - - - - - - - ->VALUE ->NAME - - - -SOT-93<p> -grid 5.45 mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -A20,3mm - - - - - - - - - - - - -<b>TO 126 horizontal</b> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - - -<b>TO-18</b> - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - -<b>TO 218 vertical</b> - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - - -<b>TO 202 horizontal</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - - - - -<b>TO-39</b> - - - - - - - - ->NAME ->VALUE - - -<b>TO 126 vertical</b> - - - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - -<b>TO 5</b> - - - - - - - - ->NAME ->VALUE - - -<b>TO-92</b> Pads In Line E B C from top<p> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TO 92</b> - - - - - - - - - - - - - ->NAME ->VALUE -2 -3 -1 - - -<b>TO 218 horizontal</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - - - - -SOT89 Emitter Collector Basis - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>TO 202 vertical</b> - - - - - - - - - ->NAME ->VALUE -1 -2 -3 - - - - - - - - - -<b>TOP 3 horizontal</b> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -A20,3mm -1 -2 -3 - - - - - - - - - - - - -<b>TO-92</b> Pads In Line C B E from top<p> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TO-92</b> Pads In Line C E B from top<p> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -SC59 (SOT23) Motorola - - - - - - - ->NAME ->VALUE - - - - - -<b>TO 220 vertical</b> - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - -<b>TO-92</b> Pads In Line B C E from top<p> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TO-92</b> Pads In Line B E C from top<p> - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TO 220 horizontal</b> - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -A17,5mm -1 -2 -3 - - - - - - - - - - - - -<b>TO-66</b> - - - - - - - - - - - - - - - - -3 ->NAME ->VALUE -2 -1 - - -<b>TO-225</b><p> -grid 2.54 mm, vertical - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -2 -3 ->NAME ->VALUE - - - - - - -<b>TO-92</b> Pads Triangle Reverse - - - - - - - - - - - - ->NAME ->VALUE - - -<b>SOT-23 (EBC)</b> - - - - - - - ->NAME ->VALUE - - - - - -<b>TOP 3 vertical</b> - - - - - - - - - - - - - - ->NAME ->VALUE -B -C -E - - - - - - - - - - -<b>TO-92</b><p> -grid 5.08 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TO-92</b><p> -grid 2.54 mm<p> -rotated 45 deg. - - - - - - - - - - - - - - ->NAME ->VALUE - - -TO-236 ITT Intermetall - - - - - - - ->NAME ->VALUE - - - - - -SOT89 Basis Collector Emitter - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Chip, 1.00 X 0.55 X 0.50 mm body -<p>Chip package with body size 1.00 X 0.55 X 0.50 mm</p> - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - -<b>SOT-23 (BCE)</b> - - - - - - - ->NAME ->VALUE - - - - - -Fiducial 60mil - - - - - - - - -Fiducial 20mil with paste for alignment - - - - - - - - -Fiducial 40mil - - - - - - - - -Fiducial 20mil - - - - - - - - -Fiducial 60mil with paste for alignment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - -Fiducial 40mil with paste for alignment - - - - - - - - -<b>RESISTOR</b><p> -chip - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->NAME - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 5 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530004_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 5 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430004_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - - -<b>SL™ Wire-to-Board Header, Surface Mount, Single Row, Vertical, 3.05mm Pocket, Shrouded, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530004_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - - -<B>DIODE</B> - - - - - - - - - - - ->NAME - - - - - -<b>Ceramic Chip Capacitor KEMET 0603 reflow solder</b><p> -Metric Code Size 1608 - - - - ->NAME ->VALUE - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913044_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - -Chip, 2.00 X 1.25 X 1.30 mm body -<p>Chip package with body size 2.00 X 1.25 X 1.30 mm</p> - - - - - - ->NAME ->VALUE - - -Single-row, 5-pin Receptacle Header (Female) Straight, 2.54 mm (0.10 in) col pitch, 5.75 mm insulator length, 12.70 X 2.54 X 5.75 mm body -<p>Single-row (1X5), 5-pin Receptacle Header (Female) Straight package with 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.75 mm insulator length with overall size 12.70 X 2.54 X 5.75 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - - - - - ->NAME - - -<b>AMP MTA connector</b> - - - - - - - - - ->NAME - - - - -<b>KK® 254 Wire-to-Board Header, Right Angle, with Friction Lock, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/022057048_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 -4 ->VALUE - - - - - - - - - - -<b>KK® 254 Wire-to-Board Header, Vertical, with Friction Lock, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022272041_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 -4 ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - -Chip, 1.60 X 0.90 X 0.80 mm body -<p>Chip package with body size 1.60 X 0.90 X 0.80 mm</p> - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name ->VALUE - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610271_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - ->NAME ->VALUE - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980271_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470210_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - ->NAME - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480210_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - - - - - - - - - - - ->NAME - - - - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 5.84 mm mating length, 5.08 X 7.62 X 8.38 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.84 mm mating length with overall size 5.08 X 7.62 X 8.38 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - - - - - - ->NAME - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - - - - - - - - - - - ->NAME - - - - - - - - -Double-row, 6-pin Pin Header (Male) Right Angle, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 5.84 mm mating length, 7.62 X 2.54 X 5.08 mm body -<p>Double-row (2X3), 6-pin Pin Header (Male) Right Angle package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.84 mm mating length with body size 7.62 X 2.54 X 5.08 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - - - - - - - - - - - ->NAME - - -<b>SC70-3 Reflow soldering</b><p> -Philips SC01_Mounting_1996.pdf<p> -ROHM : UMT3 ; EIAJ : SC-70 - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610371_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - -<b>0.5mm Pitch Connectors For FPC/FFC</b><p> -Source: <a href= "http://www.hirose.co.jp/cataloge_hp/e58605370.pdf">Data sheet</a><p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470310_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480310_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - -Becher B6 (cup B6) top view -ca. Maße (approx. dimensions): -ØxH [mm]: 16x11 -RM (grid) [mm]: 8.75x10 / 5x12.5 -manufactured by NKL® - - - - - - - - - - - - - ->NAME ->VALUE - - -SMD top view -ca. Maße (approx. dim.)[mm]: -LxB(W)xH : 17x13x7 -pad: 2.8x1.8 - - - - - - - - - - - - ->NAME ->VALUE - - ->VALUE ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Sockel S11 (base S11) top view -ca. Maße (approx. dimensions): -LxB(W)xH [mm]: 12x6x12 -RM (grid) [mm]: 7.5 -manufactured by NKL® - - - - - - ->NAME ->VALUE - - -Becher B5 (cup B5) top view -ca. Maße (approx. dimensions): -LxB(W)xH [mm]: 13x6x14 -RM (grid): (10x3)mm -manufactured by NKL® - - - - - - - - ->NAME ->VALUE - - -<b>RTE (S-PQFP-N16)</b> 3x3 mm<p> -Source: www.ti.com .. tpa6132a2 direct path stereo $.65.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>Dual In Line Package</b> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - ->NAME - - -<b>Small Outline Package 14</b> - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - -<b>Small Shrink Outline Package</b> - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - -<b>CHICAGO MINIATURE LAMP, INC.</b><p> -7022X Series SMT LEDs 1206 Package Size - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - -<b>KK® 254 Solid Header, Vertical, with Friction Lock, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022232021_sd.pdf>Datasheet </a> - - - - - - - - - ->NAME ->VALUE - - -<B>LED</B><p> -5 mm, square, Siemens - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<B>LED</B><p> -1 mm, round, Siemens - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<B>LED</B><p> -5 mm, round - - - - - - - - - - - ->NAME ->VALUE - - -<B>LED</B><p> -3 mm, round - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>LED HOLDER</b><p> -Siemens - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<B>LED</B><p> -2 x 5 mm, rectangle - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - -<b>LED HOLDER</b><p> -Siemens - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -+ -- - - -<B>IR LED</B><p> -infrared emitting diode, Infineon -TO-18, lead spacing 2.54 mm, cathode marking<p> -Inifineon - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<B>LED BLOCK</B><p> -1 LED, Siemens - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Super SIDELED® High-Current LED</b><p> -LG A672, LP A672 <br> -Source: http://www.osram.convergy.de/ ... LG_LP_A672.pdf (2004.05.13) - - - - - - - - - - - - - - - - - - - -C -A ->NAME ->VALUE - - - - - - - -<b>LED HOLDER</b><p> -Siemens - - - - - - - - - - - - - - - - - -A+ -K- ->NAME ->VALUE - - - - - -<B>LED</B><p> -rectangle, 5.7 x 3.2 mm - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>Hyper Micro SIDELED®</b><p> -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY Y876.pdf - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - -<b>SmartLEDTM Hyper-Bright LED</b><p> -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY L896.pdf - - - - - - - - ->NAME ->VALUE - - - - - -<b>LED HOLDER</b><p> -Siemens - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CHIPLED</b><p> -Source: http://www.osram.convergy.de/ ... LG_LY N971.pdf - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - -<B>IR LED</B><p> -infrared emitting diode, Infineon -TO-18, lead spacing 2.54 mm, cathode marking<p> -Inifineon - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>SML0805-2CW-TR (0805 PROFILE)</b> COOL WHITE<p> -Source: http://www.ledtronics.com/ds/smd-0603/Dstr0093.pdf - - - - - - - - - - - ->NAME ->VALUE - - -<b>Hyper CHIPLED Hyper-Bright LED</b><p> -LB Q993<br> -Source: http://www.osram.convergy.de/ ... Lb_q993.pdf - - - - ->NAME ->VALUE - - - - - - - -<B>IR LED</B><p> -IR transmitter Siemens - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<B>LED</B><p> -10 mm, round - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>Lumileds Lighting. LUXEON®</b> without cool pad<p> -Source: K2.pdf - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - -<b>SML0603-XXX (HIGH INTENSITY) LED</b><p> -<table> -<tr><td>AG3K</td><td>AQUA GREEN</td></tr> -<tr><td>B1K</td><td>SUPER BLUE</td></tr> -<tr><td>R1K</td><td>SUPER RED</td></tr> -<tr><td>R3K</td><td>ULTRA RED</td></tr> -<tr><td>O3K</td><td>SUPER ORANGE</td></tr> -<tr><td>O3KH</td><td>SOFT ORANGE</td></tr> -<tr><td>Y3KH</td><td>SUPER YELLOW</td></tr> -<tr><td>Y3K</td><td>SUPER YELLOW</td></tr> -<tr><td>2CW</td><td>WHITE</td></tr> -</table> -Source: http://www.ledtronics.com/ds/smd-0603/Dstr0092.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Hyper TOPLED® RG Hyper-Bright LED</b><p> -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY T776.pdf - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -A -C - - - - - - - - - - -<b>TOPLED® High-optical Power LED (HOP)</b><p> -Source: http://www.osram.convergy.de/ ... ls_t675.pdf - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -A -C - - - - - - - -<b>Power TOPLED®</b><p> -Source: http://www.osram.convergy.de/ ... LA_LO_LA_LY E67B.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -C -A -C -C - - - - - - - - - - - -<b>Hyper CHIPLED Hyper-Bright LED</b><p> -LB R99A<br> -Source: http://www.osram.convergy.de/ ... lb_r99a.pdf - - - - ->NAME ->VALUE - - - - - - - -<b>SmartLED TTW</b><p> -Recommended Solder Pad useable for SmartLEDTM and Chipled - Package 0603<br> -Package able to withstand TTW-soldering heat<br> -Package suitable for TTW-soldering<br> -Source: http://www.osram.convergy.de/ ... LO_LS_LY L89K.pdf - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - -<b>BLUE LINETM Hyper Mini TOPLED® Hyper-Bright LED</b><p> -Source: http://www.osram.convergy.de/ ... LB M676.pdf - - - - - - - - - - - - - - -A -C ->NAME ->VALUE - - - - - - - -<b>CHIPLED</b><p> -Source: http://www.osram.convergy.de/ ... LG_R971.pdf - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - -<b>CHIPLED</b><p> -Source: http://www.osram.convergy.de/ ... LG_LY Q971.pdf - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - -<b>Lumileds Lighting. LUXEON®</b> with cool pad<p> -Source: K2.pdf - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CHIPLED-0603</b><p> -Recommended Solder Pad useable for SmartLEDTM and Chipled - Package 0603<br> -Package able to withstand TTW-soldering heat<br> -Package suitable for TTW-soldering<br> -Source: http://www.osram.convergy.de/ ... LO_LS_LY L89K.pdf - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - -<b>SURFACE MOUNT LED LAMP</b> 3.5x2.8mm<p> -Source: http://www.kingbright.com/manager/upload/pdf/KA-3528ASYC(Ver1189474662.1) - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - -<b>Mini TOPLED Santana®</b><p> -Source: http://www.osram.convergy.de/ ... LG M470.pdf - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - -Chip, 1.00 X 0.50 X 0.39 mm body -<p>Chip package with body size 1.00 X 0.50 X 0.39 mm</p> - - - - ->NAME - - -<b>MOUNTING PAD</b> 2.8 mm, round - - - - - - - - - - - - - -<b>SML10XXKH-TR (HIGH INTENSITY) LED</b><p> -<table> -<tr><td>SML10R3KH-TR</td><td>ULTRA RED</td></tr> -<tr><td>SML10E3KH-TR</td><td>SUPER REDSUPER BLUE</td></tr> -<tr><td>SML10O3KH-TR</td><td>SUPER ORANGE</td></tr> -<tr><td>SML10PY3KH-TR</td><td>PURE YELLOW</td></tr> -<tr><td>SML10OY3KH-TR</td><td>ULTRA YELLOW</td></tr> -<tr><td>SML10AG3KH-TR</td><td>AQUA GREEN</td></tr> -<tr><td>SML10BG3KH-TR</td><td>BLUE GREEN</td></tr> -<tr><td>SML10PB1KH-TR</td><td>SUPER BLUE</td></tr> -<tr><td>SML10CW1KH-TR</td><td>WHITE</td></tr> -</table> - -Source: http://www.ledtronics.com/ds/smd-1206/dstr0094.PDF - - - - - - - ->NAME ->VALUE - - - - - - - - - -<b>MOUNTING PAD</b> 3.2 mm, round - - - - - - - - - -3,2 - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980371_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - -<b>MOUNTING PAD</b> 4.3 mm, round - - - - - - - - - - - -<b>MOUNTING PAD</b> 5.5 mm, round - - - - - - - - - - - -<b>MOUNTING PAD</b> 3.3 mm, round - - - - - - - - - - - -<b>MOUNTING PAD</b> 5.0 mm, round - - - - - - - - - - - -<b>MOUNTING PAD</b> 4.1 mm, round - - - - - - - - - -<b>MOUNTING PAD</b> 3.6 mm, round - - - - - - - - - - - -<b>MOUNTING PAD</b> 3.0 mm, round - - - - - - - - - -3,0 - - -Double-row, 4-pin Receptacle Header (Female) Right Angle, 2.54 mm (0.10 in) pitch, 7.36 mm insulator length, 5.56 X 7.36 X 5.56 mm body -<p>Double-row (2X2), 4-pin Receptacle Header (Female) Right Angle package with 2.54 mm (0.10 in) pitch, 0.64 mm lead width, 3.00 mm tail length and 7.36 mm insulator length with body size 5.56 X 7.36 X 5.56 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name - - -<b>MOUNTING PAD</b> 4.5 mm, round - - - - - - - - - - - -<b>SOLDER PAD</b><p> -drill 1.2 mm - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - ->NAME - - -<b>3 mm SMD Trimming Potentiometer</b> Side Adjust<p> -Source: http://www.bourns.com/data/global/PDFs/3223.PDF ->NAME - - - - - - - - - - - - - - - - - - - - -<h3>0606 - LED SMT</h3> -<p>Specifications: -<ul><li>Pin count:4</li> -<li>Pin pitch: 0.8mm</li> -<li>Area:1.6mm L x 1.5mm W</li> -<li>Height: 0.55m</li> -</ul></p> -<p><b>Datasheet referenced for footprint:</b> <a href="http://optoelectronics.liteon.com/upload/download/DS22-2000-282/P_100_LTST-C195KGJRKT.pdf">LTST-C195KGJRKT</a></p> -<p>Example device(s): -<ul><li>LTST-C195KGJRKT</li> -</ul></p> - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 4 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530003_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913034_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - -<b>SL™ Wire-to-Board Header, Surface Mount, Single Row, Vertical, 3.05mm Pocket, Shrouded, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530003_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 4 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430003_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name - - -<b>SURFACE MOUNT GENERAL RECTIFIER</b> JEDEC DO-214AC molded platic body<p> -Method 2026<br> -Source: http://www.kingtronics.com/SMD_M7/M7_SMD_4007.pdf - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<B>DIODE</B><p> -diameter 2 mm, horizontal, grid 7.62 mm - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - -Chip, 1.00 X 0.60 X 0.70 mm body -<p>Chip package with body size 1.00 X 0.60 X 0.70 mm</p> - - ->NAME ->VALUE - - - - - - - -<B>DIODE</B><p> -diameter 2 mm, horizontal, grid 10.16 mm - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* -* ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* -* ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -* -* ->Name - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980671_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - - - -Radial Polarized Capacitor, 2.54 mm pitch, 6.50 mm body diameter, 12.50 mm body height -<p>Radial Polarized Capacitor package with 2.54 mm pitch, 0.65 mm lead diameter, 6.50 mm body diameter and 12.50 mm body height</p> - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480610_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610471_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470610_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - ->NAME - - - -Double-row, 12-pin Receptacle Header (Female) Right Angle, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 7.36 mm insulator length, 15.24 X 7.36 X 5.56 mm body -<p>Double-row (2X6), 12-pin Receptacle Header (Female) Right Angle package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 7.36 mm insulator length with body size 15.24 X 7.36 X 5.56 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - - - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980471_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470410_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - ->NAME - - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - - ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>AMP MTA connector</b> - - - - - - - - - - ->NAME - - - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> ->NAME ->VALUE ->TP_SIGNAL_NAME - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -Spring loaded contact -https://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10104320.pdf - - - - - - - - -Spring loaded contact -https://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10104320.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913024_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - -<b>TEST PAD</b> - ->NAME ->VALUE ->TP_SIGNAL_NAME - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 3 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530002_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 3 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430002_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610671_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -1 - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480410_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Solder jumper - - - - - -Solder jumper - - - - - -<b>Solder jumper</b> - - - - - - - - - - -SMALL OUTLINE DIODE - - - - - -DO41 7.6mm x 2mm -Source: http://www.diodes.com/datasheets/ds23001.pdf - - - - - - - - - - - - - - - - - - - - -<B>INDUCTOR</B><p> -manufacturer Siemens - - - - - -<b>KK® 254 Solid Header, Vertical, with Friction Lock, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022232031_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - -Single-row, 4-pin Receptacle Header (Female) Straight, 2.54 mm (0.10 in) col pitch, 5.75 mm insulator length, 10.16 X 2.54 X 5.75 mm body -<p>Single-row (1X4), 4-pin Receptacle Header (Female) Straight package with 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.75 mm insulator length with overall size 10.16 X 2.54 X 5.75 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - -<b>0.5mm Pitch Connectors For FPC/FFC</b><p> -Source: <a href= "http://www.hirose.co.jp/cataloge_hp/e58605370.pdf">Data sheet</a><p> - - - - - -TO 18 - - - - - -<b>KK® 396 Header, Vertical, Friction Lock, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/026604020_sd.pdf>Datasheet </a> - - - - - -TO-18 - - - - - -TO-18 - - - - - -TO-3 - - - - - -SOT-93 -grid 5.45 mm - - - - - -SOT-93 -grid 5.45 mm - - - - - -TO 126 horizontal - - - - - -TO 218 vertical - - - - - -TO 126 vertical - - - - - -TO-39 - - - - - -TO 5 - - - - - -TO 202 horizontal - - - - - -TO 92 - - - - - -TO-92 Pads In Line E B C from top - - - - - -TOP 3 horizontal - - - - - -SOT89 Emitter Collector Basis - - - - - -TO 218 horizontal - - - - - -TO 202 vertical - - - - - -TO-92 Pads In Line C B E from top - - - - - -TO-92 Pads In Line B C E from top - - - - - -TO-92 Pads In Line C E B from top - - - - - -SC59 (SOT23) Motorola - - - - - -TO 220 vertical - - - - - -TO-92 Pads In Line B E C from top - - - - - -TO 220 horizontal - - - - - -TO-66 - - - - - -TO-225 -grid 2.54 mm, vertical - - - - - -TO-92 Pads Triangle Reverse - - - - - -TO-92 -grid 5.08 mm - - - - - -TO-92 -grid 2.54 mm -rotated 45 deg. - - - - - -TOP 3 vertical - - - - - -SOT-23 (EBC) - - - - - -SOT89 Basis Collector Emitter - - - - - -TO-236 ITT Intermetall - - - - - -Chip, 1.00 X 0.55 X 0.50 mm body -<p>Chip package with body size 1.00 X 0.55 X 0.50 mm</p> - - - - - - - - - - -SOT-23 (BCE) - - - - - -Fiducial 40mil - - - - - -Fiducial 20mil - - - - - -Fiducial 60mil - - - - - -Fiducial 20mil with paste for alignment - - - - - -Fiducial 60mil with paste for alignment - - - - - -Fiducial 40mil with paste for alignment - - - - - -<b>RESISTOR</b><p> -chip - - - - - -<b>RESISTOR</b><p> -chip - - - - - - - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 5 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430004_sd.pdf>Datasheet </a> - - - - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 5 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530004_sd.pdf>Datasheet </a> - - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913044_sd.pdf>Datasheet </a> - - - - - -<b>SL™ Wire-to-Board Header, Surface Mount, Single Row, Vertical, 3.05mm Pocket, Shrouded, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530004_sd.pdf>Datasheet </a> - - - - - -<B>DIODE</B> - - - - - -Chip, 2.00 X 1.25 X 1.30 mm body -<p>Chip package with body size 2.00 X 1.25 X 1.30 mm</p> - - - - - -<b>Ceramic Chip Capacitor KEMET 0603 reflow solder</b><p> -Metric Code Size 1608 - - - - - -Chip, 1.60 X 0.90 X 0.80 mm body -<p>Chip package with body size 1.60 X 0.90 X 0.80 mm</p> - - - - - -<b>AMP MTA connector</b> - - - - - -Single-row, 5-pin Receptacle Header (Female) Straight, 2.54 mm (0.10 in) col pitch, 5.75 mm insulator length, 12.70 X 2.54 X 5.75 mm body -<p>Single-row (1X5), 5-pin Receptacle Header (Female) Straight package with 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.75 mm insulator length with overall size 12.70 X 2.54 X 5.75 mm, pin pattern - clockwise from top left</p> - - - - - -<b>KK® 254 Wire-to-Board Header, Right Angle, with Friction Lock, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/022057048_sd.pdf>Datasheet </a> - - - - - -<b>KK® 254 Wire-to-Board Header, Vertical, with Friction Lock, 4 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022272041_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610271_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980271_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470210_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 2 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480210_sd.pdf>Datasheet </a> - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 5.84 mm mating length, 5.08 X 7.62 X 8.38 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.84 mm mating length with overall size 5.08 X 7.62 X 8.38 mm, pin pattern - clockwise from top left</p> - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - -Three-row, 6-pin Pin Header (Male) Straight, 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 4.00 mm mating length, 4.00 X 6.00 X 5.50 mm body -<p>Three-row (3X2), 6-pin Pin Header (Male) Straight package with 2.00 mm (0.08 in) row pitch, 2.00 mm (0.08 in) col pitch, 0.50 mm lead width, 2.60 mm tail length and 4.00 mm mating length with overall size 4.00 X 6.00 X 5.50 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - -Double-row, 6-pin Pin Header (Male) Right Angle, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 5.84 mm mating length, 7.62 X 2.54 X 5.08 mm body -<p>Double-row (2X3), 6-pin Pin Header (Male) Right Angle package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 5.84 mm mating length with body size 7.62 X 2.54 X 5.08 mm, pin pattern - clockwise from top left</p> - - - - - - - - - - - - - - - -<b>SC70-3 Reflow soldering</b><p> -Philips SC01_Mounting_1996.pdf<p> -ROHM : UMT3 ; EIAJ : SC-70 - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610371_sd.pdf>Datasheet </a> - - - - - -<b>0.5mm Pitch Connectors For FPC/FFC</b><p> -Source: <a href= "http://www.hirose.co.jp/cataloge_hp/e58605370.pdf">Data sheet</a><p> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480310_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980371_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 3 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470310_sd.pdf>Datasheet </a> - - - - - -Sockel S11 (base S11) top view -ca. Maße (approx. dimensions): -LxB(W)xH [mm]: 12x6x12 -RM (grid) [mm]: 7.5 -manufactured by NKL® - - - - - -Becher B6 (cup B6) top view -ca. Maße (approx. dimensions): -ØxH [mm]: 16x11 -RM (grid) [mm]: 8.75x10 / 5x12.5 -manufactured by NKL® - - - - - - - - - - -SMD top view -ca. Maße (approx. dim.)[mm]: -LxB(W)xH : 17x13x7 -pad: 2.8x1.8 - - - - - -Becher B5 (cup B5) top view -ca. Maße (approx. dimensions): -LxB(W)xH [mm]: 13x6x14 -RM (grid): (10x3)mm -manufactured by NKL® - - - - - -<b>RTE (S-PQFP-N16)</b> 3x3 mm<p> -Source: www.ti.com .. tpa6132a2 direct path stereo $.65.pdf - - - - - -Dual In Line Package - - - - - -Small Shrink Outline Package - - - - - -Small Outline Package 14 - - - - - - - - - - -<b>KK® 254 Solid Header, Vertical, with Friction Lock, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/022232021_sd.pdf>Datasheet </a> - - - - - -LED -5 mm, square, Siemens - - - - - -CHICAGO MINIATURE LAMP, INC. -7022X Series SMT LEDs 1206 Package Size - - - - - -LED -1 mm, round, Siemens - - - - - -LED -2 x 5 mm, rectangle - - - - - -LED -5 mm, round - - - - - -LED HOLDER -Siemens - - - - - -LED -3 mm, round - - - - - -LED HOLDER -Siemens - - - - - -IR LED -infrared emitting diode, Infineon -TO-18, lead spacing 2.54 mm, cathode marking -Inifineon - - - - - -LED BLOCK -1 LED, Siemens - - - - - -Super SIDELED® High-Current LED -LG A672, LP A672 -Source: http://www.osram.convergy.de/ ... LG_LP_A672.pdf (2004.05.13) - - - - - -LED HOLDER -Siemens - - - - - -LED -rectangle, 5.7 x 3.2 mm - - - - - -LED HOLDER -Siemens - - - - - -SmartLEDTM Hyper-Bright LED -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY L896.pdf - - - - - -Hyper Micro SIDELED® -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY Y876.pdf - - - - - -Hyper CHIPLED Hyper-Bright LED -LB Q993 -Source: http://www.osram.convergy.de/ ... Lb_q993.pdf - - - - - -CHIPLED -Source: http://www.osram.convergy.de/ ... LG_LY N971.pdf - - - - - -IR LED -infrared emitting diode, Infineon -TO-18, lead spacing 2.54 mm, cathode marking -Inifineon - - - - - -IR LED -IR transmitter Siemens - - - - - -SML0805-2CW-TR (0805 PROFILE) COOL WHITE -Source: http://www.ledtronics.com/ds/smd-0603/Dstr0093.pdf - - - - - -LED -10 mm, round - - - - - -Hyper TOPLED® RG Hyper-Bright LED -Source: http://www.osram.convergy.de/ ... LA_LO_LS_LY T776.pdf - - - - - -SML0603-XXX (HIGH INTENSITY) LED - -AG3KAQUA GREEN -B1KSUPER BLUE -R1KSUPER RED -R3KULTRA RED -O3KSUPER ORANGE -O3KHSOFT ORANGE -Y3KHSUPER YELLOW -Y3KSUPER YELLOW -2CWWHITE - -Source: http://www.ledtronics.com/ds/smd-0603/Dstr0092.pdf - - - - - -Lumileds Lighting. LUXEON® without cool pad -Source: K2.pdf - - - - - -TOPLED® High-optical Power LED (HOP) -Source: http://www.osram.convergy.de/ ... ls_t675.pdf - - - - - -Power TOPLED® -Source: http://www.osram.convergy.de/ ... LA_LO_LA_LY E67B.pdf - - - - - -BLUE LINETM Hyper Mini TOPLED® Hyper-Bright LED -Source: http://www.osram.convergy.de/ ... LB M676.pdf - - - - - -Hyper CHIPLED Hyper-Bright LED -LB R99A -Source: http://www.osram.convergy.de/ ... lb_r99a.pdf - - - - - -SmartLED TTW -Recommended Solder Pad useable for SmartLEDTM and Chipled - Package 0603 -Package able to withstand TTW-soldering heat -Package suitable for TTW-soldering -Source: http://www.osram.convergy.de/ ... LO_LS_LY L89K.pdf - - - - - -CHIPLED -Source: http://www.osram.convergy.de/ ... LG_R971.pdf - - - - - -CHIPLED -Source: http://www.osram.convergy.de/ ... LG_LY Q971.pdf - - - - - -Lumileds Lighting. LUXEON® with cool pad -Source: K2.pdf - - - - - -CHIPLED-0603 -Recommended Solder Pad useable for SmartLEDTM and Chipled - Package 0603 -Package able to withstand TTW-soldering heat -Package suitable for TTW-soldering -Source: http://www.osram.convergy.de/ ... LO_LS_LY L89K.pdf - - - - - -SURFACE MOUNT LED LAMP 3.5x2.8mm -Source: http://www.kingbright.com/manager/upload/pdf/KA-3528ASYC(Ver1189474662.1) - - - - - -Mini TOPLED Santana® -Source: http://www.osram.convergy.de/ ... LG M470.pdf - - - - - -SML10XXKH-TR (HIGH INTENSITY) LED - -SML10R3KH-TRULTRA RED -SML10E3KH-TRSUPER REDSUPER BLUE -SML10O3KH-TRSUPER ORANGE -SML10PY3KH-TRPURE YELLOW -SML10OY3KH-TRULTRA YELLOW -SML10AG3KH-TRAQUA GREEN -SML10BG3KH-TRBLUE GREEN -SML10PB1KH-TRSUPER BLUE -SML10CW1KH-TRWHITE - - -Source: http://www.ledtronics.com/ds/smd-1206/dstr0094.PDF - - - - - -Chip, 1.00 X 0.50 X 0.39 mm body -<p>Chip package with body size 1.00 X 0.50 X 0.39 mm</p> - - - - - -<b>MOUNTING PAD</b> 2.8 mm, round - - - - - -<b>MOUNTING PAD</b> 3.2 mm, round - - - - - -<b>MOUNTING PAD</b> 3.3 mm, round - - - - - -<b>MOUNTING PAD</b> 4.3 mm, round - - - - - -<b>MOUNTING PAD</b> 5.5 mm, round - - - - - -<b>MOUNTING PAD</b> 5.0 mm, round - - - - - -<b>MOUNTING PAD</b> 4.1 mm, round - - - - - -<b>MOUNTING PAD</b> 3.6 mm, round - - - - - -<b>MOUNTING PAD</b> 3.0 mm, round - - - - - - - - - - - - - - - - - - - - -<b>MOUNTING PAD</b> 4.5 mm, round - - - - - -Double-row, 4-pin Receptacle Header (Female) Right Angle, 2.54 mm (0.10 in) pitch, 7.36 mm insulator length, 5.56 X 7.36 X 5.56 mm body -<p>Double-row (2X2), 4-pin Receptacle Header (Female) Right Angle package with 2.54 mm (0.10 in) pitch, 0.64 mm lead width, 3.00 mm tail length and 7.36 mm insulator length with body size 5.56 X 7.36 X 5.56 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - -SOLDER PAD -drill 1.2 mm - - - - - - - - - - - - - - - -<h3>0606 - LED SMT</h3> -<p>Specifications: -<ul><li>Pin count:4</li> -<li>Pin pitch: 0.8mm</li> -<li>Area:1.6mm L x 1.5mm W</li> -<li>Height: 0.55m</li> -</ul></p> -<p><b>Datasheet referenced for footprint:</b> <a href="http://optoelectronics.liteon.com/upload/download/DS22-2000-282/P_100_LTST-C195KGJRKT.pdf">LTST-C195KGJRKT</a></p> -<p>Example device(s): -<ul><li>LTST-C195KGJRKT</li> -</ul></p> - - - - - -<b>3 mm SMD Trimming Potentiometer</b> Side Adjust<p> -Source: http://www.bourns.com/data/global/PDFs/3223.PDF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 4 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530003_sd.pdf>Datasheet </a> - - - - - -<b>SL™ Wire-to-Board Header, Surface Mount, Single Row, Vertical, 3.05mm Pocket, Shrouded, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530003_sd.pdf>Datasheet </a> - - - - - - - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 3 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913034_sd.pdf>Datasheet </a> - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 4 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430003_sd.pdf>Datasheet </a> - - - - - - - - - - - - - - - -Molded Body, 4.25 X 2.70 X 2.45 mm body -<p>Molded Body package with body size 4.25 X 2.70 X 2.45 mm</p> - - - - - - - - - - -DIODE -diameter 2 mm, horizontal, grid 7.62 mm - - - - - -DIODE -diameter 2 mm, horizontal, grid 10.16 mm - - - - - -Chip, 1.00 X 0.60 X 0.70 mm body -<p>Chip package with body size 1.00 X 0.60 X 0.70 mm</p> - - - - - - - - - - - - - - - - - - - - - - - - - -Radial Polarized Capacitor, 2.54 mm pitch, 6.50 mm body diameter, 12.50 mm body height -<p>Radial Polarized Capacitor package with 2.54 mm pitch, 0.65 mm lead diameter, 6.50 mm body diameter and 12.50 mm body height</p> - - - - - - - - - - - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980671_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470610_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480610_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610471_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Right Angle, 6 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/532610671_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Right Angle, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530480410_sd.pdf>Datasheet </a> - - - - - -Double-row, 12-pin Receptacle Header (Female) Right Angle, 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 7.36 mm insulator length, 15.24 X 7.36 X 5.56 mm body -<p>Double-row (2X6), 12-pin Receptacle Header (Female) Right Angle package with 2.54 mm (0.10 in) row pitch, 2.54 mm (0.10 in) col pitch, 0.64 mm lead width, 3.00 mm tail length and 7.36 mm insulator length with body size 15.24 X 7.36 X 5.56 mm, pin pattern - counter-clockwise from bottom left</p> - - - - - -TEST PAD - - - - - -<b>1.25mm Pitch PicoBlade™ Wire-to-Board Header, Vertical, with Friction Lock, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/530470410_sd.pdf>Datasheet </a> - - - - - -<b>1.25mm Pitch PicoBlade™ Header, Surface Mount, Vertical, 4 Circuits</b><p><a href =http://www.molex.com/pdm_docs/sd/533980471_sd.pdf>Datasheet </a> - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -<b>TEST PAD</b> - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -<b>AMP MTA connector</b> - - - - - -<b>TEST PAD</b> - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -<b>TEST PAD</b> - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -<b>TEST PAD</b> - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -TEST PAD - - - - - -Spring loaded contact -https://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10104320.pdf - - - - - -Spring loaded contact -https://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10104320.pdf - - - - - - - - - - -<b>2.54mm Pitch SL™ Header, Single Row, Vertical, 3.05mm Pocket, Shrouded, 3 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705430002_sd.pdf>Datasheet </a> - - - - - - - - - - -<b>2.54mm Pitch SL™ Wire-to-Board Header, Low Profile, Surface Mount, Single Row, Right Angle, 3.05mm Pocket, Shrouded, with Press-fit Plastic Peg, 2 Circuits, Tin (Sn) Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/015913024_sd.pdf>Datasheet </a> - - - - - -<b>2.54mm Pitch SL™ Header, Low Profile, Single Row, Right Angle, 3.05mm Pocket, Shrouded, 3 Circuits, 0.38µm Gold (Au) Selective Plating, Tin (Sn) PC Tail Plating</b><p><a href =http://www.molex.com/pdm_docs/sd/705530002_sd.pdf>Datasheet </a> - - - - - - - -<h3>RG LED - No Common</h3> -<p>4 pin RG LED</p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -R -G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name ->Value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Value ->Name - - -<b>ZX62-B-5PA(11)</b><br> -Hirose Micro-USB B connector<br> -SMD type<br> - - - - -Micro USB -Hirose -ZX62-B-5PA ->NAME - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Value ->Name - - - - - - ->NAME ->VALUE - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - ->NAME ->VALUE - - - - - - - - ->NAME ->VALUE -GND -IN -OUT -GND - - - - - - - ->NAME - - - - ->NAME ->VALUE - - - - - - ->NAME ->VALUE - - - - - - - - - - - ->name ->value - - - - - - ->NAME ->VALUE - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -Empty symbol so a blank device can be made. Sometimes when working with scripts and ULPs they error when there are board-only elements - ->NAME - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - ->NAME ->VALUE - - - ->NAME ->VALUE - - - - - - - - - ->NAME ->VALUE -1 - - - - - - - - - - - - - ->name - - - - ->VALUE - - - - - - - ->NAME - - - - - - - - - ->NAME ->VALUE - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - ->NAME ->VALUE - - - - ->NAME - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - -ICSP - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME -B -C -E - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - ->NAME ->VALUE - - - ->NAME ->VALUE - - - - - - - ->NAME ->VALUE - - - - - - - ->NAME - - - - ->NAME - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -V+ -V- - - - - - ->NAME - - - - - - - - - ->NAME ->VALUE - - - - - - - - ->NAME - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - ->Name - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME - - - - - - - - - - - -2 of 2 ->Name ->Value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 of 2 ->Name ->Value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -SpiceOrder 1 -SpiceOrder 2 - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - -+ ->NAME ->VALUE -- - - - - - - - - - - ->NAME ->VALUE -V+ -GND - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - ->NAME ->VALUE - - - - ->NAME - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - ->NAME - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - -<b>SUPPLY SYMBOL</b> - - - - - - - - - - - - -301010000 - - - - - - - - - - - - - - - - - - - - - - -Single Port 5 Contact Horizontal Right Angle Shielded Micro B USB 2.0 Connector - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SMD solder <b>JUMPER</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Ic Bridge Usb To Uart 28qfn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<B>INDUCTOR</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>1.0A SCHOTTKY BARRIER RECTIFIER</b><p> -Source: http://www.diodes.com/datasheets/ds23001.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -5V Positive voltage regulator SMD SOT89 Package - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.100" (2.54mm) Center Header - 3 Pin - - - - - - - - - - - - - - - - - - - - - - - - - - - -320030017 - - - - - - - - - - - - - - - - - - - - - -IC ADJ LINEAR REG 1.25V TO 37V - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>KK 156 HEADER</b><p> -Source: http://www.molex.com/pdm_docs/sd/026604100_sd.pdf - - - - - - - - - - - - - - - - - - - - - - - - - -<b>NPN TRANSISTOR</b> - - - - - - - - - - - - - - - - - - - - -<b>NPN TRANSISTOR</b> - - - - - - - - - - - - - - - - - - - - -<b>NPN TRANSISTOR</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -302010005 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PNP Transistror - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Fiducial marks. Top and Bottom copper with stop mask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -301010318 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Atmel 8-bit AVR Microcontroller,SOIC-8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<B>DIODE</B><p> -low-leakage double diode - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 2.54 mm (0.100") pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>AMP connector</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 2.54 mm (.1 inch) pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -302010178 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Ic Bridge Usb To Uart 20qfn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -301010189 - - - - - - - - - - - - - - - - - - - -TVS DIODE 5.5VWM 8.5VC SOT143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 1.25 mm (.049 inch) pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SAMD21E Series 256 KB Flash 32 KB SRAM 48 MHz 32-Bit Microcontroller - QFN-32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311020047 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AVR 32KBytes Flash, 1KBytes EEPROM, 2KBytes RAM, w - 20MHZ, QFN/MFL, IND TEMP, GREEN 5 V/ DFN/QFN (M) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>0.5mm Pitch Connectors For FPC/FFC</b><p> -Source: <a href= "http://www.hirose.co.jp/cataloge_hp/e58605370.pdf">Data sheet</a><p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en590799 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6500-32-bit-Cortex-M3-Microcontroller-SAM3S4-SAM3S2-SAM3S1_Datasheet.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Gegentakt-Entstördrossel -differential mode choke - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311010004 - - - - - - - - - - - - - - - - - - - - - - - -<b>Low power quad operational amplifier</b><p> -Source: <a href="http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000533.pdf"> Data sgeet </a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.100" (2.54mm) Center Header - 2 Pin - - - - - - - - - - - - - - - - - - - - - - - - - -https://www.digikey.com/product-detail/en/ERB-RD0R50X/P15122CT-ND/2796798/?itemSeq=282912571 - - - - - - - - - - - - - - - - - - - -<b>LED</b><p> -<u>OSRAM</u>:<br> - -- <u>CHIPLED</u><br> -LG R971, LG N971, LY N971, LG Q971, LY Q971, LO R971, LY R971 -LH N974, LH R974<br> -LS Q976, LO Q976, LY Q976<br> -LO Q996<br> - -- <u>Hyper CHIPLED</u><br> -LW Q18S<br> -LB Q993, LB Q99A, LB R99A<br> - -- <u>SideLED</u><br> -LS A670, LO A670, LY A670, LG A670, LP A670<br> -LB A673, LV A673, LT A673, LW A673<br> -LH A674<br> -LY A675<br> -LS A676, LA A676, LO A676, LY A676, LW A676<br> -LS A679, LY A679, LG A679<br> - -- <u>Hyper Micro SIDELED®</u><br> -LS Y876, LA Y876, LO Y876, LY Y876<br> -LT Y87S<br> - -- <u>SmartLED</u><br> -LW L88C, LW L88S<br> -LB L89C, LB L89S, LG L890<br> -LS L89K, LO L89K, LY L89K<br> -LS L896, LA L896, LO L896, LY L896<br> - -- <u>TOPLED</u><br> -LS T670, LO T670, LY T670, LG T670, LP T670<br> -LSG T670, LSP T670, LSY T670, LOP T670, LYG T670<br> -LG T671, LOG T671, LSG T671<br> -LB T673, LV T673, LT T673, LW T673<br> -LH T674<br> -LS T676, LA T676, LO T676, LY T676, LB T676, LH T676, LSB T676, LW T676<br> -LB T67C, LV T67C, LT T67C, LS T67K, LO T67K, LY T67K, LW E67C<br> -LS E67B, LA E67B, LO E67B, LY E67B, LB E67C, LV E67C, LT E67C<br> -LW T67C<br> -LS T679, LY T679, LG T679<br> -LS T770, LO T770, LY T770, LG T770, LP T770<br> -LB T773, LV T773, LT T773, LW T773<br> -LH T774<br> -LS E675, LA E675, LY E675, LS T675<br> -LS T776, LA T776, LO T776, LY T776, LB T776<br> -LHGB T686<br> -LT T68C, LB T68C<br> - -- <u>Hyper Mini TOPLED®</u><br> -LB M676<br> - -- <u>Mini TOPLED Santana®</u><br> -LG M470<br> -LS M47K, LO M47K, LY M47K -<p> -Source: http://www.osram.convergy.de<p> - -<u>LUXEON:</u><br> -- <u>LUMILED®</u><br> -LXK2-PW12-R00, LXK2-PW12-S00, LXK2-PW14-U00, LXK2-PW14-V00<br> -LXK2-PM12-R00, LXK2-PM12-S00, LXK2-PM14-U00<br> -LXK2-PE12-Q00, LXK2-PE12-R00, LXK2-PE12-S00, LXK2-PE14-T00, LXK2-PE14-U00<br> -LXK2-PB12-K00, LXK2-PB12-L00, LXK2-PB12-M00, LXK2-PB14-N00, LXK2-PB14-P00, LXK2-PB14-Q00<br> -LXK2-PR12-L00, LXK2-PR12-M00, LXK2-PR14-Q00, LXK2-PR14-R00<br> -LXK2-PD12-Q00, LXK2-PD12-R00, LXK2-PD12-S00<br> -LXK2-PH12-R00, LXK2-PH12-S00<br> -LXK2-PL12-P00, LXK2-PL12-Q00, LXK2-PL12-R00 -<p> -Source: www.luxeon.com<p> - -<u>KINGBRIGHT:</U><p> -KA-3528ASYC<br> -Source: www.kingbright.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 1.25 mm (.049 inch) pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>MOUNTING PAD</b>, round - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>SOLDER PAD</b><p> MC S0,8, drill 1.2 mm, distributor Buerklin, 08F130 - - - - - - - - - - - - - - - - - - -304090045 - - - - - - - - - - - - - - - - - - - -Res Cermet POT 10K Ohm 25% 0.1W(1/10W) 1(Elec)/1(Mech)Turn 3mm (3 X 3.65 X 1.85mm) Foot Print SMD T/R - - - - - - - - - - - - - - - - - - - - - - - - - - - -<h3>Everlight Electronics Co Ltd EAST1616RGBB4 0606 RGB LED</h3> - -<p><li><b>Color:</b> RGB</li> -<li><b>Lens Transparency: </b> Clear</li> -<li><b>Lens Style/Size:</b> Rectangle with Flat top, 1.10 x 1.5 mm</li> -<li><b>mC Rating</b>45mcd Red, 35 mcd Green</li> -<li><b>Current:</b> 5mA Red, 5mA Green, 5mA</li> -<li><b>Forward Voltage: </b> 2V Red, 2V Green</li> -<li><b>Packages:</b> 0606</li> -</p> - -<p>SparkFun Products: -<ul><li><a href=”[https://www.sparkfun.com/products/12958]”>Electric Imp imp002 Breakout</a></li> -</ul></p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 2.54 mm (0.100") pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -https://media.digikey.com/pdf/Data%20Sheets/Vishay%20Semiconductors/V8KM60DU.pdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -https://www.onsemi.com/pub/Collateral/CM1293A-D.PDF - - - - - - - - - - - - - - - - - - - - - - - - - - -<B>DIODE</B><p> -high speed (Philips) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -302030031 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>AMP connector</b> - - - - - - - - - - - - - - - - - - - - - - -MCU, 8BIT, AVR, 8K FLASH, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -IC, OP AMP, 1.8V, DUAL, R-R - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>Test pad</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 2.54 mm (0.100") pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 1.25 mm (.049 inch) pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>CONNECTOR</b><p> -wire to board 1.25 mm (.049 inch) pitch header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - -Since Version 8.3, EAGLE supports the association of 3D packages -with devices in libraries, schematics, and board files. Those 3D -packages will not be understood (or retained) with this version. - - -Since Version 8.4, EAGLE supports properties for SPICE simulation. -Probes in schematics and SPICE mapping objects found in parts and library devices -will not be understood with this version. Update EAGLE to the latest version -for full support of SPICE simulation. - - - \ No newline at end of file From 30afcdd8b7be6f0fd13ab5e50c1eb692173c7a66 Mon Sep 17 00:00:00 2001 From: loredan13 Date: Thu, 6 Feb 2020 11:12:32 +0300 Subject: [PATCH 02/18] Added separate cmd file --- .../src/Pyr0_Piezo_Sensor_V2.x.x.cpp | 4 - .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h | 119 +++++++ .../src/pP_config.cpp | 109 +++++++ .../src/pP_function.h | 198 ++++-------- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 296 +++++++----------- .../src/pP_volatile.h | 7 + 6 files changed, 411 insertions(+), 322 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp index 6eae9d1..4062f02 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp @@ -84,10 +84,6 @@ update the voltMeterConstant variable in pP_config.h with the correct value ------------------------------------------------------------*/ -/* Debug output verbose mode will continuously output sensor readings - rather than waiting for user input */ -#define VERBOSE true - // Headers, variables, and functions #include #include diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h new file mode 100644 index 0000000..9e4d335 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h @@ -0,0 +1,119 @@ +#ifndef PP_CMD_H +#define PP_CMD_H + +#include "pP_config.h" +#include "pP_function.h" +#include "EEPROM.h" + +/*------------------------------------------------*/ + +void updateGainFactor(int value) +{ + if (value >= 0) + { + GAIN_FACTOR = value; + adjustGain(); + EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); + } +} + +/*------------------------------------------------*/ + +void updateVFol(int value) +{ + if (value >= 0) + { + followerThrs = value; + adjustFollow(); + EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); + } +} +/*------------------------------------------------*/ + +void updateVComp(int value) +{ + if (value >= 0) + { + compThrs = value; + adjustComp(); + EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); + } +} + +/*------------------------------------------------*/ + +void updateLoopDuration(int value) +{ + if (value >= 0) + { + LOOP_DUR = value; + EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); + } +} +/*------------------------------------------------*/ + +void updateTrigDuration(int value) +{ + if (value >= 0) + { + TRG_DUR = value; + EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); + } +} +/*------------------------------------------------*/ + +void updateHysteresis(int value) +{ + if (value >= 0) + { + Hyst = value; + EEPROM.put(HYST_ADDRESS, Hyst); + } +} +/*------------------------------------------------*/ + +void updateLogic(int value) +{ + if (value >= 0) + { + LOGIC = value; + EEPROM.put(LOGIC_ADDRESS, LOGIC); + pulse(); + } +} +/*------------------------------------------------*/ + +void updatePzDet(int value) +{ + if (value >= 0) + { + PZDET = value; + EEPROM.put(PZDET_ADDRESS, PZDET); + } +} +/*------------------------------------------------*/ + +void updateConstant(long value) +{ + if (value >= 0) + { + voltMeterConstant = value; + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); + } +} + +/*------------------------------------------------*/ + +void updateDebug(int value) +{ + if (value > 0) + { + Debug = 1; + } + else if (value == 0) + { + Debug = 0; + } +} + +#endif //PP_CMD_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index 7c74583..f284b6e 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -1,4 +1,5 @@ #include "pP_config.h" +#include "pP_function.h" #include int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x @@ -12,3 +13,111 @@ int PZDET = PZDET_DEFAULT; // Enable/disable piezo connection detection int Debug = 0; long voltMeterConstant = VM_CONST_DEFAULT; uint8_t pP_i2c_address = 0xa0; + +/*------------------------------------------------*/ +void eraseEEPROM() { + + setDefaultConfig(); + + EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); + EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); + EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); + EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); + EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); + EEPROM.put(HYST_ADDRESS, Hyst); + EEPROM.put(PZDET_ADDRESS, PZDET); + EEPROM.put(LOGIC_ADDRESS, LOGIC); + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); +} + +// Restore config from EEPROM, otherwise erase config and write to EEPROM +void restoreConfig() { + int temp; + + bool erase = false; + + EEPROM.get(GAIN_FACTOR_ADDRESS, temp); + if (temp < 0 || temp > 4) { + erase = true; + } else { + GAIN_FACTOR = temp; + } + + EEPROM.get(FOLLOWER_THRESHOLD_ADDRESS, temp); + if (temp < 0 || temp > 5000) { + erase = true; + } else { + followerThrs = temp; + } + + EEPROM.get(COMP_THRESHOLD_ADDRESS, temp); + if (temp < 0 || temp > 5000) { + erase = true; + } else { + compThrs = temp; + } + + EEPROM.get(LOOP_DUR_ADDRESS, temp); + if (temp < 0 && temp > 1000) { + erase = true; + } else { + LOOP_DUR = temp; + } + + EEPROM.get(TRG_DUR_ADDRESS, temp); + if (temp < 0 || temp > 1000) { + erase = true; + } else { + TRG_DUR = temp; + } + + EEPROM.get(HYST_ADDRESS, temp); + if (temp < 0 || temp > 1000) { + erase = true; + } else { + Hyst = temp; + } + + EEPROM.get(PZDET_ADDRESS, temp); + if (temp < 0 || temp > 1) { + erase = true; + } else { + PZDET = temp; + } + + EEPROM.get(LOGIC_ADDRESS, temp); + if (temp < 0 || temp > 1) { + erase = true; + } else { + LOGIC = temp; + } + + long longTemp; + EEPROM.get(VM_CONST_ADDRESS, longTemp); + if (longTemp < 1000000L || longTemp > 1200000L) { + erase = true; + } else { + voltMeterConstant = longTemp; + } + + if (erase) { + eraseEEPROM(); + } + + adjustFollow(); + adjustComp(); +} + +void setDefaultConfig() { + GAIN_FACTOR = GAIN_FACTOR_DEFAULT; + followerThrs = FOLLOWER_THRESHOLD_DEFAULT; + compThrs = COMP_THRESHOLD_DEFAULT; + LOOP_DUR = LOOP_DUR_DEFAULT; + TRG_DUR = TRG_DUR_DEFAULT; + Hyst = HYST_DEFAULT; + PZDET = PZDET_DEFAULT; + LOGIC = LOGIC_DEFAULT; + voltMeterConstant = VM_CONST_DEFAULT; + adjustFollow(); + adjustComp(); +} \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index d721f33..612d697 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -6,17 +6,29 @@ //#pragma once //#include "pP_function.h" -void digitalWriteFast(uint8_t pin, uint8_t x) { - if (pin / 8) { // pin >= 8 +#ifndef PP_FUNCTION_H +#define PP_FUNCTION_H + +#include "Arduino.h" +#include "pP_volatile.h" +#include "pP_pins.h" +#include "stdint.h" + +void digitalWriteFast(uint8_t pin, uint8_t x) +{ + if (pin / 8) + { // pin >= 8 PORTB ^= (-x ^ PORTB) & (1 << (pin % 8)); } - else { + else + { PORTD ^= (-x ^ PORTD) & (1 << (pin % 8)); } } int inline analogReadFast(byte ADCpin) -{ byte ADCSRAoriginal = ADCSRA; +{ + byte ADCSRAoriginal = ADCSRA; ADCSRA = (ADCSRA & B11111000) | 4; int adc = analogRead(ADCpin); ADCSRA = ADCSRAoriginal; @@ -25,13 +37,15 @@ int inline analogReadFast(byte ADCpin) /*------------------------------------------------*/ -void doubleFlash() { - BlinkCount = 4 ; +void doubleFlash() +{ + BlinkCount = 4; } /*------------------------------------------------*/ -void pulse() { +void pulse() +{ digitalWriteFast(TRG_OUT, LOGIC); sensorHReading = 1; delay(TRG_DUR); @@ -42,7 +56,8 @@ void pulse() { /*------------------------------------------------*/ -long readVcc() { +long readVcc() +{ // Read 1.1V reference against AVcc // Atmega's Secret Voltmeter setup: @@ -60,15 +75,16 @@ long readVcc() { delay(2); // Wait for vref to settle ADCSRA |= _BV(ADSC); // Start conversion - while (bit_is_set(ADCSRA,ADSC)); // measuring + while (bit_is_set(ADCSRA, ADSC)) + ; // measuring - uint8_t low = ADCL; // must read ADCL first - it then locks ADCH + uint8_t low = ADCL; // must read ADCL first - it then locks ADCH uint8_t high = ADCH; // unlocks both - long result = (high<<8) | low; + long result = (high << 8) | low; result = voltMeterConstant / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 - return result; // Vcc in millivolts + return result; // Vcc in millivolts } /*------------------------------------------------- @@ -88,26 +104,28 @@ If the scale_constant calculated is different from the default 1125300, update the voltMeterConstant variable in pP_config.h with the correct value --------------------------------------------------*/ - void readVin() { - VOld = Vin; - Vin = readVcc(); - followerLong = followerThrs * 1023L; - compLong = compThrs * 1023L; - followerInt = (long long) followerLong / Vin; - compInt = (long long) compLong / Vin; - followerInt = (int) followerInt; - compInt = (int) compInt; - } +void readVin() +{ + VOld = Vin; + Vin = readVcc(); + followerLong = followerThrs * 1023L; + compLong = compThrs * 1023L; + followerInt = (long long)followerLong / Vin; + compInt = (long long)compLong / Vin; + followerInt = (int)followerInt; + compInt = (int)compInt; +} /*------------------------------------------------*/ - void adjustFollow() { +void adjustFollow() +{ /* Compares diffs of threshold vs read value if positive, adjusts the follower to within the range set above*/ followerLong = followerThrs * 1023L; - followerInt = (long long) followerLong / Vin; - followerInt = (int) followerInt; + followerInt = (long long)followerLong / Vin; + followerInt = (int)followerInt; ADJ_FOLLOW = (followerInt / 4); // Analog output (PWM) of duty cycle @@ -116,25 +134,29 @@ update the voltMeterConstant variable in pP_config.h with the correct value /*------------------------------------------------*/ -void adjustComp() { +void adjustComp() +{ compLong = compThrs * 1023L; - compInt = (long long) compLong / Vin; - compInt = (int) compInt; + compInt = (long long)compLong / Vin; + compInt = (int)compInt; OCR1A = compInt; } /*------------------------------------------------*/ -void calibrateAlert() { +void calibrateAlert() +{ VLast = VOld - Vin; - if (VLast > Hyst || VLast < -Hyst ) { + if (VLast > Hyst || VLast < -Hyst) + { ERR_STATE = 1; } } /*------------------------------------------------*/ -void adjustGain() { +void adjustGain() +{ switch (GAIN_FACTOR) { case 4: @@ -184,118 +206,14 @@ void adjustGain() { /*------------------------------------------------*/ -void pzConCheck () { +void pzConCheck() +{ PZ_STATE = digitalRead(PZDET_PIN); - if (PZ_STATE == PZDET) { + if (PZ_STATE == PZDET) + { //digitalWriteFast(TRG_OUT, LOGIC); ERR_STATE = 1; } } -/*------------------------------------------------*/ -void eraseEEPROM() { - - setDefaultConfig(); - - EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); - EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); - EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); - EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); - EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); - EEPROM.put(HYST_ADDRESS, Hyst); - EEPROM.put(PZDET_ADDRESS, PZDET); - EEPROM.put(LOGIC_ADDRESS, LOGIC); - EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); -} - -// Restore config from EEPROM, otherwise erase config and write to EEPROM -void restoreConfig() { - int temp; - - bool erase = false; - - EEPROM.get(GAIN_FACTOR_ADDRESS, temp); - if (temp < 0 || temp > 4) { - erase = true; - } else { - GAIN_FACTOR = temp; - } - - EEPROM.get(FOLLOWER_THRESHOLD_ADDRESS, temp); - if (temp < 0 || temp > 5000) { - erase = true; - } else { - followerThrs = temp; - } - - EEPROM.get(COMP_THRESHOLD_ADDRESS, temp); - if (temp < 0 || temp > 5000) { - erase = true; - } else { - compThrs = temp; - } - - EEPROM.get(LOOP_DUR_ADDRESS, temp); - if (temp < 0 && temp > 1000) { - erase = true; - } else { - LOOP_DUR = temp; - } - - EEPROM.get(TRG_DUR_ADDRESS, temp); - if (temp < 0 || temp > 1000) { - erase = true; - } else { - TRG_DUR = temp; - } - - EEPROM.get(HYST_ADDRESS, temp); - if (temp < 0 || temp > 1000) { - erase = true; - } else { - Hyst = temp; - } - - EEPROM.get(PZDET_ADDRESS, temp); - if (temp < 0 || temp > 1) { - erase = true; - } else { - PZDET = temp; - } - - EEPROM.get(LOGIC_ADDRESS, temp); - if (temp < 0 || temp > 1) { - erase = true; - } else { - LOGIC = temp; - } - - long longTemp; - EEPROM.get(VM_CONST_ADDRESS, longTemp); - if (longTemp < 1000000L || longTemp > 1200000L) { - erase = true; - } else { - voltMeterConstant = longTemp; - } - - if (erase) { - eraseEEPROM(); - } - - adjustFollow(); - adjustComp(); -} - -void setDefaultConfig() { - GAIN_FACTOR = GAIN_FACTOR_DEFAULT; - followerThrs = FOLLOWER_THRESHOLD_DEFAULT; - compThrs = COMP_THRESHOLD_DEFAULT; - LOOP_DUR = LOOP_DUR_DEFAULT; - TRG_DUR = TRG_DUR_DEFAULT; - Hyst = HYST_DEFAULT; - PZDET = PZDET_DEFAULT; - LOGIC = LOGIC_DEFAULT; - voltMeterConstant = VM_CONST_DEFAULT; - adjustFollow(); - adjustComp(); -} +#endif //PP_FUNCTION_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 63af5e5..9f6b098 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -1,150 +1,73 @@ -void parseData() { +#include "pP_cmd.h" + +void parseData() +{ // split the data into its parts - + char *strtokIndx; // this is used by strtok() as an index - + strtokIndx = strtok(inputBuffer, " "); // get the first part - the string strcpy(serialMessageIn, strtokIndx); // copy it to serialMessageIn - - strtokIndx = strtok(NULL, " "); // this continues where the previous call left off - serialLong = atol(strtokIndx); // convert this part to an integer + strtokIndx = strtok(NULL, " "); // this continues where the previous call left off + serialLong = atol(strtokIndx); // convert this part to an integer } /*------------------------------------------------*/ -void identifyMarkers() { - - char x = Serial.read(); - #ifdef I2C_INPUT - char y = Wire.read(); - #endif // I2C_INPUT +void identifyMarkers() +{ - if (x == '\n' || x == '\r') { + char x = Serial.read(); +#ifdef I2C_INPUT + char y = Wire.read(); +#endif // I2C_INPUT + + if (x == '\n' || x == '\r') + { serialIncoming = true; inputBuffer[bytesRecvd] = 0; parseData(); bytesRecvd = 0; - } else { + } + else + { inputBuffer[bytesRecvd] = x; bytesRecvd++; - if (bytesRecvd == buffSize) { + if (bytesRecvd == buffSize) + { bytesRecvd = buffSize - 1; } } - #ifdef I2C_INPUT - if (y == '\n' || y == '\r') { - serialIncoming = true; - inputBuffer[bytesRecvd] = 0; - parseData(); - bytesRecvd = 0; - } else { - inputBuffer[bytesRecvd] = y; - bytesRecvd++; - if (bytesRecvd == buffSize) { - bytesRecvd = buffSize - 1; - } +#ifdef I2C_INPUT + if (y == '\n' || y == '\r') + { + serialIncoming = true; + inputBuffer[bytesRecvd] = 0; + parseData(); + bytesRecvd = 0; + } + else + { + inputBuffer[bytesRecvd] = y; + bytesRecvd++; + if (bytesRecvd == buffSize) + { + bytesRecvd = buffSize - 1; } - #endif + } +#endif } /*------------------------------------------------*/ -void updateGainFactor() +void serialPrintConfig() { - if (serialLong >= 0) { - GAIN_FACTOR = serialLong; - adjustGain(); - EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); - } -} - -/*------------------------------------------------*/ - -void updateVFol() { - if (serialLong >= 0) { - followerThrs = serialLong; - adjustFollow(); - EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); - } -} -/*------------------------------------------------*/ - -void updateVComp() { - if (serialLong >= 0) { - compThrs = serialLong; - adjustComp(); - EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); - } -} - -/*------------------------------------------------*/ - -void updateLoopDuration() { - if (serialLong >= 0) { - LOOP_DUR = serialLong; - EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); - } -} -/*------------------------------------------------*/ - -void updateTrigDuration() { - if (serialLong >= 0) { - TRG_DUR = serialLong; - EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); - } -} -/*------------------------------------------------*/ - -void updateHysteresis() { - if (serialLong >= 0) { - Hyst = serialLong; - EEPROM.put(HYST_ADDRESS, Hyst); - } -} -/*------------------------------------------------*/ - -void updateLogic() { - if (serialLong >= 0) { - LOGIC = serialLong; - EEPROM.put(LOGIC_ADDRESS, LOGIC); - pulse(); - } -} -/*------------------------------------------------*/ - -void updatePzDet() { - if (serialLong >= 0) { - PZDET = serialLong; - EEPROM.put(PZDET_ADDRESS, PZDET); - } -} -/*------------------------------------------------*/ - -void updateConstant() { - if (serialLong >= 0) { - voltMeterConstant = (long) serialLong; - EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); - } -} - -/*------------------------------------------------*/ - -void updateDebug() { - if (serialLong > 0) { - Debug = 1; - } else if (serialLong == 0) { - Debug = 0; - } -} - -/*------------------------------------------------*/ - -void serialPrintConfig() { Serial.print("GAIN_F "); Serial.print(GAIN_FACTOR); - switch (GAIN_FACTOR) { + switch (GAIN_FACTOR) + { case 0: Serial.println(" 3x"); break; @@ -188,12 +111,13 @@ void serialPrintConfig() { Serial.print("VM_CONST "); Serial.println(voltMeterConstant); - + Serial.print("Firmware Version "); Serial.println(PP_VERSION); } -void serialPrintState() { +void serialPrintState() +{ Serial.print("{"); Serial.print("\"Vcc\":"); @@ -201,11 +125,11 @@ void serialPrintState() { Serial.print(","); Serial.print("\"VComp\":"); - Serial.print((long) VComp * Vin / 1023); + Serial.print((long)VComp * Vin / 1023); Serial.print(","); Serial.print("\"VFol\":"); - Serial.print((long) VFol * Vin / 1023); + Serial.print((long)VFol * Vin / 1023); Serial.print(","); Serial.print("\"Err\":"); @@ -223,83 +147,99 @@ void serialPrintState() { Serial.println("}"); } -void updateParams() { +void updateParams() +{ serialIncoming = false; - if (strcmp(serialMessageIn, "GAIN_F") == 0) { - updateGainFactor(); + if (strcmp(serialMessageIn, "GAIN_F") == 0) + { + updateGainFactor(serialLong); } - else if (strcmp(serialMessageIn, "VFOL") == 0) { - updateVFol(); + else if (strcmp(serialMessageIn, "VFOL") == 0) + { + updateVFol(serialLong); } - else if (strcmp(serialMessageIn, "VCOMP") == 0) { - updateVComp(); + else if (strcmp(serialMessageIn, "VCOMP") == 0) + { + updateVComp(serialLong); } - else if (strcmp(serialMessageIn, "LOOP_D") == 0) { - updateLoopDuration(); + else if (strcmp(serialMessageIn, "LOOP_D") == 0) + { + updateLoopDuration(serialLong); } - else if (strcmp(serialMessageIn, "TRG_D") == 0) { - updateTrigDuration(); + else if (strcmp(serialMessageIn, "TRG_D") == 0) + { + updateTrigDuration(serialLong); } - else if (strcmp(serialMessageIn, "HYST") == 0) { - updateHysteresis(); + else if (strcmp(serialMessageIn, "HYST") == 0) + { + updateHysteresis(serialLong); } - else if (strcmp(serialMessageIn, "LOGIC") == 0) { - updateLogic(); + else if (strcmp(serialMessageIn, "LOGIC") == 0) + { + updateLogic(serialLong); } - else if (strcmp(serialMessageIn, "PZDET") == 0) { - updatePzDet(); + else if (strcmp(serialMessageIn, "PZDET") == 0) + { + updatePzDet(serialLong); } - else if (strcmp(serialMessageIn, "CONST") == 0) { - updateConstant(); + else if (strcmp(serialMessageIn, "CONST") == 0) + { + updateConstant(serialLong); } - else if (strcmp(serialMessageIn, "DEBUG") == 0) { - updateDebug(); + else if (strcmp(serialMessageIn, "DEBUG") == 0) + { + updateDebug(serialLong); } - else if (strcmp(serialMessageIn, "CONFIG") == 0) { + else if (strcmp(serialMessageIn, "CONFIG") == 0) + { serialPrintConfig(); } - else if (strcmp(serialMessageIn, "ERASE") == 0) { + else if (strcmp(serialMessageIn, "ERASE") == 0) + { eraseEEPROM(); serialPrintConfig(); } - else if (strcmp(serialMessageIn, "STATE") == 0) { + else if (strcmp(serialMessageIn, "STATE") == 0) + { serialPrintState(); } - else if (strcmp(serialMessageIn, "HELP") == 0) { - #if defined(ARDUINO_AVR_ATmega328PB) - Serial.println("To change gain factor: GAIN_F [integer for gain state - see note*]"); - Serial.println("To change voltage follower voltage (low threshold): VFOL [float value]"); - Serial.println("To change comparator voltage (high threshold): VCOMP [float value]"); - Serial.println("To change main loop period: LOOP_D [integer for milliseconds]"); - Serial.println("To change trigger active duration: TRG_D [integer for milliseconds]"); - Serial.println("To change the output logic: LOGIC [0|1]"); - Serial.println(" (0 for active low, 1 for active high)"); - Serial.println("To enable piezo plugged detection: PZDET [0|1]"); - Serial.println(" (0 for disabled, 1 for enabled)"); - Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); - Serial.println("To enable or disable debug output: DEBUG [0|1]"); - Serial.println("To print current config: CONFIG"); - Serial.println("To set config to defaults: ERASE"); - Serial.println("To print current state: STATE"); - Serial.println(""); - Serial.println("Commands are entered in this format:"); - Serial.println("CMD VAL"); - Serial.println("Commands are confirmed with Enter key"); - Serial.println(""); - Serial.println("Examples:"); - Serial.println("GAIN_F 3 <~ set gain factor to index 3 (6x)"); - Serial.println("VFOL 2350 <~ set the vref floor to 2.35V"); - #else - Serial.println("Check docs.pyroballpcbs.com/config"); - #endif // defined(ARDUINO_AVR_ATmega328PB) + else if (strcmp(serialMessageIn, "HELP") == 0) + { +#if defined(ARDUINO_AVR_ATmega328PB) + Serial.println("To change gain factor: GAIN_F [integer for gain state - see note*]"); + Serial.println("To change voltage follower voltage (low threshold): VFOL [float value]"); + Serial.println("To change comparator voltage (high threshold): VCOMP [float value]"); + Serial.println("To change main loop period: LOOP_D [integer for milliseconds]"); + Serial.println("To change trigger active duration: TRG_D [integer for milliseconds]"); + Serial.println("To change the output logic: LOGIC [0|1]"); + Serial.println(" (0 for active low, 1 for active high)"); + Serial.println("To enable piezo plugged detection: PZDET [0|1]"); + Serial.println(" (0 for disabled, 1 for enabled)"); + Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); + Serial.println("To enable or disable debug output: DEBUG [0|1]"); + Serial.println("To print current config: CONFIG"); + Serial.println("To set config to defaults: ERASE"); + Serial.println("To print current state: STATE"); + Serial.println(""); + Serial.println("Commands are entered in this format:"); + Serial.println("CMD VAL"); + Serial.println("Commands are confirmed with Enter key"); + Serial.println(""); + Serial.println("Examples:"); + Serial.println("GAIN_F 3 <~ set gain factor to index 3 (6x)"); + Serial.println("VFOL 2350 <~ set the vref floor to 2.35V"); +#else + Serial.println("Check docs.pyroballpcbs.com/config"); +#endif // defined(ARDUINO_AVR_ATmega328PB) } parseData(); -} +} - -void serialInput() { +void serialInput() +{ // receive data from Serial and save it into inputBuffer - if (Serial.available() > 0) { + if (Serial.available() > 0) + { // the order of these IF clauses is significant identifyMarkers(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h index a3f5e07..ac1c5eb 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h @@ -1,3 +1,8 @@ +#ifndef PP_VOLATILE_H +#define PP_VOLATILE_H + +#include "LightChrono.h" + // these variables will change on their own. Do not edit ANYTHING below this line volatile int sensorHReading = 0; // variable to store the value read from the sensor pin volatile int ADJ_FOLLOW = 0; // Variable for Follower adjustment @@ -41,3 +46,5 @@ long serialLong = 0; // Task scheduler instances LightChrono mainLoop; + +#endif //PP_VOLATILE_H \ No newline at end of file From 36b6402b2e1bf0a174e935cc42dd0559d939d87c Mon Sep 17 00:00:00 2001 From: loredan13 Date: Thu, 6 Feb 2020 19:06:46 +0300 Subject: [PATCH 03/18] Attempt at fixing compile error --- .../src/pP_config.cpp | 12 ----- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 48 +++++-------------- .../src/pP_function.h | 1 + 3 files changed, 14 insertions(+), 47 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index f284b6e..d7225ca 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -2,18 +2,6 @@ #include "pP_function.h" #include -int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x -int followerThrs = FOLLOWER_THRESHOLD_DEFAULT; -int compThrs = COMP_THRESHOLD_DEFAULT; -int LOOP_DUR = LOOP_DUR_DEFAULT; // duration of time between ADC checks and other loop functions -int TRG_DUR = TRG_DUR_DEFAULT; // duration of the Z-axis pulse sent, in ms -int Hyst = HYST_DEFAULT; // Hysteresis value for ADC measurements -int LOGIC = LOGIC_DEFAULT; // Trigger output logic (active low or active high) -int PZDET = PZDET_DEFAULT; // Enable/disable piezo connection detection -int Debug = 0; -long voltMeterConstant = VM_CONST_DEFAULT; -uint8_t pP_i2c_address = 0xa0; - /*------------------------------------------------*/ void eraseEEPROM() { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index abe8a97..92d31e9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -5,71 +5,49 @@ #define GAIN_FACTOR_DEFAULT 2 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x #define GAIN_FACTOR_ADDRESS 0 -#if !(defined(GAIN_FACTOR)) - extern int GAIN_FACTOR; -#endif +int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; #define FOLLOWER_THRESHOLD_DEFAULT 1450 // Voltage follower default voltage in mV #define FOLLOWER_THRESHOLD_ADDRESS 4 -#if !(defined(followerThrs)) - extern int followerThrs; -#endif +int followerThrs = 1450; #define COMP_THRESHOLD_DEFAULT 2850 // Comparatore Vref default voltage in mV #define COMP_THRESHOLD_ADDRESS 8 -#if !(defined(compThrs)) - extern int compThrs; -#endif +int compThrs = COMP_THRESHOLD_DEFAULT; #ifndef InitCount - #define InitCount 6 // Number of times to blink the LED on start +#define InitCount 6 // Number of times to blink the LED on start #endif #define LOOP_DUR_DEFAULT 50 // duration of time between ADC checks and other loop functions #define LOOP_DUR_ADDRESS 12 -#if !(defined(LOOP_DUR)) - extern int LOOP_DUR; -#endif +int LOOP_DUR = LOOP_DUR_DEFAULT; #define TRG_DUR_DEFAULT 20 // duration of the Z-axis pulse sent, in ms #define TRG_DUR_ADDRESS 16 -#if !(defined(TRG_DUR)) - extern int TRG_DUR; -#endif +int TRG_DUR = TRG_DUR_DEFAULT; #define HYST_DEFAULT 20 #define HYST_ADDRESS 20 -#if !(defined(Hyst)) - extern int Hyst; // Hysteresis value for ADC measurements -#endif +int Hyst = HYST_DEFAULT; // Hysteresis value for ADC measurements #define LOGIC_DEFAULT 1 #define LOGIC_ADDRESS 32 -#if !(defined(LOGIC)) - extern int LOGIC; // Trigger logic scheme, Active LOW is default -#endif +int LOGIC = LOGIC_DEFAULT; // Trigger logic scheme, Active LOW is default #define PZDET_DEFAULT 0 #define PZDET_ADDRESS 26 -#if !(defined(PZDET)) - extern int PZDET; // Enable or disable piezo connection detection, default is off -#endif +int PZDET = PZDET_DEFAULT; // Enable or disable piezo connection detection, default is off -#if !(defined(Debug)) - extern int Debug; -#endif +int Debug = 0; #define VM_CONST_ADDRESS 28 #define VM_CONST_DEFAULT 1125300L -#if !(defined(voltMeterConstant)) - extern long voltMeterConstant; // For fine tuning input voltage sense -#endif +long voltMeterConstant = VM_CONST_DEFAULT; // For fine tuning input voltage sense #ifdef I2C_INPUT - #define I2C_SLAVE_ADDRESS 24 - #if !(defined(pP_i2c_address)) - extern uint8_t pP_i2c_address; // I2C Bus Address - #endif +#define I2C_SLAVE_ADDRESS 24 +uint8_t pP_i2c_address = 0xa0; // I2C Bus Address #endif // I2C_INPUT void eraseEEPROM(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index 612d697..5bc2061 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -10,6 +10,7 @@ #define PP_FUNCTION_H #include "Arduino.h" +#include "pP_config.h" #include "pP_volatile.h" #include "pP_pins.h" #include "stdint.h" From bf800e99409aa2a77a68f65a6380e21cf10abf8a Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Wed, 19 Feb 2020 03:32:22 +0300 Subject: [PATCH 04/18] Separating declaration and definition - volatile --- .../src/Pyr0_Piezo_Sensor_V2.x.x.cpp | 2 +- .../src/pP_volatile.cpp | 36 ++++++++++++++++++ .../src/pP_volatile.h | 37 ++++++++++--------- 3 files changed, 56 insertions(+), 19 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp index 4062f02..a5ddd49 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp @@ -89,7 +89,7 @@ update the voltMeterConstant variable in pP_config.h with the correct value #include #include "LightChrono.h" #include "pP_pins.h" -#include "pP_config.h" +// #include "pP_config.h" #include "pP_volatile.h" #include "pP_function.h" #include "pP_serial.h" diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp new file mode 100644 index 0000000..1906e14 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp @@ -0,0 +1,36 @@ +#include "pP_volatile.h" +#include "pP_config.h" +#include "stdint.h" + +// these variables will change on their own. Do not edit ANYTHING below this line +volatile int sensorHReading = 0; // variable to store the value read from the sensor pin +volatile int ADJ_FOLLOW = 0; // Variable for Follower adjustment +volatile int ADJ_COMP = 0; // Variable for Comparator adjustment +volatile int ERR_STATE = 0; +volatile int PZ_STATE = 0; + +int Vin = 5000; // input reference voltage in millivolts (multiply V by 1000) +int VOld = 5000; // Variable to store previous cycle's Vin +int VLast = 0; + +// Convert threshold values based on the input voltage + +long followerLong = followerThrs * 1023L; +long compLong = compThrs * 1023L; + +// Voltage Comparator Adjustment parameters +int VComp = 0; + +// Voltage Follower Adjustment parameters +int VFol = 0; + +// Error blink parameters + +int BlinkState = 0; +int BlinkCount = (InitCount * 2) + 1; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after + +// Serial Input Parsing Variables +uint8_t bytesRecvd = 0; +bool serialIncoming = false; +char serialMessageIn[buffSize] = {0}; +long serialLong = 0; \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h index ac1c5eb..7dd9c27 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h @@ -2,44 +2,45 @@ #define PP_VOLATILE_H #include "LightChrono.h" +#include "stdint.h" // these variables will change on their own. Do not edit ANYTHING below this line -volatile int sensorHReading = 0; // variable to store the value read from the sensor pin -volatile int ADJ_FOLLOW = 0; // Variable for Follower adjustment -volatile int ADJ_COMP = 0; // Variable for Comparator adjustment -volatile int ERR_STATE = 0; -volatile int PZ_STATE = 0; +extern volatile int sensorHReading; // variable to store the value read from the sensor pin +extern volatile int ADJ_FOLLOW; // Variable for Follower adjustment +extern volatile int ADJ_COMP; // Variable for Comparator adjustment +extern volatile int ERR_STATE; +extern volatile int PZ_STATE; -int Vin = 5000; // input reference voltage in millivolts (multiply V by 1000) -int VOld = 5000; // Variable to store previous cycle's Vin -int VLast = 0; +extern int Vin; // input reference voltage in millivolts (multiply V by 1000) +extern int VOld; // Variable to store previous cycle's Vin +extern int VLast; // Convert threshold values based on the input voltage -long followerLong = followerThrs * 1023L; -long compLong = compThrs * 1023L; +extern long followerLong; +extern long compLong; long followerInt; long compInt; // Voltage Comparator Adjustment parameters -int VComp = 0; +extern int VComp; // Voltage Follower Adjustment parameters -int VFol = 0; +extern int VFol; // Error blink parameters -int BlinkState = 0; -int BlinkCount = (InitCount * 2) + 1; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after +extern int BlinkState; +extern int BlinkCount; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after // Serial Input Parsing Variables #define buffSize 40 char inputBuffer[buffSize]; #define endMarker '\n' -byte bytesRecvd = 0; -bool serialIncoming = false; -char serialMessageIn[buffSize] = {0}; -long serialLong = 0; +extern uint8_t bytesRecvd; +extern bool serialIncoming; +extern char serialMessageIn[buffSize]; +extern long serialLong; //#define LOW 0 //#define HIGH 1 From 60a26ad3f713238cdc536b0302aa6de5a44fa6f2 Mon Sep 17 00:00:00 2001 From: loredan13 Date: Wed, 19 Feb 2020 19:25:24 +0300 Subject: [PATCH 05/18] More separation of declaration and definition --- .../src/pP_config.cpp | 11 + .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 20 +- .../src/pP_function.cpp | 216 ++++++++++++++++++ .../src/pP_function.h | 189 +-------------- .../src/pP_volatile.cpp | 7 +- .../src/pP_volatile.h | 8 +- 6 files changed, 258 insertions(+), 193 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index d7225ca..a1f426b 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -2,6 +2,17 @@ #include "pP_function.h" #include +int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; +int followerThrs = FOLLOWER_THRESHOLD_DEFAULT; +int compThrs = COMP_THRESHOLD_DEFAULT; +int LOOP_DUR = LOOP_DUR_DEFAULT; +int TRG_DUR = TRG_DUR_DEFAULT; +int Hyst = HYST_DEFAULT; +int LOGIC = LOGIC_DEFAULT; +int PZDET = PZDET_DEFAULT; +int Debug = 0; +long voltMeterConstant = VM_CONST_DEFAULT; + /*------------------------------------------------*/ void eraseEEPROM() { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index 92d31e9..14ae5ee 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -5,15 +5,15 @@ #define GAIN_FACTOR_DEFAULT 2 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x #define GAIN_FACTOR_ADDRESS 0 -int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; +extern int GAIN_FACTOR; #define FOLLOWER_THRESHOLD_DEFAULT 1450 // Voltage follower default voltage in mV #define FOLLOWER_THRESHOLD_ADDRESS 4 -int followerThrs = 1450; +extern int followerThrs; #define COMP_THRESHOLD_DEFAULT 2850 // Comparatore Vref default voltage in mV #define COMP_THRESHOLD_ADDRESS 8 -int compThrs = COMP_THRESHOLD_DEFAULT; +extern int compThrs; #ifndef InitCount #define InitCount 6 // Number of times to blink the LED on start @@ -21,29 +21,29 @@ int compThrs = COMP_THRESHOLD_DEFAULT; #define LOOP_DUR_DEFAULT 50 // duration of time between ADC checks and other loop functions #define LOOP_DUR_ADDRESS 12 -int LOOP_DUR = LOOP_DUR_DEFAULT; +extern int LOOP_DUR; #define TRG_DUR_DEFAULT 20 // duration of the Z-axis pulse sent, in ms #define TRG_DUR_ADDRESS 16 -int TRG_DUR = TRG_DUR_DEFAULT; +extern int TRG_DUR; #define HYST_DEFAULT 20 #define HYST_ADDRESS 20 -int Hyst = HYST_DEFAULT; // Hysteresis value for ADC measurements +extern int Hyst; // Hysteresis value for ADC measurements #define LOGIC_DEFAULT 1 #define LOGIC_ADDRESS 32 -int LOGIC = LOGIC_DEFAULT; // Trigger logic scheme, Active LOW is default +extern int LOGIC; // Trigger logic scheme, Active LOW is default #define PZDET_DEFAULT 0 #define PZDET_ADDRESS 26 -int PZDET = PZDET_DEFAULT; // Enable or disable piezo connection detection, default is off +extern int PZDET; // Enable or disable piezo connection detection, default is off -int Debug = 0; +extern int Debug; #define VM_CONST_ADDRESS 28 #define VM_CONST_DEFAULT 1125300L -long voltMeterConstant = VM_CONST_DEFAULT; // For fine tuning input voltage sense +extern long voltMeterConstant; // For fine tuning input voltage sense #ifdef I2C_INPUT #define I2C_SLAVE_ADDRESS 24 diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp new file mode 100644 index 0000000..44e8332 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp @@ -0,0 +1,216 @@ +/* + pyr0-piezo functions library + Created by Alan "pyr0ball" Weinstock 6/26/2019 +*/ + +//#pragma once +//#include "pP_function.h" + +#include "pP_function.h" +#include "Arduino.h" +#include "pP_config.h" +#include "pP_volatile.h" +#include "pP_pins.h" +#include "stdint.h" + +void digitalWriteFast(uint8_t pin, uint8_t x) +{ + if (pin / 8) + { // pin >= 8 + PORTB ^= (-x ^ PORTB) & (1 << (pin % 8)); + } + else + { + PORTD ^= (-x ^ PORTD) & (1 << (pin % 8)); + } +} + +int analogReadFast(uint8_t ADCpin) +{ + byte ADCSRAoriginal = ADCSRA; + ADCSRA = (ADCSRA & B11111000) | 4; + int adc = analogRead(ADCpin); + ADCSRA = ADCSRAoriginal; + return adc; +} + +/*------------------------------------------------*/ + +void doubleFlash() +{ + BlinkCount = 4; +} + +/*------------------------------------------------*/ + +void pulse() +{ + digitalWriteFast(TRG_OUT, LOGIC); + sensorHReading = 1; + delay(TRG_DUR); + digitalWriteFast(TRG_OUT, !LOGIC); + Serial.println("Trig'd!"); + doubleFlash(); +} + +/*------------------------------------------------*/ + +long readVcc() +{ + // Read 1.1V reference against AVcc + + // Atmega's Secret Voltmeter setup: + // set the reference to Vcc and the measurement to the internal 1.1V reference +#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); +#elif defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) + ADMUX = _BV(MUX5) | _BV(MUX0); +#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) + ADMUX = _BV(MUX3) | _BV(MUX2); +#else + ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); +#endif + + delay(2); // Wait for vref to settle + + ADCSRA |= _BV(ADSC); // Start conversion + while (bit_is_set(ADCSRA, ADSC)) + ; // measuring + + uint8_t low = ADCL; // must read ADCL first - it then locks ADCH + uint8_t high = ADCH; // unlocks both + + long result = (high << 8) | low; + + result = voltMeterConstant / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 + return result; // Vcc in millivolts +} + +/*------------------------------------------------- +The above function assumes an "ideal" multiplier constant. +Each Atmega chip is slightly different, so it won't be completely accurate +without tuning. Most of the time this won't be necessary, so don't mess +with this if you don't know what you're doing! +The reading can be fine-tuned by using a multimeter, and this equation: + +scale_constant = internal1.1Ref * 1023 * 1000 + +where + +internal1.1Ref = 1.1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function) + +If the scale_constant calculated is different from the default 1125300, +update the voltMeterConstant variable in pP_config.h with the correct value +--------------------------------------------------*/ + +void readVin() +{ + VOld = Vin; + Vin = readVcc(); + followerLong = followerThrs * 1023L; + compLong = compThrs * 1023L; + followerInt = (long long)followerLong / Vin; + compInt = (long long)compLong / Vin; + followerInt = (int)followerInt; + compInt = (int)compInt; +} + +/*------------------------------------------------*/ + +void adjustFollow() +{ + /* Compares diffs of threshold vs read value + if positive, adjusts the follower to within + the range set above*/ + followerLong = followerThrs * 1023L; + followerInt = (long long)followerLong / Vin; + followerInt = (int)followerInt; + ADJ_FOLLOW = (followerInt / 4); + + // Analog output (PWM) of duty cycle + OCR2B = ADJ_FOLLOW; +} + +/*------------------------------------------------*/ + +void adjustComp() +{ + compLong = compThrs * 1023L; + compInt = (long long)compLong / Vin; + compInt = (int)compInt; + OCR1A = compInt; +} + +/*------------------------------------------------*/ + +void calibrateAlert() +{ + VLast = VOld - Vin; + if (VLast > Hyst || VLast < -Hyst) + { + ERR_STATE = 1; + } +} + +/*------------------------------------------------*/ + +void adjustGain() +{ + switch (GAIN_FACTOR) + { + case 4: + pinMode(GADJ_R0, OUTPUT); + digitalWriteFast(GADJ_R0, LOW); + break; + case 3: + pinMode(GADJ_R1, OUTPUT); + digitalWriteFast(GADJ_R1, LOW); + pinMode(GADJ_R0, INPUT); + break; + case 2: + pinMode(GADJ_R2, OUTPUT); + digitalWriteFast(GADJ_R2, LOW); + pinMode(GADJ_R1, INPUT); + pinMode(GADJ_R0, INPUT); + break; + case 1: + pinMode(GADJ_R3, OUTPUT); + digitalWriteFast(GADJ_R3, LOW); + pinMode(GADJ_R2, INPUT); + pinMode(GADJ_R1, INPUT); + pinMode(GADJ_R0, INPUT); + break; + case 0: + default: + pinMode(GADJ_R3, INPUT); + pinMode(GADJ_R2, INPUT); + pinMode(GADJ_R1, INPUT); + pinMode(GADJ_R0, INPUT); + break; + } +} + +/*------------------------------------------------*/ + +//void checkError () { +// if (ERR_STATE == 1) { +// digitalWriteFast(ERR_LED, BlinkState); +// BlinkState = !BlinkState; +// } +// else if (ERR_STATE == 0) { +// BlinkState = LOW; +// digitalWriteFast(ERR_LED, BlinkState); +// } +//} + +/*------------------------------------------------*/ + +void pzConCheck() +{ + PZ_STATE = digitalRead(PZDET_PIN); + if (PZ_STATE == PZDET) + { + //digitalWriteFast(TRG_OUT, LOGIC); + ERR_STATE = 1; + } +} \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index 5bc2061..beecc0b 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -9,84 +9,13 @@ #ifndef PP_FUNCTION_H #define PP_FUNCTION_H -#include "Arduino.h" -#include "pP_config.h" -#include "pP_volatile.h" -#include "pP_pins.h" #include "stdint.h" -void digitalWriteFast(uint8_t pin, uint8_t x) -{ - if (pin / 8) - { // pin >= 8 - PORTB ^= (-x ^ PORTB) & (1 << (pin % 8)); - } - else - { - PORTD ^= (-x ^ PORTD) & (1 << (pin % 8)); - } -} - -int inline analogReadFast(byte ADCpin) -{ - byte ADCSRAoriginal = ADCSRA; - ADCSRA = (ADCSRA & B11111000) | 4; - int adc = analogRead(ADCpin); - ADCSRA = ADCSRAoriginal; - return adc; -} - -/*------------------------------------------------*/ - -void doubleFlash() -{ - BlinkCount = 4; -} - -/*------------------------------------------------*/ - -void pulse() -{ - digitalWriteFast(TRG_OUT, LOGIC); - sensorHReading = 1; - delay(TRG_DUR); - digitalWriteFast(TRG_OUT, !LOGIC); - Serial.println("Trig'd!"); - doubleFlash(); -} - -/*------------------------------------------------*/ - -long readVcc() -{ - // Read 1.1V reference against AVcc - - // Atmega's Secret Voltmeter setup: - // set the reference to Vcc and the measurement to the internal 1.1V reference -#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) - ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); -#elif defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) - ADMUX = _BV(MUX5) | _BV(MUX0); -#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) - ADMUX = _BV(MUX3) | _BV(MUX2); -#else - ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); -#endif - - delay(2); // Wait for vref to settle - - ADCSRA |= _BV(ADSC); // Start conversion - while (bit_is_set(ADCSRA, ADSC)) - ; // measuring - - uint8_t low = ADCL; // must read ADCL first - it then locks ADCH - uint8_t high = ADCH; // unlocks both - - long result = (high << 8) | low; - - result = voltMeterConstant / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 - return result; // Vcc in millivolts -} +void digitalWriteFast(uint8_t pin, uint8_t x); +int analogReadFast(uint8_t ADCpin); +void doubleFlash(); +void pulse(); +long readVcc(); /*------------------------------------------------- The above function assumes an "ideal" multiplier constant. @@ -104,96 +33,11 @@ internal1.1Ref = 1.1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function) If the scale_constant calculated is different from the default 1125300, update the voltMeterConstant variable in pP_config.h with the correct value --------------------------------------------------*/ - -void readVin() -{ - VOld = Vin; - Vin = readVcc(); - followerLong = followerThrs * 1023L; - compLong = compThrs * 1023L; - followerInt = (long long)followerLong / Vin; - compInt = (long long)compLong / Vin; - followerInt = (int)followerInt; - compInt = (int)compInt; -} - -/*------------------------------------------------*/ - -void adjustFollow() -{ - /* Compares diffs of threshold vs read value - if positive, adjusts the follower to within - the range set above*/ - followerLong = followerThrs * 1023L; - followerInt = (long long)followerLong / Vin; - followerInt = (int)followerInt; - ADJ_FOLLOW = (followerInt / 4); - - // Analog output (PWM) of duty cycle - OCR2B = ADJ_FOLLOW; -} - -/*------------------------------------------------*/ - -void adjustComp() -{ - compLong = compThrs * 1023L; - compInt = (long long)compLong / Vin; - compInt = (int)compInt; - OCR1A = compInt; -} - -/*------------------------------------------------*/ - -void calibrateAlert() -{ - VLast = VOld - Vin; - if (VLast > Hyst || VLast < -Hyst) - { - ERR_STATE = 1; - } -} - -/*------------------------------------------------*/ - -void adjustGain() -{ - switch (GAIN_FACTOR) - { - case 4: - pinMode(GADJ_R0, OUTPUT); - digitalWriteFast(GADJ_R0, LOW); - break; - case 3: - pinMode(GADJ_R1, OUTPUT); - digitalWriteFast(GADJ_R1, LOW); - pinMode(GADJ_R0, INPUT); - break; - case 2: - pinMode(GADJ_R2, OUTPUT); - digitalWriteFast(GADJ_R2, LOW); - pinMode(GADJ_R1, INPUT); - pinMode(GADJ_R0, INPUT); - break; - case 1: - pinMode(GADJ_R3, OUTPUT); - digitalWriteFast(GADJ_R3, LOW); - pinMode(GADJ_R2, INPUT); - pinMode(GADJ_R1, INPUT); - pinMode(GADJ_R0, INPUT); - break; - case 0: - default: - pinMode(GADJ_R3, INPUT); - pinMode(GADJ_R2, INPUT); - pinMode(GADJ_R1, INPUT); - pinMode(GADJ_R0, INPUT); - break; - } -} - -/*------------------------------------------------*/ - +void readVin(); +void adjustFollow(); +void adjustComp(); +void calibrateAlert(); +void adjustGain(); //void checkError () { // if (ERR_STATE == 1) { // digitalWriteFast(ERR_LED, BlinkState); @@ -204,17 +48,6 @@ void adjustGain() // digitalWriteFast(ERR_LED, BlinkState); // } //} - -/*------------------------------------------------*/ - -void pzConCheck() -{ - PZ_STATE = digitalRead(PZDET_PIN); - if (PZ_STATE == PZDET) - { - //digitalWriteFast(TRG_OUT, LOGIC); - ERR_STATE = 1; - } -} +void pzConCheck(); #endif //PP_FUNCTION_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp index 1906e14..c7ab7b1 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp @@ -17,6 +17,8 @@ int VLast = 0; long followerLong = followerThrs * 1023L; long compLong = compThrs * 1023L; +long followerInt = 0; +long compInt = 0; // Voltage Comparator Adjustment parameters int VComp = 0; @@ -30,7 +32,10 @@ int BlinkState = 0; int BlinkCount = (InitCount * 2) + 1; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after // Serial Input Parsing Variables +char inputBuffer[buffSize]; uint8_t bytesRecvd = 0; bool serialIncoming = false; char serialMessageIn[buffSize] = {0}; -long serialLong = 0; \ No newline at end of file +long serialLong = 0; + +LightChrono mainLoop; \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h index 7dd9c27..8d2d9ad 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h @@ -19,8 +19,8 @@ extern int VLast; extern long followerLong; extern long compLong; -long followerInt; -long compInt; +extern long followerInt; +extern long compInt; // Voltage Comparator Adjustment parameters extern int VComp; @@ -35,7 +35,7 @@ extern int BlinkCount; // Multiply Blink count by 2 to handle toggle state, ad // Serial Input Parsing Variables #define buffSize 40 -char inputBuffer[buffSize]; +extern char inputBuffer[buffSize]; #define endMarker '\n' extern uint8_t bytesRecvd; extern bool serialIncoming; @@ -46,6 +46,6 @@ extern long serialLong; //#define HIGH 1 // Task scheduler instances -LightChrono mainLoop; +extern LightChrono mainLoop; #endif //PP_VOLATILE_H \ No newline at end of file From 12f86c971b6423e21b550d0ae3377014a091d48b Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 27 Feb 2020 12:34:10 -0800 Subject: [PATCH 06/18] Added code for switching between 3.3v and 5v signal output #featureadd - Fixes #67 --- .../src/Pyr0_Piezo_Sensor_V2.x.x.cpp | 15 +++++++++---- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h | 10 +++++++++ .../src/pP_config.cpp | 10 +++++++++ .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 6 +++++- .../src/pP_function.cpp | 17 +++++++++++++++ .../src/pP_function.h | 1 + .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h | 3 ++- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 21 +++++++++++++++++++ 8 files changed, 77 insertions(+), 6 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp index a5ddd49..5cf11c7 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp @@ -11,10 +11,11 @@ * PC0 ADC0 (Voltage Reference Check 'A0') * PC1 ADC1 (Sensitivity Adjustment Check 'A1') * PD4 PCINT20 (Error feedback LED 'D4') - * PB6 PCINT6 (Voltage Adjustment Resistor 0 'D20') - * PB7 PCINT7 (Voltage Adjustment Resistor 1 'D21') - * PD5 T1 (Voltage Adjustment Resistor 2 'D5') - * PD6 PCINT22 (Voltage Adjustment Resistor 3 'D6') + * PB6 PCINT6 (Gain Adjustment Resistor 0 'D20') + * PB7 PCINT7 (Gain Adjustment Resistor 1 'D21') + * PD5 T1 (Gain Adjustment Resistor 2 'D5') + * PD6 PCINT22 (Gain Adjustment Resistor 3 'D6') + * PB0 PCINT0 (VCC Adjustment Resistors 'D8') * PB1 OC1A (Comparator VRef PWM Out 'D9') * PD3 OC2B (Voltage Follower VRef PWM Out 'D3') @@ -36,6 +37,7 @@ To change trigger active duration: TRG_D [integer for milliseconds] To change gain factor: GAIN_F [integer for gain state - see note*] To change the output logic: LOGIC [0|1] (0 for active low, 1 for active high) To enable piezo plugged detection: PZDET [0|1] (0 for disabled, 1 for enabled) +To set the sensor's output voltage: VCCSW [0|1] (0 for 3.3v, 1 for 5v) To change ADC hysteresis value: HYST [integer in millivolts] To change sensor input pullup vRef low threshold: VFOL [integer in millivolts] To change comparator trigger high threshold: VCOMP [integer in millivolts] @@ -128,6 +130,8 @@ void setup() { adjustGain(); + adjustVcc(); + digitalWriteFast(TRG_OUT, !LOGIC); } @@ -155,6 +159,9 @@ void loop() { // Set the amplification gain factor adjustGain(); + // Set the VCC input switch + adjustVcc(); + // Check voltage of first and second stages and compare against thresholds readVin(); VComp = analogReadFast(VCOMP_SENSE_PIN); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h index 9e4d335..a183a2e 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h @@ -93,6 +93,16 @@ void updatePzDet(int value) } /*------------------------------------------------*/ +void updateVccSwitch(int value) +{ + if (value >= 0) + { + VCCSW = value; + EEPROM.put(VCCSW_ADDRESS, VCCSW); + } +} +/*------------------------------------------------*/ + void updateConstant(long value) { if (value >= 0) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index a1f426b..a44357d 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -10,6 +10,7 @@ int TRG_DUR = TRG_DUR_DEFAULT; int Hyst = HYST_DEFAULT; int LOGIC = LOGIC_DEFAULT; int PZDET = PZDET_DEFAULT; +int VCCSW = VCCSW_DEFAULT; int Debug = 0; long voltMeterConstant = VM_CONST_DEFAULT; @@ -26,6 +27,7 @@ void eraseEEPROM() { EEPROM.put(HYST_ADDRESS, Hyst); EEPROM.put(PZDET_ADDRESS, PZDET); EEPROM.put(LOGIC_ADDRESS, LOGIC); + EEPROM.put(VCCSW_ADDRESS, VCCSW); EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); } @@ -91,6 +93,13 @@ void restoreConfig() { LOGIC = temp; } + EEPROM.get(VCCSW_ADDRESS, temp); + if (temp < 0 || temp > 1) { + erase = true; + } else { + VCCSW = temp; + } + long longTemp; EEPROM.get(VM_CONST_ADDRESS, longTemp); if (longTemp < 1000000L || longTemp > 1200000L) { @@ -116,6 +125,7 @@ void setDefaultConfig() { Hyst = HYST_DEFAULT; PZDET = PZDET_DEFAULT; LOGIC = LOGIC_DEFAULT; + VCCSW = VCCSW_DEFAULT; voltMeterConstant = VM_CONST_DEFAULT; adjustFollow(); adjustComp(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index 14ae5ee..4538923 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -39,9 +39,13 @@ extern int LOGIC; // Trigger logic scheme, Active LOW is default #define PZDET_ADDRESS 26 extern int PZDET; // Enable or disable piezo connection detection, default is off +#define VCCSW_DEFAULT 0 +#define VCCSW_ADDRESS 28 +extern int VCCSW; // Enable or disable piezo connection detection, default is off + extern int Debug; -#define VM_CONST_ADDRESS 28 +#define VM_CONST_ADDRESS 30 #define VM_CONST_DEFAULT 1125300L extern long voltMeterConstant; // For fine tuning input voltage sense diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp index 44e8332..434b4e7 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp @@ -192,6 +192,23 @@ void adjustGain() /*------------------------------------------------*/ +void adjustVcc() +{ + switch (VCCSW) + { + case 0: + pinMode(VCCSW_PIN, OUTPUT); + digitalWriteFast(VCCSW_PIN, LOW); + break; + case 1: + default: + pinMode(VCCSW_PIN, INPUT); + break; + } +} + +/*------------------------------------------------*/ + //void checkError () { // if (ERR_STATE == 1) { // digitalWriteFast(ERR_LED, BlinkState); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index beecc0b..e686308 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -36,6 +36,7 @@ update the voltMeterConstant variable in pP_config.h with the correct value void readVin(); void adjustFollow(); void adjustComp(); +void adjustVcc(); void calibrateAlert(); void adjustGain(); //void checkError () { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h index bd103cb..dba3e74 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h @@ -30,4 +30,5 @@ Default pins (based on Rev.2.x.xPCB layout) #define GADJ_R3 6 // " #define V_FOL_PWM 3 // PWM analog output pin for voltage follower adjustment #define VCOMP_PWM 9 // PWM analog output pin for comparator adjustment -#define PZDET_PIN 16 // Digital input pin for detecting piezo connection \ No newline at end of file +#define PZDET_PIN 16 // Digital input pin for detecting piezo connection +#define VCCSW_PIN 8 // VCC variable regulator switch pin \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 9f6b098..c2f4185 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -108,6 +108,21 @@ void serialPrintConfig() Serial.print("PZDET "); Serial.println(PZDET); + + Serial.print("VCCSW "); + Serial.print(VCCSW); + switch (VCCSW) + { + case 0: + Serial.println(" 3.3v"); + break; + case 1: + Serial.println(" 5v"); + break; + default: + Serial.println(" INVALID"); + break; + } Serial.print("VM_CONST "); Serial.println(voltMeterConstant); @@ -182,6 +197,10 @@ void updateParams() { updatePzDet(serialLong); } + else if (strcmp(serialMessageIn, "VCCSW") == 0) + { + updateVccSwitch(serialLong); + } else if (strcmp(serialMessageIn, "CONST") == 0) { updateConstant(serialLong); @@ -215,6 +234,8 @@ void updateParams() Serial.println(" (0 for active low, 1 for active high)"); Serial.println("To enable piezo plugged detection: PZDET [0|1]"); Serial.println(" (0 for disabled, 1 for enabled)"); + Serial.println("To change the main voltage of the circuit: VCCSW [0|1]") + Serial.println(" (0 for 3.3v, 1 for 5v)"); Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); Serial.println("To enable or disable debug output: DEBUG [0|1]"); Serial.println("To print current config: CONFIG"); From f2c3843668c0c5cf79aa38b490d3b087d26d91ec Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Fri, 27 Mar 2020 11:32:34 +0300 Subject: [PATCH 07/18] Formatting --- .../Pyr0_Piezo_Sensor_v2.x.x/.clang-format | 3 + .../.vscode/extensions.json | 12 +- .../src/LightChrono.cpp | 28 ++- .../src/LightChrono.h | 13 +- .../src/Pyr0_Piezo_Sensor_V2.x.x.cpp | 38 ++-- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h | 136 ++++++-------- .../src/pP_config.cpp | 174 +++++++++--------- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 2 +- .../src/pP_function.cpp | 55 ++---- .../src/pP_function.h | 4 +- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 127 ++++++------- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h | 32 ++-- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h | 26 +-- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 100 +++------- .../src/pP_volatile.cpp | 12 +- .../src/pP_volatile.h | 14 +- 16 files changed, 343 insertions(+), 433 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.clang-format diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.clang-format b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.clang-format new file mode 100644 index 0000000..fab33b7 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.clang-format @@ -0,0 +1,3 @@ +BasedOnStyle: LLVM +ColumnLimit: 200 +AllowShortFunctionsOnASingleLine: false \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.vscode/extensions.json b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.vscode/extensions.json index 272828b..e80666b 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.vscode/extensions.json +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/.vscode/extensions.json @@ -1,7 +1,7 @@ { - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - "platformio.platformio-ide" - ] -} \ No newline at end of file + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ] +} diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.cpp index 14b719b..64257f0 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.cpp @@ -1,22 +1,22 @@ /* * Lightweight chronometer class. * Simple chronometer/stopwatch class that counts the time passed since started. - * + * * (c) 2015 Sofian Audry :: info(@)sofianaudry(.)com * (c) 2015 Thomas O Fredericks :: tof(@)t-o-f(.)info * * The MIT License (MIT) - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -32,24 +32,23 @@ #endif #include "LightChrono.h" -LightChrono::LightChrono() -{ +LightChrono::LightChrono() { restart(); } -void LightChrono::start() { restart(); } +void LightChrono::start() { + restart(); +} -void LightChrono::restart() -{ +void LightChrono::restart() { _startTime = millis(); } LightChrono::chrono_t LightChrono::elapsed() const { - return (millis() - _startTime); + return (millis() - _startTime); } -bool LightChrono::hasPassed(LightChrono::chrono_t timeout) const -{ +bool LightChrono::hasPassed(LightChrono::chrono_t timeout) const { return (elapsed() >= timeout); } @@ -58,10 +57,7 @@ bool LightChrono::hasPassed(LightChrono::chrono_t timeout, bool restartIfPassed) if (restartIfPassed) restart(); return true; - } - else { + } else { return false; } } - - diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.h index 1060a3b..e846e8e 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/LightChrono.h @@ -1,22 +1,22 @@ /* * Lightweight chronometer class. * Simple chronometer/stopwatch class that counts the time passed since started. - * + * * (c) 2015 Sofian Audry :: info(@)sofianaudry(.)com * (c) 2015 Thomas O Fredericks :: tof(@)t-o-f(.)info * * The MIT License (MIT) - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -39,8 +39,7 @@ * // do something * // ... */ -class LightChrono -{ +class LightChrono { public: #if defined(ARDUINO_ARC32_TOOLS) typedef uint64_t chrono_t; @@ -68,5 +67,3 @@ public: }; #endif - - diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp index a5ddd49..5c1e315 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp @@ -85,39 +85,39 @@ update the voltMeterConstant variable in pP_config.h with the correct value ------------------------------------------------------------*/ // Headers, variables, and functions -#include -#include #include "LightChrono.h" #include "pP_pins.h" +#include +#include // #include "pP_config.h" -#include "pP_volatile.h" #include "pP_function.h" #include "pP_serial.h" +#include "pP_volatile.h" // i2c input toggle. Uncomment to enable #define I2C_INPUT void setup() { - //Setup PWM on voltage follower (PD3) + // Setup PWM on voltage follower (PD3) TCCR2A = (1 << COM2B1) | (0 << COM2B0) | (0 << WGM21) | (1 << WGM20); TCCR2B = (0 << WGM22) | (0 << CS22) | (0 << CS21) | (1 << CS20); DDRD |= (1 << DDD3); - //Setup PWM on comparator (PB1) + // Setup PWM on comparator (PB1) TCCR1A = (1 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (1 << WGM10); TCCR1B = (0 << WGM13) | (0 << WGM12) | (0 << CS12) | (0 << CS11) | (1 << CS10); DDRB |= (1 << DDB1); - pinMode(TRG_OUT, OUTPUT); // declare the Trigger as as OUTPUT + pinMode(TRG_OUT, OUTPUT); // declare the Trigger as as OUTPUT pinMode(ERR_LED, OUTPUT); pinMode(PZDET_PIN, INPUT_PULLUP); - pinMode(Z_TRG, INPUT_PULLUP); // declare z-sense input with pullup + pinMode(Z_TRG, INPUT_PULLUP); // declare z-sense input with pullup pinMode(V_FOLLOW_PIN, INPUT); pinMode(VCOMP_SENSE_PIN, INPUT); - pinMode(GADJ_R0, INPUT); // declare input to set high impedance - pinMode(GADJ_R1, INPUT); // declare input to set high impedance - pinMode(GADJ_R2, INPUT); // declare input to set high impedance - pinMode(GADJ_R3, INPUT); // declare input to set high impedance + pinMode(GADJ_R0, INPUT); // declare input to set high impedance + pinMode(GADJ_R1, INPUT); // declare input to set high impedance + pinMode(GADJ_R2, INPUT); // declare input to set high impedance + pinMode(GADJ_R3, INPUT); // declare input to set high impedance attachInterrupt(digitalPinToInterrupt(Z_TRG), pulse, FALLING); @@ -140,7 +140,7 @@ void loop() { if (BlinkCount > 0) { BlinkState = !BlinkState; digitalWriteFast(ERR_LED, BlinkState); - //digitalWriteFast(TRG_OUT, BlinkState); + // digitalWriteFast(TRG_OUT, BlinkState); --BlinkCount; } @@ -162,11 +162,11 @@ void loop() { VLast = VOld - Vin; if (VLast > Hyst || VLast < -Hyst) { - // Voltage Follower adjustment + // Voltage Follower adjustment adjustFollow(); - // Voltage Comparator adjustment + // Voltage Comparator adjustment adjustComp(); - // Alert the user that auto-calibration is ongoing + // Alert the user that auto-calibration is ongoing ERR_STATE = 1; } else { ERR_STATE = 0; @@ -179,11 +179,11 @@ void loop() { if (BlinkCount > 0) { BlinkState = !BlinkState; digitalWriteFast(ERR_LED, BlinkState); -// digitalWriteFast(TRG_OUT, BlinkState); + // digitalWriteFast(TRG_OUT, BlinkState); --BlinkCount; -// } else { + // } else { // Check for error state -// checkError(); + // checkError(); } else { digitalWriteFast(ERR_LED, 0); } @@ -193,7 +193,7 @@ void loop() { serialPrintState(); } // Sets trigger output state to false after completing loop - //digitalWriteFast(TRG_OUT, HIGH); + // digitalWriteFast(TRG_OUT, HIGH); sensorHReading = 0; } } diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h index 9e4d335..c4de8c0 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h @@ -1,119 +1,97 @@ #ifndef PP_CMD_H #define PP_CMD_H +#include "EEPROM.h" #include "pP_config.h" #include "pP_function.h" -#include "EEPROM.h" /*------------------------------------------------*/ -void updateGainFactor(int value) -{ - if (value >= 0) - { - GAIN_FACTOR = value; - adjustGain(); - EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); - } +void updateGainFactor(int value) { + if (value >= 0) { + GAIN_FACTOR = value; + adjustGain(); + EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); + } } /*------------------------------------------------*/ -void updateVFol(int value) -{ - if (value >= 0) - { - followerThrs = value; - adjustFollow(); - EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); - } +void updateVFol(int value) { + if (value >= 0) { + followerThrs = value; + adjustFollow(); + EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); + } } /*------------------------------------------------*/ -void updateVComp(int value) -{ - if (value >= 0) - { - compThrs = value; - adjustComp(); - EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); - } +void updateVComp(int value) { + if (value >= 0) { + compThrs = value; + adjustComp(); + EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); + } } /*------------------------------------------------*/ -void updateLoopDuration(int value) -{ - if (value >= 0) - { - LOOP_DUR = value; - EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); - } +void updateLoopDuration(int value) { + if (value >= 0) { + LOOP_DUR = value; + EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); + } } /*------------------------------------------------*/ -void updateTrigDuration(int value) -{ - if (value >= 0) - { - TRG_DUR = value; - EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); - } +void updateTrigDuration(int value) { + if (value >= 0) { + TRG_DUR = value; + EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); + } } /*------------------------------------------------*/ -void updateHysteresis(int value) -{ - if (value >= 0) - { - Hyst = value; - EEPROM.put(HYST_ADDRESS, Hyst); - } +void updateHysteresis(int value) { + if (value >= 0) { + Hyst = value; + EEPROM.put(HYST_ADDRESS, Hyst); + } } /*------------------------------------------------*/ -void updateLogic(int value) -{ - if (value >= 0) - { - LOGIC = value; - EEPROM.put(LOGIC_ADDRESS, LOGIC); - pulse(); - } +void updateLogic(int value) { + if (value >= 0) { + LOGIC = value; + EEPROM.put(LOGIC_ADDRESS, LOGIC); + pulse(); + } } /*------------------------------------------------*/ -void updatePzDet(int value) -{ - if (value >= 0) - { - PZDET = value; - EEPROM.put(PZDET_ADDRESS, PZDET); - } +void updatePzDet(int value) { + if (value >= 0) { + PZDET = value; + EEPROM.put(PZDET_ADDRESS, PZDET); + } } /*------------------------------------------------*/ -void updateConstant(long value) -{ - if (value >= 0) - { - voltMeterConstant = value; - EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); - } +void updateConstant(long value) { + if (value >= 0) { + voltMeterConstant = value; + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); + } } /*------------------------------------------------*/ -void updateDebug(int value) -{ - if (value > 0) - { - Debug = 1; - } - else if (value == 0) - { - Debug = 0; - } +void updateDebug(int value) { + if (value > 0) { + Debug = 1; + } else if (value == 0) { + Debug = 0; + } } -#endif //PP_CMD_H \ No newline at end of file +#endif // PP_CMD_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index a1f426b..054203a 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -15,108 +15,108 @@ long voltMeterConstant = VM_CONST_DEFAULT; /*------------------------------------------------*/ void eraseEEPROM() { - - setDefaultConfig(); - - EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); - EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); - EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); - EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); - EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); - EEPROM.put(HYST_ADDRESS, Hyst); - EEPROM.put(PZDET_ADDRESS, PZDET); - EEPROM.put(LOGIC_ADDRESS, LOGIC); - EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); + + setDefaultConfig(); + + EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); + EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); + EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); + EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); + EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); + EEPROM.put(HYST_ADDRESS, Hyst); + EEPROM.put(PZDET_ADDRESS, PZDET); + EEPROM.put(LOGIC_ADDRESS, LOGIC); + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); } // Restore config from EEPROM, otherwise erase config and write to EEPROM void restoreConfig() { - int temp; - - bool erase = false; + int temp; - EEPROM.get(GAIN_FACTOR_ADDRESS, temp); - if (temp < 0 || temp > 4) { - erase = true; - } else { - GAIN_FACTOR = temp; - } + bool erase = false; - EEPROM.get(FOLLOWER_THRESHOLD_ADDRESS, temp); - if (temp < 0 || temp > 5000) { - erase = true; - } else { - followerThrs = temp; - } + EEPROM.get(GAIN_FACTOR_ADDRESS, temp); + if (temp < 0 || temp > 4) { + erase = true; + } else { + GAIN_FACTOR = temp; + } - EEPROM.get(COMP_THRESHOLD_ADDRESS, temp); - if (temp < 0 || temp > 5000) { - erase = true; - } else { - compThrs = temp; - } + EEPROM.get(FOLLOWER_THRESHOLD_ADDRESS, temp); + if (temp < 0 || temp > 5000) { + erase = true; + } else { + followerThrs = temp; + } - EEPROM.get(LOOP_DUR_ADDRESS, temp); - if (temp < 0 && temp > 1000) { - erase = true; - } else { - LOOP_DUR = temp; - } + EEPROM.get(COMP_THRESHOLD_ADDRESS, temp); + if (temp < 0 || temp > 5000) { + erase = true; + } else { + compThrs = temp; + } - EEPROM.get(TRG_DUR_ADDRESS, temp); - if (temp < 0 || temp > 1000) { - erase = true; - } else { - TRG_DUR = temp; - } + EEPROM.get(LOOP_DUR_ADDRESS, temp); + if (temp < 0 && temp > 1000) { + erase = true; + } else { + LOOP_DUR = temp; + } - EEPROM.get(HYST_ADDRESS, temp); - if (temp < 0 || temp > 1000) { - erase = true; - } else { - Hyst = temp; - } + EEPROM.get(TRG_DUR_ADDRESS, temp); + if (temp < 0 || temp > 1000) { + erase = true; + } else { + TRG_DUR = temp; + } - EEPROM.get(PZDET_ADDRESS, temp); - if (temp < 0 || temp > 1) { - erase = true; - } else { - PZDET = temp; - } + EEPROM.get(HYST_ADDRESS, temp); + if (temp < 0 || temp > 1000) { + erase = true; + } else { + Hyst = temp; + } - EEPROM.get(LOGIC_ADDRESS, temp); - if (temp < 0 || temp > 1) { - erase = true; - } else { - LOGIC = temp; - } + EEPROM.get(PZDET_ADDRESS, temp); + if (temp < 0 || temp > 1) { + erase = true; + } else { + PZDET = temp; + } - long longTemp; - EEPROM.get(VM_CONST_ADDRESS, longTemp); - if (longTemp < 1000000L || longTemp > 1200000L) { - erase = true; - } else { - voltMeterConstant = longTemp; - } - - if (erase) { - eraseEEPROM(); - } + EEPROM.get(LOGIC_ADDRESS, temp); + if (temp < 0 || temp > 1) { + erase = true; + } else { + LOGIC = temp; + } - adjustFollow(); - adjustComp(); + long longTemp; + EEPROM.get(VM_CONST_ADDRESS, longTemp); + if (longTemp < 1000000L || longTemp > 1200000L) { + erase = true; + } else { + voltMeterConstant = longTemp; + } + + if (erase) { + eraseEEPROM(); + } + + adjustFollow(); + adjustComp(); } void setDefaultConfig() { - GAIN_FACTOR = GAIN_FACTOR_DEFAULT; - followerThrs = FOLLOWER_THRESHOLD_DEFAULT; - compThrs = COMP_THRESHOLD_DEFAULT; - LOOP_DUR = LOOP_DUR_DEFAULT; - TRG_DUR = TRG_DUR_DEFAULT; - Hyst = HYST_DEFAULT; - PZDET = PZDET_DEFAULT; - LOGIC = LOGIC_DEFAULT; - voltMeterConstant = VM_CONST_DEFAULT; - adjustFollow(); - adjustComp(); + GAIN_FACTOR = GAIN_FACTOR_DEFAULT; + followerThrs = FOLLOWER_THRESHOLD_DEFAULT; + compThrs = COMP_THRESHOLD_DEFAULT; + LOOP_DUR = LOOP_DUR_DEFAULT; + TRG_DUR = TRG_DUR_DEFAULT; + Hyst = HYST_DEFAULT; + PZDET = PZDET_DEFAULT; + LOGIC = LOGIC_DEFAULT; + voltMeterConstant = VM_CONST_DEFAULT; + adjustFollow(); + adjustComp(); } \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index 14ae5ee..b73697e 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -48,7 +48,7 @@ extern long voltMeterConstant; // For fine tuning input voltage sense #ifdef I2C_INPUT #define I2C_SLAVE_ADDRESS 24 uint8_t pP_i2c_address = 0xa0; // I2C Bus Address -#endif // I2C_INPUT +#endif // I2C_INPUT void eraseEEPROM(); void setDefaultConfig(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp index 44e8332..c67eafc 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp @@ -9,24 +9,19 @@ #include "pP_function.h" #include "Arduino.h" #include "pP_config.h" -#include "pP_volatile.h" #include "pP_pins.h" +#include "pP_volatile.h" #include "stdint.h" -void digitalWriteFast(uint8_t pin, uint8_t x) -{ - if (pin / 8) - { // pin >= 8 +void digitalWriteFast(uint8_t pin, uint8_t x) { + if (pin / 8) { // pin >= 8 PORTB ^= (-x ^ PORTB) & (1 << (pin % 8)); - } - else - { + } else { PORTD ^= (-x ^ PORTD) & (1 << (pin % 8)); } } -int analogReadFast(uint8_t ADCpin) -{ +int analogReadFast(uint8_t ADCpin) { byte ADCSRAoriginal = ADCSRA; ADCSRA = (ADCSRA & B11111000) | 4; int adc = analogRead(ADCpin); @@ -36,15 +31,13 @@ int analogReadFast(uint8_t ADCpin) /*------------------------------------------------*/ -void doubleFlash() -{ +void doubleFlash() { BlinkCount = 4; } /*------------------------------------------------*/ -void pulse() -{ +void pulse() { digitalWriteFast(TRG_OUT, LOGIC); sensorHReading = 1; delay(TRG_DUR); @@ -55,8 +48,7 @@ void pulse() /*------------------------------------------------*/ -long readVcc() -{ +long readVcc() { // Read 1.1V reference against AVcc // Atmega's Secret Voltmeter setup: @@ -103,8 +95,7 @@ If the scale_constant calculated is different from the default 1125300, update the voltMeterConstant variable in pP_config.h with the correct value --------------------------------------------------*/ -void readVin() -{ +void readVin() { VOld = Vin; Vin = readVcc(); followerLong = followerThrs * 1023L; @@ -117,8 +108,7 @@ void readVin() /*------------------------------------------------*/ -void adjustFollow() -{ +void adjustFollow() { /* Compares diffs of threshold vs read value if positive, adjusts the follower to within the range set above*/ @@ -133,8 +123,7 @@ void adjustFollow() /*------------------------------------------------*/ -void adjustComp() -{ +void adjustComp() { compLong = compThrs * 1023L; compInt = (long long)compLong / Vin; compInt = (int)compInt; @@ -143,21 +132,17 @@ void adjustComp() /*------------------------------------------------*/ -void calibrateAlert() -{ +void calibrateAlert() { VLast = VOld - Vin; - if (VLast > Hyst || VLast < -Hyst) - { + if (VLast > Hyst || VLast < -Hyst) { ERR_STATE = 1; } } /*------------------------------------------------*/ -void adjustGain() -{ - switch (GAIN_FACTOR) - { +void adjustGain() { + switch (GAIN_FACTOR) { case 4: pinMode(GADJ_R0, OUTPUT); digitalWriteFast(GADJ_R0, LOW); @@ -192,7 +177,7 @@ void adjustGain() /*------------------------------------------------*/ -//void checkError () { +// void checkError () { // if (ERR_STATE == 1) { // digitalWriteFast(ERR_LED, BlinkState); // BlinkState = !BlinkState; @@ -205,12 +190,10 @@ void adjustGain() /*------------------------------------------------*/ -void pzConCheck() -{ +void pzConCheck() { PZ_STATE = digitalRead(PZDET_PIN); - if (PZ_STATE == PZDET) - { - //digitalWriteFast(TRG_OUT, LOGIC); + if (PZ_STATE == PZDET) { + // digitalWriteFast(TRG_OUT, LOGIC); ERR_STATE = 1; } } \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index beecc0b..a7801a9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -38,7 +38,7 @@ void adjustFollow(); void adjustComp(); void calibrateAlert(); void adjustGain(); -//void checkError () { +// void checkError () { // if (ERR_STATE == 1) { // digitalWriteFast(ERR_LED, BlinkState); // BlinkState = !BlinkState; @@ -50,4 +50,4 @@ void adjustGain(); //} void pzConCheck(); -#endif //PP_FUNCTION_H \ No newline at end of file +#endif // PP_FUNCTION_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index fc23912..a8c2e8c 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -1,16 +1,15 @@ #ifdef I2C_INPUT -#include -#include "pP_config.h" #include "pP_i2c.h" +#include "pP_config.h" +#include #include byte registerMap[regMapSize]; byte registerMapTemp[regMapSize - 1]; byte receivedCommands[maxBytes]; -pP_i2c::pP_i2c(){ - +pP_i2c::pP_i2c() { } void pP_i2c::init() { @@ -24,19 +23,15 @@ void pP_i2c::i2cReportStatus() { } void pP_i2c::i2cReportVersion() { - } void pP_i2c::i2cReportConfig() { - } void pP_i2c::i2cReportIdentity() { - } void pP_i2c::i2cRequestInput() { - } void pP_i2c::i2cReply() { @@ -68,64 +63,64 @@ void pP_i2c::i2cInput(int bytesReceived) { // Parse commands and apply changes or actions switch (cmdRcvd[0]) { - case 0x00: - i2cReportStatus(); - return; - break; - case 0x01: - followerInt = (int) cmdRcvd[1]; - return; - break; - case 0x02: - compInt = (int) cmdRcvd[1]; - return; - break; - case 0x03: - GAIN_FACTOR = (int) cmdRcvd[1]; - return; - break; - case 0x04: - Hyst = (int) cmdRcvd[1]; - return; - break; - case 0x05: - LOOP_DUR = (int) cmdRcvd[1]; - return; - break; - case 0x06: - LOGIC = (int) cmdRcvd[1]; - return; - break; - case 0x07: - PZDET = (int) cmdRcvd[1]; - return; - break; - case 0x08: - TRG_DUR = (int) cmdRcvd[1]; - return; - break; - case 0x09: - DEBUG = (int) cmdRcvd[1]; - return; - break; - case 0x0a: - voltMeterConstant = longRcvd[0]*65536+longRcvd[1]*256+longRcvd[2]; - return; - break; - case 0x0b: - reportVersion(); - return; - break; - case 0x0c: - reportConfig(); - return; - break; - case 0x0d: - reportIdentity(); - return; - break; - default: - return; + case 0x00: + i2cReportStatus(); + return; + break; + case 0x01: + followerInt = (int)cmdRcvd[1]; + return; + break; + case 0x02: + compInt = (int)cmdRcvd[1]; + return; + break; + case 0x03: + GAIN_FACTOR = (int)cmdRcvd[1]; + return; + break; + case 0x04: + Hyst = (int)cmdRcvd[1]; + return; + break; + case 0x05: + LOOP_DUR = (int)cmdRcvd[1]; + return; + break; + case 0x06: + LOGIC = (int)cmdRcvd[1]; + return; + break; + case 0x07: + PZDET = (int)cmdRcvd[1]; + return; + break; + case 0x08: + TRG_DUR = (int)cmdRcvd[1]; + return; + break; + case 0x09: + DEBUG = (int)cmdRcvd[1]; + return; + break; + case 0x0a: + voltMeterConstant = longRcvd[0] * 65536 + longRcvd[1] * 256 + longRcvd[2]; + return; + break; + case 0x0b: + reportVersion(); + return; + break; + case 0x0c: + reportConfig(); + return; + break; + case 0x0d: + reportIdentity(); + return; + break; + default: + return; } } #endif diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h index a21df47..22fae9e 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h @@ -2,23 +2,23 @@ #define _pP_i2c_h_ #ifdef I2C_INPUT -#define status_Offset 0x00 // Status register -#define senseInt_Offset 0x01 // Integer of sense threshold in millivolts -#define compInt_Offset 0x02 // Integer of comparator threshold in millivolts -#define gainFactor_Offset 0x03 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x -#define hysteresis_Offset 0x04 // Hysteresis value for ADC measurements -#define loopDuration_Offset 0x05 // duration of time between ADC checks and other loop functions +#define status_Offset 0x00 // Status register +#define senseInt_Offset 0x01 // Integer of sense threshold in millivolts +#define compInt_Offset 0x02 // Integer of comparator threshold in millivolts +#define gainFactor_Offset 0x03 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x +#define hysteresis_Offset 0x04 // Hysteresis value for ADC measurements +#define loopDuration_Offset 0x05 // duration of time between ADC checks and other loop functions #define logicLevel_Offset 0x06 #define piezoDetect_Offset 0x07 -#define triggerDuration_Offset 0x08 // duration of the Z-axis pulse sent, in ms +#define triggerDuration_Offset 0x08 // duration of the Z-axis pulse sent, in ms #define debugEnable_Offset 0x09 -#define voltMeterLong_Offset 0x0a // For fine-tuning the input volt master +#define voltMeterLong_Offset 0x0a // For fine-tuning the input volt master #define versionRegister_Offset 0x0b #define configRegister_Offset 0x0c #define identRegister_Offset 0x0d /*-------------------------Variables------------------------*/ -#define regMapSize 14 +#define regMapSize 14 #define maxBytes 2 #define longBytes 4 byte regMap[regMapSize]; @@ -26,16 +26,16 @@ byte regMapTemp[regMapSize]; byte cmdRcvd[maxBytes]; byte longRcvd[longBytes]; - /*------------------------------------------------*/ class pP_i2c { - public: - pP_i2c(uint8_t address=pP_i2c_address); - void init(); - void i2cInput(int bytesReceived); - private: - char _i2cResponse; +public: + pP_i2c(uint8_t address = pP_i2c_address); + void init(); + void i2cInput(int bytesReceived); + +private: + char _i2cResponse; }; #endif // I2C_INPUT diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h index bd103cb..4640d5d 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_pins.h @@ -1,6 +1,6 @@ /* pyr0-piezo pins configuration file -Default pins (based on Rev.2.x.xPCB layout) +Default pins (based on Rev.2.x.xPCB layout) * PD2 INT0 (Piezo In 'D2') * D7 PCINT23 (Trigger OUT 'D7') @@ -16,18 +16,18 @@ Default pins (based on Rev.2.x.xPCB layout) */ // Analog Pin Assignments -#define V_FOLLOW_PIN A0 // Sense pin to check Voltage Follower stage -#define VCOMP_SENSE_PIN A1 // Sense pin to check comparator stage voltage +#define V_FOLLOW_PIN A0 // Sense pin to check Voltage Follower stage +#define VCOMP_SENSE_PIN A1 // Sense pin to check comparator stage voltage // Digital Pin Assignments -#define TRG_OUT 7 // LED and Z-Min trigger output connected to digital pin 7 +#define TRG_OUT 7 // LED and Z-Min trigger output connected to digital pin 7 //#define TRG_OUT 13 // For testing on Atmega328/2560, Output is moved to onboard LED pin -#define Z_TRG 2 // the piezo is connected to INT0 / digital pin 2 -#define ERR_LED 4 // LED will blink if optimal voltage range cannot be achieved -#define GADJ_R0 20 // Auto-adjust ladder pin assignments -#define GADJ_R1 21 // " -#define GADJ_R2 5 // " -#define GADJ_R3 6 // " -#define V_FOL_PWM 3 // PWM analog output pin for voltage follower adjustment -#define VCOMP_PWM 9 // PWM analog output pin for comparator adjustment -#define PZDET_PIN 16 // Digital input pin for detecting piezo connection \ No newline at end of file +#define Z_TRG 2 // the piezo is connected to INT0 / digital pin 2 +#define ERR_LED 4 // LED will blink if optimal voltage range cannot be achieved +#define GADJ_R0 20 // Auto-adjust ladder pin assignments +#define GADJ_R1 21 // " +#define GADJ_R2 5 // " +#define GADJ_R3 6 // " +#define V_FOL_PWM 3 // PWM analog output pin for voltage follower adjustment +#define VCOMP_PWM 9 // PWM analog output pin for comparator adjustment +#define PZDET_PIN 16 // Digital input pin for detecting piezo connection \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 9f6b098..62d4b0f 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -1,7 +1,7 @@ #include "pP_cmd.h" +#include "pP_volatile.h" -void parseData() -{ +void parseData() { // split the data into its parts @@ -15,45 +15,36 @@ void parseData() } /*------------------------------------------------*/ -void identifyMarkers() -{ +void identifyMarkers() { char x = Serial.read(); #ifdef I2C_INPUT char y = Wire.read(); #endif // I2C_INPUT - if (x == '\n' || x == '\r') - { + if (x == '\n' || x == '\r') { serialIncoming = true; inputBuffer[bytesRecvd] = 0; parseData(); bytesRecvd = 0; - } - else - { + } else { inputBuffer[bytesRecvd] = x; bytesRecvd++; - if (bytesRecvd == buffSize) - { + if (bytesRecvd == buffSize) { bytesRecvd = buffSize - 1; } } #ifdef I2C_INPUT - if (y == '\n' || y == '\r') - { + if (y == '\n' || y == '\r') { serialIncoming = true; inputBuffer[bytesRecvd] = 0; parseData(); bytesRecvd = 0; - } - else - { + } else { inputBuffer[bytesRecvd] = y; bytesRecvd++; - if (bytesRecvd == buffSize) - { + if (bytesRecvd == buffSize) { bytesRecvd = buffSize - 1; } } @@ -62,12 +53,10 @@ void identifyMarkers() /*------------------------------------------------*/ -void serialPrintConfig() -{ +void serialPrintConfig() { Serial.print("GAIN_F "); Serial.print(GAIN_FACTOR); - switch (GAIN_FACTOR) - { + switch (GAIN_FACTOR) { case 0: Serial.println(" 3x"); break; @@ -116,8 +105,7 @@ void serialPrintConfig() Serial.println(PP_VERSION); } -void serialPrintState() -{ +void serialPrintState() { Serial.print("{"); Serial.print("\"Vcc\":"); @@ -147,64 +135,36 @@ void serialPrintState() Serial.println("}"); } -void updateParams() -{ +void updateParams() { serialIncoming = false; - if (strcmp(serialMessageIn, "GAIN_F") == 0) - { + if (strcmp(serialMessageIn, "GAIN_F") == 0) { updateGainFactor(serialLong); - } - else if (strcmp(serialMessageIn, "VFOL") == 0) - { + } else if (strcmp(serialMessageIn, "VFOL") == 0) { updateVFol(serialLong); - } - else if (strcmp(serialMessageIn, "VCOMP") == 0) - { + } else if (strcmp(serialMessageIn, "VCOMP") == 0) { updateVComp(serialLong); - } - else if (strcmp(serialMessageIn, "LOOP_D") == 0) - { + } else if (strcmp(serialMessageIn, "LOOP_D") == 0) { updateLoopDuration(serialLong); - } - else if (strcmp(serialMessageIn, "TRG_D") == 0) - { + } else if (strcmp(serialMessageIn, "TRG_D") == 0) { updateTrigDuration(serialLong); - } - else if (strcmp(serialMessageIn, "HYST") == 0) - { + } else if (strcmp(serialMessageIn, "HYST") == 0) { updateHysteresis(serialLong); - } - else if (strcmp(serialMessageIn, "LOGIC") == 0) - { + } else if (strcmp(serialMessageIn, "LOGIC") == 0) { updateLogic(serialLong); - } - else if (strcmp(serialMessageIn, "PZDET") == 0) - { + } else if (strcmp(serialMessageIn, "PZDET") == 0) { updatePzDet(serialLong); - } - else if (strcmp(serialMessageIn, "CONST") == 0) - { + } else if (strcmp(serialMessageIn, "CONST") == 0) { updateConstant(serialLong); - } - else if (strcmp(serialMessageIn, "DEBUG") == 0) - { + } else if (strcmp(serialMessageIn, "DEBUG") == 0) { updateDebug(serialLong); - } - else if (strcmp(serialMessageIn, "CONFIG") == 0) - { + } else if (strcmp(serialMessageIn, "CONFIG") == 0) { serialPrintConfig(); - } - else if (strcmp(serialMessageIn, "ERASE") == 0) - { + } else if (strcmp(serialMessageIn, "ERASE") == 0) { eraseEEPROM(); serialPrintConfig(); - } - else if (strcmp(serialMessageIn, "STATE") == 0) - { + } else if (strcmp(serialMessageIn, "STATE") == 0) { serialPrintState(); - } - else if (strcmp(serialMessageIn, "HELP") == 0) - { + } else if (strcmp(serialMessageIn, "HELP") == 0) { #if defined(ARDUINO_AVR_ATmega328PB) Serial.println("To change gain factor: GAIN_F [integer for gain state - see note*]"); Serial.println("To change voltage follower voltage (low threshold): VFOL [float value]"); @@ -235,11 +195,9 @@ void updateParams() parseData(); } -void serialInput() -{ +void serialInput() { // receive data from Serial and save it into inputBuffer - if (Serial.available() > 0) - { + if (Serial.available() > 0) { // the order of these IF clauses is significant identifyMarkers(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp index c7ab7b1..cfd90ba 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.cpp @@ -3,14 +3,14 @@ #include "stdint.h" // these variables will change on their own. Do not edit ANYTHING below this line -volatile int sensorHReading = 0; // variable to store the value read from the sensor pin -volatile int ADJ_FOLLOW = 0; // Variable for Follower adjustment -volatile int ADJ_COMP = 0; // Variable for Comparator adjustment +volatile int sensorHReading = 0; // variable to store the value read from the sensor pin +volatile int ADJ_FOLLOW = 0; // Variable for Follower adjustment +volatile int ADJ_COMP = 0; // Variable for Comparator adjustment volatile int ERR_STATE = 0; volatile int PZ_STATE = 0; -int Vin = 5000; // input reference voltage in millivolts (multiply V by 1000) -int VOld = 5000; // Variable to store previous cycle's Vin +int Vin = 5000; // input reference voltage in millivolts (multiply V by 1000) +int VOld = 5000; // Variable to store previous cycle's Vin int VLast = 0; // Convert threshold values based on the input voltage @@ -29,7 +29,7 @@ int VFol = 0; // Error blink parameters int BlinkState = 0; -int BlinkCount = (InitCount * 2) + 1; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after +int BlinkCount = (InitCount * 2) + 1; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after // Serial Input Parsing Variables char inputBuffer[buffSize]; diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h index 8d2d9ad..c1659cf 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_volatile.h @@ -5,14 +5,14 @@ #include "stdint.h" // these variables will change on their own. Do not edit ANYTHING below this line -extern volatile int sensorHReading; // variable to store the value read from the sensor pin -extern volatile int ADJ_FOLLOW; // Variable for Follower adjustment -extern volatile int ADJ_COMP; // Variable for Comparator adjustment +extern volatile int sensorHReading; // variable to store the value read from the sensor pin +extern volatile int ADJ_FOLLOW; // Variable for Follower adjustment +extern volatile int ADJ_COMP; // Variable for Comparator adjustment extern volatile int ERR_STATE; extern volatile int PZ_STATE; -extern int Vin; // input reference voltage in millivolts (multiply V by 1000) -extern int VOld; // Variable to store previous cycle's Vin +extern int Vin; // input reference voltage in millivolts (multiply V by 1000) +extern int VOld; // Variable to store previous cycle's Vin extern int VLast; // Convert threshold values based on the input voltage @@ -31,7 +31,7 @@ extern int VFol; // Error blink parameters extern int BlinkState; -extern int BlinkCount; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after +extern int BlinkCount; // Multiply Blink count by 2 to handle toggle state, add one extra to make sure light is on after // Serial Input Parsing Variables #define buffSize 40 @@ -48,4 +48,4 @@ extern long serialLong; // Task scheduler instances extern LightChrono mainLoop; -#endif //PP_VOLATILE_H \ No newline at end of file +#endif // PP_VOLATILE_H \ No newline at end of file From 02d734b177014aa8d2fc55b756e8568df9544931 Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Sun, 29 Mar 2020 00:25:27 +0300 Subject: [PATCH 08/18] i2c support, not tested #feature --- .../src/Pyr0_Piezo_Sensor_V2.x.x.cpp | 10 +- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp | 92 ++++++++++ .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h | 102 ++--------- .../src/pP_config.cpp | 1 + .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 6 +- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 167 +++++++++--------- .../src/{pP_i2c.h => pP_i2c.hpp} | 26 +-- .../src/pP_i2c_config.h | 12 ++ .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 23 --- 9 files changed, 209 insertions(+), 230 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp rename firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/{pP_i2c.h => pP_i2c.hpp} (65%) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp index 5c1e315..182cbf8 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/Pyr0_Piezo_Sensor_V2.x.x.cpp @@ -84,19 +84,19 @@ update the voltMeterConstant variable in pP_config.h with the correct value ------------------------------------------------------------*/ +// i2c input toggle. Uncomment to enable +#define I2C_INPUT + // Headers, variables, and functions #include "LightChrono.h" #include "pP_pins.h" #include #include -// #include "pP_config.h" #include "pP_function.h" +#include "pP_i2c.hpp" #include "pP_serial.h" #include "pP_volatile.h" -// i2c input toggle. Uncomment to enable -#define I2C_INPUT - void setup() { // Setup PWM on voltage follower (PD3) TCCR2A = (1 << COM2B1) | (0 << COM2B0) | (0 << WGM21) | (1 << WGM20); @@ -124,6 +124,8 @@ void setup() { Serial.begin(9600); Serial.println("Initializing Pyr0-Piezo Sensor..."); + i2cInit(); + restoreConfig(); adjustGain(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp new file mode 100644 index 0000000..43f4ed4 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp @@ -0,0 +1,92 @@ +#include "EEPROM.h" +#include "pP_config.h" +#include "pP_function.h" + +/*------------------------------------------------*/ + +void updateGainFactor(int value) { + if (value >= 0) { + GAIN_FACTOR = value; + adjustGain(); + EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); + } +} + +/*------------------------------------------------*/ + +void updateVFol(int value) { + if (value >= 0) { + followerThrs = value; + adjustFollow(); + EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); + } +} +/*------------------------------------------------*/ + +void updateVComp(int value) { + if (value >= 0) { + compThrs = value; + adjustComp(); + EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); + } +} + +/*------------------------------------------------*/ + +void updateLoopDuration(int value) { + if (value >= 0) { + LOOP_DUR = value; + EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); + } +} +/*------------------------------------------------*/ + +void updateTrigDuration(int value) { + if (value >= 0) { + TRG_DUR = value; + EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); + } +} +/*------------------------------------------------*/ + +void updateHysteresis(int value) { + if (value >= 0) { + Hyst = value; + EEPROM.put(HYST_ADDRESS, Hyst); + } +} +/*------------------------------------------------*/ + +void updateLogic(int value) { + if (value >= 0) { + LOGIC = value; + EEPROM.put(LOGIC_ADDRESS, LOGIC); + pulse(); + } +} +/*------------------------------------------------*/ + +void updatePzDet(int value) { + if (value >= 0) { + PZDET = value; + EEPROM.put(PZDET_ADDRESS, PZDET); + } +} +/*------------------------------------------------*/ + +void updateConstant(long value) { + if (value >= 0) { + voltMeterConstant = value; + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); + } +} + +/*------------------------------------------------*/ + +void updateDebug(int value) { + if (value > 0) { + Debug = 1; + } else if (value == 0) { + Debug = 0; + } +} \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h index c4de8c0..e3d7263 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h @@ -1,97 +1,15 @@ #ifndef PP_CMD_H #define PP_CMD_H -#include "EEPROM.h" -#include "pP_config.h" -#include "pP_function.h" - -/*------------------------------------------------*/ - -void updateGainFactor(int value) { - if (value >= 0) { - GAIN_FACTOR = value; - adjustGain(); - EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR); - } -} - -/*------------------------------------------------*/ - -void updateVFol(int value) { - if (value >= 0) { - followerThrs = value; - adjustFollow(); - EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); - } -} -/*------------------------------------------------*/ - -void updateVComp(int value) { - if (value >= 0) { - compThrs = value; - adjustComp(); - EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs); - } -} - -/*------------------------------------------------*/ - -void updateLoopDuration(int value) { - if (value >= 0) { - LOOP_DUR = value; - EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); - } -} -/*------------------------------------------------*/ - -void updateTrigDuration(int value) { - if (value >= 0) { - TRG_DUR = value; - EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); - } -} -/*------------------------------------------------*/ - -void updateHysteresis(int value) { - if (value >= 0) { - Hyst = value; - EEPROM.put(HYST_ADDRESS, Hyst); - } -} -/*------------------------------------------------*/ - -void updateLogic(int value) { - if (value >= 0) { - LOGIC = value; - EEPROM.put(LOGIC_ADDRESS, LOGIC); - pulse(); - } -} -/*------------------------------------------------*/ - -void updatePzDet(int value) { - if (value >= 0) { - PZDET = value; - EEPROM.put(PZDET_ADDRESS, PZDET); - } -} -/*------------------------------------------------*/ - -void updateConstant(long value) { - if (value >= 0) { - voltMeterConstant = value; - EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); - } -} - -/*------------------------------------------------*/ - -void updateDebug(int value) { - if (value > 0) { - Debug = 1; - } else if (value == 0) { - Debug = 0; - } -} +void updateGainFactor(int value); +void updateVFol(int value); +void updateVComp(int value); +void updateLoopDuration(int value); +void updateTrigDuration(int value); +void updateHysteresis(int value); +void updateLogic(int value); +void updatePzDet(int value); +void updateConstant(long value); +void updateDebug(int value); #endif // PP_CMD_H \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index 054203a..02af5af 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -12,6 +12,7 @@ int LOGIC = LOGIC_DEFAULT; int PZDET = PZDET_DEFAULT; int Debug = 0; long voltMeterConstant = VM_CONST_DEFAULT; +uint8_t pP_i2c_address = 0x80; /*------------------------------------------------*/ void eraseEEPROM() { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index b73697e..0ef3554 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -1,6 +1,8 @@ #ifndef PP_CONFIG_H #define PP_CONFIG_H +#include "stdint.h" + // Configurable settings: #define GAIN_FACTOR_DEFAULT 2 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x @@ -45,10 +47,8 @@ extern int Debug; #define VM_CONST_DEFAULT 1125300L extern long voltMeterConstant; // For fine tuning input voltage sense -#ifdef I2C_INPUT #define I2C_SLAVE_ADDRESS 24 -uint8_t pP_i2c_address = 0xa0; // I2C Bus Address -#endif // I2C_INPUT +extern uint8_t pP_i2c_address; // I2C Bus Address (P + 0 -> 0x50 + 0x30 -> 0x80) void eraseEEPROM(); void setDefaultConfig(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index a8c2e8c..c2796cc 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -1,126 +1,121 @@ -#ifdef I2C_INPUT - -#include "pP_i2c.h" -#include "pP_config.h" -#include +#include "pP_i2c.hpp" +#include "pP_cmd.h" +#include "pP_i2c_config.h" +#include "pP_volatile.h" #include -byte registerMap[regMapSize]; -byte registerMapTemp[regMapSize - 1]; -byte receivedCommands[maxBytes]; +uint8_t command; +uint16_t value; -pP_i2c::pP_i2c() { -} - -void pP_i2c::init() { +void i2cInit() { Wire.begin(pP_i2c_address); Wire.onRequest(i2cReply); Wire.onReceive(i2cInput); } -void pP_i2c::i2cReportStatus() { - _i2cResponse = "{" +void i2cReportConfig() { + i2cWrite(GAIN_FACTOR); + i2cWrite(followerThrs); + i2cWrite(compThrs); + i2cWrite(LOOP_DUR); + i2cWrite(TRG_DUR); + i2cWrite(Hyst); + i2cWrite(LOGIC); + i2cWrite(PZDET); + i2cWrite(voltMeterConstant); } -void pP_i2c::i2cReportVersion() { +void i2cReportState() { + i2cWrite(Vin); + i2cWrite((int)((long)VComp * Vin / 1023)); + i2cWrite((int)((long)VFol * Vin / 1023)); + i2cWrite(ERR_STATE); + i2cWrite(PZ_STATE); } -void pP_i2c::i2cReportConfig() { +void i2cWrite(int data) { + Wire.write(data >> 24); + Wire.write(data >> 16); + Wire.write(data >> 8); + Wire.write(data); } -void pP_i2c::i2cReportIdentity() { +void i2cWrite(long data) { + Wire.write(data >> 56); + Wire.write(data >> 48); + Wire.write(data >> 40); + Wire.write(data >> 32); + Wire.write(data >> 24); + Wire.write(data >> 16); + Wire.write(data >> 8); + Wire.write(data); } -void pP_i2c::i2cRequestInput() { +void i2cReply() { + switch (command) { + case CMD_CONFIG: + case CMD_ERASE: + i2cReportConfig(); + break; + case CMD_STATE: + i2cReportState(); + break; + default: + break; + } } -void pP_i2c::i2cReply() { - Wire.send() -} - -void pP_i2c::i2cInput(int bytesReceived) { +void i2cInput(int bytesReceived) { for (int a = 0; a < bytesReceived; a++) { // Check length of message, drops anything longer than [longBytes] - if (a <= maxBytes) { - cmdRcvd[a] = Wire.receive(); + if (a == 0) { + command = Wire.read(); + } else if (a == 1) { + value = Wire.read(); + } else if (a == 2) { + value = value << 8 | Wire.read(); + } else { + Wire.read(); // } - elif (a <= longBytes) { - longRcvd[a] = Wire.receive(); - } - else { - Wire.receive(); // - } - } - - // Check input command corresponds with register map, set 0x00 if not - if (bytesReceived == 1 && (cmdRcvd[0] < regMapSize)) { - return; - } - if (bytesReceived == 1 && (cmdRcvd[0] >= regMapSize)) { - cmdRcvd[0] = 0x00; - return; } // Parse commands and apply changes or actions - switch (cmdRcvd[0]) { - case 0x00: - i2cReportStatus(); - return; + switch (command) { + case CMD_GAIN_F: + updateGainFactor(value); break; - case 0x01: - followerInt = (int)cmdRcvd[1]; - return; + case CMD_VFOL: + updateVFol(value); break; - case 0x02: - compInt = (int)cmdRcvd[1]; - return; + case CMD_VCOMP: + updateVComp(value); break; - case 0x03: - GAIN_FACTOR = (int)cmdRcvd[1]; - return; + case CMD_LOOP_D: + updateLoopDuration(value); break; - case 0x04: - Hyst = (int)cmdRcvd[1]; - return; + case CMD_TRG_D: + updateTrigDuration(value); break; - case 0x05: - LOOP_DUR = (int)cmdRcvd[1]; - return; + case CMD_HYST: + updateHysteresis(value); break; - case 0x06: - LOGIC = (int)cmdRcvd[1]; - return; + case CMD_LOGIC: + updateLogic(value); break; - case 0x07: - PZDET = (int)cmdRcvd[1]; - return; + case CMD_PZDET: + updatePzDet(value); break; - case 0x08: - TRG_DUR = (int)cmdRcvd[1]; - return; + case CMD_CONST: + updateConstant(value); break; - case 0x09: - DEBUG = (int)cmdRcvd[1]; - return; + case CMD_CONFIG: break; - case 0x0a: - voltMeterConstant = longRcvd[0] * 65536 + longRcvd[1] * 256 + longRcvd[2]; - return; + case CMD_ERASE: + eraseEEPROM(); break; - case 0x0b: - reportVersion(); - return; - break; - case 0x0c: - reportConfig(); - return; - break; - case 0x0d: - reportIdentity(); - return; + case CMD_STATE: break; default: return; } } -#endif diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp similarity index 65% rename from firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h rename to firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp index 22fae9e..1cad709 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp @@ -1,6 +1,8 @@ #ifndef _pP_i2c_h_ #define _pP_i2c_h_ -#ifdef I2C_INPUT + +#include "pP_config.h" +#include "stdint.h" #define status_Offset 0x00 // Status register #define senseInt_Offset 0x01 // Integer of sense threshold in millivolts @@ -17,26 +19,6 @@ #define configRegister_Offset 0x0c #define identRegister_Offset 0x0d -/*-------------------------Variables------------------------*/ -#define regMapSize 14 -#define maxBytes 2 -#define longBytes 4 -byte regMap[regMapSize]; -byte regMapTemp[regMapSize]; -byte cmdRcvd[maxBytes]; -byte longRcvd[longBytes]; +void i2cInit(); -/*------------------------------------------------*/ - -class pP_i2c { -public: - pP_i2c(uint8_t address = pP_i2c_address); - void init(); - void i2cInput(int bytesReceived); - -private: - char _i2cResponse; -}; - -#endif // I2C_INPUT #endif // _pP_i2c_h_ diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h new file mode 100644 index 0000000..62b4f09 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h @@ -0,0 +1,12 @@ +#define CMD_GAIN_F 0x00 +#define CMD_VFOL 0x01 +#define CMD_VCOMP 0x02 +#define CMD_LOOP_D 0x03 +#define CMD_TRG_D 0x04 +#define CMD_HYST 0x05 +#define CMD_LOGIC 0x06 +#define CMD_PZDET 0x07 +#define CMD_CONST 0x08 +#define CMD_CONFIG 0x09 +#define CMD_ERASE 0x0a +#define CMD_STATE 0x0b \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 62d4b0f..44b0844 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -18,9 +18,6 @@ void parseData() { void identifyMarkers() { char x = Serial.read(); -#ifdef I2C_INPUT - char y = Wire.read(); -#endif // I2C_INPUT if (x == '\n' || x == '\r') { serialIncoming = true; @@ -34,21 +31,6 @@ void identifyMarkers() { bytesRecvd = buffSize - 1; } } - -#ifdef I2C_INPUT - if (y == '\n' || y == '\r') { - serialIncoming = true; - inputBuffer[bytesRecvd] = 0; - parseData(); - bytesRecvd = 0; - } else { - inputBuffer[bytesRecvd] = y; - bytesRecvd++; - if (bytesRecvd == buffSize) { - bytesRecvd = buffSize - 1; - } - } -#endif } /*------------------------------------------------*/ @@ -126,11 +108,6 @@ void serialPrintState() { Serial.print("\"PzCon\":"); Serial.print(PZ_STATE); - Serial.print(","); - - Serial.print("\"Firm_Ver\":"); - Serial.print(PP_VERSION); - Serial.print(","); Serial.println("}"); } From 57d11c5b97227ff954a04ad26cda8fe61bfe7241 Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Sun, 29 Mar 2020 20:56:43 +0300 Subject: [PATCH 09/18] Added i2c bridge sketch --- .../src/pP_config.cpp | 2 +- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 45 +++-- .../Pyr0_Piezo_i2c_Bridge/.clang-format | 3 + .../Pyr0_Piezo_i2c_Bridge/.gitignore | 7 + .../.vscode/extensions.json | 7 + .../Pyr0_Piezo_i2c_Bridge/include/README | 39 ++++ .../Pyr0_Piezo_i2c_Bridge/lib/README | 46 +++++ .../Pyr0_Piezo_i2c_Bridge/platformio.ini | 14 ++ .../Pyr0_Piezo_i2c_Bridge/src/i2c.cpp | 73 +++++++ .../Pyr0_Piezo_i2c_Bridge/src/i2c.h | 49 +++++ .../Pyr0_Piezo_i2c_Bridge/src/main.cpp | 21 ++ .../Pyr0_Piezo_i2c_Bridge/src/pP_serial.h | 191 ++++++++++++++++++ .../Pyr0_Piezo_i2c_Bridge/test/README | 11 + 13 files changed, 485 insertions(+), 23 deletions(-) create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.clang-format create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.gitignore create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.vscode/extensions.json create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/include/README create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/lib/README create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/platformio.ini create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/main.cpp create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h create mode 100644 firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/test/README diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index 02af5af..3f0cbb2 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -12,7 +12,7 @@ int LOGIC = LOGIC_DEFAULT; int PZDET = PZDET_DEFAULT; int Debug = 0; long voltMeterConstant = VM_CONST_DEFAULT; -uint8_t pP_i2c_address = 0x80; +uint8_t pP_i2c_address = 0x10; /*------------------------------------------------*/ void eraseEEPROM() { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index c2796cc..5d5d40f 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -7,10 +7,16 @@ uint8_t command; uint16_t value; -void i2cInit() { - Wire.begin(pP_i2c_address); - Wire.onRequest(i2cReply); - Wire.onReceive(i2cInput); +void i2cWrite(int data) { + Wire.write(data >> 8); + Wire.write(data); +} + +void i2cWrite(long data) { + Wire.write(data >> 24); + Wire.write(data >> 16); + Wire.write(data >> 8); + Wire.write(data); } void i2cReportConfig() { @@ -33,25 +39,9 @@ void i2cReportState() { i2cWrite(PZ_STATE); } -void i2cWrite(int data) { - Wire.write(data >> 24); - Wire.write(data >> 16); - Wire.write(data >> 8); - Wire.write(data); -} - -void i2cWrite(long data) { - Wire.write(data >> 56); - Wire.write(data >> 48); - Wire.write(data >> 40); - Wire.write(data >> 32); - Wire.write(data >> 24); - Wire.write(data >> 16); - Wire.write(data >> 8); - Wire.write(data); -} - void i2cReply() { + Serial.print("Requested "); + Serial.println(command); switch (command) { case CMD_CONFIG: case CMD_ERASE: @@ -79,6 +69,11 @@ void i2cInput(int bytesReceived) { } } + Serial.print("Command "); + Serial.print(command); + Serial.print(" "); + Serial.println(value); + // Parse commands and apply changes or actions switch (command) { case CMD_GAIN_F: @@ -119,3 +114,9 @@ void i2cInput(int bytesReceived) { return; } } + +void i2cInit() { + Wire.begin(pP_i2c_address); + Wire.onRequest(i2cReply); + Wire.onReceive(i2cInput); +} diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.clang-format b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.clang-format new file mode 100644 index 0000000..fab33b7 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.clang-format @@ -0,0 +1,3 @@ +BasedOnStyle: LLVM +ColumnLimit: 200 +AllowShortFunctionsOnASingleLine: false \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.gitignore b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.gitignore new file mode 100644 index 0000000..8501923 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.gitignore @@ -0,0 +1,7 @@ +.pio +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch +.vscode/settings.json +.travis.yml \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.vscode/extensions.json b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.vscode/extensions.json new file mode 100644 index 0000000..e80666b --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ] +} diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/include/README b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/include/README new file mode 100644 index 0000000..194dcd4 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/lib/README b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/lib/README new file mode 100644 index 0000000..6debab1 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/platformio.ini b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/platformio.ini new file mode 100644 index 0000000..ea23b77 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/platformio.ini @@ -0,0 +1,14 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:uno] +platform = atmelavr +board = uno +framework = arduino diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp new file mode 100644 index 0000000..a9605fa --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp @@ -0,0 +1,73 @@ +#include "i2c.h" +#include "Wire.h" +#include "Arduino.h" + +uint16_t read16() { + return Wire.read() << 8 | Wire.read(); +} + +uint32_t read32() { + return (uint32_t)Wire.read() << 24 | (uint32_t)Wire.read() << 16 | Wire.read() << 8 | Wire.read(); +} + +void write(uint8_t cmd) { + Wire.beginTransmission(ADDRESS); + Wire.write(cmd); + Wire.endTransmission(); +} + +void write(uint8_t cmd, uint16_t value) { + Wire.beginTransmission(ADDRESS); + Wire.write(cmd); + Wire.write(value >> 8); + Wire.write(value); + Wire.endTransmission(); +} + +void write(uint8_t cmd, uint32_t value) { + Wire.beginTransmission(ADDRESS); + Wire.write(cmd); + Wire.write(value >> 24); + Wire.write(value >> 16); + Wire.write(value >> 8); + Wire.write(value); + Wire.endTransmission(); +} + +config_t requestConfig() { + Wire.beginTransmission(ADDRESS); + Wire.write(CMD_CONFIG); + Wire.endTransmission(); + + uint8_t bytes = Wire.requestFrom(ADDRESS, 255); + Serial.println(bytes); + + config_t config; + config.GAIN_FACTOR = read16(); + config.followerThrs = read16(); + config.compThrs = read16(); + config.LOOP_DUR = read16(); + config.TRG_DUR = read16(); + config.Hyst = read16(); + config.LOGIC = read16(); + config.PZDET = read16(); + config.voltMeterConstant = read32(); + config.version = Wire.readString(); + + return config; +} + +state_t requestState() { + Wire.beginTransmission(ADDRESS); + Wire.write(CMD_STATE); + Wire.endTransmission(); + + uint8_t bytes = Wire.requestFrom(ADDRESS, 10); + + state_t state; + state.Vin = read16(); + state.VComp = read16(); + state.VFol = read16(); + state.ERR_STATE = read16(); + state.PZ_STATE = read16(); +} \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h new file mode 100644 index 0000000..13ab362 --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h @@ -0,0 +1,49 @@ +#ifndef I2C +#define I2C + +#define ADDRESS 0x10 + +#define CMD_GAIN_F 0x00 +#define CMD_VFOL 0x01 +#define CMD_VCOMP 0x02 +#define CMD_LOOP_D 0x03 +#define CMD_TRG_D 0x04 +#define CMD_HYST 0x05 +#define CMD_LOGIC 0x06 +#define CMD_PZDET 0x07 +#define CMD_CONST 0x08 +#define CMD_CONFIG 0x09 +#define CMD_ERASE 0x0a +#define CMD_STATE 0x0b + +#include "WString.h" + +typedef struct { + uint16_t GAIN_FACTOR; + uint16_t followerThrs; + uint16_t compThrs; + uint16_t LOOP_DUR; + uint16_t TRG_DUR; + uint16_t Hyst; + uint16_t LOGIC; + uint16_t PZDET; + uint32_t voltMeterConstant; + String version; +} config_t; + +typedef struct { + uint16_t Vin; + uint16_t VComp; + uint16_t VFol; + uint16_t ERR_STATE; + uint16_t PZ_STATE; +} state_t; + +void write(uint8_t cmd); +void write(uint8_t cmd, uint16_t value); +void write(uint8_t cmd, uint32_t value); + +config_t requestConfig(); +state_t requestState(); + +#endif \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/main.cpp b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/main.cpp new file mode 100644 index 0000000..58c41ce --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/main.cpp @@ -0,0 +1,21 @@ +#define ARDUINO_AVR_ATmega328PB + +#include +#include + +#include "pP_serial.h" + +void setup() { + Serial.begin(9600); + Serial.println("Initializing Pyr0-Piezo i2c Bridge..."); + + Wire.begin(); +} + +void loop() { + serialInput(); + + if (serialIncoming) { + updateParams(); + } +} \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h new file mode 100644 index 0000000..24f118f --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h @@ -0,0 +1,191 @@ +#include "i2c.h" +#include "stdint.h" + +#define buffSize 40 +bool serialIncoming = false; +uint8_t bytesRecvd = 0; +char inputBuffer[buffSize]; +char serialMessageIn[buffSize] = {0}; +uint32_t serialLong = 0; + +void parseData() { + + // split the data into its parts + + char *strtokIndx; // this is used by strtok() as an index + + strtokIndx = strtok(inputBuffer, " "); // get the first part - the string + strcpy(serialMessageIn, strtokIndx); // copy it to serialMessageIn + + strtokIndx = strtok(NULL, " "); // this continues where the previous call left off + serialLong = atol(strtokIndx); // convert this part to an integer +} +/*------------------------------------------------*/ + +void identifyMarkers() { + + char x = Serial.read(); + + if (x == '\n' || x == '\r') { + serialIncoming = true; + inputBuffer[bytesRecvd] = 0; + parseData(); + bytesRecvd = 0; + } else { + inputBuffer[bytesRecvd] = x; + bytesRecvd++; + if (bytesRecvd == buffSize) { + bytesRecvd = buffSize - 1; + } + } +} + +/*------------------------------------------------*/ + +void serialPrintConfig() { + config_t config = requestConfig(); + + Serial.print("GAIN_F "); + Serial.print(config.GAIN_FACTOR); + switch (config.GAIN_FACTOR) { + case 0: + Serial.println(" 3x"); + break; + case 1: + Serial.println(" 3.5x"); + break; + case 2: + Serial.println(" 4.33x"); + break; + case 3: + Serial.println(" 6x"); + break; + case 4: + Serial.println(" 11x"); + break; + default: + Serial.println(" INVALID"); + break; + } + + Serial.print("VFOL "); + Serial.println(config.followerThrs); + + Serial.print("VCOMP "); + Serial.println(config.compThrs); + + Serial.print("LOOP_D "); + Serial.println(config.LOOP_DUR); + + Serial.print("TRG_D "); + Serial.println(config.TRG_DUR); + + Serial.print("HYST "); + Serial.println(config.Hyst); + + Serial.print("LOGIC "); + Serial.println(config.LOGIC); + + Serial.print("PZDET "); + Serial.println(config.PZDET); + + Serial.print("VM_CONST "); + Serial.println(config.voltMeterConstant); + + Serial.print("Firmware Version "); + Serial.println(config.version); +} + +void serialPrintState() { + state_t state = requestState(); + + Serial.print("{"); + + Serial.print("\"Vcc\":"); + Serial.print(state.Vin); + Serial.print(","); + + Serial.print("\"VComp\":"); + Serial.print((uint32_t)state.VComp * state.Vin / 1023); + Serial.print(","); + + Serial.print("\"VFol\":"); + Serial.print((uint32_t)state.VFol * state.Vin / 1023); + Serial.print(","); + + Serial.print("\"Err\":"); + Serial.print(state.ERR_STATE); + Serial.print(","); + + Serial.print("\"PzCon\":"); + Serial.print(state.PZ_STATE); + + Serial.println("}"); +} + +void updateParams() { + serialIncoming = false; + if (strcmp(serialMessageIn, "GAIN_F") == 0) { + write(CMD_GAIN_F, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "VFOL") == 0) { + write(CMD_VFOL, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "VCOMP") == 0) { + write(CMD_VCOMP, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "LOOP_D") == 0) { + write(CMD_LOOP_D, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "TRG_D") == 0) { + write(CMD_TRG_D, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "HYST") == 0) { + write(CMD_HYST, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "LOGIC") == 0) { + write(CMD_LOGIC, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "PZDET") == 0) { + write(CMD_PZDET, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "CONST") == 0) { + write(CMD_CONST, serialLong); + } else if (strcmp(serialMessageIn, "CONFIG") == 0) { + serialPrintConfig(); + } else if (strcmp(serialMessageIn, "ERASE") == 0) { + write(CMD_ERASE); + serialPrintConfig(); + } else if (strcmp(serialMessageIn, "STATE") == 0) { + serialPrintState(); + } else if (strcmp(serialMessageIn, "HELP") == 0) { +#if defined(ARDUINO_AVR_ATmega328PB) + Serial.println("To change gain factor: GAIN_F [integer for gain state - see note*]"); + Serial.println("To change voltage follower voltage (low threshold): VFOL [float value]"); + Serial.println("To change comparator voltage (high threshold): VCOMP [float value]"); + Serial.println("To change main loop period: LOOP_D [integer for milliseconds]"); + Serial.println("To change trigger active duration: TRG_D [integer for milliseconds]"); + Serial.println("To change the output logic: LOGIC [0|1]"); + Serial.println(" (0 for active low, 1 for active high)"); + Serial.println("To enable piezo plugged detection: PZDET [0|1]"); + Serial.println(" (0 for disabled, 1 for enabled)"); + Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); + Serial.println("To enable or disable debug output: DEBUG [0|1]"); + Serial.println("To print current config: CONFIG"); + Serial.println("To set config to defaults: ERASE"); + Serial.println("To print current state: STATE"); + Serial.println(""); + Serial.println("Commands are entered in this format:"); + Serial.println("CMD VAL"); + Serial.println("Commands are confirmed with Enter key"); + Serial.println(""); + Serial.println("Examples:"); + Serial.println("GAIN_F 3 <~ set gain factor to index 3 (6x)"); + Serial.println("VFOL 2350 <~ set the vref floor to 2.35V"); +#else + Serial.println("Check docs.pyroballpcbs.com/config"); +#endif // defined(ARDUINO_AVR_ATmega328PB) + } + parseData(); +} + +void serialInput() { + // receive data from Serial and save it into inputBuffer + if (Serial.available() > 0) { + + // the order of these IF clauses is significant + identifyMarkers(); + } +} diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/test/README b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/test/README new file mode 100644 index 0000000..df5066e --- /dev/null +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PIO Unit Testing and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PIO Unit Testing: +- https://docs.platformio.org/page/plus/unit-testing.html From 46fc068619dfae9bec039a5e430702ed039f5fff Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Tue, 14 Apr 2020 21:58:00 +0300 Subject: [PATCH 10/18] Correct I2C port now used, fixed config and state reply --- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 2 +- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 70 +++++++++++-------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index 0ef3554..e51cde8 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -48,7 +48,7 @@ extern int Debug; extern long voltMeterConstant; // For fine tuning input voltage sense #define I2C_SLAVE_ADDRESS 24 -extern uint8_t pP_i2c_address; // I2C Bus Address (P + 0 -> 0x50 + 0x30 -> 0x80) +extern uint8_t pP_i2c_address; void eraseEEPROM(); void setDefaultConfig(); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index 5d5d40f..26758a3 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -2,41 +2,51 @@ #include "pP_cmd.h" #include "pP_i2c_config.h" #include "pP_volatile.h" -#include +#include uint8_t command; uint16_t value; -void i2cWrite(int data) { - Wire.write(data >> 8); - Wire.write(data); +void i2cWrite(uint8_t *buffer, int offset, int data) { + buffer[offset] = (uint8_t)(data >> 8); + buffer[offset + 1] = (uint8_t)data; } -void i2cWrite(long data) { - Wire.write(data >> 24); - Wire.write(data >> 16); - Wire.write(data >> 8); - Wire.write(data); +void i2cWrite(uint8_t *buffer, int offset, long data) { + buffer[offset] = (uint8_t)(data >> 24); + buffer[offset + 1] = (uint8_t)(data >> 16); + buffer[offset + 2] = (uint8_t)(data >> 8); + buffer[offset + 3] = (uint8_t)data; } void i2cReportConfig() { - i2cWrite(GAIN_FACTOR); - i2cWrite(followerThrs); - i2cWrite(compThrs); - i2cWrite(LOOP_DUR); - i2cWrite(TRG_DUR); - i2cWrite(Hyst); - i2cWrite(LOGIC); - i2cWrite(PZDET); - i2cWrite(voltMeterConstant); + uint8_t length = 20 + sizeof(PP_VERSION) - 1; + if (length > 32) { + length = 32; + } + uint8_t buffer[length]; + i2cWrite(buffer, 0, GAIN_FACTOR); + i2cWrite(buffer, 2, followerThrs); + i2cWrite(buffer, 4, compThrs); + i2cWrite(buffer, 6, LOOP_DUR); + i2cWrite(buffer, 8, TRG_DUR); + i2cWrite(buffer, 10, Hyst); + i2cWrite(buffer, 12, LOGIC); + i2cWrite(buffer, 14, PZDET); + i2cWrite(buffer, 16, voltMeterConstant); + memcpy(buffer + 20, PP_VERSION, length - 20); + Wire1.write(buffer, length); } void i2cReportState() { - i2cWrite(Vin); - i2cWrite((int)((long)VComp * Vin / 1023)); - i2cWrite((int)((long)VFol * Vin / 1023)); - i2cWrite(ERR_STATE); - i2cWrite(PZ_STATE); + uint8_t length = 10; + uint8_t buffer[length]; + i2cWrite(buffer, 0, Vin); + i2cWrite(buffer, 2, (int)((long)VComp * Vin / 1023)); + i2cWrite(buffer, 4, (int)((long)VFol * Vin / 1023)); + i2cWrite(buffer, 6, ERR_STATE); + i2cWrite(buffer, 8, PZ_STATE); + Wire1.write(buffer, length); } void i2cReply() { @@ -59,13 +69,13 @@ void i2cInput(int bytesReceived) { for (int a = 0; a < bytesReceived; a++) { // Check length of message, drops anything longer than [longBytes] if (a == 0) { - command = Wire.read(); + command = Wire1.read(); } else if (a == 1) { - value = Wire.read(); + value = Wire1.read(); } else if (a == 2) { - value = value << 8 | Wire.read(); + value = value << 8 | Wire1.read(); } else { - Wire.read(); // + Wire1.read(); // } } @@ -116,7 +126,7 @@ void i2cInput(int bytesReceived) { } void i2cInit() { - Wire.begin(pP_i2c_address); - Wire.onRequest(i2cReply); - Wire.onReceive(i2cInput); + Wire1.begin(pP_i2c_address); + Wire1.onRequest(i2cReply); + Wire1.onReceive(i2cInput); } From 21f7ee25fed4163b46f0cfd30ddc90b16c9d8a50 Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Tue, 14 Apr 2020 22:22:39 +0300 Subject: [PATCH 11/18] Added VCC switch to I2C --- firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 2 ++ .../AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h | 3 ++- firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 3 ++- firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h | 1 + firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h | 4 ++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index 26758a3..7edbb5a 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -120,6 +120,8 @@ void i2cInput(int bytesReceived) { break; case CMD_STATE: break; + case CMD_VCCSW: + updateVccSwitch(value); default: return; } diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h index 62b4f09..cd286e5 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h @@ -9,4 +9,5 @@ #define CMD_CONST 0x08 #define CMD_CONFIG 0x09 #define CMD_ERASE 0x0a -#define CMD_STATE 0x0b \ No newline at end of file +#define CMD_STATE 0x0b +#define CMD_VCCSW 0x0c \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 37504a7..60b94f8 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -168,7 +168,8 @@ void updateParams() { Serial.println(" (0 for active low, 1 for active high)"); Serial.println("To enable piezo plugged detection: PZDET [0|1]"); Serial.println(" (0 for disabled, 1 for enabled)"); - Serial.println("To change the main voltage of the circuit: VCCSW [0|1]") Serial.println(" (0 for 3.3v, 1 for 5v)"); + Serial.println("To change the main voltage of the circuit: VCCSW [0|1]"); + Serial.println(" (0 for 3.3v, 1 for 5v)"); Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); Serial.println("To enable or disable debug output: DEBUG [0|1]"); Serial.println("To print current config: CONFIG"); diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h index 13ab362..b976fd9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h @@ -15,6 +15,7 @@ #define CMD_CONFIG 0x09 #define CMD_ERASE 0x0a #define CMD_STATE 0x0b +#define CMD_VCCSW 0x0c #include "WString.h" diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h index 24f118f..4604178 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h @@ -141,6 +141,8 @@ void updateParams() { write(CMD_LOGIC, (uint16_t)serialLong); } else if (strcmp(serialMessageIn, "PZDET") == 0) { write(CMD_PZDET, (uint16_t)serialLong); + } else if (strcmp(serialMessageIn, "VCCSW") == 0) { + write(CMD_VCCSW, (uint16_t)serialLong); } else if (strcmp(serialMessageIn, "CONST") == 0) { write(CMD_CONST, serialLong); } else if (strcmp(serialMessageIn, "CONFIG") == 0) { @@ -161,6 +163,8 @@ void updateParams() { Serial.println(" (0 for active low, 1 for active high)"); Serial.println("To enable piezo plugged detection: PZDET [0|1]"); Serial.println(" (0 for disabled, 1 for enabled)"); + Serial.println("To change the main voltage of the circuit: VCCSW [0|1]"); + Serial.println(" (0 for 3.3v, 1 for 5v)"); Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); Serial.println("To enable or disable debug output: DEBUG [0|1]"); Serial.println("To print current config: CONFIG"); From 2f4e42d34a00b0e58e4ca3b12aa95ce10a417e57 Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Sun, 3 May 2020 14:51:16 +0300 Subject: [PATCH 12/18] Serial commands are now case-insensitive #featureadd --- firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 2 ++ firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 60b94f8..5c34030 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -1,5 +1,6 @@ #include "pP_cmd.h" #include "pP_volatile.h" +#include "string.h" void parseData() { @@ -128,6 +129,7 @@ void serialPrintState() { void updateParams() { serialIncoming = false; + strupr(serialMessageIn); if (strcmp(serialMessageIn, "GAIN_F") == 0) { updateGainFactor(serialLong); } else if (strcmp(serialMessageIn, "VFOL") == 0) { diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h index 4604178..17fe64c 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h @@ -1,5 +1,6 @@ #include "i2c.h" #include "stdint.h" +#include "string.h" #define buffSize 40 bool serialIncoming = false; @@ -125,6 +126,7 @@ void serialPrintState() { void updateParams() { serialIncoming = false; + strupr(serialMessageIn); if (strcmp(serialMessageIn, "GAIN_F") == 0) { write(CMD_GAIN_F, (uint16_t)serialLong); } else if (strcmp(serialMessageIn, "VFOL") == 0) { From 65dbe60c877d7df285dea69503dcf04b4e33f95f Mon Sep 17 00:00:00 2001 From: Vsevolod Merenkov Date: Thu, 7 May 2020 21:55:27 +0300 Subject: [PATCH 13/18] Added user-friendty VCC readings adjustment #featureadd Minor fixes to i2c #bugfix --- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp | 8 +++++++ .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h | 1 + .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 22 ++++++++----------- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp | 15 ------------- .../src/pP_i2c_config.h | 3 ++- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h | 3 +++ .../Pyr0_Piezo_i2c_Bridge/src/i2c.cpp | 14 +++++++++--- .../Pyr0_Piezo_i2c_Bridge/src/i2c.h | 2 ++ .../Pyr0_Piezo_i2c_Bridge/src/pP_serial.h | 21 ++++++++++++++++-- 9 files changed, 55 insertions(+), 34 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp index 4ae86c5..856e6db 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp @@ -1,6 +1,7 @@ #include "EEPROM.h" #include "pP_config.h" #include "pP_function.h" +#include "pP_volatile.h" /*------------------------------------------------*/ @@ -88,6 +89,13 @@ void updateConstant(long value) { } } +void adjustConstant(int value) { + if (value > 0 && Vin > 0) { + voltMeterConstant = (long)(1.1 * value / Vin * 1023 * 1000); + EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); + } +} + /*------------------------------------------------*/ void updateDebug(int value) { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h index 9edfb82..a38149c 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.h @@ -11,6 +11,7 @@ void updateLogic(int value); void updatePzDet(int value); void updateVccSwitch(int value); void updateConstant(long value); +void adjustConstant(int value); void updateDebug(int value); #endif // PP_CMD_H diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index 7edbb5a..f41c200 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -5,7 +5,7 @@ #include uint8_t command; -uint16_t value; +uint32_t value; void i2cWrite(uint8_t *buffer, int offset, int data) { buffer[offset] = (uint8_t)(data >> 8); @@ -33,8 +33,9 @@ void i2cReportConfig() { i2cWrite(buffer, 10, Hyst); i2cWrite(buffer, 12, LOGIC); i2cWrite(buffer, 14, PZDET); - i2cWrite(buffer, 16, voltMeterConstant); - memcpy(buffer + 20, PP_VERSION, length - 20); + i2cWrite(buffer, 16, VCCSW); + i2cWrite(buffer, 18, voltMeterConstant); + memcpy(buffer + 22, PP_VERSION, length - 22); Wire1.write(buffer, length); } @@ -50,8 +51,6 @@ void i2cReportState() { } void i2cReply() { - Serial.print("Requested "); - Serial.println(command); switch (command) { case CMD_CONFIG: case CMD_ERASE: @@ -72,18 +71,11 @@ void i2cInput(int bytesReceived) { command = Wire1.read(); } else if (a == 1) { value = Wire1.read(); - } else if (a == 2) { - value = value << 8 | Wire1.read(); } else { - Wire1.read(); // + value = value << 8 | Wire1.read(); } } - Serial.print("Command "); - Serial.print(command); - Serial.print(" "); - Serial.println(value); - // Parse commands and apply changes or actions switch (command) { case CMD_GAIN_F: @@ -122,6 +114,10 @@ void i2cInput(int bytesReceived) { break; case CMD_VCCSW: updateVccSwitch(value); + break; + case CMD_VCCADJUST: + adjustConstant(value); + break; default: return; } diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp index 1cad709..f34640c 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.hpp @@ -4,21 +4,6 @@ #include "pP_config.h" #include "stdint.h" -#define status_Offset 0x00 // Status register -#define senseInt_Offset 0x01 // Integer of sense threshold in millivolts -#define compInt_Offset 0x02 // Integer of comparator threshold in millivolts -#define gainFactor_Offset 0x03 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x -#define hysteresis_Offset 0x04 // Hysteresis value for ADC measurements -#define loopDuration_Offset 0x05 // duration of time between ADC checks and other loop functions -#define logicLevel_Offset 0x06 -#define piezoDetect_Offset 0x07 -#define triggerDuration_Offset 0x08 // duration of the Z-axis pulse sent, in ms -#define debugEnable_Offset 0x09 -#define voltMeterLong_Offset 0x0a // For fine-tuning the input volt master -#define versionRegister_Offset 0x0b -#define configRegister_Offset 0x0c -#define identRegister_Offset 0x0d - void i2cInit(); #endif // _pP_i2c_h_ diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h index cd286e5..510a3c9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c_config.h @@ -10,4 +10,5 @@ #define CMD_CONFIG 0x09 #define CMD_ERASE 0x0a #define CMD_STATE 0x0b -#define CMD_VCCSW 0x0c \ No newline at end of file +#define CMD_VCCSW 0x0c +#define CMD_VCCADJUST 0x0d \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h index 5c34030..88699d4 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_serial.h @@ -150,6 +150,8 @@ void updateParams() { updateVccSwitch(serialLong); } else if (strcmp(serialMessageIn, "CONST") == 0) { updateConstant(serialLong); + } else if (strcmp(serialMessageIn, "VCCADJUST") == 0) { + adjustConstant(serialLong); } else if (strcmp(serialMessageIn, "DEBUG") == 0) { updateDebug(serialLong); } else if (strcmp(serialMessageIn, "CONFIG") == 0) { @@ -173,6 +175,7 @@ void updateParams() { Serial.println("To change the main voltage of the circuit: VCCSW [0|1]"); Serial.println(" (0 for 3.3v, 1 for 5v)"); Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); + Serial.println("To adjust VCC voltage readings: VCCADJUST [integer in millivolts, use value from multimeter]"); Serial.println("To enable or disable debug output: DEBUG [0|1]"); Serial.println("To print current config: CONFIG"); Serial.println("To set config to defaults: ERASE"); diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp index 02fd0b8..fc36a88 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.cpp @@ -3,11 +3,17 @@ #include "Wire.h" uint16_t read16() { - return Wire.read() << 8 | Wire.read(); + uint8_t value = Wire.read(); + uint8_t value1 = Wire.read(); + return ((uint16_t)value) << 8 | value1; } uint32_t read32() { - return (uint32_t)Wire.read() << 24 | (uint32_t)Wire.read() << 16 | Wire.read() << 8 | Wire.read(); + uint8_t value = Wire.read(); + uint8_t value1 = Wire.read(); + uint8_t value2 = Wire.read(); + uint8_t value3 = Wire.read(); + return ((uint32_t)value) << 24 | ((uint32_t)value1) << 16 | ((uint16_t)value2) << 8 | value3; } void write(uint8_t cmd) { @@ -40,7 +46,6 @@ config_t requestConfig() { Wire.endTransmission(); uint8_t bytes = Wire.requestFrom(ADDRESS, 255); - Serial.println(bytes); config_t config; config.GAIN_FACTOR = read16(); @@ -51,6 +56,7 @@ config_t requestConfig() { config.Hyst = read16(); config.LOGIC = read16(); config.PZDET = read16(); + config.VCCSW = read16(); config.voltMeterConstant = read32(); config.version = Wire.readString(); @@ -70,4 +76,6 @@ state_t requestState() { state.VFol = read16(); state.ERR_STATE = read16(); state.PZ_STATE = read16(); + + return state; } \ No newline at end of file diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h index b976fd9..97b79ae 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/i2c.h @@ -16,6 +16,7 @@ #define CMD_ERASE 0x0a #define CMD_STATE 0x0b #define CMD_VCCSW 0x0c +#define CMD_VCCADJUST 0x0d #include "WString.h" @@ -28,6 +29,7 @@ typedef struct { uint16_t Hyst; uint16_t LOGIC; uint16_t PZDET; + uint16_t VCCSW; uint32_t voltMeterConstant; String version; } config_t; diff --git a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h index 17fe64c..3357a42 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_i2c_Bridge/src/pP_serial.h @@ -90,6 +90,20 @@ void serialPrintConfig() { Serial.print("PZDET "); Serial.println(config.PZDET); + Serial.print("VCCSW "); + Serial.print(config.VCCSW); + switch (config.VCCSW) { + case 0: + Serial.println(" 3.3v"); + break; + case 1: + Serial.println(" 5v"); + break; + default: + Serial.println(" INVALID"); + break; + } + Serial.print("VM_CONST "); Serial.println(config.voltMeterConstant); @@ -107,11 +121,11 @@ void serialPrintState() { Serial.print(","); Serial.print("\"VComp\":"); - Serial.print((uint32_t)state.VComp * state.Vin / 1023); + Serial.print(state.VComp); Serial.print(","); Serial.print("\"VFol\":"); - Serial.print((uint32_t)state.VFol * state.Vin / 1023); + Serial.print(state.VFol); Serial.print(","); Serial.print("\"Err\":"); @@ -147,6 +161,8 @@ void updateParams() { write(CMD_VCCSW, (uint16_t)serialLong); } else if (strcmp(serialMessageIn, "CONST") == 0) { write(CMD_CONST, serialLong); + } else if (strcmp(serialMessageIn, "VCCADJUST") == 0) { + write(CMD_VCCADJUST, (uint16_t)serialLong); } else if (strcmp(serialMessageIn, "CONFIG") == 0) { serialPrintConfig(); } else if (strcmp(serialMessageIn, "ERASE") == 0) { @@ -168,6 +184,7 @@ void updateParams() { Serial.println("To change the main voltage of the circuit: VCCSW [0|1]"); Serial.println(" (0 for 3.3v, 1 for 5v)"); Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]"); + Serial.println("To adjust VCC voltage readings: VCCADJUST [integer in millivolts, use value from multimeter]"); Serial.println("To enable or disable debug output: DEBUG [0|1]"); Serial.println("To print current config: CONFIG"); Serial.println("To set config to defaults: ERASE"); From 3b46a42023dd5dc6e368d0758cb93247772f33ad Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sat, 9 May 2020 12:22:50 -0700 Subject: [PATCH 14/18] formatting fix for markdown in pt100 page #docs --- docs/tutorials/extras/pt100.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/extras/pt100.md b/docs/tutorials/extras/pt100.md index 0629310..c8e8639 100644 --- a/docs/tutorials/extras/pt100.md +++ b/docs/tutorials/extras/pt100.md @@ -1,4 +1,4 @@ -### PT100 RTD Thermal Sensor Integration +# PT100 RTD Thermal Sensor Integration The EasyPiezi (Rev 1.1.x and Rev 2.x.x) utilize an extra amp channel to allow the use of a PT100 RTD Thermal sensor with minimal additional components. The circuit is based on E3D's daughterboard designed for PT100 sensors. @@ -6,4 +6,4 @@ The EasyPiezi (Rev 1.1.x and Rev 2.x.x) utilize an extra amp channel to allow th The circuit outputs a DC voltage that corresponds to the RTD's change in resistance, which in turn changes based on the temperature of the RTD. This output shares a common ground with other parts of the circuit, so only one additonal output pin is required to utilize it. -As this is a direct voltage reading, the usual TH# inputs on most controllers cannot be used (unless the user removes the pullup resistor attached to the input). Instead, the PT100 input must be attached to a bare analog input pin (any of the pins labeled A##, like A5 on Atmega controllers) \ No newline at end of file +As this is a direct voltage reading, the usual TH# inputs on most controllers cannot be used (unless the user removes the pullup resistor attached to the input). Instead, the PT100 input must be attached to a bare analog input pin (any of the pins labeled A##, like A5 on Atmega controllers) From 7086002db535978ebb8bbd9deb0b0a25816f8a55 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sat, 9 May 2020 12:24:03 -0700 Subject: [PATCH 15/18] Code comments/formatting #docs --- .../Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp | 10 +++++++ .../src/pP_config.cpp | 5 ++++ .../src/pP_function.cpp | 13 --------- .../src/pP_function.h | 27 ------------------- 4 files changed, 15 insertions(+), 40 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp index 856e6db..3284c1b 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_cmd.cpp @@ -22,6 +22,7 @@ void updateVFol(int value) { EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs); } } + /*------------------------------------------------*/ void updateVComp(int value) { @@ -40,6 +41,7 @@ void updateLoopDuration(int value) { EEPROM.put(LOOP_DUR_ADDRESS, LOOP_DUR); } } + /*------------------------------------------------*/ void updateTrigDuration(int value) { @@ -48,6 +50,7 @@ void updateTrigDuration(int value) { EEPROM.put(TRG_DUR_ADDRESS, TRG_DUR); } } + /*------------------------------------------------*/ void updateHysteresis(int value) { @@ -56,6 +59,7 @@ void updateHysteresis(int value) { EEPROM.put(HYST_ADDRESS, Hyst); } } + /*------------------------------------------------*/ void updateLogic(int value) { @@ -65,6 +69,7 @@ void updateLogic(int value) { pulse(); } } + /*------------------------------------------------*/ void updatePzDet(int value) { @@ -73,6 +78,7 @@ void updatePzDet(int value) { EEPROM.put(PZDET_ADDRESS, PZDET); } } + /*------------------------------------------------*/ void updateVccSwitch(int value) { @@ -82,6 +88,8 @@ void updateVccSwitch(int value) { } } +/*------------------------------------------------*/ + void updateConstant(long value) { if (value >= 0) { voltMeterConstant = value; @@ -89,6 +97,8 @@ void updateConstant(long value) { } } +/*------------------------------------------------*/ + void adjustConstant(int value) { if (value > 0 && Vin > 0) { voltMeterConstant = (long)(1.1 * value / Vin * 1023 * 1000); diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp index 87e7be6..b681de5 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.cpp @@ -16,6 +16,7 @@ long voltMeterConstant = VM_CONST_DEFAULT; uint8_t pP_i2c_address = 0x10; /*------------------------------------------------*/ + void eraseEEPROM() { setDefaultConfig(); @@ -32,6 +33,8 @@ void eraseEEPROM() { EEPROM.put(VM_CONST_ADDRESS, voltMeterConstant); } +/*------------------------------------------------*/ + // Restore config from EEPROM, otherwise erase config and write to EEPROM void restoreConfig() { int temp; @@ -117,6 +120,8 @@ void restoreConfig() { adjustComp(); } +/*------------------------------------------------*/ + void setDefaultConfig() { GAIN_FACTOR = GAIN_FACTOR_DEFAULT; followerThrs = FOLLOWER_THRESHOLD_DEFAULT; diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp index 2f84907..288efe1 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.cpp @@ -192,19 +192,6 @@ void adjustVcc() { /*------------------------------------------------*/ -// void checkError () { -// if (ERR_STATE == 1) { -// digitalWriteFast(ERR_LED, BlinkState); -// BlinkState = !BlinkState; -// } -// else if (ERR_STATE == 0) { -// BlinkState = LOW; -// digitalWriteFast(ERR_LED, BlinkState); -// } -//} - -/*------------------------------------------------*/ - void pzConCheck() { PZ_STATE = digitalRead(PZDET_PIN); if (PZ_STATE == PZDET) { diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h index e442aae..9abc4f8 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_function.h @@ -16,39 +16,12 @@ int analogReadFast(uint8_t ADCpin); void doubleFlash(); void pulse(); long readVcc(); - -/*------------------------------------------------- -The above function assumes an "ideal" multiplier constant. -Each Atmega chip is slightly different, so it won't be completely accurate -without tuning. Most of the time this won't be necessary, so don't mess -with this if you don't know what you're doing! -The reading can be fine-tuned by using a multimeter, and this equation: - -scale_constant = internal1.1Ref * 1023 * 1000 - -where - -internal1.1Ref = 1.1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function) - -If the scale_constant calculated is different from the default 1125300, -update the voltMeterConstant variable in pP_config.h with the correct value ---------------------------------------------------*/ void readVin(); void adjustFollow(); void adjustComp(); void adjustVcc(); void calibrateAlert(); void adjustGain(); -// void checkError () { -// if (ERR_STATE == 1) { -// digitalWriteFast(ERR_LED, BlinkState); -// BlinkState = !BlinkState; -// } -// else if (ERR_STATE == 0) { -// BlinkState = LOW; -// digitalWriteFast(ERR_LED, BlinkState); -// } -//} void pzConCheck(); #endif // PP_FUNCTION_H \ No newline at end of file From a44ed2556f393929b5706f03524492a56760e9a8 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sat, 9 May 2020 12:24:59 -0700 Subject: [PATCH 16/18] fixed incorrect annotation on one config #docs --- firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h index 07f5b21..ed535cb 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h @@ -43,7 +43,7 @@ extern int PZDET; // Enable or disable piezo connection detection, default is of #define VCCSW_DEFAULT 0 #define VCCSW_ADDRESS 28 -extern int VCCSW; // Enable or disable piezo connection detection, default is off +extern int VCCSW; // Set the signal output to 3.3v [0] or 5v logic [1] extern int Debug; From 74eabff95006689712e1e82c747ca5aed931c24f Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 10 May 2020 14:22:01 -0700 Subject: [PATCH 17/18] fixed string concatentate issue on version_git.py #bugfix --- .../AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/version_git.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/version_git.py b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/version_git.py index 760556b..0d41da9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/version_git.py +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/version_git.py @@ -1,4 +1,7 @@ import subprocess -major_version = "2.2.1" -print("-DPP_VERSION=\\\"" + major_version + "_" + subprocess.check_output(["git", "rev-parse", "HEAD"])[0:6] + "\\\"") +major_version = "2.3.0" + +git_head = str(subprocess.check_output(["git", "rev-parse", "HEAD"])[0:6]) + +print("-DPP_VERSION=\\\"" + major_version + "_" + git_head + "\\\"") \ No newline at end of file From 2184ec69ed98b0d6816eb756c8e51f00dbad1deb Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 10 May 2020 15:11:06 -0700 Subject: [PATCH 18/18] updated changelog for v2.3.0 #docs --- docs/changelog.md | 189 ++++++++++++++++++ .../changelog_2020-05-10_v2.2.1_v2.3.0.md | 183 +++++++++++++++++ mkdocs.yml | 1 + 3 files changed, 373 insertions(+) create mode 100644 docs/changelogs/changelog_2020-05-10_v2.2.1_v2.3.0.md diff --git a/docs/changelog.md b/docs/changelog.md index 523d65e..72022fa 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1268,4 +1268,193 @@ Changelog updated 2020-01-16_11-24-38 - changed error LED behavor to instead indicate a trigger event [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a1267204d5403a3fcd20f680be75cc6753366ca9) +------------------------------------ +### v2.2.1 to v2.3.0 + +Changelog updated 2020-05-10_15-07-19 + + *Added Features* + +- Added FFC-X-Mot board for v2.1.2 [view commit](http://github.com/pyr0ball/pyr0piezo/commit/9db036fc1ee13d3b5176fb5bf5b92bc0b1705af0) + +- Added eagle source files for SingleDisk PCB adapters [view commit](http://github.com/pyr0ball/pyr0piezo/commit/6b6d13e08fdaa915b19635e5706014ff1557589d) + +- added configs for new features logic level and pzdet [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a4a9cb90813fc5e266a67536046f3ae7843fea3a) + +- updated eagle parts library to latest [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83e43f34ae264cc559ccf97175229d012f8606b7) + +- Added support for either 5v or 3.3v operation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b1830500647f918d589c5a2789fab86cfa5f2167) + +- updated parts library with new logo and TH parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b4ea4d7b3e801fa4bebc78481b3216e79aae7109) + +- Built pyr0-piezo v2 circuit on a business card [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d41e24f2eadb59d8c6f5cf00d4713b647d4d98bf) + +- added compiled firmware used on MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8838301821af1c50062aa33850ca78bdb6a1e888) + +- Added code for switching between 3.3v and 5v signal output [view commit](http://github.com/pyr0ball/pyr0piezo/commit/12f86c971b6423e21b550d0ae3377014a091d48b) + +- Serial commands are now case-insensitive [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2f4e42d34a00b0e58e4ca3b12aa95ce10a417e57) + +- Added user-friendty VCC readings adjustment Minor fixes to i2c #bugfix [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +------------------------------------ + + *Bugfixes* + +- updated v2.2.0 eagle files with latest library parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2e8d5cba4c94b07c971bc0f6fb4b212f942b47e4) + +- gave singledisk pcb a bit more flex for better sensitivity [view commit](http://github.com/pyr0ball/pyr0piezo/commit/0de1676e642282700ff34fe56c29fd853e1f06e2) + +- updated piezoPCB singledisk for better actuation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/effa5c7d7faf5e5383f9e7b8dcab6c5f0658d752) + +- trying to eliminate those pesky lbr temp files again [view commit](http://github.com/pyr0ball/pyr0piezo/commit/db0e457450fa9ba14a52c7b514dc4d7800f73a21) + +- Added user-friendty VCC readings adjustment #featureadd Minor fixes to i2c [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +- fixed string concatentate issue on version_git.py [view commit](http://github.com/pyr0ball/pyr0piezo/commit/74eabff95006689712e1e82c747ca5aed931c24f) + + +------------------------------------ + + *Documentation Updates* + +- updated internal version with latest commit [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3f5af8ced7dc1dfc5b8074e8f6127acd8a35957a) + +- updated circuit explanation docs [view commit](http://github.com/pyr0ball/pyr0piezo/commit/91b72b71a10293e891dcd5d7f01b6684f2775397) + +- Added installation tutorial for MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/067c4c0df390b468aa43b1285c58c6f5e602a4ed) + +- fixed typo and missing image asset on install page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/529485f75a239028bec144c34d826c6e769c535d) + +- added a little more info about gettin support to installation page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/e625f5fcaf89aa806cfd58b865e57ec195017f2a) + +- Fixed links to images in a couple of pages [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3955912fb1bd1ec780ddd105a04e84ff1cf5a2d8) + +- Added paypal.me donation link to docs site [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83997a2fab4375cddff9256202e29f0b1f4d4e3f) + +- formatting fix for markdown in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3b46a42023dd5dc6e368d0758cb93247772f33ad) + +- Code comments/formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/7086002db535978ebb8bbd9deb0b0a25816f8a55) + +- fixed incorrect annotation on one config [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a44ed2556f393929b5706f03524492a56760e9a8) + + +------------------------------------ + + *Full Changelog* + +- updated readme [view commit](http://github.com/pyr0ball/pyr0piezo/commit/4300c905516beb5e0963778b450ec2463ccec9f0) + +- #feature Autogenerating version number [view commit](http://github.com/pyr0ball/pyr0piezo/commit/5cf9c4e94a3b14414befba0423b0cb3273846a4c) + +- updated internal version with latest commit [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3f5af8ced7dc1dfc5b8074e8f6127acd8a35957a) + +- Merge branch 'develop' into master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/052023eb7947be76b7c6ac7a7e4dcd39207122b4) + +- Merge pull request #64 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/ca0669d7dffa44ea5e437aef12aec28bc39d7829) + +- Added FFC-X-Mot board for v2.1.2 [view commit](http://github.com/pyr0ball/pyr0piezo/commit/9db036fc1ee13d3b5176fb5bf5b92bc0b1705af0) + +- Added eagle source files for SingleDisk PCB adapters [view commit](http://github.com/pyr0ball/pyr0piezo/commit/6b6d13e08fdaa915b19635e5706014ff1557589d) + +- added configs for new features logic level and pzdet [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a4a9cb90813fc5e266a67536046f3ae7843fea3a) + +- updated v2.2.0 eagle files with latest library parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2e8d5cba4c94b07c971bc0f6fb4b212f942b47e4) + +- updated eagle parts library to latest [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83e43f34ae264cc559ccf97175229d012f8606b7) + +- updated eagle project file with latest library urn [view commit](http://github.com/pyr0ball/pyr0piezo/commit/62c459e0dc21a6f95cb10052ce2009102c441938) + +- gave singledisk pcb a bit more flex for better sensitivity [view commit](http://github.com/pyr0ball/pyr0piezo/commit/0de1676e642282700ff34fe56c29fd853e1f06e2) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/61995934eb96a093d42fb98284abd59c655b2741) + +- Merge branch 'develop' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/76fb8c36310b9d08ca59388e83678511cce2491d) + +- Merge pull request #65 from pyr0ball/develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65f941cd0680d61e33342ae1d4a51e85a2202633) + +- added eagle library backup files to gitignore [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d203ce5e9617a2120a04a04697e361f0435a15da) + +- updated gitignore with eagle library temp files [view commit](http://github.com/pyr0ball/pyr0piezo/commit/4c6e21e67ab8cc35e0c6a46edd24b5490e4426cf) + +- updated eagle library with latest parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/43e04a3e90131085a976a528813d200e5ed1e2d6) + +- Update to README [view commit](http://github.com/pyr0ball/pyr0piezo/commit/82dd63f11111d0ddbd11bed4a46ad8f5200f0623) + +- updated piezoPCB singledisk for better actuation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/effa5c7d7faf5e5383f9e7b8dcab6c5f0658d752) + +- trying to eliminate those pesky lbr temp files again [view commit](http://github.com/pyr0ball/pyr0piezo/commit/db0e457450fa9ba14a52c7b514dc4d7800f73a21) + +- updated circuit explanation docs [view commit](http://github.com/pyr0ball/pyr0piezo/commit/91b72b71a10293e891dcd5d7f01b6684f2775397) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo [view commit](http://github.com/pyr0ball/pyr0piezo/commit/fd7fa2b3bdc8c2474bbcb2d7e7d2e5c7559e1859) + +- Added separate cmd file [view commit](http://github.com/pyr0ball/pyr0piezo/commit/30afcdd8b7be6f0fd13ab5e50c1eb692173c7a66) + +- Attempt at fixing compile error [view commit](http://github.com/pyr0ball/pyr0piezo/commit/36b6402b2e1bf0a174e935cc42dd0559d939d87c) + +- Separating declaration and definition - volatile [view commit](http://github.com/pyr0ball/pyr0piezo/commit/bf800e99409aa2a77a68f65a6380e21cf10abf8a) + +- More separation of declaration and definition [view commit](http://github.com/pyr0ball/pyr0piezo/commit/60a26ad3f713238cdc536b0302aa6de5a44fa6f2) + +- Added installation tutorial for MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/067c4c0df390b468aa43b1285c58c6f5e602a4ed) + +- fixed typo and missing image asset on install page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/529485f75a239028bec144c34d826c6e769c535d) + +- added a little more info about gettin support to installation page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/e625f5fcaf89aa806cfd58b865e57ec195017f2a) + +- updated gitignore for CAM outputs under Eagle_Files [view commit](http://github.com/pyr0ball/pyr0piezo/commit/1efaf53379f11a3136bee61716f45fb0534af48b) + +- Added support for either 5v or 3.3v operation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b1830500647f918d589c5a2789fab86cfa5f2167) + +- updated parts library with new logo and TH parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b4ea4d7b3e801fa4bebc78481b3216e79aae7109) + +- Built pyr0-piezo v2 circuit on a business card [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d41e24f2eadb59d8c6f5cf00d4713b647d4d98bf) + +- added compiled firmware used on MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8838301821af1c50062aa33850ca78bdb6a1e888) + +- Pull latest changes from master into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/c4fc40fa818a78b452a2bdc85cb7c610f2daf903) + +- Merge pull request #68 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/c521adccd33b6d8597e7da8c751769d26fd7cbe2) + +- Added code for switching between 3.3v and 5v signal output [view commit](http://github.com/pyr0ball/pyr0piezo/commit/12f86c971b6423e21b550d0ae3377014a091d48b) + +- Finished business card design [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8d2174d549d7c7d12a626af161ca07902a616246) + +- Formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/f2c3843668c0c5cf79aa38b490d3b087d26d91ec) + +- i2c support, not tested #feature [view commit](http://github.com/pyr0ball/pyr0piezo/commit/02d734b177014aa8d2fc55b756e8568df9544931) + +- Added i2c bridge sketch [view commit](http://github.com/pyr0ball/pyr0piezo/commit/57d11c5b97227ff954a04ad26cda8fe61bfe7241) + +- Correct I2C port now used, fixed config and state reply [view commit](http://github.com/pyr0ball/pyr0piezo/commit/46fc068619dfae9bec039a5e430702ed039f5fff) + +- Merge branch 'develop' of https://github.com/pyr0ball/pyr0piezo [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b3cc47daad9a0a4e9e4517dcdfe4aa05ce0ae3bc) + +- Added VCC switch to I2C [view commit](http://github.com/pyr0ball/pyr0piezo/commit/21f7ee25fed4163b46f0cfd30ddc90b16c9d8a50) + +- Fixed links to images in a couple of pages [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3955912fb1bd1ec780ddd105a04e84ff1cf5a2d8) + +- Added paypal.me donation link to docs site [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83997a2fab4375cddff9256202e29f0b1f4d4e3f) + +- fixed syntax error in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/acb2e7cee714cae4cdbaaf007af572315ee8e1ef) + +- Merge pull request #70 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/ce91ff63ddbf9a93051e909930894cf10b6faba5) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b45315f3b53e765771f010d0f22c3864423477c9) + +- Serial commands are now case-insensitive [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2f4e42d34a00b0e58e4ca3b12aa95ce10a417e57) + +- Added user-friendty VCC readings adjustment Minor fixes to i2c [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +- Merge pull request #71 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/1ea927ecd9c4be146695a829b980e3383231ba26) + +- formatting fix for markdown in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3b46a42023dd5dc6e368d0758cb93247772f33ad) + +- Code comments/formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/7086002db535978ebb8bbd9deb0b0a25816f8a55) + +- fixed incorrect annotation on one config [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a44ed2556f393929b5706f03524492a56760e9a8) + +- fixed string concatentate issue on version_git.py [view commit](http://github.com/pyr0ball/pyr0piezo/commit/74eabff95006689712e1e82c747ca5aed931c24f) + ------------------------------------ diff --git a/docs/changelogs/changelog_2020-05-10_v2.2.1_v2.3.0.md b/docs/changelogs/changelog_2020-05-10_v2.2.1_v2.3.0.md new file mode 100644 index 0000000..dc38fb9 --- /dev/null +++ b/docs/changelogs/changelog_2020-05-10_v2.2.1_v2.3.0.md @@ -0,0 +1,183 @@ +###Pyr0-Piezo Changelog v2.2.1 to v2.3.0 + +#### Added Features + +- Added FFC-X-Mot board for v2.1.2 [view commit](http://github.com/pyr0ball/pyr0piezo/commit/9db036fc1ee13d3b5176fb5bf5b92bc0b1705af0) + +- Added eagle source files for SingleDisk PCB adapters [view commit](http://github.com/pyr0ball/pyr0piezo/commit/6b6d13e08fdaa915b19635e5706014ff1557589d) + +- added configs for new features logic level and pzdet [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a4a9cb90813fc5e266a67536046f3ae7843fea3a) + +- updated eagle parts library to latest [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83e43f34ae264cc559ccf97175229d012f8606b7) + +- Added support for either 5v or 3.3v operation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b1830500647f918d589c5a2789fab86cfa5f2167) + +- updated parts library with new logo and TH parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b4ea4d7b3e801fa4bebc78481b3216e79aae7109) + +- Built pyr0-piezo v2 circuit on a business card [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d41e24f2eadb59d8c6f5cf00d4713b647d4d98bf) + +- added compiled firmware used on MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8838301821af1c50062aa33850ca78bdb6a1e888) + +- Added code for switching between 3.3v and 5v signal output [view commit](http://github.com/pyr0ball/pyr0piezo/commit/12f86c971b6423e21b550d0ae3377014a091d48b) + +- Serial commands are now case-insensitive [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2f4e42d34a00b0e58e4ca3b12aa95ce10a417e57) + +- Added user-friendty VCC readings adjustment Minor fixes to i2c #bugfix [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +------------------------------------ + +#### Bugfixes + +- updated v2.2.0 eagle files with latest library parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2e8d5cba4c94b07c971bc0f6fb4b212f942b47e4) + +- gave singledisk pcb a bit more flex for better sensitivity [view commit](http://github.com/pyr0ball/pyr0piezo/commit/0de1676e642282700ff34fe56c29fd853e1f06e2) + +- updated piezoPCB singledisk for better actuation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/effa5c7d7faf5e5383f9e7b8dcab6c5f0658d752) + +- trying to eliminate those pesky lbr temp files again [view commit](http://github.com/pyr0ball/pyr0piezo/commit/db0e457450fa9ba14a52c7b514dc4d7800f73a21) + +- Added user-friendty VCC readings adjustment #featureadd Minor fixes to i2c [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +- fixed string concatentate issue on version_git.py [view commit](http://github.com/pyr0ball/pyr0piezo/commit/74eabff95006689712e1e82c747ca5aed931c24f) + +------------------------------------ + +#### Documentation Updates + +- updated internal version with latest commit [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3f5af8ced7dc1dfc5b8074e8f6127acd8a35957a) + +- updated circuit explanation docs [view commit](http://github.com/pyr0ball/pyr0piezo/commit/91b72b71a10293e891dcd5d7f01b6684f2775397) + +- Added installation tutorial for MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/067c4c0df390b468aa43b1285c58c6f5e602a4ed) + +- fixed typo and missing image asset on install page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/529485f75a239028bec144c34d826c6e769c535d) + +- added a little more info about gettin support to installation page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/e625f5fcaf89aa806cfd58b865e57ec195017f2a) + +- Fixed links to images in a couple of pages [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3955912fb1bd1ec780ddd105a04e84ff1cf5a2d8) + +- Added paypal.me donation link to docs site [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83997a2fab4375cddff9256202e29f0b1f4d4e3f) + +- formatting fix for markdown in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3b46a42023dd5dc6e368d0758cb93247772f33ad) + +- Code comments/formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/7086002db535978ebb8bbd9deb0b0a25816f8a55) + +- fixed incorrect annotation on one config [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a44ed2556f393929b5706f03524492a56760e9a8) + +------------------------------------ + +#### Full Changelog + +- updated readme [view commit](http://github.com/pyr0ball/pyr0piezo/commit/4300c905516beb5e0963778b450ec2463ccec9f0) + +- #feature Autogenerating version number [view commit](http://github.com/pyr0ball/pyr0piezo/commit/5cf9c4e94a3b14414befba0423b0cb3273846a4c) + +- updated internal version with latest commit [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3f5af8ced7dc1dfc5b8074e8f6127acd8a35957a) + +- Merge branch 'develop' into master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/052023eb7947be76b7c6ac7a7e4dcd39207122b4) + +- Merge pull request #64 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/ca0669d7dffa44ea5e437aef12aec28bc39d7829) + +- Added FFC-X-Mot board for v2.1.2 [view commit](http://github.com/pyr0ball/pyr0piezo/commit/9db036fc1ee13d3b5176fb5bf5b92bc0b1705af0) + +- Added eagle source files for SingleDisk PCB adapters [view commit](http://github.com/pyr0ball/pyr0piezo/commit/6b6d13e08fdaa915b19635e5706014ff1557589d) + +- added configs for new features logic level and pzdet [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a4a9cb90813fc5e266a67536046f3ae7843fea3a) + +- updated v2.2.0 eagle files with latest library parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2e8d5cba4c94b07c971bc0f6fb4b212f942b47e4) + +- updated eagle parts library to latest [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83e43f34ae264cc559ccf97175229d012f8606b7) + +- updated eagle project file with latest library urn [view commit](http://github.com/pyr0ball/pyr0piezo/commit/62c459e0dc21a6f95cb10052ce2009102c441938) + +- gave singledisk pcb a bit more flex for better sensitivity [view commit](http://github.com/pyr0ball/pyr0piezo/commit/0de1676e642282700ff34fe56c29fd853e1f06e2) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/61995934eb96a093d42fb98284abd59c655b2741) + +- Merge branch 'develop' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/76fb8c36310b9d08ca59388e83678511cce2491d) + +- Merge pull request #65 from pyr0ball/develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65f941cd0680d61e33342ae1d4a51e85a2202633) + +- added eagle library backup files to gitignore [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d203ce5e9617a2120a04a04697e361f0435a15da) + +- updated gitignore with eagle library temp files [view commit](http://github.com/pyr0ball/pyr0piezo/commit/4c6e21e67ab8cc35e0c6a46edd24b5490e4426cf) + +- updated eagle library with latest parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/43e04a3e90131085a976a528813d200e5ed1e2d6) + +- Update to README [view commit](http://github.com/pyr0ball/pyr0piezo/commit/82dd63f11111d0ddbd11bed4a46ad8f5200f0623) + +- updated piezoPCB singledisk for better actuation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/effa5c7d7faf5e5383f9e7b8dcab6c5f0658d752) + +- trying to eliminate those pesky lbr temp files again [view commit](http://github.com/pyr0ball/pyr0piezo/commit/db0e457450fa9ba14a52c7b514dc4d7800f73a21) + +- updated circuit explanation docs [view commit](http://github.com/pyr0ball/pyr0piezo/commit/91b72b71a10293e891dcd5d7f01b6684f2775397) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo [view commit](http://github.com/pyr0ball/pyr0piezo/commit/fd7fa2b3bdc8c2474bbcb2d7e7d2e5c7559e1859) + +- Added separate cmd file [view commit](http://github.com/pyr0ball/pyr0piezo/commit/30afcdd8b7be6f0fd13ab5e50c1eb692173c7a66) + +- Attempt at fixing compile error [view commit](http://github.com/pyr0ball/pyr0piezo/commit/36b6402b2e1bf0a174e935cc42dd0559d939d87c) + +- Separating declaration and definition - volatile [view commit](http://github.com/pyr0ball/pyr0piezo/commit/bf800e99409aa2a77a68f65a6380e21cf10abf8a) + +- More separation of declaration and definition [view commit](http://github.com/pyr0ball/pyr0piezo/commit/60a26ad3f713238cdc536b0302aa6de5a44fa6f2) + +- Added installation tutorial for MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/067c4c0df390b468aa43b1285c58c6f5e602a4ed) + +- fixed typo and missing image asset on install page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/529485f75a239028bec144c34d826c6e769c535d) + +- added a little more info about gettin support to installation page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/e625f5fcaf89aa806cfd58b865e57ec195017f2a) + +- updated gitignore for CAM outputs under Eagle_Files [view commit](http://github.com/pyr0ball/pyr0piezo/commit/1efaf53379f11a3136bee61716f45fb0534af48b) + +- Added support for either 5v or 3.3v operation [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b1830500647f918d589c5a2789fab86cfa5f2167) + +- updated parts library with new logo and TH parts [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b4ea4d7b3e801fa4bebc78481b3216e79aae7109) + +- Built pyr0-piezo v2 circuit on a business card [view commit](http://github.com/pyr0ball/pyr0piezo/commit/d41e24f2eadb59d8c6f5cf00d4713b647d4d98bf) + +- added compiled firmware used on MPDM [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8838301821af1c50062aa33850ca78bdb6a1e888) + +- Pull latest changes from master into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/c4fc40fa818a78b452a2bdc85cb7c610f2daf903) + +- Merge pull request #68 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/c521adccd33b6d8597e7da8c751769d26fd7cbe2) + +- Added code for switching between 3.3v and 5v signal output [view commit](http://github.com/pyr0ball/pyr0piezo/commit/12f86c971b6423e21b550d0ae3377014a091d48b) + +- Finished business card design [view commit](http://github.com/pyr0ball/pyr0piezo/commit/8d2174d549d7c7d12a626af161ca07902a616246) + +- Formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/f2c3843668c0c5cf79aa38b490d3b087d26d91ec) + +- i2c support, not tested #feature [view commit](http://github.com/pyr0ball/pyr0piezo/commit/02d734b177014aa8d2fc55b756e8568df9544931) + +- Added i2c bridge sketch [view commit](http://github.com/pyr0ball/pyr0piezo/commit/57d11c5b97227ff954a04ad26cda8fe61bfe7241) + +- Correct I2C port now used, fixed config and state reply [view commit](http://github.com/pyr0ball/pyr0piezo/commit/46fc068619dfae9bec039a5e430702ed039f5fff) + +- Merge branch 'develop' of https://github.com/pyr0ball/pyr0piezo [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b3cc47daad9a0a4e9e4517dcdfe4aa05ce0ae3bc) + +- Added VCC switch to I2C [view commit](http://github.com/pyr0ball/pyr0piezo/commit/21f7ee25fed4163b46f0cfd30ddc90b16c9d8a50) + +- Fixed links to images in a couple of pages [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3955912fb1bd1ec780ddd105a04e84ff1cf5a2d8) + +- Added paypal.me donation link to docs site [view commit](http://github.com/pyr0ball/pyr0piezo/commit/83997a2fab4375cddff9256202e29f0b1f4d4e3f) + +- fixed syntax error in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/acb2e7cee714cae4cdbaaf007af572315ee8e1ef) + +- Merge pull request #70 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/ce91ff63ddbf9a93051e909930894cf10b6faba5) + +- Merge branch 'master' of https://github.com/pyr0ball/pyr0piezo into develop [view commit](http://github.com/pyr0ball/pyr0piezo/commit/b45315f3b53e765771f010d0f22c3864423477c9) + +- Serial commands are now case-insensitive [view commit](http://github.com/pyr0ball/pyr0piezo/commit/2f4e42d34a00b0e58e4ca3b12aa95ce10a417e57) + +- Added user-friendty VCC readings adjustment Minor fixes to i2c [view commit](http://github.com/pyr0ball/pyr0piezo/commit/65dbe60c877d7df285dea69503dcf04b4e33f95f) + +- Merge pull request #71 from loredan/master [view commit](http://github.com/pyr0ball/pyr0piezo/commit/1ea927ecd9c4be146695a829b980e3383231ba26) + +- formatting fix for markdown in pt100 page [view commit](http://github.com/pyr0ball/pyr0piezo/commit/3b46a42023dd5dc6e368d0758cb93247772f33ad) + +- Code comments/formatting [view commit](http://github.com/pyr0ball/pyr0piezo/commit/7086002db535978ebb8bbd9deb0b0a25816f8a55) + +- fixed incorrect annotation on one config [view commit](http://github.com/pyr0ball/pyr0piezo/commit/a44ed2556f393929b5706f03524492a56760e9a8) + +- fixed string concatentate issue on version_git.py [view commit](http://github.com/pyr0ball/pyr0piezo/commit/74eabff95006689712e1e82c747ca5aed931c24f) diff --git a/mkdocs.yml b/mkdocs.yml index 4c31034..e907dc9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -90,6 +90,7 @@ nav: - Changelog: - Version List: 'changelog.md' - Logs: + - 'v2.2.1-v2.3.0': 'changelogs/changelog_2020-05-10_v2.2.1_v2.3.0.md' - 'v2.2.0-v2.2.1': 'changelogs/changelog_2020-01-16_v2.2.0_v2.2.1.md' - 'v2.1.5-v2.1.6': 'changelogs/changelog_2019-12-28_v2.1.5_v2.1.6.md' - 'v2.1.4-v2.1.5': 'changelogs/changelog_2019-10-30_v2.1.4_v2.1.5.md'