Browse Source

Bat

master
Your Name 5 years ago
parent
commit
1d82f9cf09
66 changed files with 6467 additions and 88 deletions
  1. +2
    -2
      FlammableGasSensor/docs/12.log
  2. BIN
      FlammableGasSensor/docs/12.pdf
  3. +32
    -0
      FlammableGasSensor/docs/13.aux
  4. +405
    -0
      FlammableGasSensor/docs/13.log
  5. BIN
      FlammableGasSensor/docs/13.pdf
  6. +159
    -0
      FlammableGasSensor/docs/13.tex
  7. +19
    -0
      FlammableGasSensor/docs/13.toc
  8. BIN
      FlammableGasSensor/docs/fin.pdf
  9. +10
    -0
      Steno_ProCAT_Flash/docs/10.aux
  10. +252
    -0
      Steno_ProCAT_Flash/docs/10.log
  11. BIN
      Steno_ProCAT_Flash/docs/10.pdf
  12. +176
    -0
      Steno_ProCAT_Flash/docs/10.tex
  13. +9
    -0
      Steno_ProCAT_Flash/docs/10.toc
  14. +3
    -3
      Steno_ProCAT_Flash/docs/9.aux
  15. +181
    -41
      Steno_ProCAT_Flash/docs/9.log
  16. BIN
      Steno_ProCAT_Flash/docs/9.pdf
  17. +9
    -2
      Steno_ProCAT_Flash/docs/9.tex
  18. +3
    -3
      Steno_ProCAT_Flash/docs/9.toc
  19. BIN
      Steno_ProCAT_Flash/docs/fin.pdf
  20. +1
    -1
      ZMHW_Modector/docs/15.log
  21. BIN
      ZMHW_Modector/docs/15.pdf
  22. +27
    -0
      ZMHW_Modector/docs/16.aux
  23. +397
    -0
      ZMHW_Modector/docs/16.log
  24. BIN
      ZMHW_Modector/docs/16.pdf
  25. +241
    -0
      ZMHW_Modector/docs/16.tex
  26. +207
    -0
      ZMHW_Modector/docs/16.tex~
  27. +17
    -0
      ZMHW_Modector/docs/16.toc
  28. +27
    -0
      ZMHW_Modector/docs/17.aux
  29. +397
    -0
      ZMHW_Modector/docs/17.log
  30. BIN
      ZMHW_Modector/docs/17.pdf
  31. +246
    -0
      ZMHW_Modector/docs/17.tex
  32. +241
    -0
      ZMHW_Modector/docs/17.tex~
  33. +17
    -0
      ZMHW_Modector/docs/17.toc
  34. +30
    -0
      ZMHW_Modector/docs/18.aux
  35. +397
    -0
      ZMHW_Modector/docs/18.log
  36. BIN
      ZMHW_Modector/docs/18.pdf
  37. +279
    -0
      ZMHW_Modector/docs/18.tex
  38. +249
    -0
      ZMHW_Modector/docs/18.tex~
  39. +20
    -0
      ZMHW_Modector/docs/18.toc
  40. +30
    -0
      ZMHW_Modector/docs/19.aux
  41. +481
    -0
      ZMHW_Modector/docs/19.log
  42. BIN
      ZMHW_Modector/docs/19.pdf
  43. +300
    -0
      ZMHW_Modector/docs/19.tex
  44. +279
    -0
      ZMHW_Modector/docs/19.tex~
  45. +20
    -0
      ZMHW_Modector/docs/19.toc
  46. +30
    -0
      ZMHW_Modector/docs/20.aux
  47. +496
    -0
      ZMHW_Modector/docs/20.log
  48. BIN
      ZMHW_Modector/docs/20.pdf
  49. +308
    -0
      ZMHW_Modector/docs/20.tex
  50. +300
    -0
      ZMHW_Modector/docs/20.tex~
  51. +20
    -0
      ZMHW_Modector/docs/20.toc
  52. BIN
      ZMHW_Modector/docs/fin.pdf
  53. BIN
      ZMHW_Modector/pcb_switcher/bom/switcher_bom.csv
  54. BIN
      ZMHW_Modector/pcb_switcher/bom/switcher_bom2.csv
  55. +22
    -0
      ZMHW_Modector/pcb_switcher/bom/switcher_bom3.csv
  56. BIN
      ZMHW_Modector/pcb_switcher/bom/switcher_bom3.ods
  57. +6
    -2
      ZMHW_Modector/pcb_switcher/uno.bak
  58. +4
    -4
      ZMHW_Modector/pcb_switcher/uno.kicad_pcb
  59. +7
    -7
      ZMHW_Modector/pcb_switcher/uno.kicad_pcb-bak
  60. +6
    -2
      ZMHW_Modector/pcb_switcher/uno.sch
  61. BIN
      ZMHW_Modector/resources/enc28j60_datasheet.pdf
  62. BIN
      ZMHW_Modector/resources/lp2985-n.pdf
  63. +1
    -1
      batterycharge_stationdata/docs/8.log
  64. BIN
      batterycharge_stationdata/docs/8.pdf
  65. +51
    -9
      batterycharge_stationdata/pcb/rev2/batterystation.kicad_pcb
  66. +53
    -11
      batterycharge_stationdata/pcb/rev2/batterystation.kicad_pcb-bak

+ 2
- 2
FlammableGasSensor/docs/12.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 6 SEP 2019 12:30
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:37
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -292,7 +292,7 @@ xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb>
xmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts
/type1/public/amsfonts/cm/cmti10.pfb>
Output written on 12.pdf (8 pages, 362369 bytes).
Output written on 12.pdf (8 pages, 362370 bytes).
PDF statistics:
70 PDF objects out of 1000 (max. 8388607)
47 compressed objects within 1 object stream

BIN
FlammableGasSensor/docs/12.pdf View File


+ 32
- 0
FlammableGasSensor/docs/13.aux View File

@ -0,0 +1,32 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Chip Hunting}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Gas Sensor Tuning}{2}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Application Note resistance table\relax }}{3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.1}Fixed resistors}{3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.2}Gas Sensor Power Usage}{3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.3}PCB Layout}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Switcher}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Enclosure}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}CAD Layout}{4}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Freecad has the ability to pull in boards from Kicad. Even without step file dependencies you can see how the PCB will fit a case\relax }}{4}}
\@writefile{toc}{\contentsline {section}{\numberline {4}PCB Assembly}{4}}
\citation{Schram}
\citation{Pickard}
\citation{EEVBlog}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Place Sensors on the Floor}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {5}In Consideration of ``Hazardous Locations''}{5}}
\citation{Fuchs}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}What Class is my Company?}{6}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.1.1}Encapsulated Fuses}{6}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Existing Gas Detectors}{6}}
\@writefile{toc}{\contentsline {section}{\numberline {7}Switching Power Supply}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Prototype\relax }}{7}}
\@writefile{toc}{\contentsline {section}{\numberline {8}Connecting the Sensor by a Wire}{7}}
\bibcite{Schram}{1}
\bibcite{Pickard}{2}
\bibcite{EEVBlog}{3}
\bibcite{Fuchs}{4}
\@writefile{toc}{\contentsline {section}{\numberline {9}Calibration}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {10}References}{8}}
\bibcite{}{5}

+ 405
- 0
FlammableGasSensor/docs/13.log View File

@ -0,0 +1,405 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:39
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
FlammableGasSensor/docs/13.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/F
lammableGasSensor/docs/13.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count89
\Gm@cntv=\count90
\c@Gm@tempcnt=\count91
\Gm@bindingoffset=\dimen112
\Gm@wd@mp=\dimen113
\Gm@odd@mp=\dimen114
\Gm@even@mp=\dimen115
\Gm@layoutwidth=\dimen116
\Gm@layoutheight=\dimen117
\Gm@layouthoffset=\dimen118
\Gm@layoutvoffset=\dimen119
\Gm@dimlist=\toks15
) (./13.aux)
\openout1 = `13.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 15.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 15.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 15.
(./13.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `13.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 28.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 28.
[2]
<../pics/resistances.png, id=14, 548.80031pt x 152.82094pt>
File: ../pics/resistances.png Graphic file (type png)
<use ../pics/resistances.png>
Package pdftex.def Info: ../pics/resistances.png used on input line 44.
(pdftex.def) Requested size: 439.04083pt x 122.2569pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 45.
See the caption package documentation for explanation.
Overfull \hbox (130.82584pt too wide) in paragraph at lines 44--45
[][]
[]
[3 <../pics/resistances.png (PNG copy)>]
<../pics/kicadstepup1.jpg, id=18, 561.59813pt x 422.32782pt>
File: ../pics/kicadstepup1.jpg Graphic file (type jpg)
<use ../pics/kicadstepup1.jpg>
Package pdftex.def Info: ../pics/kicadstepup1.jpg used on input line 71.
(pdftex.def) Requested size: 280.79837pt x 211.16339pt.
[4 <../pics/kicadstepup1.jpg>]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 90.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 90.
[5] [6]
<../pics/DSCN2209.JPG, id=32, 803.0pt x 602.25pt>
File: ../pics/DSCN2209.JPG Graphic file (type jpg)
<use ../pics/DSCN2209.JPG>
Package pdftex.def Info: ../pics/DSCN2209.JPG used on input line 113.
(pdftex.def) Requested size: 240.90186pt x 180.67639pt.
[7 <../pics/DSCN2209.JPG>]
Underfull \hbox (badness 1337) in paragraph at lines 136--138
\OT1/cmr/m/n/10.95 first edi-tion - 1991, Na-tional Fire Pro-tec-tion As-so-ci-
a-tion
[]
Underfull \hbox (badness 2707) in paragraph at lines 140--142
[]\OT1/cmr/m/n/10.95 Murphy Pickard, \OT1/cmr/m/it/10.95 Surge Stop-per IC Sim-
pli-fies De-sign of
[]
Underfull \hbox (badness 1248) in paragraph at lines 140--142
\OT1/cmr/m/it/10.95 In-trin-sic Safety Bar-rier for Elec-tron-ics Des-tined for
Haz-
[]
Underfull \hbox (badness 10000) in paragraph at lines 140--142
\OT1/cmr/m/n/10.95 2009, https://www.analog.com/en/technical-articles/surge-
[]
Underfull \hbox (badness 10000) in paragraph at lines 140--142
\OT1/cmr/m/n/10.95 stopper-ic-simplifies-design-of-intrinsic-safety-barrier-for
-
[]
Underfull \hbox (badness 10000) in paragraph at lines 144--146
[]\OT1/cmr/m/n/10.95 Various, \OT1/cmr/m/it/10.95 Elec-tron-ics De-sign for Ex-
plo-
[]
Underfull \hbox (badness 10000) in paragraph at lines 144--146
\OT1/cmr/m/it/10.95 sive En-viri-on-ment\OT1/cmr/m/n/10.95 , EEVBlog Fo-rums,
[]
Underfull \hbox (badness 10000) in paragraph at lines 144--146
\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/chat/electronics-
[]
Underfull \hbox (badness 10000) in paragraph at lines 144--146
\OT1/cmr/m/n/10.95 design-for-explosive-environment/?all,
[]
Overfull \hbox (154.94302pt too wide) in paragraph at lines 144--146
\OT1/cmr/m/n/10.95 http://web.archive.org/web/20190410172437/http://www.eevblog
.com/forum/chat/electronics-
[]
Underfull \hbox (badness 10000) in paragraph at lines 148--150
[]\OT1/cmr/m/n/10.95 Various, \OT1/cmr/m/it/10.95 Ex-plo-sion Pro-tec-tion and
In-trin-sic
[]
Underfull \hbox (badness 10000) in paragraph at lines 148--150
\OT1/cmr/m/it/10.95 Safety 101\OT1/cmr/m/n/10.95 , Pep-perl Fuchs, https://www.
pepperl-
[]
Underfull \hbox (badness 10000) in paragraph at lines 148--150
\OT1/cmr/m/n/10.95 fuchs.com/usa/downloads[]USA/explosion-
[]
Underfull \hbox (badness 10000) in paragraph at lines 148--150
\OT1/cmr/m/n/10.95 protection-and-intrinsic-safety-101.pdf,
[]
Overfull \hbox (21.99161pt too wide) in paragraph at lines 148--150
\OT1/cmr/m/n/10.95 http://web.archive.org/web/20190721221654/https://www.pepper
l-
[]
Underfull \hbox (badness 10000) in paragraph at lines 148--150
\OT1/cmr/m/n/10.95 fuchs.com/usa/downloads[]USA/explosion-protection-and-
[]
[8] [9] (./13.aux) )
Here is how much of TeX's memory you used:
3565 strings out of 494945
54171 string characters out of 6181032
119070 words of memory out of 5000000
6830 multiletter control sequences out of 15000+600000
10376 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,1259b,212s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/
cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmb
x12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/
share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/te
xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts
/type1/public/amsfonts/cm/cmti10.pfb>
Output written on 13.pdf (9 pages, 363165 bytes).
PDF statistics:
73 PDF objects out of 1000 (max. 8388607)
49 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
16 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
FlammableGasSensor/docs/13.pdf View File


+ 159
- 0
FlammableGasSensor/docs/13.tex View File

@ -0,0 +1,159 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Flammable Gas Sensor}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Shop needs a flammable gas sensor, for safety.
\textcolor{green!60!blue!70}{
\section{Chip Hunting}}
I'm looking at the following:
\begin{itemize}
\item SGAS711
\item 200K fixed resistor
\item 1M potentiometer
\item Arduino Nano (for speed)
\item Ample Power Supply They are recommending 7 Volts for the heater. So, one rated for 1A.
\item led notifiers
\item Long cables to separate sensor from device. (optional)
\end{itemize}
\textcolor{green!60!blue!70}{
\subsection{Gas Sensor Tuning}}
The flammable gas sensor has different sensitivities for different gases (see data sheet, Figure 8). I'm going to need to test for something specific, i.e. if the shop needs to watch out for acetone, I should test acetone. Of course, if enough of a flammable gas is in the air, it will set it off no matter what, but I should focus on what the danger is for calibrating.
Based on the resistance chart, I'm going to use a fixed 200K and a 1M pot. Pots are to be avoided, but here we need to calibrate over time. For the response of the v divider, the sensor is not linear, but closer (though not quite) logarithmic. So what I will do, is have to use some math on the micro, and use the formula they give in the Datasheet, to get a logarithmic output that appears linear (figure 5). For my needs, it is good enough.
\includegraphics[scale=0.8]{../pics/resistances.png}
\captionof{figure}{Application Note resistance table}
\textcolor{green!60!blue!70}{
\subsubsection{Fixed resistors}}
If these sensors are consistent enough, possibly I could use fixed resistors later.
\textcolor{green!60!blue!70}{
\subsubsection{Gas Sensor Power Usage}}
Rated at 900mW for 7V, so about 150mA (128mA). I know from prior experience these things heat up, so we need plenty of power.
\textcolor{green!60!blue!70}{
\subsubsection{PCB Layout}}
The gas sensor must be sideways, as there is excessive dust in the shop so, the holes will be on the side. I will do a 90 degree edge mount pcb.
\textcolor{green!60!blue!70}{
\subsection{Switcher}}
STS1024S6V5 Seems like a fair option for now. Output is 6.5 volts which is enough. Will use a module. Need to make a footprint.
\textcolor{green!60!blue!70}{
\subsection{Enclosure}}
We need a box that is tall enough to be a cube. Also want square, not rectangular. I plan to have the leds light from the back of the pcb. The pcb will be the top cover / front. The top cover / front will be the box, put on its side, so dust doesn't collect on the leds. Need a cube.
\textcolor{green!60!blue!70}{
\section{CAD Layout}}
I found that Kicad step up in Freecad is helpful for making sure your board will fit the enclosure. A very helpful addition to an arsenal. Although I didn't test it until after rev 1.
\begin{center}
\includegraphics[scale=0.5]{../pics/kicadstepup1.jpg}
\captionof{figure}{Freecad has the ability to pull in boards from Kicad. Even without step file dependencies you can see how the PCB will fit a case}
\end{center}
\textcolor{green!60!blue!70}{
\section{PCB Assembly}}
Most of the board came out ok. Power section is routed right. I need to move the barrel plug further out of the board, so it fits with the case better. The one issue I overlooked
was the A6, and A7 pins, which have no digital circuitry behind them. So I have some pins that can't light up. I'll have to bodge wires in, or respin the board. Simple fix. Oversight on my part, that's all. I assumed GPIO on all pins, but here are two analog pins that can't function as GPIO.
\vspace{0.2in}
I'll use D7, and D8. Looks like I also missed the wire from VSenseOut of the Gas sensor to the board. So that will go to A6. Technically, I missed a net on the schematic.
\vspace{0.2in}
One other fail of the enclosure, is that the Arduino nano won't fit with female pin headers holding it in. This means, instead of easily being socketable, I'll have to solder the board in. Not a deal-breaker, but I would prefer the nano to be easily removable. I don't like soldering it on the board. In the future, I need to find a taller enclosure.
\textcolor{green!60!blue!70}{
\subsection{Place Sensors on the Floor}}
Being that at least some flammable gases are heavier than air\footnote{Reference: Plumbing, Rex Cauldwell, 2006, page 137 - Gas Heater Awareness - Great book.}(in our case, they are, your situation may vary) it is logical for us to put them on the floor. There are no rules, though so why not both? It would be interesting to see the LEDs responding differently at say waist height, and at your feet. That would indicate different gas in the air.
\textcolor{green!60!blue!70}{
\section{In Consideration of ``Hazardous Locations''}}
Up to this point, I have not paid any attention to official rules or standards regarding safety\footnote{Our environment is only dangerous when there is a gas leak (extremely rarely), so we are the least strict of the hazardous location types. In the US, this is Class 1, Division 2. Gas (class 1) can be present, but is not normally (division 2). We regularly have dust in our air, however it is silica and therefore inert / not explosive.}. The search term for a device like this that may be in an environment that can dangerous is \textbf{hazardous locations}. There are a few books on the subject I found (specifically for electronics in hazardous locations). I downloaded the PDF of a few online, but was not impressed with the writing quality enough to buy them with the exception of \emph{Electrical Installations in Hazardous Locations} by Peter Schram \cite{Schram}. There is also a succint Application note which covers a general overview in Linear Technology Magazine September 2009, also accessible online \cite{Pickard}. As a launchoff point, some discussion can also be found online in various forums \cite{EEVBlog}.
\textcolor{green!60!blue!70}{
\subsection{What Class is my Company?}}
Based on \cite{Fuchs}, we are a Class 1, Division 2. With the Class 1, being Group D, as we would have leaks of those gases. It's possible that certain areas (inside the reactors for example) may be a higher class.
\textcolor{green!60!blue!70}{
\subsubsection{Encapsulated Fuses}}
Encapsulated fuses are also referred to as UL913 online (e.g. in stores). UL913 is UL's \emph{Standard for Intrinsically Safe Apparatus and Associated Apparatus for Use in Class I, II, III, Division 1, Hazardous (Classified) Locations}. Another term to search for is \emph{intrinsically safe} on the parametric search for fuses. The cheapest intrinsically safe fuse in 1 quantity on Digikey is currently \$4.50. Ouch. Safety requirements sure help some people, just not the buyers. I see a market, for a blobbed fuse at \$1.
\textcolor{green!60!blue!70}{
\section{Existing Gas Detectors}}
We have already purchased a commercial gas detector. This particular model is designed so that the control box is kept separated from the sensor. The sensor has a 30 foot cable. The control box is installed in the ceiling. \footnote{See in the git: teardowns 2019, the RKI instruments combustible gas sensor.}
\textcolor{green!60!blue!70}{
\section{Switching Power Supply}}
In search of a low part count, simple to deploy switcher I came across this in my rss (https://hackaday.com/2019/08/11/switching-over-to-smps-for-efficiency/). The LM2576 is easy enough to use instead of a lm317, and requires only a diode and inductor more. Here I need more power efficiency from the 12V input so that should work. A simple go-to switcher.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN2209.JPG}
\captionof{figure}{Prototype}
\end{center}
\textcolor{green!60!blue!70}{
\section{Connecting the Sensor by a Wire}}
Upon showing this to my family co. who wanted it, they mentioned they wanted a cable going to the sensor. I looked at the RKI Instruments flammable gas sensor, which we have a few of, and these used a 22 Gauge 4 conductor cable. That is \$50 for 100' of cable. A more DIY solution is to grab some 4 pair CAT5E or CAT6 and connect two wires to each screw terminal on the board. That is what I will do. Saves money, and should work no issue, up to the 30 feet max that I need. Any small box can be used for the sensors. I might build a pcb mount for those, or perhaps just some hot glue. Depends on what works the best, while being efficient.
\textcolor{green!60!blue!70}{
\section{Calibration}}
This is the real task of this project. Making a gas sensor is easy, calibrating it, is another step. Thankfully, some companies sell calibration tanks. For calibration you might calibrate on the LEL or the lowest acceptable level before an alarm should be fired off for a given chemical.
\textcolor{green!60!blue!70}{
\section{References}}
\begin{thebibliography}{99}
\bibitem{Schram}
Peter Schram,
\emph{Electrical Installations in Hazardous Locations}, first edition - 1991, National Fire Protection Association (NFPA), ISBN-13: 9780877653561.
\bibitem{Pickard}
Murphy Pickard,
\emph{Surge Stopper IC Simplifies Design of Intrinsic Safety Barrier for Electronics Destined for Hazardous Environments}, Linear Technology Magazine September 2009, https://www.analog.com/en/technical-articles/surge-stopper-ic-simplifies-design-of-intrinsic-safety-barrier-for-electronics.html .
\bibitem{EEVBlog}
Various,
\emph{Electronics Design for Explosive Envirionment}, EEVBlog Forums, https://www.eevblog.com/forum/chat/electronics-design-for-explosive-environment/?all, http://web.archive.org/web/20190410172437/http://www.eevblog.com/forum/chat/electronics-design-for-explosive-environment/?all.
\bibitem{Fuchs}
Various,
\emph{Explosion Protection and Intrinsic Safety 101}, Pepperl Fuchs, https://www.pepperl-fuchs.com/usa/downloads\_USA/explosion-protection-and-intrinsic-safety-101.pdf, http://web.archive.org/web/20190721221654/https://www.pepperl-fuchs.com/usa/downloads\_USA/explosion-protection-and-intrinsic-safety-101.pdf.
\bibitem{}
\end{thebibliography}
\end{document}

+ 19
- 0
FlammableGasSensor/docs/13.toc View File

@ -0,0 +1,19 @@
\contentsline {section}{\numberline {1}Overview}{2}
\contentsline {section}{\numberline {2}Chip Hunting}{2}
\contentsline {subsection}{\numberline {2.1}Gas Sensor Tuning}{2}
\contentsline {subsubsection}{\numberline {2.1.1}Fixed resistors}{3}
\contentsline {subsubsection}{\numberline {2.1.2}Gas Sensor Power Usage}{3}
\contentsline {subsubsection}{\numberline {2.1.3}PCB Layout}{3}
\contentsline {subsection}{\numberline {2.2}Switcher}{3}
\contentsline {subsection}{\numberline {2.3}Enclosure}{3}
\contentsline {section}{\numberline {3}CAD Layout}{4}
\contentsline {section}{\numberline {4}PCB Assembly}{4}
\contentsline {subsection}{\numberline {4.1}Place Sensors on the Floor}{5}
\contentsline {section}{\numberline {5}In Consideration of ``Hazardous Locations''}{5}
\contentsline {subsection}{\numberline {5.1}What Class is my Company?}{6}
\contentsline {subsubsection}{\numberline {5.1.1}Encapsulated Fuses}{6}
\contentsline {section}{\numberline {6}Existing Gas Detectors}{6}
\contentsline {section}{\numberline {7}Switching Power Supply}{7}
\contentsline {section}{\numberline {8}Connecting the Sensor by a Wire}{7}
\contentsline {section}{\numberline {9}Calibration}{8}
\contentsline {section}{\numberline {10}References}{8}

BIN
FlammableGasSensor/docs/fin.pdf View File


+ 10
- 0
Steno_ProCAT_Flash/docs/10.aux View File

@ -0,0 +1,10 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Work Log}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Not All ProCAT Flash's will work with Plover}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Never Believe the Internet}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Soldering Experience is a plus}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.1}Simplest Explanation of a Shift In Register}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Conclusion}{6}}

+ 252
- 0
Steno_ProCAT_Flash/docs/10.log View File

@ -0,0 +1,252 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:36
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
Steno_ProCAT_Flash/docs/10.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/S
teno_ProCAT_Flash/docs/10.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./10.aux)
\openout1 = `10.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
(./10.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 3.
)
\tf@toc=\write3
\openout3 = `10.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Overfull \hbox (19.70627pt too wide) in paragraph at lines 63--63
[]\OT1/cmtt/m/n/10.95 On ribbon cable going from left to right looking from abo
ve.[]
[]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 63--63
[]\OT1/cmtt/m/n/10.95 On my IO board, the pins are staggered, so there is 1,2,3
,[]
[]
[2] [3]
Overfull \hbox (31.20364pt too wide) in paragraph at lines 93--93
[] \OT1/cmtt/m/n/10.95 * All inputs are pulled up. Pressing a key s
horts[]
[]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 93--93
[] \OT1/cmtt/m/n/10.95 * We invert the logic here to convert to mor
e[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 137--137
[] \OT1/cmtt/m/n/10.95 packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have
to move[]
[]
Overfull \hbox (59.94708pt too wide) in paragraph at lines 137--137
[] \OT1/cmtt/m/n/10.95 | (raw_data[ 4] << 4) /* T- */ //chan
ge values.[]
[]
[4]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 137--137
[] \OT1/cmtt/m/n/10.95 packed_data[4] = (raw_data[23] << 6) /* -P */ // was
14[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 137--137
[] \OT1/cmtt/m/n/10.95 | (raw_data[22] << 5) /* -B */ // wa
s dupe 0[]
[]
[5]
Overfull \hbox (59.94708pt too wide) in paragraph at lines 166--166
[] \OT1/cmtt/m/n/10.95 Increment clock up, then down (as long as Micro GPIO
is <30MHz)[]
[]
Overfull \hbox (71.44446pt too wide) in paragraph at lines 166--166
[] \OT1/cmtt/m/n/10.95 (30MHz being max speed
of shift ic)[]
[]
[6] [7] (./10.aux) )
Here is how much of TeX's memory you used:
1942 strings out of 494945
25525 string characters out of 6181032
94872 words of memory out of 5000000
5264 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,35p,1082b,250s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/
cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmb
x12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/s
hare/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/tex
live/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 10.pdf (7 pages, 120177 bytes).
PDF statistics:
56 PDF objects out of 1000 (max. 8388607)
39 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
Steno_ProCAT_Flash/docs/final.pdf → Steno_ProCAT_Flash/docs/10.pdf View File


+ 176
- 0
Steno_ProCAT_Flash/docs/10.tex View File

@ -0,0 +1,176 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{ProCAT Flash and Plover}
\author{Steak Electronics}
\date{2019}
\begin{document}
%\maketitle
\textbf{ProCAT Flash and Plover Hax}
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
I want to use a ProCAT flash with Plover. The ProCAT Flash is a stenography machine. It allows for faster typing, and less strain. Plover is a FOSS Stenography project.
\textcolor{green!60!blue!70}{
\section{Work Log}
\subsection{Not All ProCAT Flash's will work with Plover}}
Some of the plover docs mention that a ProCAT flash will work with a RJ11 to DB9 cable, and that the protocol can be set to Baron. My device must be an older firmware as there is no option to change the protocol, and in fact the RJ11 appears to be only for outbound calling... There is a modem option, and it allows you to call a number. It appears to be for actually calling a phone line.
Instead, there is an arduino sketch of someone who has previously tapped into the serial out of the IO Expander (essentially the board that reads the keys), and helpfully outlined the process. By cutting the motherboard out of the picture, and driving the IO board directly from a 5V Arduino, one can use the ProCAT without the need for its built in modem. Neat.
\textcolor{green!60!blue!70}{
\subsection{Backup Plan: Reading from a ProCAT Flash with an Arduino}}
There is a six pin ribbon cable that can be cut in half, or removed, and then the arduino connected to it. This is a minimally invasive hack. I can always put the cable back. Let's begin.
The ink ribbon can be easily removed to gain better access to the IO board. The Shift Registers are TI 74HC165 which means this board may be able to be repaired, if needed. There is a conformal coating on the board, both sides. Funny how laptops don't bother with conformal coatings for waterproofing.\footnote{100+ years of electronics engineering advances, billions of dollars of R\&D, yet we can't figure out how to keep a laptop safe from a cup of H2O.}
Vcc is pin 16, and Gnd is 8. Tracing that back to the 6 pin cable to confirm the pinout of the arduino sketch is right,
\textcolor{green!60!blue!70}{
\subsubsection{Never Believe the Internet}}
The pinout of the sketch was wrong, for my flash. To be fair, my flash is not a Stentura 200, so that's why.
My pinout is:
\begin{verbatim}
On ribbon cable going from left to right looking from above.
RIBBON CABLE:
1 SH/LD (shift)
2 GND
3 CLK
4 PWR
5 Serial Out
6 ??? Goes to Resistor
(INSERT PICTURE)
On my IO board, the pins are staggered, so there is 1,2,3,
then another column of 4,5,6 (columns start at the top,
1 being a square pad). Confusing.
IO BOARD PADS
1 ??? Goes to Resistor
2 PWR
3 GND
4 Serial Out
5 CLK (goes underneath a resistor, then to all clocks)
6 SH/LD
(INSERT PICTURE)
\end{verbatim}
These pins on the IO board are also soldered to pads (not holes) and fragile. Shit design. Tiny wires. I disconnected one just trying to follow the wires. Also they put some tape w/grease on the wires, and have them in a different order on the PCB from what the ribbon cable wiring is. Shit. Nothing I can't handle, however.
There are three rails going on the top (bottom?) of the IO board. These are CLOCK, SH/LD, and Power. GND is a copper flood on the top (bottom?) of the IO board. Make sure to double check the pins line up with what you are connecting after building this.
If you look closely on the circuit board for the IO expander, you might see labels for the Pins. I have G for gnd, + for Pwr, C for clk, etc..
\textcolor{green!60!blue!70}{
\subsection{Soldering Experience is a plus}}
I don't need to use the ribbon cable. Instead, let's take off the wires and use my own cable. I might make a PCB to fit inside the Flash... I'll need to edit the Arduino sketch too.
Not only the IO board, but I'll also need to attach wires to the metal chassis or frame somewhere inside. The Pins of the Steno short the IO expander to ground so I need to have the Arduino connected to chassis as well.
Very carefully, I used solder wick to remove all solder from the existig pins. Making sure to tin the tip before using wick each time. After removing all the solder, I pushed through the pins to remove the conformal coating from the other side. Then I passed some wires through the (fairly thick) PCB. Not too hard, but it helps to have experience here.
\textcolor{green!60!blue!70}{
\subsection{steno-arduino sketch is also not compatible with Flash}}
I made some edits to the Arduino sketch. One thing noteworthy to myself is the
\begin{verbatim}
/*
* All inputs are pulled up. Pressing a key shorts
the circuit to
* ground.
*
* We invert the logic here to convert to more
conventional positive
* logic.
*/
pressed = !digitalRead(DATA_IN);
\end{verbatim}
Haven't see the !variable logic before. Only in booleans, if(!true)...
The mapping of the pins on the ProCAT flash is different from the Stentura, so some deciphering was necessary. I ended up brute forcing some of it, as I couldn't figure out exactly how it was different, with relation to the previous setup.
I also added the debounce logic from one of the repos into the code. And added some serial debug notes. All said and done, the device connected into Plover and worked without issue. Nice.
Here is the mapping that took 1-2 hours to decipher, and the end result (see also arduino folder).
\begin{verbatim}
void construct_data(char raw_data[], char packed_data[])
{
packed_data[0] = 0x80;
packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have to move
arrays entries around here, if you are going to
| (raw_data[ 4] << 4) /* T- */ //change values.
Need all 24 bits.
| (raw_data[ 3] << 3) /* K- */
| (raw_data[ 2] << 2) /* P- */
| (raw_data[ 1] << 1) /* W- */
| (raw_data[ 0] << 0); /* H- */
packed_data[2] = (raw_data[ 15] << 6) /* R- */
| (raw_data[ 14] << 5) /* A- */
| (raw_data[ 13] << 4) /* O- */
| (raw_data[ 12] << 3); /* * */
packed_data[3] = (raw_data[11] << 3) /* -E */
| (raw_data[10] << 2) /* -U */
| (raw_data[9] << 1) /* -F */
| (raw_data[8] << 0); /* -R */
packed_data[4] = (raw_data[23] << 6) /* -P */ // was 14
| (raw_data[22] << 5) /* -B */ // was dupe 0
| (raw_data[21] << 4) /* -L */
| (raw_data[20] << 3) /* -G */
| (raw_data[19] << 2) /* -T */
| (raw_data[18] << 1) /* -S */
| (raw_data[17] << 0); /* -D */
packed_data[5] = (raw_data[6] << 6) /* # */ //
| (raw_data[16] << 0); /* -Z */
}
\end{verbatim}
The Gemini PR protocol is reasonable to deal with, and this hack worked out well. Looking at the above packed\_data, you can see that all the Gemini PR protocol is, is the initial 0x80 byte, followed by the bits either being 0 or 1 for each key. Simple.
\textcolor{green!60!blue!70}{
\subsubsection{Simplest Explanation of a Shift In Register}}
I've used these 4 or 5 times now, but finally I understand a simple enough way to use these.
The \textbf{simplest shift register in} code does the following:
\begin{verbatim}
Hold All pins low (CLK,DATA,LATCH)
Bring Latch Up
Enter For Loop
Read DATA bit (into array)
Increment clock up, then down (as long as Micro GPIO is <30MHz)
(30MHz being max speed of shift ic)
Read DATA bit
Increment clock up, then down
Repeat until for loop exhausted
Put Latch Down (now the data will again be read
by the parallel inputs)
Repeat
\end{verbatim}
That is the simplest explanation for a shift in register, and it is demonstrated here, in the steno-arduino code. Nice.
\textcolor{green!60!blue!70}{
\section{Conclusion}}
The ProCAT Flash is similar to the Stentura 200 but not identical. Due to that, the arduino sketch needed to be customized somewhat to interface with the Shift Registers. Also, the pinout of the ribbon cable was different. Otherwise, thanks to the original efforts of the first steno-arduino sketch, I was able to make this old ProCAT Flash output to Plover without using the internal Motherboard, nor the RJ11 connection. I now have a real steno machine that cost no more than \$100 including shipping. \footnote{This price is comparable to what it would've cost for a home built keyboard solution. But is the value the same? I doubt it. The machining of the key levers on this ProCAT is miles beyond a PCB and some switches put together in a weekend.}
I feel using a genuine Steno machine was the right choice to starting down this road, as I don't want to deal with the toys or half baked solutions made by some hackers who are selling home built keyboards.\footnote{There is also the issue that the switches on these keyboard all require 10-30 something of force for each key, whereas the ProCAT only requires 10-20 of force for the first key, whereas all subsequent keys, are free of strain. A small difference, but the devil is in the details. You can't beat the real thing.} However, I will say, that once I'm comfortable with this, I might get one of those keyboards, add a few extra keys on\footnote{By keys, I mean I plan to make a custom keyboard solution. Rotaries, Slide pots, etc... All the fun interfacing things.}, and make my own custom keyboard for interfacing with GNU Linux. There is a reason to have both a genuine steno machine, and a custom hacker diy keyboard solution. Why not both?
\end{document}

+ 9
- 0
Steno_ProCAT_Flash/docs/10.toc View File

@ -0,0 +1,9 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Work Log}{1}
\contentsline {subsection}{\numberline {2.1}Not All ProCAT Flash's will work with Plover}{1}
\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{2}
\contentsline {subsubsection}{\numberline {2.2.1}Never Believe the Internet}{2}
\contentsline {subsection}{\numberline {2.3}Soldering Experience is a plus}{3}
\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{4}
\contentsline {subsubsection}{\numberline {2.4.1}Simplest Explanation of a Shift In Register}{5}
\contentsline {section}{\numberline {3}Conclusion}{6}

+ 3
- 3
Steno_ProCAT_Flash/docs/9.aux View File

@ -2,9 +2,9 @@
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Work Log}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Not All ProCAT Flash's will work with Plover}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{2}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Never Believe the Internet}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Soldering Experience is a plus}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{4}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.4.1}Simplest Explanation of a Shift In Register}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Conclusion}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Conclusion}{6}}

+ 181
- 41
Steno_ProCAT_Flash/docs/9.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 20 JUN 2019 17:00
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:35
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -7,8 +7,8 @@ Steno_ProCAT_Flash/docs/9.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/S
teno_ProCAT_Flash/docs/9.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 2 languages loaded.
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
@ -26,76 +26,216 @@ File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
No file 9.aux.
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./9.aux)
\openout1 = `9.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
No file 9.toc.
\tf@toc=\write3
\openout3 = `9.toc'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
(./9.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 22.
(Font) <10.95> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 22.
(Font) <8> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 22.
(Font) <6> on input line 3.
)
\tf@toc=\write3
\openout3 = `9.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 22.
(Font) <9> on input line 29.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 22.
[1
(Font) <5> on input line 29.
Overfull \hbox (19.70627pt too wide) in paragraph at lines 59--59
[]\OT1/cmtt/m/n/10.95 On ribbon cable going from left to right looking from abo
ve.[]
[]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 59--59
[]\OT1/cmtt/m/n/10.95 On my IO board, the pins are staggered, so there is 1,2,3
,[]
[]
[2] [3]
Overfull \hbox (31.20364pt too wide) in paragraph at lines 87--87
[] \OT1/cmtt/m/n/10.95 * All inputs are pulled up. Pressing a key s
horts[]
[]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 87--87
[] \OT1/cmtt/m/n/10.95 * We invert the logic here to convert to mor
e[]
[]
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3]
Overfull \hbox (13.6647pt too wide) in paragraph at lines 124--124
Overfull \hbox (48.4497pt too wide) in paragraph at lines 131--131
[] \OT1/cmtt/m/n/10.95 packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have
to move[]
[]
Overfull \hbox (25.16208pt too wide) in paragraph at lines 124--124
Overfull \hbox (59.94708pt too wide) in paragraph at lines 131--131
[] \OT1/cmtt/m/n/10.95 | (raw_data[ 4] << 4) /* T- */ //chan
ge values.[]
[]
[4]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 131--131
[] \OT1/cmtt/m/n/10.95 packed_data[4] = (raw_data[23] << 6) /* -P */ // was
14[]
[]
Overfull \hbox (13.6647pt too wide) in paragraph at lines 124--124
Overfull \hbox (48.4497pt too wide) in paragraph at lines 131--131
[] \OT1/cmtt/m/n/10.95 | (raw_data[22] << 5) /* -B */ // wa
s dupe 0[]
[]
[4]
Overfull \hbox (25.16208pt too wide) in paragraph at lines 152--152
[5]
Overfull \hbox (59.94708pt too wide) in paragraph at lines 159--159
[] \OT1/cmtt/m/n/10.95 Increment clock up, then down (as long as Micro GPIO
is <30MHz)[]
[]
Overfull \hbox (36.65945pt too wide) in paragraph at lines 152--152
Overfull \hbox (71.44446pt too wide) in paragraph at lines 159--159
[] \OT1/cmtt/m/n/10.95 (30MHz being max speed
of shift ic)[]
[]
[5] [6] (./9.aux) )
[6] [7] (./9.aux) )
Here is how much of TeX's memory you used:
239 strings out of 495020
2838 string characters out of 6181323
54970 words of memory out of 5000000
3527 multiletter control sequences out of 15000+600000
1942 strings out of 494945
25514 string characters out of 6181032
94872 words of memory out of 5000000
5264 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,19p,1081b,145s stack positions out of 5000i,500n,10000p,200000b,80000s
23i,8n,35p,1081b,250s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/c
m/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx
12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
@ -103,10 +243,10 @@ m/cmbx10.pfb>
are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texl
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texm
f-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 9.pdf (6 pages, 117311 bytes).
Output written on 9.pdf (7 pages, 120048 bytes).
PDF statistics:
51 PDF objects out of 1000 (max. 8388607)
35 compressed objects within 1 object stream
56 PDF objects out of 1000 (max. 8388607)
39 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
Steno_ProCAT_Flash/docs/9.pdf View File


+ 9
- 2
Steno_ProCAT_Flash/docs/9.tex View File

@ -1,5 +1,10 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{ProCAT Flash and Plover}
\author{Steak Electronics}
\date{2019}
@ -8,10 +13,12 @@
%\maketitle
\textbf{ProCAT Flash and Plover Hax}
\tableofcontents
\section{Overview}
\textcolor{green!60!blue!70}{
\section{Overview}}
I want to use a ProCAT flash with Plover. The ProCAT Flash is a stenography machine. It allows for faster typing, and less strain. Plover is a FOSS Stenography project.
\textcolor{green!60!blue!70}{
\section{Work Log}
\subsection{Not All ProCAT Flash's will work with Plover}
\subsection{Not All ProCAT Flash's will work with Plover}}
Some of the plover docs mention that a ProCAT flash will work with a RJ11 to DB9 cable, and that the protocol can be set to Baron. My device must be an older firmware as there is no option to change the protocol, and in fact the RJ11 appears to be only for outbound calling... There is a modem option, and it allows you to call a number. It appears to be for actually calling a phone line.
Instead, there is an arduino sketch of someone who has previously tapped into the serial out of the IO Expander (essentially the board that reads the keys), and helpfully outlined the process. By cutting the motherboard out of the picture, and driving the IO board directly from a 5V Arduino, one can use the ProCAT without the need for its built in modem. Neat.

+ 3
- 3
Steno_ProCAT_Flash/docs/9.toc View File

@ -1,9 +1,9 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Work Log}{1}
\contentsline {subsection}{\numberline {2.1}Not All ProCAT Flash's will work with Plover}{1}
\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{1}
\contentsline {subsection}{\numberline {2.2}Backup Plan: Reading from a ProCAT Flash with an Arduino}{2}
\contentsline {subsubsection}{\numberline {2.2.1}Never Believe the Internet}{2}
\contentsline {subsection}{\numberline {2.3}Soldering Experience is a plus}{3}
\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{3}
\contentsline {subsection}{\numberline {2.4}steno-arduino sketch is also not compatible with Flash}{4}
\contentsline {subsubsection}{\numberline {2.4.1}Simplest Explanation of a Shift In Register}{5}
\contentsline {section}{\numberline {3}Conclusion}{5}
\contentsline {section}{\numberline {3}Conclusion}{6}

BIN
Steno_ProCAT_Flash/docs/fin.pdf View File


+ 1
- 1
ZMHW_Modector/docs/15.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 6 DEC 2019 19:05
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 22 DEC 2019 19:51
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.

BIN
ZMHW_Modector/docs/15.pdf View File


+ 27
- 0
ZMHW_Modector/docs/16.aux View File

@ -0,0 +1,27 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Parts List}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Work Log}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Testing the Sick IR Diode Tripwire \relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \relax }}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.\relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Arduino and Part 2 of sensor. Lined up with the other part.\relax }}{7}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.\relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces IR in action. (without a reflective sticker, it doesn't go very far!)\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}}
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.\relax }}{11}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Deployment}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The need for POE}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}}

+ 397
- 0
ZMHW_Modector/docs/16.log View File

@ -0,0 +1,397 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 22 DEC 2019 20:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
ZMHW_Modector/docs/16.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/Z
MHW_Modector/docs/16.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
) (./16.aux)
\openout1 = `16.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen112
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks15
\MPscratchCnt=\count92
\MPscratchDim=\dimen113
\MPnumerator=\count93
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./16.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `16.toc'.
Overfull \hbox (11.59073pt too wide) in paragraph at lines 16--17
\OT1/cmr/m/n/10.95 stal-la-tions. These sen-sors use ZMTrig-ger.pl (wiki.zonemi
nder.com/ZMTrigger)
[]
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 21.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 21.
[2]
<../pics/DSCN0207.JPG, id=14, 803.0pt x 602.25pt>
File: ../pics/DSCN0207.JPG Graphic file (type jpg)
<use ../pics/DSCN0207.JPG>
Package pdftex.def Info: ../pics/DSCN0207.JPG used on input line 53.
(pdftex.def) Requested size: 321.1943pt x 240.89572pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 54.
See the caption package documentation for explanation.
[3]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 56.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 56.
[4 <../pics/DSCN0207.JPG>]
<../pics/DSCN0217.JPG, id=24, 803.0pt x 602.25pt>
File: ../pics/DSCN0217.JPG Graphic file (type jpg)
<use ../pics/DSCN0217.JPG>
Package pdftex.def Info: ../pics/DSCN0217.JPG used on input line 73.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0220.JPG, id=25, 803.0pt x 602.25pt>
File: ../pics/DSCN0220.JPG Graphic file (type jpg)
<use ../pics/DSCN0220.JPG>
Package pdftex.def Info: ../pics/DSCN0220.JPG used on input line 76.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[5 <../pics/DSCN0217.JPG>] <../pics/DSCN0225.JPG, id=29, 803.0pt x 602.25pt>
File: ../pics/DSCN0225.JPG Graphic file (type jpg)
<use ../pics/DSCN0225.JPG>
Package pdftex.def Info: ../pics/DSCN0225.JPG used on input line 79.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0227.JPG, id=30, 803.0pt x 602.25pt>
File: ../pics/DSCN0227.JPG Graphic file (type jpg)
<use ../pics/DSCN0227.JPG>
Package pdftex.def Info: ../pics/DSCN0227.JPG used on input line 82.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/walloutlet2.jpg, id=31, 481.8pt x 642.4pt>
File: ../pics/walloutlet2.jpg Graphic file (type jpg)
<use ../pics/walloutlet2.jpg>
Package pdftex.def Info: ../pics/walloutlet2.jpg used on input line 85.
(pdftex.def) Requested size: 120.44969pt x 160.59961pt.
[6 <../pics/DSCN0220.JPG> <../pics/DSCN0225.JPG> <../pics/DSCN0227.JPG>] <../p
ics/DSCN0265.JPG, id=35, 803.0pt x 602.25pt>
File: ../pics/DSCN0265.JPG Graphic file (type jpg)
<use ../pics/DSCN0265.JPG>
Package pdftex.def Info: ../pics/DSCN0265.JPG used on input line 94.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[7 <../pics/walloutlet2.jpg> <../pics/DSCN0265.JPG>]
Overfull \hbox (7.91602pt too wide) in paragraph at lines 112--112
[] \OT1/cmtt/m/n/10.95 is. To use with 5v ttl (using a second 5v source) wire a
s such:[]
[]
<../pics/DSCN0273.JPG, id=40, 803.0pt x 602.25pt>
File: ../pics/DSCN0273.JPG Graphic file (type jpg)
<use ../pics/DSCN0273.JPG>
Package pdftex.def Info: ../pics/DSCN0273.JPG used on input line 115.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[8 <../pics/DSCN0273.JPG>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Overfull \hbox (94.14633pt too wide) in paragraph at lines 146--146
[]\OT1/cmtt/m/n/10.95 Heres a small utility function which determines how much
RAM iscurrentlyunused:[]
[]
Overfull \hbox (71.15158pt too wide) in paragraph at lines 146--146
[] \OT1/cmtt/m/n/10.95 return (int) &v - (__brkval == 0 ? (int) &__heap_start
: (int) __brkval);[]
[]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Underfull \hbox (badness 4391) in paragraph at lines 149--153
[]\OT1/cmr/m/n/10.95 An easy res-o-lu-tion for this is to put all se-rial.print
lines into
[]
Underfull \hbox (badness 1158) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 flash mem-ory. You can ver-ify this helps, by tak-ing a se-r
ial.print,
[]
Underfull \hbox (badness 2426) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 and com-ment-ing it out, and com-par-ing the be-fore and af-
ter dy-
[]
Underfull \hbox (badness 1546) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 namic mem-ory used in ver-ify. To put se-rial print lines in
flash:
[]
Overfull \hbox (67.99345pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/write/)
[]
Overfull \hbox (67.08095pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/print/)
[]
[9] <../pics/wshark1.jpg, id=48, 1018.55531pt x 883.80188pt>
File: ../pics/wshark1.jpg Graphic file (type jpg)
<use ../pics/wshark1.jpg>
Package pdftex.def Info: ../pics/wshark1.jpg used on input line 158.
(pdftex.def) Requested size: 509.27641pt x 441.89986pt.
Overfull \hbox (149.27641pt too wide) in paragraph at lines 158--159
[][]
[]
[10]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[11 <../pics/wshark1.jpg>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
[12]
Underfull \hbox (badness 10000) in paragraph at lines 193--193
[][]\OT1/cmr/m/n/9 https://www.eevblog.com/forum/beginners/jelly-bean-switching
-regulator-
[]
[13]
Underfull \hbox (badness 10000) in paragraph at lines 201--202
[]\OT1/cmr/m/n/10.95 http://blog.derouineau.fr/2011/07/putting-enc28j60-etherne
t-controler-in-
[]
Overfull \hbox (180.37665pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOf
f(void) DEBUG_V3:Function started"));[]
[]
Overfull \hbox (174.62796pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOn
(void) DEBUG_V3:Function started"));[]
[]
[14] [15] (./16.aux) )
Here is how much of TeX's memory you used:
2645 strings out of 494945
42438 string characters out of 6181032
96817 words of memory out of 5000000
5921 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,658b,194s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
s/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 16.pdf (15 pages, 1523531 bytes).
PDF statistics:
98 PDF objects out of 1000 (max. 8388607)
62 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
46 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
ZMHW_Modector/ZMHW_Modector.pdf → ZMHW_Modector/docs/16.pdf View File


+ 241
- 0
ZMHW_Modector/docs/16.tex View File

@ -0,0 +1,241 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
\end{document}

+ 207
- 0
ZMHW_Modector/docs/16.tex~ View File

@ -0,0 +1,207 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or there is a sleep mode in the ENC28J60 data sheet. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected. Otherwise the ethernet can be off. Will save some power.
\end{document}

+ 17
- 0
ZMHW_Modector/docs/16.toc View File

@ -0,0 +1,17 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Parts List}{2}
\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}
\contentsline {section}{\numberline {3}Work Log}{3}
\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}
\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}
\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}
\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}
\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}
\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}
\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}
\contentsline {section}{\numberline {6}Deployment}{12}
\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}
\contentsline {subsection}{\numberline {6.2}The need for POE}{13}
\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}
\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}
\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}

+ 27
- 0
ZMHW_Modector/docs/17.aux View File

@ -0,0 +1,27 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Parts List}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Work Log}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Testing the Sick IR Diode Tripwire \relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \relax }}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.\relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Arduino and Part 2 of sensor. Lined up with the other part.\relax }}{7}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.\relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces IR in action. (without a reflective sticker, it doesn't go very far!)\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}}
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.\relax }}{11}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Deployment}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The need for POE}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}}

+ 397
- 0
ZMHW_Modector/docs/17.log View File

@ -0,0 +1,397 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 24 DEC 2019 01:57
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
ZMHW_Modector/docs/17.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/Z
MHW_Modector/docs/17.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
) (./17.aux)
\openout1 = `17.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen112
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks15
\MPscratchCnt=\count92
\MPscratchDim=\dimen113
\MPnumerator=\count93
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./17.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `17.toc'.
Overfull \hbox (11.59073pt too wide) in paragraph at lines 16--17
\OT1/cmr/m/n/10.95 stal-la-tions. These sen-sors use ZMTrig-ger.pl (wiki.zonemi
nder.com/ZMTrigger)
[]
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 21.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 21.
[2]
<../pics/DSCN0207.JPG, id=14, 803.0pt x 602.25pt>
File: ../pics/DSCN0207.JPG Graphic file (type jpg)
<use ../pics/DSCN0207.JPG>
Package pdftex.def Info: ../pics/DSCN0207.JPG used on input line 53.
(pdftex.def) Requested size: 321.1943pt x 240.89572pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 54.
See the caption package documentation for explanation.
[3]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 56.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 56.
[4 <../pics/DSCN0207.JPG>]
<../pics/DSCN0217.JPG, id=24, 803.0pt x 602.25pt>
File: ../pics/DSCN0217.JPG Graphic file (type jpg)
<use ../pics/DSCN0217.JPG>
Package pdftex.def Info: ../pics/DSCN0217.JPG used on input line 73.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0220.JPG, id=25, 803.0pt x 602.25pt>
File: ../pics/DSCN0220.JPG Graphic file (type jpg)
<use ../pics/DSCN0220.JPG>
Package pdftex.def Info: ../pics/DSCN0220.JPG used on input line 76.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[5 <../pics/DSCN0217.JPG>] <../pics/DSCN0225.JPG, id=29, 803.0pt x 602.25pt>
File: ../pics/DSCN0225.JPG Graphic file (type jpg)
<use ../pics/DSCN0225.JPG>
Package pdftex.def Info: ../pics/DSCN0225.JPG used on input line 79.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0227.JPG, id=30, 803.0pt x 602.25pt>
File: ../pics/DSCN0227.JPG Graphic file (type jpg)
<use ../pics/DSCN0227.JPG>
Package pdftex.def Info: ../pics/DSCN0227.JPG used on input line 82.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/walloutlet2.jpg, id=31, 481.8pt x 642.4pt>
File: ../pics/walloutlet2.jpg Graphic file (type jpg)
<use ../pics/walloutlet2.jpg>
Package pdftex.def Info: ../pics/walloutlet2.jpg used on input line 85.
(pdftex.def) Requested size: 120.44969pt x 160.59961pt.
[6 <../pics/DSCN0220.JPG> <../pics/DSCN0225.JPG> <../pics/DSCN0227.JPG>] <../p
ics/DSCN0265.JPG, id=35, 803.0pt x 602.25pt>
File: ../pics/DSCN0265.JPG Graphic file (type jpg)
<use ../pics/DSCN0265.JPG>
Package pdftex.def Info: ../pics/DSCN0265.JPG used on input line 94.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[7 <../pics/walloutlet2.jpg> <../pics/DSCN0265.JPG>]
Overfull \hbox (7.91602pt too wide) in paragraph at lines 112--112
[] \OT1/cmtt/m/n/10.95 is. To use with 5v ttl (using a second 5v source) wire a
s such:[]
[]
<../pics/DSCN0273.JPG, id=40, 803.0pt x 602.25pt>
File: ../pics/DSCN0273.JPG Graphic file (type jpg)
<use ../pics/DSCN0273.JPG>
Package pdftex.def Info: ../pics/DSCN0273.JPG used on input line 115.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[8 <../pics/DSCN0273.JPG>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Overfull \hbox (94.14633pt too wide) in paragraph at lines 146--146
[]\OT1/cmtt/m/n/10.95 Heres a small utility function which determines how much
RAM iscurrentlyunused:[]
[]
Overfull \hbox (71.15158pt too wide) in paragraph at lines 146--146
[] \OT1/cmtt/m/n/10.95 return (int) &v - (__brkval == 0 ? (int) &__heap_start
: (int) __brkval);[]
[]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Underfull \hbox (badness 4391) in paragraph at lines 149--153
[]\OT1/cmr/m/n/10.95 An easy res-o-lu-tion for this is to put all se-rial.print
lines into
[]
Underfull \hbox (badness 1158) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 flash mem-ory. You can ver-ify this helps, by tak-ing a se-r
ial.print,
[]
Underfull \hbox (badness 2426) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 and com-ment-ing it out, and com-par-ing the be-fore and af-
ter dy-
[]
Underfull \hbox (badness 1546) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 namic mem-ory used in ver-ify. To put se-rial print lines in
flash:
[]
Overfull \hbox (67.99345pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/write/)
[]
Overfull \hbox (67.08095pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/print/)
[]
[9] <../pics/wshark1.jpg, id=48, 1018.55531pt x 883.80188pt>
File: ../pics/wshark1.jpg Graphic file (type jpg)
<use ../pics/wshark1.jpg>
Package pdftex.def Info: ../pics/wshark1.jpg used on input line 158.
(pdftex.def) Requested size: 509.27641pt x 441.89986pt.
Overfull \hbox (149.27641pt too wide) in paragraph at lines 158--159
[][]
[]
[10]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[11 <../pics/wshark1.jpg>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
[12]
Underfull \hbox (badness 10000) in paragraph at lines 193--193
[][]\OT1/cmr/m/n/9 https://www.eevblog.com/forum/beginners/jelly-bean-switching
-regulator-
[]
[13]
Underfull \hbox (badness 10000) in paragraph at lines 201--202
[]\OT1/cmr/m/n/10.95 http://blog.derouineau.fr/2011/07/putting-enc28j60-etherne
t-controler-in-
[]
Overfull \hbox (180.37665pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOf
f(void) DEBUG_V3:Function started"));[]
[]
Overfull \hbox (174.62796pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOn
(void) DEBUG_V3:Function started"));[]
[]
[14] [15] (./17.aux) )
Here is how much of TeX's memory you used:
2644 strings out of 494945
42436 string characters out of 6181032
96817 words of memory out of 5000000
5921 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,658b,194s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
s/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 17.pdf (15 pages, 1524487 bytes).
PDF statistics:
98 PDF objects out of 1000 (max. 8388607)
62 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
46 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
ZMHW_Modector/docs/17.pdf View File


+ 246
- 0
ZMHW_Modector/docs/17.tex View File

@ -0,0 +1,246 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\end{document}

+ 241
- 0
ZMHW_Modector/docs/17.tex~ View File

@ -0,0 +1,241 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
\end{document}

+ 17
- 0
ZMHW_Modector/docs/17.toc View File

@ -0,0 +1,17 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Parts List}{2}
\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}
\contentsline {section}{\numberline {3}Work Log}{3}
\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}
\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}
\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}
\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}
\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}
\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}
\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}
\contentsline {section}{\numberline {6}Deployment}{12}
\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}
\contentsline {subsection}{\numberline {6.2}The need for POE}{13}
\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}
\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}
\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}

+ 30
- 0
ZMHW_Modector/docs/18.aux View File

@ -0,0 +1,30 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Parts List}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Work Log}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Testing the Sick IR Diode Tripwire \relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \relax }}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.\relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Arduino and Part 2 of sensor. Lined up with the other part.\relax }}{7}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.\relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces IR in action. (without a reflective sticker, it doesn't go very far!)\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}}
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.\relax }}{11}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Deployment}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The need for POE}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.7}Other Changes}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{15}}

+ 397
- 0
ZMHW_Modector/docs/18.log View File

@ -0,0 +1,397 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 24 DEC 2019 03:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
ZMHW_Modector/docs/18.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/Z
MHW_Modector/docs/18.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
) (./18.aux)
\openout1 = `18.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen112
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks15
\MPscratchCnt=\count92
\MPscratchDim=\dimen113
\MPnumerator=\count93
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./18.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `18.toc'.
Overfull \hbox (11.59073pt too wide) in paragraph at lines 16--17
\OT1/cmr/m/n/10.95 stal-la-tions. These sen-sors use ZMTrig-ger.pl (wiki.zonemi
nder.com/ZMTrigger)
[]
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 21.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 21.
[2]
<../pics/DSCN0207.JPG, id=14, 803.0pt x 602.25pt>
File: ../pics/DSCN0207.JPG Graphic file (type jpg)
<use ../pics/DSCN0207.JPG>
Package pdftex.def Info: ../pics/DSCN0207.JPG used on input line 53.
(pdftex.def) Requested size: 321.1943pt x 240.89572pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 54.
See the caption package documentation for explanation.
[3]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 56.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 56.
[4 <../pics/DSCN0207.JPG>]
<../pics/DSCN0217.JPG, id=24, 803.0pt x 602.25pt>
File: ../pics/DSCN0217.JPG Graphic file (type jpg)
<use ../pics/DSCN0217.JPG>
Package pdftex.def Info: ../pics/DSCN0217.JPG used on input line 73.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0220.JPG, id=25, 803.0pt x 602.25pt>
File: ../pics/DSCN0220.JPG Graphic file (type jpg)
<use ../pics/DSCN0220.JPG>
Package pdftex.def Info: ../pics/DSCN0220.JPG used on input line 76.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[5 <../pics/DSCN0217.JPG>] <../pics/DSCN0225.JPG, id=29, 803.0pt x 602.25pt>
File: ../pics/DSCN0225.JPG Graphic file (type jpg)
<use ../pics/DSCN0225.JPG>
Package pdftex.def Info: ../pics/DSCN0225.JPG used on input line 79.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0227.JPG, id=30, 803.0pt x 602.25pt>
File: ../pics/DSCN0227.JPG Graphic file (type jpg)
<use ../pics/DSCN0227.JPG>
Package pdftex.def Info: ../pics/DSCN0227.JPG used on input line 82.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/walloutlet2.jpg, id=31, 481.8pt x 642.4pt>
File: ../pics/walloutlet2.jpg Graphic file (type jpg)
<use ../pics/walloutlet2.jpg>
Package pdftex.def Info: ../pics/walloutlet2.jpg used on input line 85.
(pdftex.def) Requested size: 120.44969pt x 160.59961pt.
[6 <../pics/DSCN0220.JPG> <../pics/DSCN0225.JPG> <../pics/DSCN0227.JPG>] <../p
ics/DSCN0265.JPG, id=35, 803.0pt x 602.25pt>
File: ../pics/DSCN0265.JPG Graphic file (type jpg)
<use ../pics/DSCN0265.JPG>
Package pdftex.def Info: ../pics/DSCN0265.JPG used on input line 94.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[7 <../pics/walloutlet2.jpg> <../pics/DSCN0265.JPG>]
Overfull \hbox (7.91602pt too wide) in paragraph at lines 112--112
[] \OT1/cmtt/m/n/10.95 is. To use with 5v ttl (using a second 5v source) wire a
s such:[]
[]
<../pics/DSCN0273.JPG, id=40, 803.0pt x 602.25pt>
File: ../pics/DSCN0273.JPG Graphic file (type jpg)
<use ../pics/DSCN0273.JPG>
Package pdftex.def Info: ../pics/DSCN0273.JPG used on input line 115.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[8 <../pics/DSCN0273.JPG>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Overfull \hbox (94.14633pt too wide) in paragraph at lines 146--146
[]\OT1/cmtt/m/n/10.95 Heres a small utility function which determines how much
RAM iscurrentlyunused:[]
[]
Overfull \hbox (71.15158pt too wide) in paragraph at lines 146--146
[] \OT1/cmtt/m/n/10.95 return (int) &v - (__brkval == 0 ? (int) &__heap_start
: (int) __brkval);[]
[]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Underfull \hbox (badness 4391) in paragraph at lines 149--153
[]\OT1/cmr/m/n/10.95 An easy res-o-lu-tion for this is to put all se-rial.print
lines into
[]
Underfull \hbox (badness 1158) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 flash mem-ory. You can ver-ify this helps, by tak-ing a se-r
ial.print,
[]
Underfull \hbox (badness 2426) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 and com-ment-ing it out, and com-par-ing the be-fore and af-
ter dy-
[]
Underfull \hbox (badness 1546) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 namic mem-ory used in ver-ify. To put se-rial print lines in
flash:
[]
Overfull \hbox (67.99345pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/write/)
[]
Overfull \hbox (67.08095pt too wide) in paragraph at lines 149--153
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/print/)
[]
[9] <../pics/wshark1.jpg, id=48, 1018.55531pt x 883.80188pt>
File: ../pics/wshark1.jpg Graphic file (type jpg)
<use ../pics/wshark1.jpg>
Package pdftex.def Info: ../pics/wshark1.jpg used on input line 158.
(pdftex.def) Requested size: 509.27641pt x 441.89986pt.
Overfull \hbox (149.27641pt too wide) in paragraph at lines 158--159
[][]
[]
[10]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[11 <../pics/wshark1.jpg>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
[12]
Underfull \hbox (badness 10000) in paragraph at lines 193--193
[][]\OT1/cmr/m/n/9 https://www.eevblog.com/forum/beginners/jelly-bean-switching
-regulator-
[]
[13]
Underfull \hbox (badness 10000) in paragraph at lines 201--202
[]\OT1/cmr/m/n/10.95 http://blog.derouineau.fr/2011/07/putting-enc28j60-etherne
t-controler-in-
[]
Overfull \hbox (180.37665pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOf
f(void) DEBUG_V3:Function started"));[]
[]
Overfull \hbox (174.62796pt too wide) in paragraph at lines 232--232
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOn
(void) DEBUG_V3:Function started"));[]
[]
[14] [15] [16] (./18.aux) )
Here is how much of TeX's memory you used:
2645 strings out of 494945
42438 string characters out of 6181032
97817 words of memory out of 5000000
5921 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,658b,194s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/am
sfonts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
r10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/s
hare/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/tex
live/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 18.pdf (16 pages, 1527050 bytes).
PDF statistics:
101 PDF objects out of 1000 (max. 8388607)
64 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
46 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
ZMHW_Modector/docs/18.pdf View File


+ 279
- 0
ZMHW_Modector/docs/18.tex View File

@ -0,0 +1,279 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\subsection{Staggered switcher and modect board 0.1'' headers}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\subsection{Other Changes}
The 470uf caps I bought don't fit into the footprints. They are probably oversized for capacitance, anyway.
Can use through hole resistors for the divider on these. Easier to assemble.
I need to fix the caps, so they have the same polarity on a given left or right side. Right now on the LM section, they are swapped. Too easy to mess up.
Inductor footprint is a little small, but placing diagonally works well.
The single D7 pin header is difficult to solder. Make it a pair.
The fuse footprint should be bigger.
\subsection{Blowing Fuses}
The LM section... I first used a 2Amp smd fuse. No problem.
2 and 3, I used a 1.5Amp smd fuse. Both of them failed, upon 12V PSU input. Guess 2 Amps is the lower limit. This is with nothing but the power shield, so no input. Must be a current spike into the inductor, and caps, I imagine.. Oh, I also used 470uF filter caps (in and out) on these boards, as its all I had... Maybe the caps are why.
2A fuse seems to work. Still not sure if its the caps or the vreg, or both. Welp, looks like the 2nd board with the 2A fuse blew. So here's what happened.
\begin{itemize}
\item Board 1: 220uf Input filter cap, 470uf output filter cap.
\item Board 2: 470uf Input and Output filter cap.
\end{itemize}
Board 1 blew the 1.5A fuse, but not the 2A fuse.
Board 2 blew both the 1.5A and 2A fuse.
The 470uf caps are not what is supposed to be there, but it's all I had bought. They were supposed to be 120uf.
So caps will blow fuses. Of course they will though, when you think about it. I guess up to 2Amps was short circuiting for a second with the 470uf caps. Something to log with better equipment.
\end{document}

+ 249
- 0
ZMHW_Modector/docs/18.tex~ View File

@ -0,0 +1,249 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\subsection{Staggered switcher and modect board 0.1'' headers}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\end{document}

+ 20
- 0
ZMHW_Modector/docs/18.toc View File

@ -0,0 +1,20 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Parts List}{2}
\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}
\contentsline {section}{\numberline {3}Work Log}{3}
\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}
\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}
\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}
\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}
\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{7}
\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{8}
\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{9}
\contentsline {section}{\numberline {6}Deployment}{12}
\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{12}
\contentsline {subsection}{\numberline {6.2}The need for POE}{13}
\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{13}
\contentsline {subsection}{\numberline {6.4}Switcher Shield}{13}
\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{13}
\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{15}
\contentsline {subsection}{\numberline {6.7}Other Changes}{15}
\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{15}

+ 30
- 0
ZMHW_Modector/docs/19.aux View File

@ -0,0 +1,30 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Parts List}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Work Log}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Testing the Sick IR Diode Tripwire \relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces \relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.\relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Arduino and Part 2 of sensor. Lined up with the other part.\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{8}}
\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.\relax }}{9}}
\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces IR in action. (without a reflective sticker, it doesn't go very far!)\relax }}{10}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{10}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{10}}
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.\relax }}{13}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Deployment}{14}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The need for POE}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Switcher Shield}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{16}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{17}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.7}Other Changes}{18}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{18}}

+ 481
- 0
ZMHW_Modector/docs/19.log View File

@ -0,0 +1,481 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 24 DEC 2019 03:18
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
ZMHW_Modector/docs/19.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/Z
MHW_Modector/docs/19.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count89
\Gm@cntv=\count90
\c@Gm@tempcnt=\count91
\Gm@bindingoffset=\dimen112
\Gm@wd@mp=\dimen113
\Gm@odd@mp=\dimen114
\Gm@even@mp=\dimen115
\Gm@layoutwidth=\dimen116
\Gm@layoutheight=\dimen117
\Gm@layouthoffset=\dimen118
\Gm@layoutvoffset=\dimen119
\Gm@dimlist=\toks15
) (./19.aux)
\openout1 = `19.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 14.
(./19.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `19.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (97.26285pt too wide) in paragraph at lines 20--21
\OT1/cmr/m/n/10.95 soft-ware in-stal-la-tions. These sen-sors use ZMTrig-ger.pl
(wiki.zoneminder.com/ZMTrigger)
[]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 26.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 26.
[2]
<../pics/DSCN0207.JPG, id=14, 803.0pt x 602.25pt>
File: ../pics/DSCN0207.JPG Graphic file (type jpg)
<use ../pics/DSCN0207.JPG>
Package pdftex.def Info: ../pics/DSCN0207.JPG used on input line 61.
(pdftex.def) Requested size: 321.1943pt x 240.89572pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 62.
See the caption package documentation for explanation.
Overfull \hbox (12.97931pt too wide) in paragraph at lines 61--62
[][]
[]
[3]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 64.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 64.
[4 <../pics/DSCN0207.JPG>]
<../pics/DSCN0217.JPG, id=24, 803.0pt x 602.25pt>
File: ../pics/DSCN0217.JPG Graphic file (type jpg)
<use ../pics/DSCN0217.JPG>
Package pdftex.def Info: ../pics/DSCN0217.JPG used on input line 84.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[5] <../pics/DSCN0220.JPG, id=28, 803.0pt x 602.25pt>
File: ../pics/DSCN0220.JPG Graphic file (type jpg)
<use ../pics/DSCN0220.JPG>
Package pdftex.def Info: ../pics/DSCN0220.JPG used on input line 87.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0225.JPG, id=29, 803.0pt x 602.25pt>
File: ../pics/DSCN0225.JPG Graphic file (type jpg)
<use ../pics/DSCN0225.JPG>
Package pdftex.def Info: ../pics/DSCN0225.JPG used on input line 90.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[6 <../pics/DSCN0217.JPG> <../pics/DSCN0220.JPG>]
<../pics/DSCN0227.JPG, id=33, 803.0pt x 602.25pt>
File: ../pics/DSCN0227.JPG Graphic file (type jpg)
<use ../pics/DSCN0227.JPG>
Package pdftex.def Info: ../pics/DSCN0227.JPG used on input line 93.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/walloutlet2.jpg, id=34, 481.8pt x 642.4pt>
File: ../pics/walloutlet2.jpg Graphic file (type jpg)
<use ../pics/walloutlet2.jpg>
Package pdftex.def Info: ../pics/walloutlet2.jpg used on input line 96.
(pdftex.def) Requested size: 120.44969pt x 160.59961pt.
[7 <../pics/DSCN0225.JPG> <../pics/DSCN0227.JPG>]
Underfull \hbox (badness 10000) in paragraph at lines 100--100
[]\OT1/cmr/bx/n/14.4 Omrom Pho-to-elec-tric IR Emit-
[]
<../pics/DSCN0265.JPG, id=39, 803.0pt x 602.25pt>
File: ../pics/DSCN0265.JPG Graphic file (type jpg)
<use ../pics/DSCN0265.JPG>
Package pdftex.def Info: ../pics/DSCN0265.JPG used on input line 106.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[8 <../pics/walloutlet2.jpg>]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 124--124
[] \OT1/cmtt/m/n/10.95 is. To use with 5v ttl (using a second 5v source) wire a
s such:[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 124--124
[] \OT1/cmtt/m/n/10.95 Brown to +12V; Blue to ground; Pink to either +12 or gro
und[]
[]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 124--124
[] \OT1/cmtt/m/n/10.95 Black to a 4.7K resistor with the other side of the resi
stor[]
[]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 124--124
[] \OT1/cmtt/m/n/10.95 connected to a separate +5V source (the arduino). The 5v
ttl[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 124--124
[] \OT1/cmtt/m/n/10.95 signal is at the point where the black wire connects to
the[]
[]
<../pics/DSCN0273.JPG, id=43, 803.0pt x 602.25pt>
File: ../pics/DSCN0273.JPG Graphic file (type jpg)
<use ../pics/DSCN0273.JPG>
Package pdftex.def Info: ../pics/DSCN0273.JPG used on input line 127.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[9 <../pics/DSCN0265.JPG>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[10 <../pics/DSCN0273.JPG>]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Overfull \hbox (128.93134pt too wide) in paragraph at lines 160--160
[]\OT1/cmtt/m/n/10.95 Heres a small utility function which determines how much
RAM iscurrentlyunused:[]
[]
Overfull \hbox (105.93658pt too wide) in paragraph at lines 160--160
[] \OT1/cmtt/m/n/10.95 return (int) &v - (__brkval == 0 ? (int) &__heap_start
: (int) __brkval);[]
[]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Overfull \hbox (102.77846pt too wide) in paragraph at lines 163--167
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/write/)
[]
Overfull \hbox (101.86595pt too wide) in paragraph at lines 163--167
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/print/)
[]
[11] <../pics/wshark1.jpg, id=54, 1018.55531pt x 883.80188pt>
File: ../pics/wshark1.jpg Graphic file (type jpg)
<use ../pics/wshark1.jpg>
Package pdftex.def Info: ../pics/wshark1.jpg used on input line 172.
(pdftex.def) Requested size: 509.27641pt x 441.89986pt.
Overfull \hbox (184.06142pt too wide) in paragraph at lines 172--173
[][]
[]
[12]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[13 <../pics/wshark1.jpg>] [14]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Underfull \hbox (badness 10000) in paragraph at lines 211--211
[][]\OT1/cmr/m/n/9 https://www.eevblog.com/forum/beginners/jelly-bean-switching
-regulator-
[]
[15]
Underfull \hbox (badness 10000) in paragraph at lines 219--220
[]\OT1/cmr/m/n/10.95 http://blog.derouineau.fr/2011/07/putting-enc28j60-etherne
t-
[]
Overfull \hbox (215.16165pt too wide) in paragraph at lines 250--250
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOf
f(void) DEBUG_V3:Function started"));[]
[]
[16]
Overfull \hbox (209.41296pt too wide) in paragraph at lines 250--250
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOn
(void) DEBUG_V3:Function started"));[]
[]
[17] [18] (./19.aux) )
Here is how much of TeX's memory you used:
3588 strings out of 494945
54740 string characters out of 6181032
119048 words of memory out of 5000000
6848 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,658b,237s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
s/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 19.pdf (18 pages, 1528374 bytes).
PDF statistics:
107 PDF objects out of 1000 (max. 8388607)
68 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
46 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
ZMHW_Modector/docs/19.pdf View File


+ 300
- 0
ZMHW_Modector/docs/19.tex View File

@ -0,0 +1,300 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\textcolor{green!60!blue!70}{
\section{Parts List}}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\textcolor{green!60!blue!70}{
\section{Work Log}}
\textcolor{green!60!blue!70}{
\subsection{Sick Motion Sensor}}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\textcolor{green!60!blue!70}{
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\textcolor{green!60!blue!70}{
\subsection{Broken ENC28J60 Module}}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\textcolor{green!60!blue!70}{
\subsection{Installation Log in Pictures}}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\textcolor{green!60!blue!70}{
\section{Omrom Photoelectric IR Emitter/Receiver}}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\textcolor{green!60!blue!70}{
\section{Using the HFS-DC06H Microwave Sensor}}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\textcolor{green!60!blue!70}{
\subsection{Uno Memory Limitations}}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\textcolor{green!60!blue!70}{
\subsection{Work Log 1/31/19}}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\textcolor{green!60!blue!70}{
\subsection{The need for POE}}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\textcolor{green!60!blue!70}{
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\textcolor{green!60!blue!70}{
\subsection{Switcher Shield}}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\textcolor{green!60!blue!70}{
\subsection{ENC28J60 Power Consumption}}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\textcolor{green!60!blue!70}{
\subsection{Staggered switcher and modect board 0.1'' headers}}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\textcolor{green!60!blue!70}{
\subsection{Other Changes}}
The 470uf caps I bought don't fit into the footprints. They are probably oversized for capacitance, anyway.
Can use through hole resistors for the divider on these. Easier to assemble.
I need to fix the caps, so they have the same polarity on a given left or right side. Right now on the LM section, they are swapped. Too easy to mess up.
Inductor footprint is a little small, but placing diagonally works well.
The single D7 pin header is difficult to solder. Make it a pair.
The fuse footprint should be bigger.
\textcolor{green!60!blue!70}{
\subsection{Blowing Fuses}}
The LM section... I first used a 2Amp smd fuse. No problem.
2 and 3, I used a 1.5Amp smd fuse. Both of them failed, upon 12V PSU input. Guess 2 Amps is the lower limit. This is with nothing but the power shield, so no input. Must be a current spike into the inductor, and caps, I imagine.. Oh, I also used 470uF filter caps (in and out) on these boards, as its all I had... Maybe the caps are why.
2A fuse seems to work. Still not sure if its the caps or the vreg, or both. Welp, looks like the 2nd board with the 2A fuse blew. So here's what happened.
\begin{itemize}
\item Board 1: 220uf Input filter cap, 470uf output filter cap.
\item Board 2: 470uf Input and Output filter cap.
\end{itemize}
Board 1 blew the 1.5A fuse, but not the 2A fuse.
Board 2 blew both the 1.5A and 2A fuse.
The 470uf caps are not what is supposed to be there, but it's all I had bought. They were supposed to be 120uf.
So caps will blow fuses. Of course they will though, when you think about it. I guess up to 2Amps was short circuiting for a second with the 470uf caps. Something to log with better equipment.
\end{document}

+ 279
- 0
ZMHW_Modector/docs/19.tex~ View File

@ -0,0 +1,279 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\section{Parts List}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\section{Work Log}
\subsection{Sick Motion Sensor}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\subsection{Broken ENC28J60 Module}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\subsection{Installation Log in Pictures}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\section{Omrom Photoelectric IR Emitter/Receiver}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\section{Using the HFS-DC06H Microwave Sensor}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\subsection{Uno Memory Limitations}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\subsection{Work Log 1/31/19}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\subsection{The need for POE}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\subsection{Switcher Shield}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\subsection{ENC28J60 Power Consumption}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\subsection{Staggered switcher and modect board 0.1'' headers}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\subsection{Other Changes}
The 470uf caps I bought don't fit into the footprints. They are probably oversized for capacitance, anyway.
Can use through hole resistors for the divider on these. Easier to assemble.
I need to fix the caps, so they have the same polarity on a given left or right side. Right now on the LM section, they are swapped. Too easy to mess up.
Inductor footprint is a little small, but placing diagonally works well.
The single D7 pin header is difficult to solder. Make it a pair.
The fuse footprint should be bigger.
\subsection{Blowing Fuses}
The LM section... I first used a 2Amp smd fuse. No problem.
2 and 3, I used a 1.5Amp smd fuse. Both of them failed, upon 12V PSU input. Guess 2 Amps is the lower limit. This is with nothing but the power shield, so no input. Must be a current spike into the inductor, and caps, I imagine.. Oh, I also used 470uF filter caps (in and out) on these boards, as its all I had... Maybe the caps are why.
2A fuse seems to work. Still not sure if its the caps or the vreg, or both. Welp, looks like the 2nd board with the 2A fuse blew. So here's what happened.
\begin{itemize}
\item Board 1: 220uf Input filter cap, 470uf output filter cap.
\item Board 2: 470uf Input and Output filter cap.
\end{itemize}
Board 1 blew the 1.5A fuse, but not the 2A fuse.
Board 2 blew both the 1.5A and 2A fuse.
The 470uf caps are not what is supposed to be there, but it's all I had bought. They were supposed to be 120uf.
So caps will blow fuses. Of course they will though, when you think about it. I guess up to 2Amps was short circuiting for a second with the 470uf caps. Something to log with better equipment.
\end{document}

+ 20
- 0
ZMHW_Modector/docs/19.toc View File

@ -0,0 +1,20 @@
\contentsline {section}{\numberline {1}Overview}{2}
\contentsline {section}{\numberline {2}Parts List}{2}
\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}
\contentsline {section}{\numberline {3}Work Log}{3}
\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}
\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}
\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}
\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}
\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{8}
\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{10}
\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{10}
\contentsline {section}{\numberline {6}Deployment}{14}
\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{15}
\contentsline {subsection}{\numberline {6.2}The need for POE}{15}
\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{15}
\contentsline {subsection}{\numberline {6.4}Switcher Shield}{15}
\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{16}
\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{17}
\contentsline {subsection}{\numberline {6.7}Other Changes}{18}
\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{18}

+ 30
- 0
ZMHW_Modector/docs/20.aux View File

@ -0,0 +1,30 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Parts List}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Work Log}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Testing the Sick IR Diode Tripwire \relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces \relax }}{6}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces \relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.\relax }}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Arduino and Part 2 of sensor. Lined up with the other part.\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{8}}
\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.\relax }}{9}}
\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces IR in action. (without a reflective sticker, it doesn't go very far!)\relax }}{10}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{10}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{10}}
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.\relax }}{13}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Deployment}{14}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}The need for POE}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Switcher Shield}{16}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{16}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{17}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.7}Other Changes}{18}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{18}}

+ 496
- 0
ZMHW_Modector/docs/20.log View File

@ -0,0 +1,496 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:36
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/
ZMHW_Modector/docs/20.tex
(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/Z
MHW_Modector/docs/20.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count89
\Gm@cntv=\count90
\c@Gm@tempcnt=\count91
\Gm@bindingoffset=\dimen112
\Gm@wd@mp=\dimen113
\Gm@odd@mp=\dimen114
\Gm@even@mp=\dimen115
\Gm@layoutwidth=\dimen116
\Gm@layoutheight=\dimen117
\Gm@layouthoffset=\dimen118
\Gm@layoutvoffset=\dimen119
\Gm@dimlist=\toks15
) (./20.aux)
\openout1 = `20.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 14.
(./20.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `20.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (97.26285pt too wide) in paragraph at lines 20--21
\OT1/cmr/m/n/10.95 soft-ware in-stal-la-tions. These sen-sors use ZMTrig-ger.pl
(wiki.zoneminder.com/ZMTrigger)
[]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 26.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 26.
[2]
<../pics/DSCN0207.JPG, id=14, 803.0pt x 602.25pt>
File: ../pics/DSCN0207.JPG Graphic file (type jpg)
<use ../pics/DSCN0207.JPG>
Package pdftex.def Info: ../pics/DSCN0207.JPG used on input line 62.
(pdftex.def) Requested size: 321.1943pt x 240.89572pt.
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 63.
See the caption package documentation for explanation.
Overfull \hbox (12.97931pt too wide) in paragraph at lines 62--63
[][]
[]
[3]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 65.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 65.
[4 <../pics/DSCN0207.JPG>]
<../pics/DSCN0217.JPG, id=24, 803.0pt x 602.25pt>
File: ../pics/DSCN0217.JPG Graphic file (type jpg)
<use ../pics/DSCN0217.JPG>
Package pdftex.def Info: ../pics/DSCN0217.JPG used on input line 85.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[5] <../pics/DSCN0220.JPG, id=28, 803.0pt x 602.25pt>
File: ../pics/DSCN0220.JPG Graphic file (type jpg)
<use ../pics/DSCN0220.JPG>
Package pdftex.def Info: ../pics/DSCN0220.JPG used on input line 88.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/DSCN0225.JPG, id=29, 803.0pt x 602.25pt>
File: ../pics/DSCN0225.JPG Graphic file (type jpg)
<use ../pics/DSCN0225.JPG>
Package pdftex.def Info: ../pics/DSCN0225.JPG used on input line 91.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[6 <../pics/DSCN0217.JPG> <../pics/DSCN0220.JPG>]
<../pics/DSCN0227.JPG, id=33, 803.0pt x 602.25pt>
File: ../pics/DSCN0227.JPG Graphic file (type jpg)
<use ../pics/DSCN0227.JPG>
Package pdftex.def Info: ../pics/DSCN0227.JPG used on input line 94.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
<../pics/walloutlet2.jpg, id=34, 481.8pt x 642.4pt>
File: ../pics/walloutlet2.jpg Graphic file (type jpg)
<use ../pics/walloutlet2.jpg>
Package pdftex.def Info: ../pics/walloutlet2.jpg used on input line 97.
(pdftex.def) Requested size: 120.44969pt x 160.59961pt.
[7 <../pics/DSCN0225.JPG> <../pics/DSCN0227.JPG>]
Underfull \hbox (badness 10000) in paragraph at lines 101--101
[]\OT1/cmr/bx/n/14.4 Omrom Pho-to-elec-tric IR Emit-
[]
<../pics/DSCN0265.JPG, id=39, 803.0pt x 602.25pt>
File: ../pics/DSCN0265.JPG Graphic file (type jpg)
<use ../pics/DSCN0265.JPG>
Package pdftex.def Info: ../pics/DSCN0265.JPG used on input line 107.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[8 <../pics/walloutlet2.jpg>]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 125--125
[] \OT1/cmtt/m/n/10.95 is. To use with 5v ttl (using a second 5v source) wire a
s such:[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 125--125
[] \OT1/cmtt/m/n/10.95 Brown to +12V; Blue to ground; Pink to either +12 or gro
und[]
[]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 125--125
[] \OT1/cmtt/m/n/10.95 Black to a 4.7K resistor with the other side of the resi
stor[]
[]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 125--125
[] \OT1/cmtt/m/n/10.95 connected to a separate +5V source (the arduino). The 5v
ttl[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 125--125
[] \OT1/cmtt/m/n/10.95 signal is at the point where the black wire connects to
the[]
[]
<../pics/DSCN0273.JPG, id=43, 803.0pt x 602.25pt>
File: ../pics/DSCN0273.JPG Graphic file (type jpg)
<use ../pics/DSCN0273.JPG>
Package pdftex.def Info: ../pics/DSCN0273.JPG used on input line 128.
(pdftex.def) Requested size: 200.74951pt x 150.56212pt.
[9 <../pics/DSCN0265.JPG>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[10 <../pics/DSCN0273.JPG>]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Missing character: There is no  in font cmtt10!
Missing character: There is no   in font cmtt10!
Overfull \hbox (128.93134pt too wide) in paragraph at lines 161--161
[]\OT1/cmtt/m/n/10.95 Heres a small utility function which determines how much
RAM iscurrentlyunused:[]
[]
Overfull \hbox (105.93658pt too wide) in paragraph at lines 161--161
[] \OT1/cmtt/m/n/10.95 return (int) &v - (__brkval == 0 ? (int) &__heap_start
: (int) __brkval);[]
[]
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no ™ in font cmtt10!
Missing character: There is no â in font cmtt10!
Missing character: There is no € in font cmtt10!
Missing character: There is no œ in font cmtt10!
Overfull \hbox (102.77846pt too wide) in paragraph at lines 164--168
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/write/)
[]
Overfull \hbox (101.86595pt too wide) in paragraph at lines 164--168
\OT1/cmr/m/n/10.95 (https://www.arduino.cc/reference/en/language/functions/comm
unication/serial/print/)
[]
[11] <../pics/wshark1.jpg, id=54, 1018.55531pt x 883.80188pt>
File: ../pics/wshark1.jpg Graphic file (type jpg)
<use ../pics/wshark1.jpg>
Package pdftex.def Info: ../pics/wshark1.jpg used on input line 173.
(pdftex.def) Requested size: 509.27641pt x 441.89986pt.
Overfull \hbox (184.06142pt too wide) in paragraph at lines 173--174
[][]
[]
[12] [13 <../pics/wshark1.jpg>]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no “ in font cmr10!
[14]
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
Missing character: There is no â in font cmr10!
Missing character: There is no € in font cmr10!
Missing character: There is no � in font cmr10!
[15]
Underfull \hbox (badness 10000) in paragraph at lines 213--213
[][]\OT1/cmr/m/n/9 https://www.eevblog.com/forum/beginners/jelly-bean-switching
-regulator-
[]
Underfull \hbox (badness 10000) in paragraph at lines 221--222
[]\OT1/cmr/m/n/10.95 http://blog.derouineau.fr/2011/07/putting-enc28j60-etherne
t-
[]
Overfull \hbox (215.16165pt too wide) in paragraph at lines 252--252
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOf
f(void) DEBUG_V3:Function started"));[]
[]
[16]
Overfull \hbox (209.41296pt too wide) in paragraph at lines 252--252
[] \OT1/cmtt/m/n/10.95 LogObject.uart_send_strln(F("Enc28J60Network::powerOn
(void) DEBUG_V3:Function started"));[]
[]
[17]
Underfull \hbox (badness 10000) in paragraph at lines 282--284
[]
Underfull \hbox (badness 10000) in paragraph at lines 285--287
[]
Underfull \hbox (badness 10000) in paragraph at lines 297--299
[]
[18] [19] (./20.aux) )
Here is how much of TeX's memory you used:
3588 strings out of 494945
54740 string characters out of 6181032
119048 words of memory out of 5000000
6848 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,658b,237s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
s/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 20.pdf (19 pages, 1529308 bytes).
PDF statistics:
111 PDF objects out of 1000 (max. 8388607)
71 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
46 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
ZMHW_Modector/docs/20.pdf View File


+ 308
- 0
ZMHW_Modector/docs/20.tex View File

@ -0,0 +1,308 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\textcolor{green!60!blue!70}{
\section{Parts List}}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\textcolor{green!60!blue!70}{
\subsection{Other Sensors}}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\textcolor{green!60!blue!70}{
\section{Work Log}}
\textcolor{green!60!blue!70}{
\subsection{Sick Motion Sensor}}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\textcolor{green!60!blue!70}{
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\textcolor{green!60!blue!70}{
\subsection{Broken ENC28J60 Module}}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\textcolor{green!60!blue!70}{
\subsection{Installation Log in Pictures}}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\textcolor{green!60!blue!70}{
\section{Omrom Photoelectric IR Emitter/Receiver}}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\textcolor{green!60!blue!70}{
\section{Using the HFS-DC06H Microwave Sensor}}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\textcolor{green!60!blue!70}{
\subsection{Uno Memory Limitations}}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\textcolor{green!60!blue!70}{
\section{Deployment}}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\textcolor{green!60!blue!70}{
\subsection{Work Log 1/31/19}}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\textcolor{green!60!blue!70}{
\subsection{The need for POE}}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\textcolor{green!60!blue!70}{
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.\footnote{See also my notes on RFID}.
\textcolor{green!60!blue!70}{
\subsection{Switcher Shield}}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\textcolor{green!60!blue!70}{
\subsection{ENC28J60 Power Consumption}}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\textcolor{green!60!blue!70}{
\subsection{Staggered switcher and modect board 0.1'' headers}}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\textcolor{green!60!blue!70}{
\subsection{Other Changes}}
The 470uf caps I bought don't fit into the footprints. They are probably oversized for capacitance, anyway.
Can use through hole resistors for the divider on these. Easier to assemble.
I need to fix the caps, so they have the same polarity on a given left or right side. Right now on the LM section, they are swapped. Too easy to mess up.
Inductor footprint is a little small, but placing diagonally works well.
The single D7 pin header is difficult to solder. Make it a pair.
The fuse footprint should be bigger.
\textcolor{green!60!blue!70}{
\subsection{Blowing Fuses}}
The LM section... I first used a 2Amp smd fuse. No problem on first board assembly.
\\
2 and 3, I used a 1.5Amp smd fuse. Both of them failed, upon 12V PSU input. This is with nothing but the power shield. Must be a current spike into the inductor, and caps, I imagine.. Oh, I also used 470uF filter caps (in and out) on these boards, as its all I had... The first board however, had 220uf caps.
\\
So here's what happened.
\begin{itemize}
\item Board 1: 220uf Input filter cap, 470uf output filter cap.
\item Board 2: 470uf Input and Output filter cap.
\end{itemize}
Board 1 blew the 1.5A fuse, but not the 2A fuse.
Board 2 blew both the 1.5A and 2A fuse.
The 470uf caps are not what is supposed to be there, but it's all I had bought. They were supposed to be 120uf.
\\
Lesson: caps will blow fuses. Of course they will though, when you think about it. I guess up to 2Amps was short circuiting for a second with the 470uf caps. Something to log with better equipment.
\end{document}

+ 300
- 0
ZMHW_Modector/docs/20.tex~ View File

@ -0,0 +1,300 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{ZMHW Modector}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Making and deploying a Motion Sensor for Zoneminder CCTV software installations. These sensors use ZMTrigger.pl (wiki.zoneminder.com/ZMTrigger) to activate an alarm on a camera for a period of time. The advantage of hardware motion sensors over the software detection of Zoneminder, is that the hardware motion sensors avoid some of the problems inherent in software detection, such as false positives from day-to-night, bugs, missed detections, and others.
I've tried different motion sensors. Let's start with the Infrared Laser Diode.
\textcolor{green!60!blue!70}{
\section{Parts List}}
\begin{itemize}
\item Arduino Uno (official recommended)(DIP recommended)
\item ENC28J60 ethernet module
\item Passive PoE adaptors for IP Cameras
\item Series 1A fuse
\item Sick WS15-D1130 Infrared Laser Diode Motion Sensor
\item General Purpose Diode (I used 1N4818 diode) (may also use transistor, per data sheet for Sick)
\item Jumper Wires
\item Copper Wire (22-26 gauge)
\item Enclosure
\item Ethernet Wire
\item (optional) Low Profile one and two gang wall outlet
\item (optional) Blank cover plate, for one and two wall gang wall outlet
\item (optional) Electrical tape (I prefer halfway decent electrical tape)
\item (optional) piezo speaker
\item (optional) extras of everything, in case anything fails
\end{itemize}
Later on we will try a different sensor. The HFS-DC06H. This sensor is a combination of an HB100 radio, with a decoding board that will read the signal and output a logic high or low. You may also want to try PIR sensors.
\subsection{Other Sensors}
\begin{itemize}
\item HFS-DC06H
\item PIR Sensor
\item Any other Laser Diode Sensor you like
\item Reflective tape
\end{itemize}
%\includegraphics[scale=0.8]{../pics/resistances.png}
%\captionof{figure}{Application Note resistance table}
\textcolor{green!60!blue!70}{
\section{Work Log}}
\textcolor{green!60!blue!70}{
\subsection{Sick Motion Sensor}}
The first tests were with the Sick diode sensor and receiver. This device is good for a doorway, where the door must be opened in order for people to pass. Putting it in the way of the door ensures that it will activate. It has a distance of at a max 15 feet or 3 meters. It is a laser type tripwire, which means it can be avoided, if someone knows where it is.
Device was assembled and using the ZMHW Modector source code. This is simply an Arduino sketch with UIPEthernet (to use the ENC28J60) (make sure CS is pin 10 on Uno). For more details see source code. Explaining the details is out of the spec of this doc. Simply put, the ENC28J60 is connected, the Sick sensor black wire is connected to Analog input 1, and a speaker is connected.
\includegraphics[scale=0.4]{../pics/DSCN0207.JPG}
\captionof{figure}{Testing the Sick IR Diode Tripwire }
Figure 1 shows two things, first off a diode connected in series with the output of the Sick sensor, and also the orange LED on the top of the sensor. The orange led will be green when there is no connection between the diodes and orange when the Diodes (or LEDs) are lined up correctly. When someone moves across the field of their vision, the orange LED will change to green.\footnote{This will later become important when installing the IR diode and receiver, as they must be lined up correctly.}
\textcolor{green!60!blue!70}{
\subsection{Diode on Output of Sick Sensor instead of Transistor (Hack)}}
Some IR diode / receiver pairs output a high or low. Some, like the Sick sensor, output a high or low (depending on whether you connect to white or black wire), however they are meant to be connected to a transistor, and thus if you connect it directly to a micro expecting it to go high or low, it will not. Being lazy, and seeking a quick solution, I put a 1N4819 in series with the output of the Sick sensor.
TODO: pictures showing waveforms
\footnote{This is possibly an issue of output impedance, but I will admit, at the time, I didn't bother to check.}
Using the black wire, it will be normally low and go high when motion is detected (the white wire is the opposite). If you connect to a micro it will fail to go high (why?). If you put a diode on the end in series, it will turn the normally low to a noisy normally low, and sometimes it will go between 2.5-5 volts in spikes. This allows us to use the ADC to read the Sick sensor, and avoid the use of adding a transistor in. The transistor would allow for a digitalRead to be used, but we have plenty of Analog inputs to use, so let's use one of those.
It's important to line up the emitter and receiver. If they are not lined up precisely, they will not get a sync, and the motion detection will fail. Thankfully, the diode outputs more of a cone, and less of a straight line, so some buffer is there. When the lights are dark, it is possible to see the red IR emitted if the distance is not too much.
\textcolor{green!60!blue!70}{
\subsection{Broken ENC28J60 Module}}
During my testing, I suddenly was unable to get an IP address. I checked the testsuite sketches, which didn't work, then began tearing down my setup, testing another Arduino and ENC module. It turned out, the ENC28J60 module failed on me. Make sure to buy backups.
\textcolor{green!60!blue!70}{
\subsection{Installation Log in Pictures}}
Here is an overview of what installing this in the wall might look like. One side is emitter, the other the receiver.
\includegraphics[scale=0.25]{../pics/DSCN0217.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0220.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0225.JPG}
\captionof{figure}{}
\includegraphics[scale=0.25]{../pics/DSCN0227.JPG}
\captionof{figure}{Part 1 of sensor. By mounting it on the right side of a project box, we can get a 90 degree angle.}
\includegraphics[scale=0.25]{../pics/walloutlet2.jpg}
\captionof{figure}{Arduino and Part 2 of sensor. Lined up with the other part.}
\textcolor{green!60!blue!70}{
\section{Omrom Photoelectric IR Emitter/Receiver}}
All electronics is currently selling used Omrom photoelectric sensors, they are model: e3f2-r2c4. These types of photoelectric sensors are from a large catalog of different types. Some AC some DC powered. Different max distance, etc... See resources in this git repository for some PDFs.
I tested one without knowing how to use them, but had poor results. I was only able to get the light to flash when I dismantled the device, and put my hand very close to the IR. Teardown pictures are in the photos folder. The devices were not easy to dismantle, and can't really be put back together as they were originally. However, they did seem otherwise well made. \footnote{Repairs may be difficult.}
\includegraphics[scale=0.25]{../pics/DSCN0265.JPG}
\captionof{figure}{Omrom 'Photoelectric' IR Emitter and Receiver Pair. Notice the two diodes behind the black cover on the right side.}
After finding some documentation on these in the reviews, I found out that the IR emitters require a reflective sticker in order to 'see' their IR beam reflect back. Not just a white surface, but the type of reflector you might see on a construction or night worker orange vest.
Hookup Instructions from All Electronics Comments:
\begin{verbatim}
is. To use with 5v ttl (using a second 5v source) wire as such:
Brown to +12V; Blue to ground; Pink to either +12 or ground
depending whether you want Light-ON or Dark-ON mode;
Black to a 4.7K resistor with the other side of the resistor
connected to a separate +5V source (the arduino). The 5v ttl
signal is at the point where the black wire connects to the
resistor.
\end{verbatim}
One thing I also noticed, was that used photo electric sensors from brand names can be obtained for discounts on the auction sites, to see if a good deal can be had. When buying them new, they can be relatively expensive for a hobbyist working out of his/her garage.
\includegraphics[scale=0.25]{../pics/DSCN0273.JPG}
\captionof{figure}{IR in action. (without a reflective sticker, it doesn't go very far!)}
\textcolor{green!60!blue!70}{
\section{Using the HFS-DC06H Microwave Sensor}}
As I've tried with the HB100 (just the RF part of this HFS-DC06H), without success, I've moved to the HFS-DC06H microwave sensor which includes the Op Amp and accompanying circuitry (it simply outputs a digital high or low).
During testing, I found that the HFS sensor would not work correctly with my laptops usb 2.0 power supply. I thought it might be RF interferance from the metallic perf board – something I've seen before with an FM bug radio – but it was not. The HFS and the ENC require external power that is greater than my laptop can output.
\textcolor{green!60!blue!70}{
\subsection{Uno Memory Limitations}}
Using ethernet with the Uno is always touchy. Version control is important, to have a functional version to work off of.
When writing my code, I found errors creep in due to using too much of what the Arduino IDE calls dynamic memory. You can see how much dynamic memory is used in Arduino by hitting verify (not upload but verify)and reading the output from the toolchain. You can also use a tool to see how much SRAM is used (code is online:https://jeelabs.org/2011/05/22/atmega-memory-use/) the following function:
\begin{verbatim}
“Here’s a small utility function which determines how much RAM is currently unused:
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
And here’s a sketch using that code:
void setup () {
Serial.begin(57600);
Serial.println("\n[memCheck]");
Serial.println(freeRam());
}
void loop () {}
The result will be:
[memCheck]
1846
\end{verbatim}
The UIPEthernet code requires significant RAM for the Uno. This is not a new problem for me, but it rears its ugly head again. However, this is a good thing. Limits are good.
An easy resolution for this is to put all serial.print lines into flash memory. You can verify this helps, by taking a serial.print, and commenting it out, and comparing the before and after dynamic memory used in verify. To put serial print lines in flash:
(https://www.arduino.cc/reference/en/language/functions/communication/serial/write/)
(https://www.arduino.cc/reference/en/language/functions/communication/serial/print/)
As I recall, there may be limitations to what you can do with Serial.print(F()), fotr example, converting variables into it will likely not work without further finesse, and libraries that print through serial likely won't work.
Low RAM errors can creep into strange places. For example, see these two wiresharks, where my code was running, equally as well, but the new code revision simply didn't work:
As you can see the data packet is mangled in the new rev. I've seen this enough to know, it was low SRAM. Otherwise, the code worked without major error. This small error effectively broke the program! Testing is always important, as well as saving multiple copies as you go, or alternatively version control.
\includegraphics[scale=0.5]{../pics/wshark1.jpg}
\captionof{figure}{First capture is correct. Second one, the lack of RAM causes the ENC to fail to send data to ZMTrigger.}
\section{Deployment}
Today I deployed both sensor boxes on site, connecting them to the ZM system. They both work\footnote{And have continued to work for about a year now}. I found that these HFS sensors appear to be fairly directional. I've been unable to get them to fire, when behind a wall, or up a floor, which is good – I don't want them to do that. The metal shield they have, seems to work well – blocking radio waves from going behind it. I mounted one on the ceiling and one on a wall, setting the cameras to nodect. Success.
However I have seen some issues with these, in the following situations.
\begin{itemize}
\item Mice in the ceiling, setting off the alarm
\item Flourescent lights being within 2 feet of the installation causing false alarms
\end{itemize}
Keep in mind, that if anything moves, it can set off the alarms. Including small animals.
I'm not sure exactly what frequency they are, but I think it is around 5GHz, comparable to 5GHz wifi (not going through walls well). I'm also considering putting some copper tape on the inside of the box, to help block anything through the wall it's mounted to, possibly...
When building this new shield I've made for the motion sensor, you can use flush cut pliers (the ones that cut really close to a board, if you are not familiar) and cut the WS2812 RGB LEDs right off of a \$3 RGB ring. You can also buy individual WS2812 LEDs. Cutting them off, is easier, and cheaper (and for those who run on a shoe-string budget) thus what I did here. There is a video I've made in the repo to show this process.
There's some things I'd like to add to the prototypes. First off, a light pipe, from the RGB LED to the box. Perhaps, 3D printed. Second, the RGB LED should change colours, very slightly when motion is detected. Not so much colour change that a casual glance will notice, but enough that if you are watching for it, you will see it.
\textcolor{green!60!blue!70}{
\subsection{Work Log 1/31/19}}
I'm assembling three of these for a company today. I can see right away some of the mistakes I made, and it's all DFA, or design for assembly errors.
I made a whole Arduino UNO shield, and that was a bad idea. I don't want to solder all of the 0.1” headers. There's a 10, two 8s, and a 6. It takes say 3-5 minutes per board. Too slow. I need to make the next shield with as few 0.1” headers as possible. Also, possibly a different connecter besides these pin headers would be better. Something easier to solder, perhaps reflow possible.
Another option would be to use a nano. Make assembly easy. That is very important. I also might want to consider a micro with built in ethernet, but for simplicity sake, for now Arduino Uno will do. Unos also are as future proof as you can get.
\textcolor{green!60!blue!70}{
\subsection{The need for POE}}
I deployed three of these in one company, and power wiring was an issue for one of them. One of them is going to require it's own 12V wiring (the other two worked with passive POE). Based on this, and knowing that there is a limit to what passive 12V POE can do, I've decided that I will use an 802.11 48v POE board for this application going forward. I don't want to take any chances with power being an issue. POE Injectors are relatively cheap. Back to the drawing board.
\textcolor{green!60!blue!70}{
\subsection{HB100 are Sensitive to Fluorescent Lighting and Mains}}
Do not install these HB100-based sensors near either mains or tube lights. They are sensitive, and will not operate correctly. I found that being within roughly 2 feet was too close. In my case, the logic high of the HB100 would go off randomly.
\textcolor{green!60!blue!70}{
\subsection{Switcher Shield}}
As much as I have a need for POE, I also have a need for speed, so I've decided to add a new shield that manages power, as a quicker solution to the poe problem. I put two different switchers on board. Both jelly bean parts per eevblog forums \footnote{https://www.eevblog.com/forum/beginners/jelly-bean-switching-regulator-alternative-to-7805/msg369867/\#msg369867}. I'll try each.
\textcolor{green!60!blue!70}{
\subsection{ENC28J60 Power Consumption}}
The Uno has an LP2985, which is a 3.3v reg, with 150mA max output (per data sheet). The ENC28J60 is spec'd at typical 160mA active ethernet, 120 mA inactive ethernet (Max active can be 180mA).
What to do? I've never had an actual problem with my Uno + ENC modules yet, but this is of concern. I could include onboard 3.3v vreg on the switcher board, or after peeking through the ENC data sheet, I found a sleep mode. I checked online, and someone has covered it here:
http://blog.derouineau.fr/2011/07/putting-enc28j60-ethernet-controler-in-sleep-mode/
So this might be worth adding to the code. I don't need the internet active until an alarm is detected\footnote{Actually, I might, if I want a server...}. Otherwise the ethernet can be off. Will save some power. And, this is a reasonable compromise for the low power requirements, assuming that the sleep and wake from sleep mode works.
Let's see if the sleep modes are already included in the library I'm using for the ENC... It does. Not called sleep though, it's powerOff, and powerOn. See:
\begin{verbatim}
Enc28J60Network::powerOff(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV);
}
void
Enc28J60Network::powerOn(void)
{
#if ACTLOGLEVEL>=LOG_DEBUG_V3
LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started"));
#endif
writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV);
delay(50);
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
delay(50);
}
\end{verbatim}
Note that the PowerOff function does not follow the data sheet precisely. The data sheet mentions that after RXEN is cleared, to wait for RXBUSY and TXRTS to be clear. It looks like a 50millisecond delay is considered enough here. Don't like the look of that though.
So sleep is included. However, if I include sleep, I won't be able to run the web server on these devices... Save power, or have a web server with info...
A comment with the word 'sleep' would've been nice to have in the code. A grep -r sleep comes up empty, though grep -r power finds it.
Maybe instead of the IP address web server, I should just put a label on each modector box with the IP, then I can test the sleep mode to save power.
\textcolor{green!60!blue!70}{
\subsection{Staggered switcher and modect board 0.1'' headers}}
I should stagger the headers. The 0.1'' headers that go in between two boards, cost more than the standard ones. Solution: stagger them and then use the standard headers. Don't waste money on the double layer headers.
\textcolor{green!60!blue!70}{
\subsection{Other Changes}}
The 470uf caps I bought don't fit into the footprints. They are probably oversized for capacitance, anyway.
Can use through hole resistors for the divider on these. Easier to assemble.
I need to fix the caps, so they have the same polarity on a given left or right side. Right now on the LM section, they are swapped. Too easy to mess up.
Inductor footprint is a little small, but placing diagonally works well.
The single D7 pin header is difficult to solder. Make it a pair.
The fuse footprint should be bigger.
\textcolor{green!60!blue!70}{
\subsection{Blowing Fuses}}
The LM section... I first used a 2Amp smd fuse. No problem.
2 and 3, I used a 1.5Amp smd fuse. Both of them failed, upon 12V PSU input. Guess 2 Amps is the lower limit. This is with nothing but the power shield, so no input. Must be a current spike into the inductor, and caps, I imagine.. Oh, I also used 470uF filter caps (in and out) on these boards, as its all I had... Maybe the caps are why.
2A fuse seems to work. Still not sure if its the caps or the vreg, or both. Welp, looks like the 2nd board with the 2A fuse blew. So here's what happened.
\begin{itemize}
\item Board 1: 220uf Input filter cap, 470uf output filter cap.
\item Board 2: 470uf Input and Output filter cap.
\end{itemize}
Board 1 blew the 1.5A fuse, but not the 2A fuse.
Board 2 blew both the 1.5A and 2A fuse.
The 470uf caps are not what is supposed to be there, but it's all I had bought. They were supposed to be 120uf.
So caps will blow fuses. Of course they will though, when you think about it. I guess up to 2Amps was short circuiting for a second with the 470uf caps. Something to log with better equipment.
\end{document}

+ 20
- 0
ZMHW_Modector/docs/20.toc View File

@ -0,0 +1,20 @@
\contentsline {section}{\numberline {1}Overview}{2}
\contentsline {section}{\numberline {2}Parts List}{2}
\contentsline {subsection}{\numberline {2.1}Other Sensors}{3}
\contentsline {section}{\numberline {3}Work Log}{3}
\contentsline {subsection}{\numberline {3.1}Sick Motion Sensor}{3}
\contentsline {subsection}{\numberline {3.2}Diode on Output of Sick Sensor instead of Transistor (Hack)}{4}
\contentsline {subsection}{\numberline {3.3}Broken ENC28J60 Module}{5}
\contentsline {subsection}{\numberline {3.4}Installation Log in Pictures}{5}
\contentsline {section}{\numberline {4}Omrom Photoelectric IR Emitter/Receiver}{8}
\contentsline {section}{\numberline {5}Using the HFS-DC06H Microwave Sensor}{10}
\contentsline {subsection}{\numberline {5.1}Uno Memory Limitations}{10}
\contentsline {section}{\numberline {6}Deployment}{14}
\contentsline {subsection}{\numberline {6.1}Work Log 1/31/19}{15}
\contentsline {subsection}{\numberline {6.2}The need for POE}{15}
\contentsline {subsection}{\numberline {6.3}HB100 are Sensitive to Fluorescent Lighting and Mains}{15}
\contentsline {subsection}{\numberline {6.4}Switcher Shield}{16}
\contentsline {subsection}{\numberline {6.5}ENC28J60 Power Consumption}{16}
\contentsline {subsection}{\numberline {6.6}Staggered switcher and modect board 0.1'' headers}{17}
\contentsline {subsection}{\numberline {6.7}Other Changes}{18}
\contentsline {subsection}{\numberline {6.8}Blowing Fuses}{18}

BIN
ZMHW_Modector/docs/fin.pdf View File


BIN
ZMHW_Modector/pcb_switcher/bom/switcher_bom.csv View File


BIN
ZMHW_Modector/pcb_switcher/bom/switcher_bom2.csv View File


+ 22
- 0
ZMHW_Modector/pcb_switcher/bom/switcher_bom3.csv View File

@ -0,0 +1,22 @@
QTY,Value,Package,Designator,AVL1,AVL1 P/N,Notes
2,"3K, 1% metal film resistor","smd, 0603","R3,R5",Stackpole,RMCF0603FT3K00,"metal film is expensive and rare, but thick film is common and readily available in smd packages"
2,"1K 1%, metal film resistor","smd, 0603","R2,R4",Stackpole,RMCF0603FG1K00,
1,0.33ohm 1% metal film,"smd, 0603",R1,Panasonic Electronic Components,ERJ-3RQFR33V,cheapest at $0.20. Next up is $0.30
4,100uf electrolytic capacitor,"smd, 6.6x6.6mm footprint","C5,C7,C3",rubycon,25TXV100M6.3X8,
1,"220uH, 1A","smd, 10x10mm footprint",L2,Bourns Inc. ,SRN1060-221MCT-ND,
1,MC34063AD,"smd, soic-8",U6,Texas Instruments,296-17765-1-ND,
1,LM2595T-ADJ,TO-220-5 Formed Leads ,U7,Texas Instruments,LM2595T-ADJ/NOPB,5 Pin in row is cheaper than staggered
1,100uH,"smd, 10x10mm footprint",L4,Taiyo Yuden,587-1701-1-ND ,Highest Quantity in stock at right size and rating
1,3uH,smd,L1,Bourns Inc. ,SRR0805-2R2MCT-ND ,"2.2uH, best price at $0.80. Slightly off values, but will try this first."
1,1uH,smd,L3,Bourns Inc. ,SRR0805-2R2MCT-ND ,""""", see previous. For filter"
1,optional inductor,"smd, 8x8mm",n/a,Wurth Electronik,732-1877-1-ND ,optional higher inductor value for filter (4.7uH)
1,200uf electrolytic,smd 6.6x6.6mm footprint,C6,United Chemi-con,565-4320-1-ND ,8mm height. Just under 1cm
1,470uf electrolytic,"smd, 6.6x6.6mm",C4,United Chemi-con,565-5117-1-ND ,"10.5mm height or so, may be tough to fit on board"
1,470pf ceramic ,through hole,C2,Vishay BC Components,BC1087CT-ND ,
1,1N5819,"through hole,DO-41",D1,"Diodes, Inc.",1N5819DICT-ND ,"these are similar, but different capacity diodes these two 5819,5822"
1,1N5822,"through hole, DO-20",D2,STMicroelectronics,497-11370-1-ND ,
,,,,,,
1,PCB made by PCBs.io,FR4,n/a,PCBS.io,,
10,Pin Headers,"0.1""",n/a,any,,
1,"Barrel Plug, 5.5 x 2.1mm",through hole,J1,any,,
1,1A fuse,"smd, 0603",F1,any,,

BIN
ZMHW_Modector/pcb_switcher/bom/switcher_bom3.ods View File


+ 6
- 2
ZMHW_Modector/pcb_switcher/uno.bak View File

@ -394,7 +394,7 @@ F 3 "~" H 3725 6185 50 0001 C CNN
1 0 0 -1
$EndComp
Text Label 3975 6125 0 50 ~ 0
VIN
VIN12V
$Comp
L power:GND #PWR0101
U 1 1 5DEB5764
@ -540,7 +540,7 @@ U 1 1 5DEC3B0B
P 4000 2750
F 0 "C2" H 4092 2796 50 0000 L CNN
F 1 "470pf" H 4092 2705 50 0000 L CNN
F 2 "Capacitor_SMD:CP_Elec_6.3x5.9" H 4000 2750 50 0001 C CNN
F 2 "Capacitor_THT:CP_Radial_D5.0mm_P2.50mm" H 4000 2750 50 0001 C CNN
F 3 "~" H 4000 2750 50 0001 C CNN
1 4000 2750
1 0 0 -1
@ -1065,4 +1065,8 @@ Text Label 9050 5350 0 50 ~ 0
LM_TOINDUCTOR
Text Label 4000 6900 3 50 ~ 0
VINAFTERFUSE
Text Notes 8125 6800 0 50 ~ 0
120uf Caps for C5 and C7\nchanged to 100uf to make\nBOM easier\n
Text Notes 3375 4250 0 50 ~ 0
Resistors Metal Film,\nglobally
$EndSCHEMATC

+ 4
- 4
ZMHW_Modector/pcb_switcher/uno.kicad_pcb View File

@ -35,7 +35,7 @@
)
(setup
(last_trace_width 1.27)
(last_trace_width 0.254)
(user_trace_width 0.1524)
(user_trace_width 0.254)
(user_trace_width 0.3302)
@ -1179,7 +1179,7 @@
)
)
(module Inductor_SMD:L_Bourns-SRN1060 (layer F.Cu) (tedit 5DE9F473) (tstamp 5DF688D0)
(module Inductor_SMD:L_Bourns-SRN1060 (layer F.Cu) (tedit 5DFEF70B) (tstamp 5DF688D0)
(at 97.155 91.44 180)
(descr "Bourns SRN1060 series SMD inductor https://www.bourns.com/docs/Product-Datasheets/SRN1060.pdf")
(tags "Bourns SRN1060 SMD inductor")
@ -1188,7 +1188,7 @@
(fp_text reference L4 (at 0 -6.2 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 100uf (at 0 6.2 180) (layer F.SilkS)
(fp_text value 100uH (at 0 6.2 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -5.3 -5.35) (end 5.3 -5.35) (layer F.CrtYd) (width 0.05))
@ -1613,7 +1613,7 @@
(fp_text reference U7 (at -2.54 -9.32 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value LM2595T-ADJ (at 3.4 2.15 90) (layer F.SilkS)
(fp_text value LM2595T-ADJ (at -3.81 -3.81 180) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.15)))
)
(fp_line (start -1.6 -8.2) (end -1.6 -3.8) (layer F.Fab) (width 0.1))

+ 7
- 7
ZMHW_Modector/pcb_switcher/uno.kicad_pcb-bak View File

@ -35,7 +35,7 @@
)
(setup
(last_trace_width 1.27)
(last_trace_width 0.254)
(user_trace_width 0.1524)
(user_trace_width 0.254)
(user_trace_width 0.3302)
@ -98,7 +98,7 @@
(mirror false)
(drillshape 0)
(scaleselection 1)
(outputdirectory "gerbers_rev1.49/"))
(outputdirectory "gerbers_rev1/"))
)
(net 0 "")
@ -1179,7 +1179,7 @@
)
)
(module Inductor_SMD:L_Bourns-SRN1060 (layer F.Cu) (tedit 5DE9F473) (tstamp 5DF688D0)
(module Inductor_SMD:L_Bourns-SRN1060 (layer F.Cu) (tedit 5DFEF70B) (tstamp 5DF688D0)
(at 97.155 91.44 180)
(descr "Bourns SRN1060 series SMD inductor https://www.bourns.com/docs/Product-Datasheets/SRN1060.pdf")
(tags "Bourns SRN1060 SMD inductor")
@ -1188,7 +1188,7 @@
(fp_text reference L4 (at 0 -6.2 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 100uf (at 0 6.2 180) (layer F.SilkS)
(fp_text value 100uH (at 0 6.2 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -5.3 -5.35) (end 5.3 -5.35) (layer F.CrtYd) (width 0.05))
@ -1613,7 +1613,7 @@
(fp_text reference U7 (at -2.54 -9.32 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value LM2595T-ADJ (at 3.4 2.15 90) (layer F.SilkS)
(fp_text value LM2595T-ADJ (at -3.81 -3.81 180) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.15)))
)
(fp_line (start -1.6 -8.2) (end -1.6 -3.8) (layer F.Fab) (width 0.1))
@ -1878,7 +1878,7 @@
(segment (start 84.9125 65.43) (end 85.898387 64.444113) (width 0.254) (layer F.Cu) (net 20))
(segment (start 83.82 65.43) (end 84.9125 65.43) (width 0.254) (layer F.Cu) (net 20))
(zone (net 1) (net_name GND) (layer F.Cu) (tstamp 0) (hatch edge 0.508)
(zone (net 1) (net_name GND) (layer F.Cu) (tstamp 5DF81383) (hatch edge 0.508)
(connect_pads (clearance 0.508))
(min_thickness 0.254)
(fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
@ -2258,7 +2258,7 @@
)
)
)
(zone (net 1) (net_name GND) (layer B.Cu) (tstamp 5DF8015C) (hatch edge 0.508)
(zone (net 1) (net_name GND) (layer B.Cu) (tstamp 5DF81380) (hatch edge 0.508)
(connect_pads (clearance 0.508))
(min_thickness 0.254)
(fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))

+ 6
- 2
ZMHW_Modector/pcb_switcher/uno.sch View File

@ -540,7 +540,7 @@ U 1 1 5DEC3B0B
P 4000 2750
F 0 "C2" H 4092 2796 50 0000 L CNN
F 1 "470pf" H 4092 2705 50 0000 L CNN
F 2 "Capacitor_SMD:CP_Elec_6.3x5.9" H 4000 2750 50 0001 C CNN
F 2 "Capacitor_THT:CP_Radial_D5.0mm_P2.50mm" H 4000 2750 50 0001 C CNN
F 3 "~" H 4000 2750 50 0001 C CNN
1 4000 2750
1 0 0 -1
@ -832,7 +832,7 @@ L Device:L_Core_Iron L4
U 1 1 5DEF23EB
P 9650 5350
F 0 "L4" V 9875 5350 50 0000 C CNN
F 1 "100uf" V 9784 5350 50 0000 C CNN
F 1 "100uH" V 9784 5350 50 0000 C CNN
F 2 "Inductor_SMD:L_Bourns-SRN1060" H 9650 5350 50 0001 C CNN
F 3 "~" H 9650 5350 50 0001 C CNN
1 9650 5350
@ -1065,4 +1065,8 @@ Text Label 9050 5350 0 50 ~ 0
LM_TOINDUCTOR
Text Label 4000 6900 3 50 ~ 0
VINAFTERFUSE
Text Notes 8125 6800 0 50 ~ 0
120uf Caps for C5 and C7\nchanged to 100uf to make\nBOM easier\n
Text Notes 3375 4250 0 50 ~ 0
Resistors Metal Film,\nglobally
$EndSCHEMATC

BIN
ZMHW_Modector/resources/enc28j60_datasheet.pdf View File


BIN
ZMHW_Modector/resources/lp2985-n.pdf View File


+ 1
- 1
batterycharge_stationdata/docs/8.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 8 SEP 2019 10:39
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 1 JAN 2020 18:26
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.

BIN
batterycharge_stationdata/docs/8.pdf View File


+ 51
- 9
batterycharge_stationdata/pcb/rev2/batterystation.kicad_pcb View File

@ -1,8 +1,8 @@
(kicad_pcb (version 20171130) (host pcbnew 5.0.0-rc2)
(kicad_pcb (version 20171130) (host pcbnew 5.0.2+dfsg1-1~bpo9+1)
(general
(thickness 1.6)
(drawings 64)
(drawings 80)
(tracks 771)
(zones 0)
(modules 87)
@ -83,7 +83,7 @@
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15)
(hpglpendiameter 15.000000)
(psnegative false)
(psa4output false)
(plotreference true)
@ -95,7 +95,7 @@
(mirror false)
(drillshape 0)
(scaleselection 1)
(outputdirectory gerbers_rev2))
(outputdirectory "gerbers_rev2"))
)
(net 0 "")
@ -1606,7 +1606,7 @@
(fp_text reference R9 (at 0 -5.1) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 100K (at -3.683 3.937) (layer F.SilkS)
(fp_text value 100K (at -5.08 -1.016) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1.75 -1.75) (end -1.75 9.4) (layer F.CrtYd) (width 0.05))
@ -3111,14 +3111,14 @@
)
)
(module w_conn_mkds:mkds_1,5-4 (layer F.Cu) (tedit 5D364A86) (tstamp 5CD35535)
(module w_conn_mkds:mkds_1,5-4 (layer F.Cu) (tedit 5E0D8DC8) (tstamp 5CD35535)
(at 156.21 149.86 180)
(descr "4-way 5mm pitch terminal block, Phoenix MKDS series")
(path /5CBE92FB)
(fp_text reference P8 (at 0 -6.6 180) (layer F.SilkS) hide
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(fp_text value LT_CONN (at 0 5.9 180) (layer F.SilkS)
(fp_text value LT_CONN (at 0 5.9 180) (layer F.SilkS) hide
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(fp_line (start 5 4.1) (end 5 4.6) (layer F.SilkS) (width 0.381))
@ -6525,6 +6525,48 @@
(xy 21.336 -50.1396)) (layer B.SilkS) (width 0.01))
)
(gr_text "1,2 GND" (at 151.384 144.272) (layer F.SilkS) (tstamp 5E0D8E53)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "3,4 ChargeBatHere" (at 161.544 144.272) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "CurrentBrk\n1: Ifeedback\n2: GND" (at 131.572 109.728) (layer F.SilkS) (tstamp 5E0D8DE5)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "VDivBrk\n1: FloatV (FB)\n2: SwitchesInput" (at 165.354 108.712) (layer F.SilkS) (tstamp 5E0D8DE0)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_line (start 116.332 119.888) (end 117.094 121.158) (layer F.SilkS) (width 0.1524))
(gr_line (start 116.332 119.888) (end 115.316 121.158) (layer F.SilkS) (width 0.1524))
(gr_line (start 115.316 131.318) (end 116.332 119.888) (layer F.SilkS) (width 0.1524))
(gr_text "Vdivide for lowering\nVBAT to ADC accept.\nlevel\n" (at 116.078 117.348) (layer F.SilkS) (tstamp 5E0D8A7F)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text A5 (at 111.506 138.43) (layer F.SilkS) (tstamp 5E0D8A5C)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text A6 (at 111.506 135.89) (layer F.SilkS) (tstamp 5E0D8A4F)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text A7 (at 111.506 133.096) (layer F.SilkS) (tstamp 5E0D8A45)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text 1 (at 136.906 146.812) (layer F.SilkS) (tstamp 5E0D8A1A)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text 2 (at 139.954 146.812) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "1: LTFloatVoltage\n2: ShutdownPin" (at 136.398 145.034) (layer F.SilkS) (tstamp 5E0D89E9)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Switch 2:\nL: 536\nR: 28.7 (4.2v)" (at 175.006 149.098) (layer F.SilkS) (tstamp 5E0D8567)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Switch 1:\nL: Go to Other switch\nM: 54.9 (6.9 V)\nR: Variable Voltage 4 Pin Slide\n(10K POT w/20K)" (at 175.006 142.494) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Humans are\nCarnivores, \nAnon-kun!" (at 85.09 67.945) (layer B.SilkS)
(effects (font (size 2 1.5) (thickness 0.1524)) (justify mirror))
)
@ -6633,8 +6675,8 @@
(gr_text + (at 185.42 71.12) (layer F.SilkS)
(effects (font (size 1.016 1.016) (thickness 0.1524)))
)
(gr_text "Nicd = 536\n4.2Volts = 28.7\n6Volt = 54.9\n12volt = 120k" (at 177.8 137.16) (layer F.SilkS)
(effects (font (size 0.508 0.508) (thickness 0.127)))
(gr_text "Nicd = 536\n4.2Volts = 28.7\n6Volt = 54.9\n12volt = 120k" (at 184.658 137.16) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.127)) (justify left))
)
(gr_text "FABRICATION NOTES\n\n1. THIS IS A 2 LAYER BOARD. \n2. EXTERNAL LAYERS SHALL HAVE 1 OZ COPPER.\n3. MATERIAL: FR4 AND 0.062 INCH +/- 10% THICK.\n4. BOARDS SHALL BE ROHS COMPLIANT. \n5. MANUFACTURE IN ACCORDANCE WITH IPC-6012 CLASS 2\n6. MASK: BOTH SIDES OF THE BOARD SHALL HAVE \n SOLDER MASK (ANY COLOR) OVER BARE COPPER. \n7. SILK: BOTH SIDES OF THE BOARD SHALL HAVE \n WHITE SILKSCREEN. DO NOT PLACE SILK OVER BARE COPPER.\n8. FINISH: ENIG.\n9. MINIMUM TRACE WIDTH - 0.006 INCH.\n MINIMUM SPACE - 0.006 INCH.\n MINIMUM HOLE DIA - 0.013 INCH. \n10. MAX HOLE PLACEMENT TOLERANCE OF +/- 0.003 INCH.\n11. MAX HOLE DIAMETER TOLERANCE OF +/- 0.003 INCH AFTER PLATING." (at -17.78 205.74) (layer Dwgs.User)
(effects (font (size 2.54 2.54) (thickness 0.254)) (justify left))

+ 53
- 11
batterycharge_stationdata/pcb/rev2/batterystation.kicad_pcb-bak View File

@ -1,8 +1,8 @@
(kicad_pcb (version 20171130) (host pcbnew 5.0.0-rc2)
(kicad_pcb (version 20171130) (host pcbnew 5.0.2+dfsg1-1~bpo9+1)
(general
(thickness 1.6)
(drawings 64)
(drawings 80)
(tracks 771)
(zones 0)
(modules 87)
@ -15,8 +15,8 @@
)
(layers
(0 F.Cu signal hide)
(31 B.Cu signal hide)
(0 F.Cu signal)
(31 B.Cu signal)
(34 B.Paste user)
(35 F.Paste user)
(36 B.SilkS user)
@ -83,7 +83,7 @@
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15)
(hpglpendiameter 15.000000)
(psnegative false)
(psa4output false)
(plotreference true)
@ -95,7 +95,7 @@
(mirror false)
(drillshape 0)
(scaleselection 1)
(outputdirectory gerbers_rev2))
(outputdirectory "gerbers_rev2"))
)
(net 0 "")
@ -1606,7 +1606,7 @@
(fp_text reference R9 (at 0 -5.1) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 100K (at -3.683 3.937) (layer F.SilkS)
(fp_text value 100K (at -3.302 0.254) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1.75 -1.75) (end -1.75 9.4) (layer F.CrtYd) (width 0.05))
@ -3111,14 +3111,14 @@
)
)
(module w_conn_mkds:mkds_1,5-4 (layer F.Cu) (tedit 5D364A86) (tstamp 5CD35535)
(module w_conn_mkds:mkds_1,5-4 (layer F.Cu) (tedit 5E0D8DC8) (tstamp 5CD35535)
(at 156.21 149.86 180)
(descr "4-way 5mm pitch terminal block, Phoenix MKDS series")
(path /5CBE92FB)
(fp_text reference P8 (at 0 -6.6 180) (layer F.SilkS) hide
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(fp_text value LT_CONN (at 0 5.9 180) (layer F.SilkS)
(fp_text value LT_CONN (at 0 5.9 180) (layer F.SilkS) hide
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(fp_line (start 5 4.1) (end 5 4.6) (layer F.SilkS) (width 0.381))
@ -6525,6 +6525,48 @@
(xy 21.336 -50.1396)) (layer B.SilkS) (width 0.01))
)
(gr_text "1,2 GND" (at 151.384 144.272) (layer F.SilkS) (tstamp 5E0D8E53)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "3,4 ChargeBatHere" (at 161.544 144.272) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "CurrentBrk\n1: Ifeedback\n2: GND" (at 131.572 109.728) (layer F.SilkS) (tstamp 5E0D8DE5)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "VDivBrk\n1: FloatV (FB)\n2: SwitchesInput" (at 165.354 108.712) (layer F.SilkS) (tstamp 5E0D8DE0)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_line (start 116.332 119.888) (end 117.094 121.158) (layer F.SilkS) (width 0.1524))
(gr_line (start 116.332 119.888) (end 115.316 121.158) (layer F.SilkS) (width 0.1524))
(gr_line (start 115.316 131.318) (end 116.332 119.888) (layer F.SilkS) (width 0.1524))
(gr_text "Vdivide for lowering\nVBAT to ADC accept.\nlevel\n" (at 116.078 117.348) (layer F.SilkS) (tstamp 5E0D8A7F)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text A5 (at 111.506 138.43) (layer F.SilkS) (tstamp 5E0D8A5C)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text A6 (at 111.506 135.89) (layer F.SilkS) (tstamp 5E0D8A4F)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text A7 (at 111.506 133.096) (layer F.SilkS) (tstamp 5E0D8A45)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text 1 (at 136.906 146.812) (layer F.SilkS) (tstamp 5E0D8A1A)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text 2 (at 139.954 146.812) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)))
)
(gr_text "1: LTFloatVoltage\n2: ShutdownPin" (at 136.398 145.034) (layer F.SilkS) (tstamp 5E0D89E9)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Switch 2:\nL: 536\nR: 28.7 (4.2v)" (at 175.006 149.098) (layer F.SilkS) (tstamp 5E0D8567)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Switch 1:\nL: Go to Other switch\nM: 54.9 (6.9 V)\nR: Variable Voltage 4 Pin Slide\n(10K POT w/20K)" (at 175.006 142.494) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.1524)) (justify left))
)
(gr_text "Humans are\nCarnivores, \nAnon-kun!" (at 85.09 67.945) (layer B.SilkS)
(effects (font (size 2 1.5) (thickness 0.1524)) (justify mirror))
)
@ -6633,8 +6675,8 @@
(gr_text + (at 185.42 71.12) (layer F.SilkS)
(effects (font (size 1.016 1.016) (thickness 0.1524)))
)
(gr_text "Nicd = 536\n4.2Volts = 28.7\n6Volt = 54.9\n12volt = 120k" (at 177.8 137.16) (layer F.SilkS)
(effects (font (size 0.508 0.508) (thickness 0.127)))
(gr_text "Nicd = 536\n4.2Volts = 28.7\n6Volt = 54.9\n12volt = 120k" (at 184.658 137.16) (layer F.SilkS)
(effects (font (size 0.7 0.7) (thickness 0.127)) (justify left))
)
(gr_text "FABRICATION NOTES\n\n1. THIS IS A 2 LAYER BOARD. \n2. EXTERNAL LAYERS SHALL HAVE 1 OZ COPPER.\n3. MATERIAL: FR4 AND 0.062 INCH +/- 10% THICK.\n4. BOARDS SHALL BE ROHS COMPLIANT. \n5. MANUFACTURE IN ACCORDANCE WITH IPC-6012 CLASS 2\n6. MASK: BOTH SIDES OF THE BOARD SHALL HAVE \n SOLDER MASK (ANY COLOR) OVER BARE COPPER. \n7. SILK: BOTH SIDES OF THE BOARD SHALL HAVE \n WHITE SILKSCREEN. DO NOT PLACE SILK OVER BARE COPPER.\n8. FINISH: ENIG.\n9. MINIMUM TRACE WIDTH - 0.006 INCH.\n MINIMUM SPACE - 0.006 INCH.\n MINIMUM HOLE DIA - 0.013 INCH. \n10. MAX HOLE PLACEMENT TOLERANCE OF +/- 0.003 INCH.\n11. MAX HOLE DIAMETER TOLERANCE OF +/- 0.003 INCH AFTER PLATING." (at -17.78 205.74) (layer Dwgs.User)
(effects (font (size 2.54 2.54) (thickness 0.254)) (justify left))

Loading…
Cancel
Save