diff --git a/60hz_Divider/docs/10.aux b/60hz_Divider/docs/10.aux new file mode 100644 index 0000000..8fbd933 --- /dev/null +++ b/60hz_Divider/docs/10.aux @@ -0,0 +1,8 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{3}} diff --git a/60hz_Divider/docs/10.log b/60hz_Divider/docs/10.log new file mode 100644 index 0000000..58fafa0 --- /dev/null +++ b/60hz_Divider/docs/10.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 3 AUG 2020 02:34 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/10.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/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/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 +) (./10.aux) +\openout1 = `10.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: +* 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 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `10.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 59--59 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] [3] (./10.aux) ) +Here is how much of TeX's memory you used: + 3512 strings out of 494945 + 53264 string characters out of 6181032 + 119035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,694b,149s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 10.pdf (3 pages, 100788 bytes). +PDF statistics: + 42 PDF objects out of 1000 (max. 8388607) + 29 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) + diff --git a/60hz_Divider/docs/10.pdf b/60hz_Divider/docs/10.pdf new file mode 100644 index 0000000..c0ce306 Binary files /dev/null and b/60hz_Divider/docs/10.pdf differ diff --git a/60hz_Divider/docs/10.tex b/60hz_Divider/docs/10.tex new file mode 100644 index 0000000..35024ad --- /dev/null +++ b/60hz_Divider/docs/10.tex @@ -0,0 +1,85 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + +\subsection{Divide by N Counters} +The schematics appear to be incorrect for the divide by 6 counter in the Practical Electronics for Beginners book. Having looked at my built up circuit carefully, I see a 20Hz output from the 60Hz. I managed to get my hands on a copy of the TTL Cookbook by Don Lancaster recently, and that details correct divide by 6 and 10 counters (which are different from what's on my proto board), and while I could fix the divide by 6 counter, instead, I'm going to build another divide by 2 counter, and leave the original incorrect one there as a warning (it's also easier to just build a new one). + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/10.tex~ b/60hz_Divider/docs/10.tex~ new file mode 100644 index 0000000..77bc3ee --- /dev/null +++ b/60hz_Divider/docs/10.tex~ @@ -0,0 +1,84 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/10.toc b/60hz_Divider/docs/10.toc new file mode 100644 index 0000000..26b6333 --- /dev/null +++ b/60hz_Divider/docs/10.toc @@ -0,0 +1,7 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2} +\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{3} diff --git a/60hz_Divider/docs/11.aux b/60hz_Divider/docs/11.aux new file mode 100644 index 0000000..27f49dd --- /dev/null +++ b/60hz_Divider/docs/11.aux @@ -0,0 +1,8 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{3}} diff --git a/60hz_Divider/docs/11.log b/60hz_Divider/docs/11.log new file mode 100644 index 0000000..31871ca --- /dev/null +++ b/60hz_Divider/docs/11.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 3 AUG 2020 02:35 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/11.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/11.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 +) (./11.aux) +\openout1 = `11.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: +* 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) + +(./11.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `11.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 59--59 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] [3] (./11.aux) ) +Here is how much of TeX's memory you used: + 3512 strings out of 494945 + 53264 string characters out of 6181032 + 119035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,694b,149s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 11.pdf (3 pages, 100854 bytes). +PDF statistics: + 42 PDF objects out of 1000 (max. 8388607) + 29 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) + diff --git a/60hz_Divider/docs/11.pdf b/60hz_Divider/docs/11.pdf new file mode 100644 index 0000000..878dea7 Binary files /dev/null and b/60hz_Divider/docs/11.pdf differ diff --git a/60hz_Divider/docs/11.tex b/60hz_Divider/docs/11.tex new file mode 100644 index 0000000..35024ad --- /dev/null +++ b/60hz_Divider/docs/11.tex @@ -0,0 +1,85 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + +\subsection{Divide by N Counters} +The schematics appear to be incorrect for the divide by 6 counter in the Practical Electronics for Beginners book. Having looked at my built up circuit carefully, I see a 20Hz output from the 60Hz. I managed to get my hands on a copy of the TTL Cookbook by Don Lancaster recently, and that details correct divide by 6 and 10 counters (which are different from what's on my proto board), and while I could fix the divide by 6 counter, instead, I'm going to build another divide by 2 counter, and leave the original incorrect one there as a warning (it's also easier to just build a new one). + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/11.toc b/60hz_Divider/docs/11.toc new file mode 100644 index 0000000..8d3a21a --- /dev/null +++ b/60hz_Divider/docs/11.toc @@ -0,0 +1,7 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{3} +\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{3} diff --git a/60hz_Divider/docs/12.aux b/60hz_Divider/docs/12.aux new file mode 100644 index 0000000..5b15c1b --- /dev/null +++ b/60hz_Divider/docs/12.aux @@ -0,0 +1,11 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces 60 Hz Logic Divider to 1Hz\relax }}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2}UART output}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{4}} +\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces This divide by 6 counter, appears to not line up with what the TTL Cookbook has for a similar 7490 one.\relax }}{4}} diff --git a/60hz_Divider/docs/12.log b/60hz_Divider/docs/12.log new file mode 100644 index 0000000..aadd8db --- /dev/null +++ b/60hz_Divider/docs/12.log @@ -0,0 +1,289 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 3 AUG 2020 02:46 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/12.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/12.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 +) (./12.aux) +\openout1 = `12.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: +* 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) + +(./12.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `12.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. + <../pics/DSCN2964.JPG, id=1, 1003.75pt x 752.8125pt> +File: ../pics/DSCN2964.JPG Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/DSCN2964.JPG used on input line 26. +(pdftex.def) Requested size: 150.556pt x 112.91699pt. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <../pics/DSCN2964.JPG>] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 65--65 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] <../pics/DSCN2958.JPG, id=17, 1003.75pt x 752.8125pt> +File: ../pics/DSCN2958.JPG Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/DSCN2958.JPG used on input line 88. +(pdftex.def) Requested size: 200.74644pt x 150.55983pt. + [3] [4 <../pics/DSCN2958.JPG>] (./12.aux) ) +Here is how much of TeX's memory you used: + 3528 strings out of 494945 + 53560 string characters out of 6181032 + 118035 words of memory out of 5000000 + 6801 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 + 39i,8n,39p,694b,267s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 12.pdf (4 pages, 475928 bytes). +PDF statistics: + 47 PDF objects out of 1000 (max. 8388607) + 31 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 11 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/60hz_Divider/docs/12.pdf b/60hz_Divider/docs/12.pdf new file mode 100644 index 0000000..787c255 Binary files /dev/null and b/60hz_Divider/docs/12.pdf differ diff --git a/60hz_Divider/docs/12.tex b/60hz_Divider/docs/12.tex new file mode 100644 index 0000000..f0d4f6a --- /dev/null +++ b/60hz_Divider/docs/12.tex @@ -0,0 +1,101 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\begin{center} +\includegraphics[scale=0.15]{../pics/DSCN2964.JPG} +\captionof{figure}{60 Hz Logic Divider to 1Hz} +\end{center} + + +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + +\subsubsection{UART output} +I set the CPLD to use the rising edge of the 6KHz clock and to shift the counter value out... Unsuprisingly, the baud rate is 6000. I found this by using my Open Bench Logic Sniffer\footnote{Phantom 3 in Repairs 2019}. It's fairly quick to configure and get working. Auto detected the UART speed easy. + +However, my uart value is 12 - 14 bits, and with uart being an 8 bit protocol, it makes this unconventional. May need to bit bang something. But before that... + + +\subsection{Divide by N Counters} + +\begin{center} +\includegraphics[scale=0.2]{../pics/DSCN2958.JPG} +\captionof{figure}{This divide by 6 counter, appears to not line up with what the TTL Cookbook has for a similar 7490 one.} +\end{center} + +The schematics appear to be incorrect for the divide by 6 counter in the Practical Electronics for Beginners book. Having looked at my built up circuit carefully, I see a 20Hz output from the 60Hz. I managed to get my hands on a copy of the TTL Cookbook by Don Lancaster recently, and that details correct divide by 6 and 10 counters (which are different from what's on my proto board), and while I could fix the divide by 6 counter, instead, I'm going to build another divide by 2 counter, and leave the original incorrect one there as a warning (it's also easier to just build a new one). + +As it is, I'm getting 2Hz output on the pulse pin... Oops. Practical Untested Electronics for Beginners. Hax. Everything in life is hax. The earlier you realize that, the better you will feel about your own work.\footnote{It's possible they put the error in on purpose. It's really hard to tell...} + + + + + +\end{document} + diff --git a/60hz_Divider/docs/12.tex~ b/60hz_Divider/docs/12.tex~ new file mode 100644 index 0000000..f7a1563 --- /dev/null +++ b/60hz_Divider/docs/12.tex~ @@ -0,0 +1,90 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + +\subsubsection{UART output} +I set the CPLD to use the rising edge of the 6KHz clock and to shift the counter value out... Unsuprisingly, the baud rate is 6000. I found this by using my Open Bench Logic Sniffer\footnote{Phantom 3 in Repairs 2019}. It's fairly quick to configure and get working. Auto detected the UART speed easy. + +However, my uart value is 12 - 14 bits, which makes this unconventional. May need to bit bang something. But before that... + + +\subsection{Divide by N Counters} +The schematics appear to be incorrect for the divide by 6 counter in the Practical Electronics for Beginners book. Having looked at my built up circuit carefully, I see a 20Hz output from the 60Hz. I managed to get my hands on a copy of the TTL Cookbook by Don Lancaster recently, and that details correct divide by 6 and 10 counters (which are different from what's on my proto board), and while I could fix the divide by 6 counter, instead, I'm going to build another divide by 2 counter, and leave the original incorrect one there as a warning (it's also easier to just build a new one). + +As it is, I'm getting 2Hz output on the pulse pin... Oops. + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/12.toc b/60hz_Divider/docs/12.toc new file mode 100644 index 0000000..f234d6e --- /dev/null +++ b/60hz_Divider/docs/12.toc @@ -0,0 +1,8 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{2} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{3} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{3} +\contentsline {subsubsection}{\numberline {1.4.2}UART output}{3} +\contentsline {subsection}{\numberline {1.5}Divide by N Counters}{4} diff --git a/60hz_Divider/docs/4.aux b/60hz_Divider/docs/4.aux new file mode 100644 index 0000000..2f929ef --- /dev/null +++ b/60hz_Divider/docs/4.aux @@ -0,0 +1,6 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}MAX7219 8 digit 7 LED segment Display Driver}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/4.log b/60hz_Divider/docs/4.log new file mode 100644 index 0000000..0447305 --- /dev/null +++ b/60hz_Divider/docs/4.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 14 JUL 2020 21:18 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/4.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/4.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 +) (./4.aux) +\openout1 = `4.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: +* 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. + +Overfull \hbox (88.69052pt too wide) in paragraph at lines 54--54 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 67. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 67. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 67. + +[2] (./4.aux) ) +Here is how much of TeX's memory you used: + 3516 strings out of 494945 + 53328 string characters out of 6181032 + 118035 words of memory out of 5000000 + 6794 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,38p,566b,253s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 4.pdf (2 pages, 101509 bytes). +PDF statistics: + 43 PDF objects out of 1000 (max. 8388607) + 30 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) + diff --git a/60hz_Divider/docs/4.pdf b/60hz_Divider/docs/4.pdf new file mode 100644 index 0000000..d1fed5e Binary files /dev/null and b/60hz_Divider/docs/4.pdf differ diff --git a/60hz_Divider/docs/4.tex b/60hz_Divider/docs/4.tex index ada1ada..1433700 100644 --- a/60hz_Divider/docs/4.tex +++ b/60hz_Divider/docs/4.tex @@ -42,7 +42,7 @@ That's all the objective is here. Easy with a micro, but goal is to complete usi \subsection{MAX7219 8 digit 7 LED segment Display Driver} Basic code tested with this was the LedControl arduino library. -/begin{verbatim} +\begin{verbatim} /* Now we need a LedControl to work with. ***** These pin numbers will probably not work with your hardware ***** @@ -63,6 +63,11 @@ Using the XC9500XL series. This chip has some limitations - which are good. As you get faster clocks, you need bigger registers to handle parsing the clocks. bigger registers, use more power. +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now.}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. + + + \end{document} diff --git a/60hz_Divider/docs/5.aux b/60hz_Divider/docs/5.aux new file mode 100644 index 0000000..2f929ef --- /dev/null +++ b/60hz_Divider/docs/5.aux @@ -0,0 +1,6 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}MAX7219 8 digit 7 LED segment Display Driver}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/5.log b/60hz_Divider/docs/5.log new file mode 100644 index 0000000..b954ab7 --- /dev/null +++ b/60hz_Divider/docs/5.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 14 JUL 2020 21:20 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/5.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/5.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 +) (./5.aux) +\openout1 = `5.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: +* 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. + +Overfull \hbox (88.69052pt too wide) in paragraph at lines 54--54 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 67. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 67. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 67. + +[2] (./5.aux) ) +Here is how much of TeX's memory you used: + 3516 strings out of 494945 + 53328 string characters out of 6181032 + 118035 words of memory out of 5000000 + 6794 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,38p,680b,253s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 5.pdf (2 pages, 103811 bytes). +PDF statistics: + 43 PDF objects out of 1000 (max. 8388607) + 30 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) + diff --git a/60hz_Divider/docs/5.pdf b/60hz_Divider/docs/5.pdf new file mode 100644 index 0000000..30cea78 Binary files /dev/null and b/60hz_Divider/docs/5.pdf differ diff --git a/60hz_Divider/docs/5.tex b/60hz_Divider/docs/5.tex new file mode 100644 index 0000000..e574083 --- /dev/null +++ b/60hz_Divider/docs/5.tex @@ -0,0 +1,80 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +\maketitle + +%\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + + +\subsection{Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. +bigger registers, use more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/6.aux b/60hz_Divider/docs/6.aux new file mode 100644 index 0000000..55f11ac --- /dev/null +++ b/60hz_Divider/docs/6.aux @@ -0,0 +1,7 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/6.log b/60hz_Divider/docs/6.log new file mode 100644 index 0000000..9153b06 --- /dev/null +++ b/60hz_Divider/docs/6.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 14 JUL 2020 21:22 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/6.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/6.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 +) (./6.aux) +\openout1 = `6.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: +* 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) + +(./6.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `6.toc'. + + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 57--57 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 70. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 70. +[2] (./6.aux) ) +Here is how much of TeX's memory you used: + 3512 strings out of 494945 + 53253 string characters out of 6181032 + 118035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,679b,154s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 6.pdf (2 pages, 97241 bytes). +PDF statistics: + 39 PDF objects out of 1000 (max. 8388607) + 27 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) + diff --git a/60hz_Divider/docs/6.pdf b/60hz_Divider/docs/6.pdf new file mode 100644 index 0000000..d378a1f Binary files /dev/null and b/60hz_Divider/docs/6.pdf differ diff --git a/60hz_Divider/docs/6.tex b/60hz_Divider/docs/6.tex new file mode 100644 index 0000000..8df9c6e --- /dev/null +++ b/60hz_Divider/docs/6.tex @@ -0,0 +1,83 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. +\subsection{Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. +bigger registers, use more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/6.tex~ b/60hz_Divider/docs/6.tex~ new file mode 100644 index 0000000..36a7316 --- /dev/null +++ b/60hz_Divider/docs/6.tex~ @@ -0,0 +1,80 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + + +\subsection{Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. +bigger registers, use more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/6.toc b/60hz_Divider/docs/6.toc new file mode 100644 index 0000000..73f40d6 --- /dev/null +++ b/60hz_Divider/docs/6.toc @@ -0,0 +1,6 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2} diff --git a/60hz_Divider/docs/7.aux b/60hz_Divider/docs/7.aux new file mode 100644 index 0000000..4488abf --- /dev/null +++ b/60hz_Divider/docs/7.aux @@ -0,0 +1,7 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/7.log b/60hz_Divider/docs/7.log new file mode 100644 index 0000000..8814ee6 --- /dev/null +++ b/60hz_Divider/docs/7.log @@ -0,0 +1,276 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 14 JUL 2020 21:25 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/7.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/7.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 +) +No file 7.aux. +\openout1 = `7.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: +* 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) + +No file 7.toc. +\tf@toc=\write3 +\openout3 = `7.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. +[1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 59--59 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] (./7.aux) ) +Here is how much of TeX's memory you used: + 3508 strings out of 494945 + 53229 string characters out of 6181032 + 118035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,680b,154s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 7.pdf (2 pages, 97240 bytes). +PDF statistics: + 39 PDF objects out of 1000 (max. 8388607) + 27 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) + diff --git a/60hz_Divider/docs/7.pdf b/60hz_Divider/docs/7.pdf new file mode 100644 index 0000000..a446710 Binary files /dev/null and b/60hz_Divider/docs/7.pdf differ diff --git a/60hz_Divider/docs/7.tex b/60hz_Divider/docs/7.tex new file mode 100644 index 0000000..5a52e02 --- /dev/null +++ b/60hz_Divider/docs/7.tex @@ -0,0 +1,85 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. +bigger registers, use more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/7.toc b/60hz_Divider/docs/7.toc new file mode 100644 index 0000000..b62f891 --- /dev/null +++ b/60hz_Divider/docs/7.toc @@ -0,0 +1,6 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2} diff --git a/60hz_Divider/docs/8.aux b/60hz_Divider/docs/8.aux new file mode 100644 index 0000000..4488abf --- /dev/null +++ b/60hz_Divider/docs/8.aux @@ -0,0 +1,7 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/8.log b/60hz_Divider/docs/8.log new file mode 100644 index 0000000..123f568 --- /dev/null +++ b/60hz_Divider/docs/8.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 14 JUL 2020 21:25 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/8.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/8.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 +) (./8.aux) +\openout1 = `8.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: +* 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) + +(./8.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `8.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 59--59 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] [3] (./8.aux) ) +Here is how much of TeX's memory you used: + 3512 strings out of 494945 + 53253 string characters out of 6181032 + 119035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,680b,149s stack positions out of 5000i,500n,10000p,200000b,80000s + + +Output written on 8.pdf (3 pages, 99106 bytes). +PDF statistics: + 42 PDF objects out of 1000 (max. 8388607) + 29 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) + diff --git a/60hz_Divider/docs/8.pdf b/60hz_Divider/docs/8.pdf new file mode 100644 index 0000000..28d0bfb Binary files /dev/null and b/60hz_Divider/docs/8.pdf differ diff --git a/60hz_Divider/docs/8.tex b/60hz_Divider/docs/8.tex new file mode 100644 index 0000000..5a52e02 --- /dev/null +++ b/60hz_Divider/docs/8.tex @@ -0,0 +1,85 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. +bigger registers, use more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/8.toc b/60hz_Divider/docs/8.toc new file mode 100644 index 0000000..b62f891 --- /dev/null +++ b/60hz_Divider/docs/8.toc @@ -0,0 +1,6 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2} diff --git a/60hz_Divider/docs/9.aux b/60hz_Divider/docs/9.aux new file mode 100644 index 0000000..4488abf --- /dev/null +++ b/60hz_Divider/docs/9.aux @@ -0,0 +1,7 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}60Hz Divider}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2}} diff --git a/60hz_Divider/docs/9.log b/60hz_Divider/docs/9.log new file mode 100644 index 0000000..9007f29 --- /dev/null +++ b/60hz_Divider/docs/9.log @@ -0,0 +1,277 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 3 AUG 2020 02:32 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +60hz_Divider/docs/9.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/6 +0hz_Divider/docs/9.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 +) (./9.aux) +\openout1 = `9.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: +* 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 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +) +\tf@toc=\write3 +\openout3 = `9.toc'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 24. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 24. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (88.69052pt too wide) in paragraph at lines 59--59 +[] \OT1/cmtt/m/n/10.95 ***** These pin numbers will probably not work with your + hardware *****[] + [] + +[2] [3] (./9.aux) ) +Here is how much of TeX's memory you used: + 3512 strings out of 494945 + 53253 string characters out of 6181032 + 119035 words of memory out of 5000000 + 6789 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 + 39i,8n,38p,680b,149s stack positions out of 5000i,500n,10000p,200000b,80000s + + +Output written on 9.pdf (3 pages, 99198 bytes). +PDF statistics: + 42 PDF objects out of 1000 (max. 8388607) + 29 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) + diff --git a/60hz_Divider/docs/9.pdf b/60hz_Divider/docs/9.pdf new file mode 100644 index 0000000..2b69f9b Binary files /dev/null and b/60hz_Divider/docs/9.pdf differ diff --git a/60hz_Divider/docs/9.tex b/60hz_Divider/docs/9.tex new file mode 100644 index 0000000..77bc3ee --- /dev/null +++ b/60hz_Divider/docs/9.tex @@ -0,0 +1,84 @@ + +\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{}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{60Hz Divider}} + + +\subsection{Overview} +Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module. + +The goal is relative accuracy. Not absolute. No GPS here. I'm going from 60 to 6,000 cycles.\footnote{Due to limitations of CPLD} This is just meant to be fun. +\subsection{Initial Notes: Counting the Hz} +pseudo code goal: +\begin{verbatim} +Using 1Hz signal +Start counting 1MHz every 1Hz +when next cycle is received, + display count + start counting again +\end{verbatim} +That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic. + + 4553 x 5 + 74hct132 + 1MHz clock (or 6MHz clock), or some variation thereof + jk flip flop + 74376 - quad jk flip flop + 7476 - jk flip flop +1mhz clk will be main counter, +6 hz or 1 hz will be latch / reset + +I ended up skipping the 74 CMOS, in favor of a CPLD. Practical Electronics also mentions this approach as favored. Even a micro alone could be used. Schematic entry in the CPLD could also be used. + +\subsection{MAX7219 8 digit 7 LED segment Display Driver} +Basic code tested with this was the LedControl arduino library. + +\begin{verbatim} +/* + Now we need a LedControl to work with. + ***** These pin numbers will probably not work with your hardware ***** + pin 12 is connected to the DataIn + pin 11 is connected to the CLK + pin 10 is connected to LOAD + We have only a single MAX72XX. + */ +\end{verbatim} +Some of the lines have to be edited to allow for all digits to be read, and +also to lower intensity of display. I think also a component package (dark +grey clear plastic bag) in front of the leds with intensity 1 is about right. + + +\subsection{CPLD Programming} +Using the XC9500XL series. This chip has some limitations - which are good. + +As you get faster clocks, you need bigger registers to handle parsing the clocks. Bigger registers, use more power. Maybe this is one reason why high clock speeds mean more power. + +\subsubsection{6KHz clock} +Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily. + + + + + + + + + + + +\end{document} + diff --git a/60hz_Divider/docs/9.toc b/60hz_Divider/docs/9.toc new file mode 100644 index 0000000..b62f891 --- /dev/null +++ b/60hz_Divider/docs/9.toc @@ -0,0 +1,6 @@ +\contentsline {section}{\numberline {1}60Hz Divider}{1} +\contentsline {subsection}{\numberline {1.1}Overview}{1} +\contentsline {subsection}{\numberline {1.2}Initial Notes: Counting the Hz}{1} +\contentsline {subsection}{\numberline {1.3}MAX7219 8 digit 7 LED segment Display Driver}{2} +\contentsline {subsection}{\numberline {1.4}CPLD Programming}{2} +\contentsline {subsubsection}{\numberline {1.4.1}6KHz clock}{2} diff --git a/Attiny_Solar_Energy_Harvest/docs/38.aux b/Attiny_Solar_Energy_Harvest/docs/38.aux index 7ff30e1..fa64ea4 100644 --- a/Attiny_Solar_Energy_Harvest/docs/38.aux +++ b/Attiny_Solar_Energy_Harvest/docs/38.aux @@ -31,4 +31,6 @@ \@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15}} \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces simple rx tx on 433mhz\relax }}{15}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Further Notes}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Further Notes}{16}} diff --git a/Attiny_Solar_Energy_Harvest/docs/38.log b/Attiny_Solar_Energy_Harvest/docs/38.log index a049d36..602f89b 100644 --- a/Attiny_Solar_Energy_Harvest/docs/38.log +++ b/Attiny_Solar_Energy_Harvest/docs/38.log @@ -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) 13 JUL 2020 14:48 +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 02:53 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -349,31 +349,31 @@ File: ../pics/rxtx_433.jpg Graphic file (type jpg) Package pdftex.def Info: ../pics/rxtx_433.jpg used on input line 390. (pdftex.def) Requested size: 140.92616pt x 65.7655pt. - -Overfull \hbox (3.92412pt too wide) in paragraph at lines 395--396 + [15 <../pics/rxtx_433.jpg>] +Overfull \hbox (3.92412pt too wide) in paragraph at lines 429--430 \OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/microcontrollers/powering-devi ces- [] -[15 <../pics/rxtx_433.jpg>] -Overfull \hbox (2.00143pt too wide) in paragraph at lines 397--398 + +Overfull \hbox (2.00143pt too wide) in paragraph at lines 431--432 []\OT1/cmr/m/n/10.95 leonerd TODO LINK HERE (book-marks in main mach) at-tiny81 5 [] -Overfull \hbox (29.1366pt too wide) in paragraph at lines 399--400 +Overfull \hbox (29.1366pt too wide) in paragraph at lines 433--434 []\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/beginners/rf-very-low-power- comms- [] -Overfull \hbox (9.33832pt too wide) in paragraph at lines 399--400 +Overfull \hbox (9.33832pt too wide) in paragraph at lines 433--434 \OT1/cmr/m/n/10.95 simple/msg3016400/#msg3016400 - Fo-rum post re-gard-ing this project. [] -[16] (./38.aux) ) +[16] [17] (./38.aux) ) Here is how much of TeX's memory you used: 3541 strings out of 494945 53807 string characters out of 6181032 @@ -382,18 +382,18 @@ Here is how much of TeX's memory you used: 8977 words of font info for 32 fonts, out of 8000000 for 9000 14 hyphenation exceptions out of 8191 39i,8n,39p,877b,250s stack positions out of 5000i,500n,10000p,200000b,80000s - -Output written on 38.pdf (16 pages, 173214 bytes). + +Output written on 38.pdf (17 pages, 175573 bytes). PDF statistics: - 89 PDF objects out of 1000 (max. 8388607) - 61 compressed objects within 1 object stream + 92 PDF objects out of 1000 (max. 8388607) + 63 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 6 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/Attiny_Solar_Energy_Harvest/docs/38.pdf b/Attiny_Solar_Energy_Harvest/docs/38.pdf index 9069c73..0ca1f2d 100644 Binary files a/Attiny_Solar_Energy_Harvest/docs/38.pdf and b/Attiny_Solar_Energy_Harvest/docs/38.pdf differ diff --git a/Attiny_Solar_Energy_Harvest/docs/38.toc b/Attiny_Solar_Energy_Harvest/docs/38.toc index eedbd86..c444d63 100644 --- a/Attiny_Solar_Energy_Harvest/docs/38.toc +++ b/Attiny_Solar_Energy_Harvest/docs/38.toc @@ -29,4 +29,6 @@ \contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14} \contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15} \contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15} -\contentsline {subsection}{\numberline {1.5}Further Notes}{15} +\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15} +\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16} +\contentsline {subsection}{\numberline {1.7}Further Notes}{16} diff --git a/Attiny_Solar_Energy_Harvest/docs/39.aux b/Attiny_Solar_Energy_Harvest/docs/39.aux new file mode 100644 index 0000000..fa64ea4 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/39.aux @@ -0,0 +1,36 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Programming}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Application}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}PCB}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces simple rx tx on 433mhz\relax }}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Further Notes}{16}} diff --git a/Attiny_Solar_Energy_Harvest/docs/39.log b/Attiny_Solar_Energy_Harvest/docs/39.log new file mode 100644 index 0000000..739294c --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/39.log @@ -0,0 +1,398 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 02:53 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +Attiny_Solar_Energy_Harvest/docs/39.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/A +ttiny_Solar_Energy_Harvest/docs/39.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 +) (./39.aux) +\openout1 = `39.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: +* 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) + +(./39.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) +\tf@toc=\write3 +\openout3 = `39.toc'. + +LaTeX Font Info: Try loading font information for OMS+cmr on input line 22. + +(/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 22. + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 41. +[2] [3] [4] [5] +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + +[6] +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + +[7] [8] +Overfull \hbox (2319.18137pt too wide) in paragraph at lines 252--252 +[]\OT1/cmtt/m/n/10.95 9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the +lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputd +riveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpu +llupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan +be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the v +oltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayo +fsensors + [] + +[9] [10] +Overfull \hbox (4.7657pt too wide) in paragraph at lines 301--302 +[]\OT1/cmr/m/n/10.95 Added ac-celerom-e-ter pcb break-out. Pack-age is small, b +ut thanks + [] + +[11] +Overfull \hbox (206.16063pt too wide) in paragraph at lines 307--308 +[]\OT1/cmr/m/n/10.95 I searched for LoRa mod-ules, and came across this https:/ +/www.disk91.com/2015/technology/networks/first- + [] + +[12] [13] +Overfull \hbox (14.6069pt too wide) in paragraph at lines 378--378 +[]\OT1/cmr/bx/n/10.95 Input Pro-tec-tion on Ac-ci-den-tal Re-verse Ca-ble Hooku +p + [] + +[14] <../pics/rxtx_433.jpg, id=55, 93.951pt x 43.8438pt> +File: ../pics/rxtx_433.jpg Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/rxtx_433.jpg used on input line 390. +(pdftex.def) Requested size: 140.92616pt x 65.7655pt. + [15 <../pics/rxtx_433.jpg>] +Overfull \hbox (3.92412pt too wide) in paragraph at lines 429--430 +\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/microcontrollers/powering-devi +ces- + [] + + +Overfull \hbox (2.00143pt too wide) in paragraph at lines 431--432 +[]\OT1/cmr/m/n/10.95 leonerd TODO LINK HERE (book-marks in main mach) at-tiny81 +5 + [] + + +Overfull \hbox (29.1366pt too wide) in paragraph at lines 433--434 +[]\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/beginners/rf-very-low-power- +comms- + [] + + +Overfull \hbox (9.33832pt too wide) in paragraph at lines 433--434 +\OT1/cmr/m/n/10.95 simple/msg3016400/#msg3016400 - Fo-rum post re-gard-ing this + project. + [] + +[16] [17] (./39.aux) ) +Here is how much of TeX's memory you used: + 3541 strings out of 494945 + 53807 string characters out of 6181032 + 121046 words of memory out of 5000000 + 6812 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 + 39i,8n,39p,877b,250s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 39.pdf (17 pages, 175633 bytes). +PDF statistics: + 92 PDF objects out of 1000 (max. 8388607) + 63 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 6 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Attiny_Solar_Energy_Harvest/docs/39.pdf b/Attiny_Solar_Energy_Harvest/docs/39.pdf new file mode 100644 index 0000000..57f6b9f Binary files /dev/null and b/Attiny_Solar_Energy_Harvest/docs/39.pdf differ diff --git a/Attiny_Solar_Energy_Harvest/docs/39.tex b/Attiny_Solar_Energy_Harvest/docs/39.tex new file mode 100644 index 0000000..2d9ed28 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/39.tex @@ -0,0 +1,436 @@ + +\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{Door Alarm}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{Attiny Solar Energy Harvest Tests}} + +I have the following: +\begin{itemize} +\item Solar panels +\item Attiny 10 +\end{itemize} +To this list, I will add a supercap, and an energy harvesting IC. The goal being to load the super cap during the day, and to run 24/7. I will need an exceptionally low power micro. The super cap will need to be about 3.3V or 5V. +\textcolor{green!60!blue!70}{ +\subsection{Micro Considerations}} +The Arduino Atmega328P is not an option. I'm looking to have a current draw of only 1mA max, (ideally 500uA) when active. Moteino is also not an option for this. Those are made for batteries. I want to be battery free. A super cap, however can be used to store energy. I'll get to that shortly. + +For micros, I have some Attiny10 on hand, and these have a reasonably low power pull in active mode. Let's build those up first. What will the micro do? No idea. I haven't a clue. + +\textcolor{green!60!blue!70}{ +\subsubsection{Micro Notes}} +Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode. +\\ +\\ + + +\textcolor{green!60!blue!70}{ +\subsubsection{Energy Storage}} +I don't want a battery. Let's go with a super cap. The solar panels will only be active some of the time, so I will want to harvest energy with some kind of IC into the cap when the sun is out.\footnote{Reference: www.analog.com/media/en/technical-documentation/technical-articles/solarenergyharvesting.pdf is a start. I'll need to do more research.} + +\textcolor{green!60!blue!70}{ \subsubsection{Make parts, not scrap}} I will +want to make sure that all parts I build are perf board parts, not +breadboard scrap (to be torn down and rebuilt again). This is an Attiny, +so no need to test much, yet. + +\textcolor{green!60!blue!70}{ +\subsection{Programming}} +To program the Attiny10, I'll use the Arduino adapter from the Junk + Arduino blog. I built it up\footnote{Had slight error where the Arduino + board wouldn't read - pins too short on headers, then the arduino wouldn't boot - due to bad connection on perf board shield. Thankfully, the USB port didn't try to run. Protection circuitry cut in on the laptop.}, and was able to Read the memory. In order to upload to the board, you will need a compiler setup. You can possibly do it in AVRGCC, but instead I opted for either Arduino IDE (via Attiny10Core which didn't work), and then went to Mplab. In order for mplab 5.25 to work, it will need XC8 compiler, and there is a pack that can be downloaded through the IDE to get Attiny10 support. + +It appears the AVR Dragon (which I have) can not be used. However, other programmers can be used. Pickit 4, Mkavrii, stk600, I think. + + +\textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}} +Tested this with the blink\_LED.c in code folder. The code is as simple as possible. +It is the following: +\begin{verbatim} +//#include +#include +#include + +int main(void) +{ + // PB2 output + DDRB = 1<<2; + + while(1) + { + // Toggle PB2 + PINB = 1<<2; + _delay_ms(500); + } +} +\end{verbatim} +When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following +hex output: +\begin{verbatim} +:100000000AC020C01FC01EC01DC01CC01BC01AC01B +:1000100019C018C017C011271FBFCFE5D0E0DEBF41 +:0A002000CDBF03D000C0F894FFCF5D +:10002A0044E041B940B95FE966E871E05150604087 +:0A003A007040E1F700C00000F5CFB0 +:02004400DDCF0E +:00000001FF +\end{verbatim} +The content of this hex isn't the focus of this passage. Instead, I want you to review the +results of a D for Dump Memory, by the Arduino Loader. +\begin{verbatim} + +Current memory state: + +registers, SRAM + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00 +0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F +0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12 +NVM lock + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F00: FF FF +configuration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F40: FF FF +calibration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F80: 79 FF +device ID + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3FC0: 1E 90 03 FF +program + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0 +4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF +4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9 +4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0 +4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF +4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +(...some memory omitted here for brevity...) +43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +\end{verbatim} + +Notice that the "AC020C01F" is set. That is from the hex. But the 01000... +before it seems to be missing. Some deciphering of how the Arduino programs +the Attiny is in order here. It also doesn't end the same. + +Regardless, when programming, the Arduino reports 70 bytes written, and +likewise in the Mplab project memorymap.xml file, it also notes 70 bytes +for the sketch. This lines up.\footnote{Although for an unknown reason, every command registers twice on the Arduino serial monitor, but this appears to be harmless.} + +The blinking LED works. Let's move on. + +\textcolor{green!60!blue!70}{\subsubsection{Conclusion on Arduino Programming Attiny10}} +It's possible, but you have to make a dedicated jig (almost), so it might be easier to use the official programming tools. However, based on this https://www.avrfreaks.net/forum/pickit-4-and-avr-mcu I might not have a choice. So I will use the Arduino for now. But will have to devise what on board parts are req'd for programming, and incorporate into proto board layout. + +\textcolor{green!60!blue!70}{ \subsubsection{IO Port Switching Speed}} +Using the above code without any delay\_ms, I get the following results from a default clock +speed, and a 128KHz clock speed. This test was done to confirm that I could change the clock with +\begin{verbatim} + //Write CCP + CCP = 0xD8; + //change CLK to 128KHz + CLKMSR = 0b01; +\end{verbatim} +There was no issue. +\begin{verbatim} +Default CLK (8MHz? or 1MHz?): 160KHz IO Switch +128KHz CLK: 2.5KHz IO Switch +\end{verbatim} +I am going to pursue 128KHz for starters, for lower current dissipation. Note that with the Arduino loader, it is cumbersome to test and change code as you move along. It is +therefore going to be necessary to use a programmer, with a dedicated header on board. +\textcolor{green!60!blue!70}{ \subsubsection{VCC 1.8V}} +The lowest power supported: 1.8V can be applied, without any configuration +needed. It does not affect IO switching speed (although obviously amplitude is affected). +\begin{verbatim} +128KHz CLK (5.0V): 2.5256 KHz IO switch +128KHz CLK (3.3V): 2.5477 KHz IO switch +128KHz CLK (1.8V): 2.5849 KHz IO switch +\end{verbatim} +As voltage drops, IO increases. +\\ +\\ +\textbf{VCC Dropout voltage:} +\\ +From 1.5, it drops out at 1.248V or so. Comes back at about 1.34V +\\ +\\ +Test size of 1. +\\ +\\ +Can't run this with one (AA) battery, but you could with 2. +\\ +\\ +Current Draw: 128KHz - IO test, 1.8V, 0.08mA (~78uA) (tested w/3478A) +\\ +\\ +\textcolor{green!60!blue!70}{\subsection{Application}} +First, I need a board for these and a programmer, to quickly program. Second, I need an application. I want extremely low power. Hopefully, solar with no batteries, to start. This is extremely low - that is the point. Let's keep this ridiculous. + +Given the power requirements put me under 1mA (with my current panels), I'm considering the following: EEPROMs would require SPI protocol. Doable, but overcomplicated for now. +\\ +\\ +Eink (need to find a small and cheap enough option. So far, they have either too many pins, and/or use too much current. Something like what stores use to display prices would work, but that doesn't get the data out, only makes it readable.), +\\ +\\ +Third option would be RF. That is a viable path, but not today. Let's skip that for now. +\\ +\\ +Fourth option that comes to mind is IR. IR diodes, as in TV remotes, would work well here. I am choosing this as the first project. I will have dumb clients, that consist of - Attiny / IR / Sensor powered by solar. I will have a BBB that receives the IR data, and does all intelligent data gathering. To keep things simple, the IR will be binary ADC data, or otherwise sensor numbers. No SPI, no protocol complexity. That would require space on the Attiny. +\\ +\\ +Let's build some boards based on the above. +\\ +\\ +For sensors: +While building, I came across an option. Hall effect sensors. I think also capacitive sensors can be used. This may find a use in a gate sensor, for when a driveway gate is opened or closed. With a small battery, it would work for years. + +Footprints: I had to make a footprint for this module on board package for one sensor. The solution to get footprints right? copy graphic image and make it into silkscreen on the board. Easy. + +The sensor I looked at was a temp and humidity sensor SHT11 (SHT10 is obsolete). It is low power enough. However, it's \$20. So not in my price range. Otherwise, it would work here. Looks like communication is a shift register, or SPI. + +\textcolor{green!60!blue!70}{ +\subsubsection{Magnetic Current Sensor}} +There is this: +BM14270AMUV-LB +Which is low enough current here (<1mA). But \$7 in qty, and req's I2C. Not today. + +\textcolor{green!60!blue!70}{ +\subsubsection{Accelerometers}} +These are an option. + +Best pinout (for deadbug) is LIS344ALHTR (but lacks vcc down to 1.8) +2nd Best pinout with full 1.8 -3.6 vcc is ADXL337BCPZ-RL7 +(Keep in mind, these are low end options only) +(Analog output only. keep it simple for now.) +Runner up to all above, is KXTC9-2050-FR . But has worse pinout. + +Going with AD part. \$5 in single qty. +Digital output Accelmeters are cheaper. + +All have tiny package sizes. + +Since I am grabbing 1 output only, will need to orient or choose correct output. + +PINOUT: When I said best pinout, I meant that you can solder this by hand or with hot air, without much difficulty, because the layout does not require all pins to be connected (hoping I don't get bit by floating pins, though). Or, the layout has PWR and GND together, which means some pins can be bridged. + +\textcolor{green!60!blue!70}{ +\subsubsection{Temperature Sensors}} +Temperature can be boring, but why not. Let's throw one of these on: LMT84LP . Pin compatible with LM35. Supply current is maybe 8uA. Extremely low. +LM84 (1.5V starts, to 5.5), LM85 (1.8V to 5.5) + +\textcolor{green!60!blue!70}{ +\subsubsection{Gas Sensors}} +Lowest is 5mV as of writing on dkey. Skipping. The SHT would work, but its too expensive. + +\textcolor{green!60!blue!70}{ +\subsubsection{Supercap}} +For now, trying this: +FG0V155ZF + + + + + +\textcolor{green!60!blue!70}{ +\subsubsection{Hall Effect Sensors - Push Pull vs Open Drain Outputs}} +\begin{verbatim}9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputdriveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpullupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the voltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayofsensors +\end{verbatim} From DRV5032 data sheet. + +\textcolor{green!60!blue!70}{ +\subsubsection{Conclusion: Starting Sensors}} +So as a recap, to start with affordable, low power sensors for my project, I have the following types: +\begin{itemize} +\item Temp sensor (cheapest) +\item Magnetic Sensor (hall effect) +\item Movement Sensor (accellerometer) (analog output) (tiny package) +\item capacitive sensor (azoteq)(may only be short range) +\end{itemize} + +Output, I have not determined yet. IR will not work, as its too high power. Unless I dedicate a battery just for the IR diode... Or make it battery powered. I'll start with batteries, but for solar panel and supercap, it will likely not be viable, unless I transmit extremely rarely. That is also an option, however. + +\subsubsection{Farad to mA} +1.5F supercap can supply 1.5A for 1 second. That is 0.025A for 60 seconds, or 25mA for a minute. +Let's stay I use half that, so 12mA for 60 seconds is my supply. If I transmit once every other hour (when in sunlight)... + +\subsection{PCB} +I have built rev2 of the board today. Using an Uno, user must remember to include VCC and GND. So the programming takes up all 6 pins. The 0.1'' headers were slightly close to the resistors, and the top row of VCC and GND headers are separated, so I labeled them V+2, and GND2.\footnote{Forgetting to plug in GND, and or 5v+ (for Uno), while still plugging in the TPI pins, did not break the Attiny10, in my tests today.} + +The 0.05'' pin headers work perfect for scope probes. The extra breakout I made demonstrates this. + +\subsubsection{PCB Programming} + +By default, the Attiny10 idles around 1.5mA (5V), before programming. + +First thing to do, is to program it into a low power mode. + +In order to use low power, whilst using the Uno, I will need to add a jumper to the PCB, +so that you can switch between V+2, and V+1. Three pin jumper. Outside pins are each V+, internal goes to Attiny V+. I'll need to remove the trace on gerber rev2, that goes from 4 to VCC. + +\subsubsection{PCB programming and use} +It's not possible to leave the Arduino plugged in, while testing the Attiny10. +example: Even if you power down the Uno, and use a jumper to change V+ rails, +the power dissipation through the TPI pins (10,11,12,13) will cause a draw of about 545uA, and the Attiny10 will not toggle its led. +Therefore, not only a power jumper is required to use the Attiny, but also +a 4 or 5 pin 0.1" cable for the TPI pins, must be disconnected before using the Attiny. +\footnote{In code section, mplab - tests2, the power draw of the 128KHz internal CLK with PB2 flipping at about 400us a cycle, at 3V VCC is about 115uA. At 2V it is ~95uA.} + +\subsubsection{PCB Rev3} +\begin{itemize} +\item Added jumper to switch between different power rails, so that + Arduino can be left sort of plugged in (turns out, it is still required to disconnect 9,10,11,12,13 pins, so use a 4/5 pin cable). This makes testing low power (2-3V) code, easier, while still programming with the 5V Uno. +\item Added SOT23-6 breakout + \item Moved Resistors further from 9,10,11,12,13 pins. + \item Added separate board for analog Accelerometer. + \item Moved VCC breakout (0.5'' header pins) to connect directly to tiny, not to bottom Voltage rail. + \item Added note about VCC and GND must be connected when programming. + \item Added accelerometer pcb breakout. Package is small, but thanks to pinout/unused pins - is reasonable to solder with hot air. I knew this when I chose it... Then I forgot it earlier today. +\end{itemize} + +\subsubsection{RF Comms} +I want to use RF to communicate with this device. The IR would work, but would require batteries. If I'm going to use batteries I may as well use RF. Ideally, RF without batteries would be nice. + +I searched for LoRa modules, and came across this https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/ + +I've added the datasheets. The RN2483 can be set with a UART, which means two pins on the Attiny. I will want to use a transistor to turn off the module (not using sleep mode), when not in use, so that's another pin. The 4th pin would be for whatever sensor I'm using. Right now, I'm thinking an accelerometer to watch for motion on a door or gate. I may need more pins, as I'd like to be able to switch the accel ic on and off as well. + +There is the Attiny40, and also an Attiny402. Different, but both worth considering. The Attiny40 is covered by my programmer, the 402 is not. 40 is from early 2010's, the 202/402 is from 2017. Also the Attiny20, which is less pins than the 40. But covered by my programmer. I would lean towards the 10 or the 20. 40 is too much IO. + +Attiny10 has I2C on board (TWI). I'm going to stick with the 10. Keep it simple. + +\subsubsection{Present Questions} +questions: +is a two pin UART the best I can expect to find for simple rf comms +is lora a reasonable solution here? I want as low power as possible, + Lora is not the lowest but if I transmit rarely, and for a short time perhaps it won't matter. + +Is there some other way to transmit data? I don't want to use ultrasonic waves, and IR seems to be too much current, as well +as requiring line of sight / lens. + +\subsubsection{Plan of attack} +I'm going to prototype with the Microchip RF modules for now, and see if I can get this working off a solar panel. I have an ADC, and with RESET disabled another IO. Goal is now: + +Configure RF modules w/arduino. + + +Configure RF module (one Uno receiver, other tiny transmitter) + + +Attach any sensor that uses ADC. (temp sensor, resistor light or thermocouple, current sensor (monitoring power supply), and I have the ones I already tested today (but will hold off on - the accelerometer, and hall effect). + +Desired applications +- Temp of hot surface (boiler) monitoring +- Solar current input monitoring. + +As I've already worked with a current sense before in my battery project (Electronics\_Projects\_2019), I will use again the INA169. It seems to be low enough power for my needs, though I will double check in practice. The data sheet lacks obvious power dissipation figures, while sensing, though quiescient is about 50uA. + +\subsubsection{Other Sensors} +I need to verify that the following sensors could be used with low power: + +Light dependent Resistor / Diode + + +Sound sensor (mic) + +\subsubsection{RF Searching} +RF Transceiver ICs require assembly/programming/time, so we want RF Transceiver modules instead. There are a number of roughly 10mA TX active, but that is the lowest I can find. Among these ics (not modules), most are SPI, have their own ARM core... The modules are a bit better in having some that can be controlled by serial. I like the TRM-433-LT, but I will skip this for now (\$20 each). + +I also like the RC11xx-RC232, though the latter is about 30mA TX. That may be the best I can hope for. These two are 433MHz (ISM is 433 - 434MHz). The radiocrafts product is essentially a simplified solution, preprogrammed with a uart which can be used to adjust settings. This option appears to be on part with the microchip offering I've looked at, the RN2483, in fact they both came up on my search results, next to each other. RN doesn't have what IC they use but RC, uses CC1110. + +Another option: + +ZETAPLUS-433-SO is faster than others (500Kbs), and has lower TX (18mA). Up to 2KM range... + +There's more options (over \$18), but for the following specifications, the above three are basically what you can choose from. Ignoring those with high TX power rates (sparkfun), or requires SPI (stmicro) +Specs: +\begin{itemize} +\item In stock +\item Frequency 433-434MHz +\item battery powered vcc range (2) +\end{itemize} +\footnote{There's only 25.} + +I will start with two Radiocraft modules. Let's see how that plays out.\footnote{A set of Dev boards for the radiocraft are \$250. Ouch.} + + +\subsubsection{PCB Rev 5} +\begin{itemize} +\item Added instructions to back of board to speed up getting back to this project after some time. +\item Moved resistors to be further away from programming header +\item Fixed missed connection from JMP to V1 / V2 when I moved barrel plug, and added back the bottom right mounting hole in rev4. +\item Changed prg/jmp/vcc to v1/jmp/v2 (either v rail can be used for programming) +\end{itemize} + +\subsubsection{Input Protection on Accidental Reverse Cable Hookup} +I'm going to want something to block plugging in the dupont cable backwards from breaking things. I had a square wave outputting on one pin of the Attiny10, and programming was going well, with the cable left in, until I removed, then connected it in backwards. The square wave blew something on the Atmega328p of the uno. This led me to quick replacement of the Uno atmega's here: electronics\_projects\_2020/AVRdragon\_Optiboot\_Atmega328 + +I don't know what's better. Make it foolproof, or let people learn the hard way. With the latter, they at least get a way to reprogram blank Atmegas (quite useful with Unos). + +Perhaps instead, a mated connector would be enough on the breakout... + +\subsubsection{Nuts \& Volts 433MHz RF Transmitters} +A recent nuts and volts issue (2019), covered a few sections on RF in one magazine. They covered, transmitters, as well as measuring power output of a transmitter (in separate articles). The RF transmitters they covered were 433MHz, ebay transmitters. The transmitters output the square wave you feed to them. Extremely basic. But also open to modifications and adaptations. The part count is very low, with minimal ICs. (The receivers do have an IC, though.) + +I've bought some of these, and will do some testing. +\begin{center} +\includegraphics[scale=1.5]{../pics/rxtx_433.jpg} +\captionof{figure}{simple rx tx on 433mhz} +\end{center} + +\subsection{Connecting to Programmer} +These notes may be redundant, need to double check. + +When connecting, have a base setup that works as a sanity check. + +It may be possible to blow out atmega328p pins if you leave attiny running, thne +plug in the cable back to front (i.e. pin 13 in 9). + +You might need to reboot the arduino completely. + +From Programmer Source code: +- Upload to arduino and power off + - Connect ATtiny10 as shown + - Power on and open the serial monitor + - If things are working so far you should + see "NVM enabled" and "ATtiny10/20/40 connected". + - Input one-letter commands via serial monitor: + +This programmer is not foolproof, so establish a routine, and keep a working +model (pcb w/attiny) as a prototype to isolate what is broken. + +\subsection{Attiny10 Timer Fail} +The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed +to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz +out of the Attiny using no optimization in mplab and IO as fast as possible. I was able +to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out). + +I also learned that the cable I was using to program the attiny10 was giving me much trouble. +I ended up soldering one side to an uno. That out of the way, When programming the attiny10 +with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno, +3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if +it doesn't print that it detects the attiny. It's pretty good about this, and if connected +correctly, will just write to the chip, when P is pressed. + +\subsection{Further Notes} +https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices. + +leonerd TODO LINK HERE (bookmarks in main mach) attiny815 with rf. notice the coiled antennas + +https://www.eevblog.com/forum/beginners/rf-very-low-power-comms-simple/msg3016400/\#msg3016400 - Forum post regarding this project. + +\end{document} + diff --git a/Attiny_Solar_Energy_Harvest/docs/39.toc b/Attiny_Solar_Energy_Harvest/docs/39.toc new file mode 100644 index 0000000..c444d63 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/39.toc @@ -0,0 +1,34 @@ +\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2} +\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2} +\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2} +\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2} +\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3} +\contentsline {subsection}{\numberline {1.2}Programming}{3} +\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3} +\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6} +\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6} +\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6} +\contentsline {subsection}{\numberline {1.3}Application}{7} +\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8} +\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8} +\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9} +\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9} +\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10} +\contentsline {subsection}{\numberline {1.4}PCB}{10} +\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10} +\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11} +\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11} +\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12} +\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12} +\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12} +\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13} +\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13} +\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14} +\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15} +\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15} +\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15} +\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16} +\contentsline {subsection}{\numberline {1.7}Further Notes}{16} diff --git a/Attiny_Solar_Energy_Harvest/docs/40.aux b/Attiny_Solar_Energy_Harvest/docs/40.aux new file mode 100644 index 0000000..fa64ea4 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/40.aux @@ -0,0 +1,36 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Programming}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Application}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}PCB}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces simple rx tx on 433mhz\relax }}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Further Notes}{16}} diff --git a/Attiny_Solar_Energy_Harvest/docs/40.log b/Attiny_Solar_Energy_Harvest/docs/40.log new file mode 100644 index 0000000..d22a219 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/40.log @@ -0,0 +1,398 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 02:53 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +Attiny_Solar_Energy_Harvest/docs/40.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/A +ttiny_Solar_Energy_Harvest/docs/40.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 +) (./40.aux) +\openout1 = `40.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: +* 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) + +(./40.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) +\tf@toc=\write3 +\openout3 = `40.toc'. + +LaTeX Font Info: Try loading font information for OMS+cmr on input line 22. + +(/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 22. + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 41. +[2] [3] [4] [5] +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + +[6] +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + +[7] [8] +Overfull \hbox (2319.18137pt too wide) in paragraph at lines 252--252 +[]\OT1/cmtt/m/n/10.95 9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the +lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputd +riveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpu +llupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan +be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the v +oltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayo +fsensors + [] + +[9] [10] +Overfull \hbox (4.7657pt too wide) in paragraph at lines 301--302 +[]\OT1/cmr/m/n/10.95 Added ac-celerom-e-ter pcb break-out. Pack-age is small, b +ut thanks + [] + +[11] +Overfull \hbox (206.16063pt too wide) in paragraph at lines 307--308 +[]\OT1/cmr/m/n/10.95 I searched for LoRa mod-ules, and came across this https:/ +/www.disk91.com/2015/technology/networks/first- + [] + +[12] [13] +Overfull \hbox (14.6069pt too wide) in paragraph at lines 378--378 +[]\OT1/cmr/bx/n/10.95 Input Pro-tec-tion on Ac-ci-den-tal Re-verse Ca-ble Hooku +p + [] + +[14] <../pics/rxtx_433.jpg, id=55, 93.951pt x 43.8438pt> +File: ../pics/rxtx_433.jpg Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/rxtx_433.jpg used on input line 390. +(pdftex.def) Requested size: 140.92616pt x 65.7655pt. + [15 <../pics/rxtx_433.jpg>] +Overfull \hbox (3.92412pt too wide) in paragraph at lines 429--430 +\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/microcontrollers/powering-devi +ces- + [] + + +Overfull \hbox (2.00143pt too wide) in paragraph at lines 431--432 +[]\OT1/cmr/m/n/10.95 leonerd TODO LINK HERE (book-marks in main mach) at-tiny81 +5 + [] + + +Overfull \hbox (29.1366pt too wide) in paragraph at lines 433--434 +[]\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/beginners/rf-very-low-power- +comms- + [] + + +Overfull \hbox (9.33832pt too wide) in paragraph at lines 433--434 +\OT1/cmr/m/n/10.95 simple/msg3016400/#msg3016400 - Fo-rum post re-gard-ing this + project. + [] + +[16] [17] (./40.aux) ) +Here is how much of TeX's memory you used: + 3541 strings out of 494945 + 53807 string characters out of 6181032 + 121046 words of memory out of 5000000 + 6812 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 + 39i,8n,39p,877b,250s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 40.pdf (17 pages, 175713 bytes). +PDF statistics: + 92 PDF objects out of 1000 (max. 8388607) + 63 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 6 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Attiny_Solar_Energy_Harvest/docs/40.pdf b/Attiny_Solar_Energy_Harvest/docs/40.pdf new file mode 100644 index 0000000..63d5263 Binary files /dev/null and b/Attiny_Solar_Energy_Harvest/docs/40.pdf differ diff --git a/Attiny_Solar_Energy_Harvest/docs/40.tex b/Attiny_Solar_Energy_Harvest/docs/40.tex new file mode 100644 index 0000000..986f84d --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/40.tex @@ -0,0 +1,438 @@ + +\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{Door Alarm}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{Attiny Solar Energy Harvest Tests}} + +I have the following: +\begin{itemize} +\item Solar panels +\item Attiny 10 +\end{itemize} +To this list, I will add a supercap, and an energy harvesting IC. The goal being to load the super cap during the day, and to run 24/7. I will need an exceptionally low power micro. The super cap will need to be about 3.3V or 5V. +\textcolor{green!60!blue!70}{ +\subsection{Micro Considerations}} +The Arduino Atmega328P is not an option. I'm looking to have a current draw of only 1mA max, (ideally 500uA) when active. Moteino is also not an option for this. Those are made for batteries. I want to be battery free. A super cap, however can be used to store energy. I'll get to that shortly. + +For micros, I have some Attiny10 on hand, and these have a reasonably low power pull in active mode. Let's build those up first. What will the micro do? No idea. I haven't a clue. + +\textcolor{green!60!blue!70}{ +\subsubsection{Micro Notes}} +Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode. +\\ +\\ + + +\textcolor{green!60!blue!70}{ +\subsubsection{Energy Storage}} +I don't want a battery. Let's go with a super cap. The solar panels will only be active some of the time, so I will want to harvest energy with some kind of IC into the cap when the sun is out.\footnote{Reference: www.analog.com/media/en/technical-documentation/technical-articles/solarenergyharvesting.pdf is a start. I'll need to do more research.} + +\textcolor{green!60!blue!70}{ \subsubsection{Make parts, not scrap}} I will +want to make sure that all parts I build are perf board parts, not +breadboard scrap (to be torn down and rebuilt again). This is an Attiny, +so no need to test much, yet. + +\textcolor{green!60!blue!70}{ +\subsection{Programming}} +To program the Attiny10, I'll use the Arduino adapter from the Junk + Arduino blog. I built it up\footnote{Had slight error where the Arduino + board wouldn't read - pins too short on headers, then the arduino wouldn't boot - due to bad connection on perf board shield. Thankfully, the USB port didn't try to run. Protection circuitry cut in on the laptop.}, and was able to Read the memory. In order to upload to the board, you will need a compiler setup. You can possibly do it in AVRGCC, but instead I opted for either Arduino IDE (via Attiny10Core which didn't work), and then went to Mplab. In order for mplab 5.25 to work, it will need XC8 compiler, and there is a pack that can be downloaded through the IDE to get Attiny10 support. + +It appears the AVR Dragon (which I have) can not be used. However, other programmers can be used. Pickit 4, Mkavrii, stk600, I think. + + +\textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}} +Tested this with the blink\_LED.c in code folder. The code is as simple as possible. +It is the following: +\begin{verbatim} +//#include +#include +#include + +int main(void) +{ + // PB2 output + DDRB = 1<<2; + + while(1) + { + // Toggle PB2 + PINB = 1<<2; + _delay_ms(500); + } +} +\end{verbatim} +When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following +hex output: +\begin{verbatim} +:100000000AC020C01FC01EC01DC01CC01BC01AC01B +:1000100019C018C017C011271FBFCFE5D0E0DEBF41 +:0A002000CDBF03D000C0F894FFCF5D +:10002A0044E041B940B95FE966E871E05150604087 +:0A003A007040E1F700C00000F5CFB0 +:02004400DDCF0E +:00000001FF +\end{verbatim} +The content of this hex isn't the focus of this passage. Instead, I want you to review the +results of a D for Dump Memory, by the Arduino Loader. +\begin{verbatim} + +Current memory state: + +registers, SRAM + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00 +0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F +0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12 +NVM lock + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F00: FF FF +configuration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F40: FF FF +calibration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F80: 79 FF +device ID + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3FC0: 1E 90 03 FF +program + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0 +4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF +4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9 +4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0 +4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF +4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +(...some memory omitted here for brevity...) +43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +\end{verbatim} + +Notice that the "AC020C01F" is set. That is from the hex. But the 01000... +before it seems to be missing. Some deciphering of how the Arduino programs +the Attiny is in order here. It also doesn't end the same. + +Regardless, when programming, the Arduino reports 70 bytes written, and +likewise in the Mplab project memorymap.xml file, it also notes 70 bytes +for the sketch. This lines up.\footnote{Although for an unknown reason, every command registers twice on the Arduino serial monitor, but this appears to be harmless.} + +The blinking LED works. Let's move on. + +\textcolor{green!60!blue!70}{\subsubsection{Conclusion on Arduino Programming Attiny10}} +It's possible, but you have to make a dedicated jig (almost), so it might be easier to use the official programming tools. However, based on this https://www.avrfreaks.net/forum/pickit-4-and-avr-mcu I might not have a choice. So I will use the Arduino for now. But will have to devise what on board parts are req'd for programming, and incorporate into proto board layout. + +\textcolor{green!60!blue!70}{ \subsubsection{IO Port Switching Speed}} +Using the above code without any delay\_ms, I get the following results from a default clock +speed, and a 128KHz clock speed. This test was done to confirm that I could change the clock with +\begin{verbatim} + //Write CCP + CCP = 0xD8; + //change CLK to 128KHz + CLKMSR = 0b01; +\end{verbatim} +There was no issue. +\begin{verbatim} +Default CLK (8MHz? or 1MHz?): 160KHz IO Switch +128KHz CLK: 2.5KHz IO Switch +\end{verbatim} +I am going to pursue 128KHz for starters, for lower current dissipation. Note that with the Arduino loader, it is cumbersome to test and change code as you move along. It is +therefore going to be necessary to use a programmer, with a dedicated header on board. +\textcolor{green!60!blue!70}{ \subsubsection{VCC 1.8V}} +The lowest power supported: 1.8V can be applied, without any configuration +needed. It does not affect IO switching speed (although obviously amplitude is affected). +\begin{verbatim} +128KHz CLK (5.0V): 2.5256 KHz IO switch +128KHz CLK (3.3V): 2.5477 KHz IO switch +128KHz CLK (1.8V): 2.5849 KHz IO switch +\end{verbatim} +As voltage drops, IO increases. +\\ +\\ +\textbf{VCC Dropout voltage:} +\\ +From 1.5, it drops out at 1.248V or so. Comes back at about 1.34V +\\ +\\ +Test size of 1. +\\ +\\ +Can't run this with one (AA) battery, but you could with 2. +\\ +\\ +Current Draw: 128KHz - IO test, 1.8V, 0.08mA (~78uA) (tested w/3478A) +\\ +\\ +\textcolor{green!60!blue!70}{\subsection{Application}} +First, I need a board for these and a programmer, to quickly program. Second, I need an application. I want extremely low power. Hopefully, solar with no batteries, to start. This is extremely low - that is the point. Let's keep this ridiculous. + +Given the power requirements put me under 1mA (with my current panels), I'm considering the following: EEPROMs would require SPI protocol. Doable, but overcomplicated for now. +\\ +\\ +Eink (need to find a small and cheap enough option. So far, they have either too many pins, and/or use too much current. Something like what stores use to display prices would work, but that doesn't get the data out, only makes it readable.), +\\ +\\ +Third option would be RF. That is a viable path, but not today. Let's skip that for now. +\\ +\\ +Fourth option that comes to mind is IR. IR diodes, as in TV remotes, would work well here. I am choosing this as the first project. I will have dumb clients, that consist of - Attiny / IR / Sensor powered by solar. I will have a BBB that receives the IR data, and does all intelligent data gathering. To keep things simple, the IR will be binary ADC data, or otherwise sensor numbers. No SPI, no protocol complexity. That would require space on the Attiny. +\\ +\\ +Let's build some boards based on the above. +\\ +\\ +For sensors: +While building, I came across an option. Hall effect sensors. I think also capacitive sensors can be used. This may find a use in a gate sensor, for when a driveway gate is opened or closed. With a small battery, it would work for years. + +Footprints: I had to make a footprint for this module on board package for one sensor. The solution to get footprints right? copy graphic image and make it into silkscreen on the board. Easy. + +The sensor I looked at was a temp and humidity sensor SHT11 (SHT10 is obsolete). It is low power enough. However, it's \$20. So not in my price range. Otherwise, it would work here. Looks like communication is a shift register, or SPI. + +\textcolor{green!60!blue!70}{ +\subsubsection{Magnetic Current Sensor}} +There is this: +BM14270AMUV-LB +Which is low enough current here (<1mA). But \$7 in qty, and req's I2C. Not today. + +\textcolor{green!60!blue!70}{ +\subsubsection{Accelerometers}} +These are an option. + +Best pinout (for deadbug) is LIS344ALHTR (but lacks vcc down to 1.8) +2nd Best pinout with full 1.8 -3.6 vcc is ADXL337BCPZ-RL7 +(Keep in mind, these are low end options only) +(Analog output only. keep it simple for now.) +Runner up to all above, is KXTC9-2050-FR . But has worse pinout. + +Going with AD part. \$5 in single qty. +Digital output Accelmeters are cheaper. + +All have tiny package sizes. + +Since I am grabbing 1 output only, will need to orient or choose correct output. + +PINOUT: When I said best pinout, I meant that you can solder this by hand or with hot air, without much difficulty, because the layout does not require all pins to be connected (hoping I don't get bit by floating pins, though). Or, the layout has PWR and GND together, which means some pins can be bridged. + +\textcolor{green!60!blue!70}{ +\subsubsection{Temperature Sensors}} +Temperature can be boring, but why not. Let's throw one of these on: LMT84LP . Pin compatible with LM35. Supply current is maybe 8uA. Extremely low. +LM84 (1.5V starts, to 5.5), LM85 (1.8V to 5.5) + +\textcolor{green!60!blue!70}{ +\subsubsection{Gas Sensors}} +Lowest is 5mV as of writing on dkey. Skipping. The SHT would work, but its too expensive. + +\textcolor{green!60!blue!70}{ +\subsubsection{Supercap}} +For now, trying this: +FG0V155ZF + + + + + +\textcolor{green!60!blue!70}{ +\subsubsection{Hall Effect Sensors - Push Pull vs Open Drain Outputs}} +\begin{verbatim}9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputdriveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpullupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the voltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayofsensors +\end{verbatim} From DRV5032 data sheet. + +\textcolor{green!60!blue!70}{ +\subsubsection{Conclusion: Starting Sensors}} +So as a recap, to start with affordable, low power sensors for my project, I have the following types: +\begin{itemize} +\item Temp sensor (cheapest) +\item Magnetic Sensor (hall effect) +\item Movement Sensor (accellerometer) (analog output) (tiny package) +\item capacitive sensor (azoteq)(may only be short range) +\end{itemize} + +Output, I have not determined yet. IR will not work, as its too high power. Unless I dedicate a battery just for the IR diode... Or make it battery powered. I'll start with batteries, but for solar panel and supercap, it will likely not be viable, unless I transmit extremely rarely. That is also an option, however. + +\subsubsection{Farad to mA} +1.5F supercap can supply 1.5A for 1 second. That is 0.025A for 60 seconds, or 25mA for a minute. +Let's stay I use half that, so 12mA for 60 seconds is my supply. If I transmit once every other hour (when in sunlight)... + +\subsection{PCB} +I have built rev2 of the board today. Using an Uno, user must remember to include VCC and GND. So the programming takes up all 6 pins. The 0.1'' headers were slightly close to the resistors, and the top row of VCC and GND headers are separated, so I labeled them V+2, and GND2.\footnote{Forgetting to plug in GND, and or 5v+ (for Uno), while still plugging in the TPI pins, did not break the Attiny10, in my tests today.} + +The 0.05'' pin headers work perfect for scope probes. The extra breakout I made demonstrates this. + +\subsubsection{PCB Programming} + +By default, the Attiny10 idles around 1.5mA (5V), before programming. + +First thing to do, is to program it into a low power mode. + +In order to use low power, whilst using the Uno, I will need to add a jumper to the PCB, +so that you can switch between V+2, and V+1. Three pin jumper. Outside pins are each V+, internal goes to Attiny V+. I'll need to remove the trace on gerber rev2, that goes from 4 to VCC. + +\subsubsection{PCB programming and use} +It's not possible to leave the Arduino plugged in, while testing the Attiny10. +example: Even if you power down the Uno, and use a jumper to change V+ rails, +the power dissipation through the TPI pins (10,11,12,13) will cause a draw of about 545uA, and the Attiny10 will not toggle its led. +Therefore, not only a power jumper is required to use the Attiny, but also +a 4 or 5 pin 0.1" cable for the TPI pins, must be disconnected before using the Attiny. +\footnote{In code section, mplab - tests2, the power draw of the 128KHz internal CLK with PB2 flipping at about 400us a cycle, at 3V VCC is about 115uA. At 2V it is ~95uA.} + +\subsubsection{PCB Rev3} +\begin{itemize} +\item Added jumper to switch between different power rails, so that + Arduino can be left sort of plugged in (turns out, it is still required to disconnect 9,10,11,12,13 pins, so use a 4/5 pin cable). This makes testing low power (2-3V) code, easier, while still programming with the 5V Uno. +\item Added SOT23-6 breakout + \item Moved Resistors further from 9,10,11,12,13 pins. + \item Added separate board for analog Accelerometer. + \item Moved VCC breakout (0.5'' header pins) to connect directly to tiny, not to bottom Voltage rail. + \item Added note about VCC and GND must be connected when programming. + \item Added accelerometer pcb breakout. Package is small, but thanks to pinout/unused pins - is reasonable to solder with hot air. I knew this when I chose it... Then I forgot it earlier today. +\end{itemize} + +\subsubsection{RF Comms} +I want to use RF to communicate with this device. The IR would work, but would require batteries. If I'm going to use batteries I may as well use RF. Ideally, RF without batteries would be nice. + +I searched for LoRa modules, and came across this https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/ + +I've added the datasheets. The RN2483 can be set with a UART, which means two pins on the Attiny. I will want to use a transistor to turn off the module (not using sleep mode), when not in use, so that's another pin. The 4th pin would be for whatever sensor I'm using. Right now, I'm thinking an accelerometer to watch for motion on a door or gate. I may need more pins, as I'd like to be able to switch the accel ic on and off as well. + +There is the Attiny40, and also an Attiny402. Different, but both worth considering. The Attiny40 is covered by my programmer, the 402 is not. 40 is from early 2010's, the 202/402 is from 2017. Also the Attiny20, which is less pins than the 40. But covered by my programmer. I would lean towards the 10 or the 20. 40 is too much IO. + +Attiny10 has I2C on board (TWI). I'm going to stick with the 10. Keep it simple. + +\subsubsection{Present Questions} +questions: +is a two pin UART the best I can expect to find for simple rf comms +is lora a reasonable solution here? I want as low power as possible, + Lora is not the lowest but if I transmit rarely, and for a short time perhaps it won't matter. + +Is there some other way to transmit data? I don't want to use ultrasonic waves, and IR seems to be too much current, as well +as requiring line of sight / lens. + +\subsubsection{Plan of attack} +I'm going to prototype with the Microchip RF modules for now, and see if I can get this working off a solar panel. I have an ADC, and with RESET disabled another IO. Goal is now: + +Configure RF modules w/arduino. + + +Configure RF module (one Uno receiver, other tiny transmitter) + + +Attach any sensor that uses ADC. (temp sensor, resistor light or thermocouple, current sensor (monitoring power supply), and I have the ones I already tested today (but will hold off on - the accelerometer, and hall effect). + +Desired applications +- Temp of hot surface (boiler) monitoring +- Solar current input monitoring. + +As I've already worked with a current sense before in my battery project (Electronics\_Projects\_2019), I will use again the INA169. It seems to be low enough power for my needs, though I will double check in practice. The data sheet lacks obvious power dissipation figures, while sensing, though quiescient is about 50uA. + +\subsubsection{Other Sensors} +I need to verify that the following sensors could be used with low power: + +Light dependent Resistor / Diode + + +Sound sensor (mic) + +\subsubsection{RF Searching} +RF Transceiver ICs require assembly/programming/time, so we want RF Transceiver modules instead. There are a number of roughly 10mA TX active, but that is the lowest I can find. Among these ics (not modules), most are SPI, have their own ARM core... The modules are a bit better in having some that can be controlled by serial. I like the TRM-433-LT, but I will skip this for now (\$20 each). + +I also like the RC11xx-RC232, though the latter is about 30mA TX. That may be the best I can hope for. These two are 433MHz (ISM is 433 - 434MHz). The radiocrafts product is essentially a simplified solution, preprogrammed with a uart which can be used to adjust settings. This option appears to be on part with the microchip offering I've looked at, the RN2483, in fact they both came up on my search results, next to each other. RN doesn't have what IC they use but RC, uses CC1110. + +Another option: + +ZETAPLUS-433-SO is faster than others (500Kbs), and has lower TX (18mA). Up to 2KM range... + +There's more options (over \$18), but for the following specifications, the above three are basically what you can choose from. Ignoring those with high TX power rates (sparkfun), or requires SPI (stmicro) +Specs: +\begin{itemize} +\item In stock +\item Frequency 433-434MHz +\item battery powered vcc range (2) +\end{itemize} +\footnote{There's only 25.} + +I will start with two Radiocraft modules. Let's see how that plays out.\footnote{A set of Dev boards for the radiocraft are \$250. Ouch.} + + +\subsubsection{PCB Rev 5} +\begin{itemize} +\item Added instructions to back of board to speed up getting back to this project after some time. +\item Moved resistors to be further away from programming header +\item Fixed missed connection from JMP to V1 / V2 when I moved barrel plug, and added back the bottom right mounting hole in rev4. +\item Changed prg/jmp/vcc to v1/jmp/v2 (either v rail can be used for programming) +\end{itemize} + +\subsubsection{Input Protection on Accidental Reverse Cable Hookup} +I'm going to want something to block plugging in the dupont cable backwards from breaking things. I had a square wave outputting on one pin of the Attiny10, and programming was going well, with the cable left in, until I removed, then connected it in backwards. The square wave blew something on the Atmega328p of the uno. This led me to quick replacement of the Uno atmega's here: electronics\_projects\_2020/AVRdragon\_Optiboot\_Atmega328 + +I don't know what's better. Make it foolproof, or let people learn the hard way. With the latter, they at least get a way to reprogram blank Atmegas (quite useful with Unos). + +Perhaps instead, a mated connector would be enough on the breakout... + +\subsubsection{Nuts \& Volts 433MHz RF Transmitters} +A recent nuts and volts issue (2019), covered a few sections on RF in one magazine. They covered, transmitters, as well as measuring power output of a transmitter (in separate articles). The RF transmitters they covered were 433MHz, ebay transmitters. The transmitters output the square wave you feed to them. Extremely basic. But also open to modifications and adaptations. The part count is very low, with minimal ICs. (The receivers do have an IC, though.) + +I've bought some of these, and will do some testing. +\begin{center} +\includegraphics[scale=1.5]{../pics/rxtx_433.jpg} +\captionof{figure}{simple rx tx on 433mhz} +\end{center} + +\subsection{Connecting to Programmer} +These notes may be redundant, need to double check. + +When connecting, have a base setup that works as a sanity check. + +It may be possible to blow out atmega328p pins if you leave attiny running, thne +plug in the cable back to front (i.e. pin 13 in 9). + +You might need to reboot the arduino completely. + +From Programmer Source code: +- Upload to arduino and power off + - Connect ATtiny10 as shown + - Power on and open the serial monitor + - If things are working so far you should + see "NVM enabled" and "ATtiny10/20/40 connected". + - Input one-letter commands via serial monitor: + +This programmer is not foolproof, so establish a routine, and keep a working +model (pcb w/attiny) as a prototype to isolate what is broken. + +\subsection{Attiny10 Timer Fail} +The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed +to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz +out of the Attiny using no optimization in mplab and IO as fast as possible. I was able +to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out). + +I also learned that the cable I was using to program the attiny10 was giving me much trouble. +I ended up soldering one side to an uno. That out of the way, When programming the attiny10 +with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno, +3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if +it doesn't print that it detects the attiny. It's pretty good about this, and if connected +correctly, will just write to the chip, when P is pressed. + +\subsection{Further Notes} +https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices. + +leonerd TODO LINK HERE (bookmarks in main mach) attiny815 with rf. notice the coiled antennas + +https://www.eevblog.com/forum/beginners/rf-very-low-power-comms-simple/msg3016400/\#msg3016400 - Forum post regarding this project. + +https://trmm.net/ATtiny10 - Programming Attiny10 with free / open source toolchain + +\end{document} + diff --git a/Attiny_Solar_Energy_Harvest/docs/40.toc b/Attiny_Solar_Energy_Harvest/docs/40.toc new file mode 100644 index 0000000..c444d63 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/40.toc @@ -0,0 +1,34 @@ +\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2} +\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2} +\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2} +\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2} +\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3} +\contentsline {subsection}{\numberline {1.2}Programming}{3} +\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3} +\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6} +\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6} +\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6} +\contentsline {subsection}{\numberline {1.3}Application}{7} +\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8} +\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8} +\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9} +\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9} +\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10} +\contentsline {subsection}{\numberline {1.4}PCB}{10} +\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10} +\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11} +\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11} +\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12} +\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12} +\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12} +\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13} +\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13} +\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14} +\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15} +\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15} +\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15} +\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16} +\contentsline {subsection}{\numberline {1.7}Further Notes}{16} diff --git a/Attiny_Solar_Energy_Harvest/docs/41.aux b/Attiny_Solar_Energy_Harvest/docs/41.aux new file mode 100644 index 0000000..4d0c796 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/41.aux @@ -0,0 +1,36 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Micro Considerations}{1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Programming}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{5}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{5}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Application}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{9}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}PCB}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{14}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{14}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces simple rx tx on 433mhz\relax }}{14}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{14}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Further Notes}{15}} diff --git a/Attiny_Solar_Energy_Harvest/docs/41.log b/Attiny_Solar_Energy_Harvest/docs/41.log new file mode 100644 index 0000000..1be9dfa --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/41.log @@ -0,0 +1,403 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 02:54 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +Attiny_Solar_Energy_Harvest/docs/41.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/A +ttiny_Solar_Energy_Harvest/docs/41.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 +) +No file 41.aux. +\openout1 = `41.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: +* 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) + +No file 41.toc. +\tf@toc=\write3 +\openout3 = `41.toc'. + +LaTeX Font Info: Try loading font information for OMS+cmr on input line 22. +(/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 22. + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 41. +[1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +[2] [3] [4] +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + +[5] +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + +[6] [7] +Overfull \hbox (2319.18137pt too wide) in paragraph at lines 252--252 +[]\OT1/cmtt/m/n/10.95 9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the +lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputd +riveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpu +llupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan +be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the v +oltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayo +fsensors + [] + +[8] [9] +Overfull \hbox (4.7657pt too wide) in paragraph at lines 301--302 +[]\OT1/cmr/m/n/10.95 Added ac-celerom-e-ter pcb break-out. Pack-age is small, b +ut thanks + [] + +[10] +Overfull \hbox (206.16063pt too wide) in paragraph at lines 307--308 +[]\OT1/cmr/m/n/10.95 I searched for LoRa mod-ules, and came across this https:/ +/www.disk91.com/2015/technology/networks/first- + [] + +[11] [12] +Overfull \hbox (14.6069pt too wide) in paragraph at lines 378--378 +[]\OT1/cmr/bx/n/10.95 Input Pro-tec-tion on Ac-ci-den-tal Re-verse Ca-ble Hooku +p + [] + +[13] <../pics/rxtx_433.jpg, id=52, 93.951pt x 43.8438pt> +File: ../pics/rxtx_433.jpg Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/rxtx_433.jpg used on input line 390. +(pdftex.def) Requested size: 140.92616pt x 65.7655pt. + [14 <../pics/rxtx_433.jpg>] +Overfull \hbox (3.92412pt too wide) in paragraph at lines 429--430 +\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/microcontrollers/powering-devi +ces- + [] + + +Overfull \hbox (2.00143pt too wide) in paragraph at lines 431--432 +[]\OT1/cmr/m/n/10.95 leonerd TODO LINK HERE (book-marks in main mach) at-tiny81 +5 + [] + + +Overfull \hbox (29.1366pt too wide) in paragraph at lines 433--434 +[]\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/beginners/rf-very-low-power- +comms- + [] + + +Overfull \hbox (9.33832pt too wide) in paragraph at lines 433--434 +\OT1/cmr/m/n/10.95 simple/msg3016400/#msg3016400 - Fo-rum post re-gard-ing this + project. + [] + +[15] +Overfull \hbox (3.34335pt too wide) in paragraph at lines 437--438 +[]\OT1/cmr/m/n/10.95 https://blog.podkalicki.com/attiny13-blinky-with-timer-com +pa/ - + [] + +[16] (./41.aux) ) +Here is how much of TeX's memory you used: + 3537 strings out of 494945 + 53779 string characters out of 6181032 + 120046 words of memory out of 5000000 + 6812 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 + 39i,8n,39p,877b,250s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 41.pdf (16 pages, 173935 bytes). +PDF statistics: + 89 PDF objects out of 1000 (max. 8388607) + 61 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 6 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Attiny_Solar_Energy_Harvest/docs/41.pdf b/Attiny_Solar_Energy_Harvest/docs/41.pdf new file mode 100644 index 0000000..3026c00 Binary files /dev/null and b/Attiny_Solar_Energy_Harvest/docs/41.pdf differ diff --git a/Attiny_Solar_Energy_Harvest/docs/41.tex b/Attiny_Solar_Energy_Harvest/docs/41.tex new file mode 100644 index 0000000..f3f90dd --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/41.tex @@ -0,0 +1,440 @@ + +\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{Door Alarm}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{Attiny Solar Energy Harvest Tests}} + +I have the following: +\begin{itemize} +\item Solar panels +\item Attiny 10 +\end{itemize} +To this list, I will add a supercap, and an energy harvesting IC. The goal being to load the super cap during the day, and to run 24/7. I will need an exceptionally low power micro. The super cap will need to be about 3.3V or 5V. +\textcolor{green!60!blue!70}{ +\subsection{Micro Considerations}} +The Arduino Atmega328P is not an option. I'm looking to have a current draw of only 1mA max, (ideally 500uA) when active. Moteino is also not an option for this. Those are made for batteries. I want to be battery free. A super cap, however can be used to store energy. I'll get to that shortly. + +For micros, I have some Attiny10 on hand, and these have a reasonably low power pull in active mode. Let's build those up first. What will the micro do? No idea. I haven't a clue. + +\textcolor{green!60!blue!70}{ +\subsubsection{Micro Notes}} +Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode. +\\ +\\ + + +\textcolor{green!60!blue!70}{ +\subsubsection{Energy Storage}} +I don't want a battery. Let's go with a super cap. The solar panels will only be active some of the time, so I will want to harvest energy with some kind of IC into the cap when the sun is out.\footnote{Reference: www.analog.com/media/en/technical-documentation/technical-articles/solarenergyharvesting.pdf is a start. I'll need to do more research.} + +\textcolor{green!60!blue!70}{ \subsubsection{Make parts, not scrap}} I will +want to make sure that all parts I build are perf board parts, not +breadboard scrap (to be torn down and rebuilt again). This is an Attiny, +so no need to test much, yet. + +\textcolor{green!60!blue!70}{ +\subsection{Programming}} +To program the Attiny10, I'll use the Arduino adapter from the Junk + Arduino blog. I built it up\footnote{Had slight error where the Arduino + board wouldn't read - pins too short on headers, then the arduino wouldn't boot - due to bad connection on perf board shield. Thankfully, the USB port didn't try to run. Protection circuitry cut in on the laptop.}, and was able to Read the memory. In order to upload to the board, you will need a compiler setup. You can possibly do it in AVRGCC, but instead I opted for either Arduino IDE (via Attiny10Core which didn't work), and then went to Mplab. In order for mplab 5.25 to work, it will need XC8 compiler, and there is a pack that can be downloaded through the IDE to get Attiny10 support. + +It appears the AVR Dragon (which I have) can not be used. However, other programmers can be used. Pickit 4, Mkavrii, stk600, I think. + + +\textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}} +Tested this with the blink\_LED.c in code folder. The code is as simple as possible. +It is the following: +\begin{verbatim} +//#include +#include +#include + +int main(void) +{ + // PB2 output + DDRB = 1<<2; + + while(1) + { + // Toggle PB2 + PINB = 1<<2; + _delay_ms(500); + } +} +\end{verbatim} +When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following +hex output: +\begin{verbatim} +:100000000AC020C01FC01EC01DC01CC01BC01AC01B +:1000100019C018C017C011271FBFCFE5D0E0DEBF41 +:0A002000CDBF03D000C0F894FFCF5D +:10002A0044E041B940B95FE966E871E05150604087 +:0A003A007040E1F700C00000F5CFB0 +:02004400DDCF0E +:00000001FF +\end{verbatim} +The content of this hex isn't the focus of this passage. Instead, I want you to review the +results of a D for Dump Memory, by the Arduino Loader. +\begin{verbatim} + +Current memory state: + +registers, SRAM + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00 +0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F +0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12 +NVM lock + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F00: FF FF +configuration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F40: FF FF +calibration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F80: 79 FF +device ID + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3FC0: 1E 90 03 FF +program + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0 +4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF +4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9 +4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0 +4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF +4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +(...some memory omitted here for brevity...) +43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +\end{verbatim} + +Notice that the "AC020C01F" is set. That is from the hex. But the 01000... +before it seems to be missing. Some deciphering of how the Arduino programs +the Attiny is in order here. It also doesn't end the same. + +Regardless, when programming, the Arduino reports 70 bytes written, and +likewise in the Mplab project memorymap.xml file, it also notes 70 bytes +for the sketch. This lines up.\footnote{Although for an unknown reason, every command registers twice on the Arduino serial monitor, but this appears to be harmless.} + +The blinking LED works. Let's move on. + +\textcolor{green!60!blue!70}{\subsubsection{Conclusion on Arduino Programming Attiny10}} +It's possible, but you have to make a dedicated jig (almost), so it might be easier to use the official programming tools. However, based on this https://www.avrfreaks.net/forum/pickit-4-and-avr-mcu I might not have a choice. So I will use the Arduino for now. But will have to devise what on board parts are req'd for programming, and incorporate into proto board layout. + +\textcolor{green!60!blue!70}{ \subsubsection{IO Port Switching Speed}} +Using the above code without any delay\_ms, I get the following results from a default clock +speed, and a 128KHz clock speed. This test was done to confirm that I could change the clock with +\begin{verbatim} + //Write CCP + CCP = 0xD8; + //change CLK to 128KHz + CLKMSR = 0b01; +\end{verbatim} +There was no issue. +\begin{verbatim} +Default CLK (8MHz? or 1MHz?): 160KHz IO Switch +128KHz CLK: 2.5KHz IO Switch +\end{verbatim} +I am going to pursue 128KHz for starters, for lower current dissipation. Note that with the Arduino loader, it is cumbersome to test and change code as you move along. It is +therefore going to be necessary to use a programmer, with a dedicated header on board. +\textcolor{green!60!blue!70}{ \subsubsection{VCC 1.8V}} +The lowest power supported: 1.8V can be applied, without any configuration +needed. It does not affect IO switching speed (although obviously amplitude is affected). +\begin{verbatim} +128KHz CLK (5.0V): 2.5256 KHz IO switch +128KHz CLK (3.3V): 2.5477 KHz IO switch +128KHz CLK (1.8V): 2.5849 KHz IO switch +\end{verbatim} +As voltage drops, IO increases. +\\ +\\ +\textbf{VCC Dropout voltage:} +\\ +From 1.5, it drops out at 1.248V or so. Comes back at about 1.34V +\\ +\\ +Test size of 1. +\\ +\\ +Can't run this with one (AA) battery, but you could with 2. +\\ +\\ +Current Draw: 128KHz - IO test, 1.8V, 0.08mA (~78uA) (tested w/3478A) +\\ +\\ +\textcolor{green!60!blue!70}{\subsection{Application}} +First, I need a board for these and a programmer, to quickly program. Second, I need an application. I want extremely low power. Hopefully, solar with no batteries, to start. This is extremely low - that is the point. Let's keep this ridiculous. + +Given the power requirements put me under 1mA (with my current panels), I'm considering the following: EEPROMs would require SPI protocol. Doable, but overcomplicated for now. +\\ +\\ +Eink (need to find a small and cheap enough option. So far, they have either too many pins, and/or use too much current. Something like what stores use to display prices would work, but that doesn't get the data out, only makes it readable.), +\\ +\\ +Third option would be RF. That is a viable path, but not today. Let's skip that for now. +\\ +\\ +Fourth option that comes to mind is IR. IR diodes, as in TV remotes, would work well here. I am choosing this as the first project. I will have dumb clients, that consist of - Attiny / IR / Sensor powered by solar. I will have a BBB that receives the IR data, and does all intelligent data gathering. To keep things simple, the IR will be binary ADC data, or otherwise sensor numbers. No SPI, no protocol complexity. That would require space on the Attiny. +\\ +\\ +Let's build some boards based on the above. +\\ +\\ +For sensors: +While building, I came across an option. Hall effect sensors. I think also capacitive sensors can be used. This may find a use in a gate sensor, for when a driveway gate is opened or closed. With a small battery, it would work for years. + +Footprints: I had to make a footprint for this module on board package for one sensor. The solution to get footprints right? copy graphic image and make it into silkscreen on the board. Easy. + +The sensor I looked at was a temp and humidity sensor SHT11 (SHT10 is obsolete). It is low power enough. However, it's \$20. So not in my price range. Otherwise, it would work here. Looks like communication is a shift register, or SPI. + +\textcolor{green!60!blue!70}{ +\subsubsection{Magnetic Current Sensor}} +There is this: +BM14270AMUV-LB +Which is low enough current here (<1mA). But \$7 in qty, and req's I2C. Not today. + +\textcolor{green!60!blue!70}{ +\subsubsection{Accelerometers}} +These are an option. + +Best pinout (for deadbug) is LIS344ALHTR (but lacks vcc down to 1.8) +2nd Best pinout with full 1.8 -3.6 vcc is ADXL337BCPZ-RL7 +(Keep in mind, these are low end options only) +(Analog output only. keep it simple for now.) +Runner up to all above, is KXTC9-2050-FR . But has worse pinout. + +Going with AD part. \$5 in single qty. +Digital output Accelmeters are cheaper. + +All have tiny package sizes. + +Since I am grabbing 1 output only, will need to orient or choose correct output. + +PINOUT: When I said best pinout, I meant that you can solder this by hand or with hot air, without much difficulty, because the layout does not require all pins to be connected (hoping I don't get bit by floating pins, though). Or, the layout has PWR and GND together, which means some pins can be bridged. + +\textcolor{green!60!blue!70}{ +\subsubsection{Temperature Sensors}} +Temperature can be boring, but why not. Let's throw one of these on: LMT84LP . Pin compatible with LM35. Supply current is maybe 8uA. Extremely low. +LM84 (1.5V starts, to 5.5), LM85 (1.8V to 5.5) + +\textcolor{green!60!blue!70}{ +\subsubsection{Gas Sensors}} +Lowest is 5mV as of writing on dkey. Skipping. The SHT would work, but its too expensive. + +\textcolor{green!60!blue!70}{ +\subsubsection{Supercap}} +For now, trying this: +FG0V155ZF + + + + + +\textcolor{green!60!blue!70}{ +\subsubsection{Hall Effect Sensors - Push Pull vs Open Drain Outputs}} +\begin{verbatim}9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputdriveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpullupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the voltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayofsensors +\end{verbatim} From DRV5032 data sheet. + +\textcolor{green!60!blue!70}{ +\subsubsection{Conclusion: Starting Sensors}} +So as a recap, to start with affordable, low power sensors for my project, I have the following types: +\begin{itemize} +\item Temp sensor (cheapest) +\item Magnetic Sensor (hall effect) +\item Movement Sensor (accellerometer) (analog output) (tiny package) +\item capacitive sensor (azoteq)(may only be short range) +\end{itemize} + +Output, I have not determined yet. IR will not work, as its too high power. Unless I dedicate a battery just for the IR diode... Or make it battery powered. I'll start with batteries, but for solar panel and supercap, it will likely not be viable, unless I transmit extremely rarely. That is also an option, however. + +\subsubsection{Farad to mA} +1.5F supercap can supply 1.5A for 1 second. That is 0.025A for 60 seconds, or 25mA for a minute. +Let's stay I use half that, so 12mA for 60 seconds is my supply. If I transmit once every other hour (when in sunlight)... + +\subsection{PCB} +I have built rev2 of the board today. Using an Uno, user must remember to include VCC and GND. So the programming takes up all 6 pins. The 0.1'' headers were slightly close to the resistors, and the top row of VCC and GND headers are separated, so I labeled them V+2, and GND2.\footnote{Forgetting to plug in GND, and or 5v+ (for Uno), while still plugging in the TPI pins, did not break the Attiny10, in my tests today.} + +The 0.05'' pin headers work perfect for scope probes. The extra breakout I made demonstrates this. + +\subsubsection{PCB Programming} + +By default, the Attiny10 idles around 1.5mA (5V), before programming. + +First thing to do, is to program it into a low power mode. + +In order to use low power, whilst using the Uno, I will need to add a jumper to the PCB, +so that you can switch between V+2, and V+1. Three pin jumper. Outside pins are each V+, internal goes to Attiny V+. I'll need to remove the trace on gerber rev2, that goes from 4 to VCC. + +\subsubsection{PCB programming and use} +It's not possible to leave the Arduino plugged in, while testing the Attiny10. +example: Even if you power down the Uno, and use a jumper to change V+ rails, +the power dissipation through the TPI pins (10,11,12,13) will cause a draw of about 545uA, and the Attiny10 will not toggle its led. +Therefore, not only a power jumper is required to use the Attiny, but also +a 4 or 5 pin 0.1" cable for the TPI pins, must be disconnected before using the Attiny. +\footnote{In code section, mplab - tests2, the power draw of the 128KHz internal CLK with PB2 flipping at about 400us a cycle, at 3V VCC is about 115uA. At 2V it is ~95uA.} + +\subsubsection{PCB Rev3} +\begin{itemize} +\item Added jumper to switch between different power rails, so that + Arduino can be left sort of plugged in (turns out, it is still required to disconnect 9,10,11,12,13 pins, so use a 4/5 pin cable). This makes testing low power (2-3V) code, easier, while still programming with the 5V Uno. +\item Added SOT23-6 breakout + \item Moved Resistors further from 9,10,11,12,13 pins. + \item Added separate board for analog Accelerometer. + \item Moved VCC breakout (0.5'' header pins) to connect directly to tiny, not to bottom Voltage rail. + \item Added note about VCC and GND must be connected when programming. + \item Added accelerometer pcb breakout. Package is small, but thanks to pinout/unused pins - is reasonable to solder with hot air. I knew this when I chose it... Then I forgot it earlier today. +\end{itemize} + +\subsubsection{RF Comms} +I want to use RF to communicate with this device. The IR would work, but would require batteries. If I'm going to use batteries I may as well use RF. Ideally, RF without batteries would be nice. + +I searched for LoRa modules, and came across this https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/ + +I've added the datasheets. The RN2483 can be set with a UART, which means two pins on the Attiny. I will want to use a transistor to turn off the module (not using sleep mode), when not in use, so that's another pin. The 4th pin would be for whatever sensor I'm using. Right now, I'm thinking an accelerometer to watch for motion on a door or gate. I may need more pins, as I'd like to be able to switch the accel ic on and off as well. + +There is the Attiny40, and also an Attiny402. Different, but both worth considering. The Attiny40 is covered by my programmer, the 402 is not. 40 is from early 2010's, the 202/402 is from 2017. Also the Attiny20, which is less pins than the 40. But covered by my programmer. I would lean towards the 10 or the 20. 40 is too much IO. + +Attiny10 has I2C on board (TWI). I'm going to stick with the 10. Keep it simple. + +\subsubsection{Present Questions} +questions: +is a two pin UART the best I can expect to find for simple rf comms +is lora a reasonable solution here? I want as low power as possible, + Lora is not the lowest but if I transmit rarely, and for a short time perhaps it won't matter. + +Is there some other way to transmit data? I don't want to use ultrasonic waves, and IR seems to be too much current, as well +as requiring line of sight / lens. + +\subsubsection{Plan of attack} +I'm going to prototype with the Microchip RF modules for now, and see if I can get this working off a solar panel. I have an ADC, and with RESET disabled another IO. Goal is now: + +Configure RF modules w/arduino. + + +Configure RF module (one Uno receiver, other tiny transmitter) + + +Attach any sensor that uses ADC. (temp sensor, resistor light or thermocouple, current sensor (monitoring power supply), and I have the ones I already tested today (but will hold off on - the accelerometer, and hall effect). + +Desired applications +- Temp of hot surface (boiler) monitoring +- Solar current input monitoring. + +As I've already worked with a current sense before in my battery project (Electronics\_Projects\_2019), I will use again the INA169. It seems to be low enough power for my needs, though I will double check in practice. The data sheet lacks obvious power dissipation figures, while sensing, though quiescient is about 50uA. + +\subsubsection{Other Sensors} +I need to verify that the following sensors could be used with low power: + +Light dependent Resistor / Diode + + +Sound sensor (mic) + +\subsubsection{RF Searching} +RF Transceiver ICs require assembly/programming/time, so we want RF Transceiver modules instead. There are a number of roughly 10mA TX active, but that is the lowest I can find. Among these ics (not modules), most are SPI, have their own ARM core... The modules are a bit better in having some that can be controlled by serial. I like the TRM-433-LT, but I will skip this for now (\$20 each). + +I also like the RC11xx-RC232, though the latter is about 30mA TX. That may be the best I can hope for. These two are 433MHz (ISM is 433 - 434MHz). The radiocrafts product is essentially a simplified solution, preprogrammed with a uart which can be used to adjust settings. This option appears to be on part with the microchip offering I've looked at, the RN2483, in fact they both came up on my search results, next to each other. RN doesn't have what IC they use but RC, uses CC1110. + +Another option: + +ZETAPLUS-433-SO is faster than others (500Kbs), and has lower TX (18mA). Up to 2KM range... + +There's more options (over \$18), but for the following specifications, the above three are basically what you can choose from. Ignoring those with high TX power rates (sparkfun), or requires SPI (stmicro) +Specs: +\begin{itemize} +\item In stock +\item Frequency 433-434MHz +\item battery powered vcc range (2) +\end{itemize} +\footnote{There's only 25.} + +I will start with two Radiocraft modules. Let's see how that plays out.\footnote{A set of Dev boards for the radiocraft are \$250. Ouch.} + + +\subsubsection{PCB Rev 5} +\begin{itemize} +\item Added instructions to back of board to speed up getting back to this project after some time. +\item Moved resistors to be further away from programming header +\item Fixed missed connection from JMP to V1 / V2 when I moved barrel plug, and added back the bottom right mounting hole in rev4. +\item Changed prg/jmp/vcc to v1/jmp/v2 (either v rail can be used for programming) +\end{itemize} + +\subsubsection{Input Protection on Accidental Reverse Cable Hookup} +I'm going to want something to block plugging in the dupont cable backwards from breaking things. I had a square wave outputting on one pin of the Attiny10, and programming was going well, with the cable left in, until I removed, then connected it in backwards. The square wave blew something on the Atmega328p of the uno. This led me to quick replacement of the Uno atmega's here: electronics\_projects\_2020/AVRdragon\_Optiboot\_Atmega328 + +I don't know what's better. Make it foolproof, or let people learn the hard way. With the latter, they at least get a way to reprogram blank Atmegas (quite useful with Unos). + +Perhaps instead, a mated connector would be enough on the breakout... + +\subsubsection{Nuts \& Volts 433MHz RF Transmitters} +A recent nuts and volts issue (2019), covered a few sections on RF in one magazine. They covered, transmitters, as well as measuring power output of a transmitter (in separate articles). The RF transmitters they covered were 433MHz, ebay transmitters. The transmitters output the square wave you feed to them. Extremely basic. But also open to modifications and adaptations. The part count is very low, with minimal ICs. (The receivers do have an IC, though.) + +I've bought some of these, and will do some testing. +\begin{center} +\includegraphics[scale=1.5]{../pics/rxtx_433.jpg} +\captionof{figure}{simple rx tx on 433mhz} +\end{center} + +\subsection{Connecting to Programmer} +These notes may be redundant, need to double check. + +When connecting, have a base setup that works as a sanity check. + +It may be possible to blow out atmega328p pins if you leave attiny running, thne +plug in the cable back to front (i.e. pin 13 in 9). + +You might need to reboot the arduino completely. + +From Programmer Source code: +- Upload to arduino and power off + - Connect ATtiny10 as shown + - Power on and open the serial monitor + - If things are working so far you should + see "NVM enabled" and "ATtiny10/20/40 connected". + - Input one-letter commands via serial monitor: + +This programmer is not foolproof, so establish a routine, and keep a working +model (pcb w/attiny) as a prototype to isolate what is broken. + +\subsection{Attiny10 Timer Fail} +The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed +to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz +out of the Attiny using no optimization in mplab and IO as fast as possible. I was able +to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out). + +I also learned that the cable I was using to program the attiny10 was giving me much trouble. +I ended up soldering one side to an uno. That out of the way, When programming the attiny10 +with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno, +3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if +it doesn't print that it detects the attiny. It's pretty good about this, and if connected +correctly, will just write to the chip, when P is pressed. + +\subsection{Further Notes} +https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices. + +leonerd TODO LINK HERE (bookmarks in main mach) attiny815 with rf. notice the coiled antennas + +https://www.eevblog.com/forum/beginners/rf-very-low-power-comms-simple/msg3016400/\#msg3016400 - Forum post regarding this project. + +https://trmm.net/ATtiny10 - Programming Attiny10 with free / open source toolchain + +https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/ - Similar example for Attiny13, adapted but did not work with Attiny10. + +\end{document} + diff --git a/Attiny_Solar_Energy_Harvest/docs/41.toc b/Attiny_Solar_Energy_Harvest/docs/41.toc new file mode 100644 index 0000000..3f92132 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/41.toc @@ -0,0 +1,34 @@ +\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{1} +\contentsline {subsection}{\numberline {1.1}Micro Considerations}{1} +\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{1} +\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{1} +\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{2} +\contentsline {subsection}{\numberline {1.2}Programming}{2} +\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{2} +\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{5} +\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{5} +\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{5} +\contentsline {subsection}{\numberline {1.3}Application}{6} +\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{7} +\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{7} +\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{8} +\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{8} +\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{8} +\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{8} +\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{8} +\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{9} +\contentsline {subsection}{\numberline {1.4}PCB}{9} +\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{9} +\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{10} +\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{10} +\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{11} +\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{11} +\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{11} +\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{12} +\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{12} +\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{13} +\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{14} +\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{14} +\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{14} +\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{15} +\contentsline {subsection}{\numberline {1.7}Further Notes}{15} diff --git a/Attiny_Solar_Energy_Harvest/docs/42.aux b/Attiny_Solar_Energy_Harvest/docs/42.aux new file mode 100644 index 0000000..fa64ea4 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/42.aux @@ -0,0 +1,36 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Programming}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Application}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}PCB}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces simple rx tx on 433mhz\relax }}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Further Notes}{16}} diff --git a/Attiny_Solar_Energy_Harvest/docs/42.log b/Attiny_Solar_Energy_Harvest/docs/42.log new file mode 100644 index 0000000..62b0005 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/42.log @@ -0,0 +1,414 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 02:57 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/ +Attiny_Solar_Energy_Harvest/docs/42.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2020/A +ttiny_Solar_Energy_Harvest/docs/42.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 +) (./42.aux) +\openout1 = `42.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: +* 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) + +(./42.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. + [1 +Non-PDF special ignored! + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) +\tf@toc=\write3 +\openout3 = `42.toc'. + +LaTeX Font Info: Try loading font information for OMS+cmr on input line 22. + +(/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 22. + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 34--37 + + [] + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 41. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 41. +[2] [3] [4] [5] +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 164--181 + + [] + +[6] +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 184--201 + + [] + +[7] [8] +Overfull \hbox (2319.18137pt too wide) in paragraph at lines 252--252 +[]\OT1/cmtt/m/n/10.95 9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the +lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputd +riveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpu +llupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan +be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the v +oltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayo +fsensors + [] + +[9] [10] +Overfull \hbox (4.7657pt too wide) in paragraph at lines 301--302 +[]\OT1/cmr/m/n/10.95 Added ac-celerom-e-ter pcb break-out. Pack-age is small, b +ut thanks + [] + +[11] +Overfull \hbox (206.16063pt too wide) in paragraph at lines 307--308 +[]\OT1/cmr/m/n/10.95 I searched for LoRa mod-ules, and came across this https:/ +/www.disk91.com/2015/technology/networks/first- + [] + +[12] [13] +Overfull \hbox (14.6069pt too wide) in paragraph at lines 378--378 +[]\OT1/cmr/bx/n/10.95 Input Pro-tec-tion on Ac-ci-den-tal Re-verse Ca-ble Hooku +p + [] + +[14] <../pics/rxtx_433.jpg, id=55, 93.951pt x 43.8438pt> +File: ../pics/rxtx_433.jpg Graphic file (type jpg) + + +Package pdftex.def Info: ../pics/rxtx_433.jpg used on input line 390. +(pdftex.def) Requested size: 140.92616pt x 65.7655pt. + [15 <../pics/rxtx_433.jpg>] +Underfull \hbox (badness 10000) in paragraph at lines 405--408 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 405--408 + + [] + + +Overfull \hbox (3.92412pt too wide) in paragraph at lines 417--418 +\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/microcontrollers/powering-devi +ces- + [] + + +Overfull \hbox (2.00143pt too wide) in paragraph at lines 419--420 +[]\OT1/cmr/m/n/10.95 leonerd TODO LINK HERE (book-marks in main mach) at-tiny81 +5 + [] + + +Overfull \hbox (29.1366pt too wide) in paragraph at lines 421--422 +[]\OT1/cmr/m/n/10.95 https://www.eevblog.com/forum/beginners/rf-very-low-power- +comms- + [] + + +Overfull \hbox (9.33832pt too wide) in paragraph at lines 421--422 +\OT1/cmr/m/n/10.95 simple/msg3016400/#msg3016400 - Fo-rum post re-gard-ing this + project. + [] + +[16] +Overfull \hbox (3.34335pt too wide) in paragraph at lines 425--426 +[]\OT1/cmr/m/n/10.95 https://blog.podkalicki.com/attiny13-blinky-with-timer-com +pa/ - + [] + +[17] (./42.aux) ) +Here is how much of TeX's memory you used: + 3541 strings out of 494945 + 53807 string characters out of 6181032 + 121046 words of memory out of 5000000 + 6812 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 + 39i,8n,39p,877b,250s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 42.pdf (17 pages, 176250 bytes). +PDF statistics: + 92 PDF objects out of 1000 (max. 8388607) + 63 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 6 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Attiny_Solar_Energy_Harvest/docs/42.pdf b/Attiny_Solar_Energy_Harvest/docs/42.pdf new file mode 100644 index 0000000..27b76ba Binary files /dev/null and b/Attiny_Solar_Energy_Harvest/docs/42.pdf differ diff --git a/Attiny_Solar_Energy_Harvest/docs/42.tex b/Attiny_Solar_Energy_Harvest/docs/42.tex new file mode 100644 index 0000000..15018cc --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/42.tex @@ -0,0 +1,428 @@ + +\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{Door Alarm}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{Attiny Solar Energy Harvest Tests}} + +I have the following: +\begin{itemize} +\item Solar panels +\item Attiny 10 +\end{itemize} +To this list, I will add a supercap, and an energy harvesting IC. The goal being to load the super cap during the day, and to run 24/7. I will need an exceptionally low power micro. The super cap will need to be about 3.3V or 5V. +\textcolor{green!60!blue!70}{ +\subsection{Micro Considerations}} +The Arduino Atmega328P is not an option. I'm looking to have a current draw of only 1mA max, (ideally 500uA) when active. Moteino is also not an option for this. Those are made for batteries. I want to be battery free. A super cap, however can be used to store energy. I'll get to that shortly. + +For micros, I have some Attiny10 on hand, and these have a reasonably low power pull in active mode. Let's build those up first. What will the micro do? No idea. I haven't a clue. + +\textcolor{green!60!blue!70}{ +\subsubsection{Micro Notes}} +Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode. +\\ +\\ + + +\textcolor{green!60!blue!70}{ +\subsubsection{Energy Storage}} +I don't want a battery. Let's go with a super cap. The solar panels will only be active some of the time, so I will want to harvest energy with some kind of IC into the cap when the sun is out.\footnote{Reference: www.analog.com/media/en/technical-documentation/technical-articles/solarenergyharvesting.pdf is a start. I'll need to do more research.} + +\textcolor{green!60!blue!70}{ \subsubsection{Make parts, not scrap}} I will +want to make sure that all parts I build are perf board parts, not +breadboard scrap (to be torn down and rebuilt again). This is an Attiny, +so no need to test much, yet. + +\textcolor{green!60!blue!70}{ +\subsection{Programming}} +To program the Attiny10, I'll use the Arduino adapter from the Junk + Arduino blog. I built it up\footnote{Had slight error where the Arduino + board wouldn't read - pins too short on headers, then the arduino wouldn't boot - due to bad connection on perf board shield. Thankfully, the USB port didn't try to run. Protection circuitry cut in on the laptop.}, and was able to Read the memory. In order to upload to the board, you will need a compiler setup. You can possibly do it in AVRGCC, but instead I opted for either Arduino IDE (via Attiny10Core which didn't work), and then went to Mplab. In order for mplab 5.25 to work, it will need XC8 compiler, and there is a pack that can be downloaded through the IDE to get Attiny10 support. + +It appears the AVR Dragon (which I have) can not be used. However, other programmers can be used. Pickit 4, Mkavrii, stk600, I think. + + +\textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}} +Tested this with the blink\_LED.c in code folder. The code is as simple as possible. +It is the following: +\begin{verbatim} +//#include +#include +#include + +int main(void) +{ + // PB2 output + DDRB = 1<<2; + + while(1) + { + // Toggle PB2 + PINB = 1<<2; + _delay_ms(500); + } +} +\end{verbatim} +When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following +hex output: +\begin{verbatim} +:100000000AC020C01FC01EC01DC01CC01BC01AC01B +:1000100019C018C017C011271FBFCFE5D0E0DEBF41 +:0A002000CDBF03D000C0F894FFCF5D +:10002A0044E041B940B95FE966E871E05150604087 +:0A003A007040E1F700C00000F5CFB0 +:02004400DDCF0E +:00000001FF +\end{verbatim} +The content of this hex isn't the focus of this passage. Instead, I want you to review the +results of a D for Dump Memory, by the Arduino Loader. +\begin{verbatim} + +Current memory state: + +registers, SRAM + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00 +0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F +0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12 +NVM lock + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F00: FF FF +configuration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F40: FF FF +calibration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F80: 79 FF +device ID + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3FC0: 1E 90 03 FF +program + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0 +4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF +4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9 +4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0 +4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF +4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +(...some memory omitted here for brevity...) +43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +\end{verbatim} + +Notice that the "AC020C01F" is set. That is from the hex. But the 01000... +before it seems to be missing. Some deciphering of how the Arduino programs +the Attiny is in order here. It also doesn't end the same. + +Regardless, when programming, the Arduino reports 70 bytes written, and +likewise in the Mplab project memorymap.xml file, it also notes 70 bytes +for the sketch. This lines up.\footnote{Although for an unknown reason, every command registers twice on the Arduino serial monitor, but this appears to be harmless.} + +The blinking LED works. Let's move on. + +\textcolor{green!60!blue!70}{\subsubsection{Conclusion on Arduino Programming Attiny10}} +It's possible, but you have to make a dedicated jig (almost), so it might be easier to use the official programming tools. However, based on this https://www.avrfreaks.net/forum/pickit-4-and-avr-mcu I might not have a choice. So I will use the Arduino for now. But will have to devise what on board parts are req'd for programming, and incorporate into proto board layout. + +\textcolor{green!60!blue!70}{ \subsubsection{IO Port Switching Speed}} +Using the above code without any delay\_ms, I get the following results from a default clock +speed, and a 128KHz clock speed. This test was done to confirm that I could change the clock with +\begin{verbatim} + //Write CCP + CCP = 0xD8; + //change CLK to 128KHz + CLKMSR = 0b01; +\end{verbatim} +There was no issue. +\begin{verbatim} +Default CLK (8MHz? or 1MHz?): 160KHz IO Switch +128KHz CLK: 2.5KHz IO Switch +\end{verbatim} +I am going to pursue 128KHz for starters, for lower current dissipation. Note that with the Arduino loader, it is cumbersome to test and change code as you move along. It is +therefore going to be necessary to use a programmer, with a dedicated header on board. +\textcolor{green!60!blue!70}{ \subsubsection{VCC 1.8V}} +The lowest power supported: 1.8V can be applied, without any configuration +needed. It does not affect IO switching speed (although obviously amplitude is affected). +\begin{verbatim} +128KHz CLK (5.0V): 2.5256 KHz IO switch +128KHz CLK (3.3V): 2.5477 KHz IO switch +128KHz CLK (1.8V): 2.5849 KHz IO switch +\end{verbatim} +As voltage drops, IO increases. +\\ +\\ +\textbf{VCC Dropout voltage:} +\\ +From 1.5, it drops out at 1.248V or so. Comes back at about 1.34V +\\ +\\ +Test size of 1. +\\ +\\ +Can't run this with one (AA) battery, but you could with 2. +\\ +\\ +Current Draw: 128KHz - IO test, 1.8V, 0.08mA (~78uA) (tested w/3478A) +\\ +\\ +\textcolor{green!60!blue!70}{\subsection{Application}} +First, I need a board for these and a programmer, to quickly program. Second, I need an application. I want extremely low power. Hopefully, solar with no batteries, to start. This is extremely low - that is the point. Let's keep this ridiculous. + +Given the power requirements put me under 1mA (with my current panels), I'm considering the following: EEPROMs would require SPI protocol. Doable, but overcomplicated for now. +\\ +\\ +Eink (need to find a small and cheap enough option. So far, they have either too many pins, and/or use too much current. Something like what stores use to display prices would work, but that doesn't get the data out, only makes it readable.), +\\ +\\ +Third option would be RF. That is a viable path, but not today. Let's skip that for now. +\\ +\\ +Fourth option that comes to mind is IR. IR diodes, as in TV remotes, would work well here. I am choosing this as the first project. I will have dumb clients, that consist of - Attiny / IR / Sensor powered by solar. I will have a BBB that receives the IR data, and does all intelligent data gathering. To keep things simple, the IR will be binary ADC data, or otherwise sensor numbers. No SPI, no protocol complexity. That would require space on the Attiny. +\\ +\\ +Let's build some boards based on the above. +\\ +\\ +For sensors: +While building, I came across an option. Hall effect sensors. I think also capacitive sensors can be used. This may find a use in a gate sensor, for when a driveway gate is opened or closed. With a small battery, it would work for years. + +Footprints: I had to make a footprint for this module on board package for one sensor. The solution to get footprints right? copy graphic image and make it into silkscreen on the board. Easy. + +The sensor I looked at was a temp and humidity sensor SHT11 (SHT10 is obsolete). It is low power enough. However, it's \$20. So not in my price range. Otherwise, it would work here. Looks like communication is a shift register, or SPI. + +\textcolor{green!60!blue!70}{ +\subsubsection{Magnetic Current Sensor}} +There is this: +BM14270AMUV-LB +Which is low enough current here (<1mA). But \$7 in qty, and req's I2C. Not today. + +\textcolor{green!60!blue!70}{ +\subsubsection{Accelerometers}} +These are an option. + +Best pinout (for deadbug) is LIS344ALHTR (but lacks vcc down to 1.8) +2nd Best pinout with full 1.8 -3.6 vcc is ADXL337BCPZ-RL7 +(Keep in mind, these are low end options only) +(Analog output only. keep it simple for now.) +Runner up to all above, is KXTC9-2050-FR . But has worse pinout. + +Going with AD part. \$5 in single qty. +Digital output Accelmeters are cheaper. + +All have tiny package sizes. + +Since I am grabbing 1 output only, will need to orient or choose correct output. + +PINOUT: When I said best pinout, I meant that you can solder this by hand or with hot air, without much difficulty, because the layout does not require all pins to be connected (hoping I don't get bit by floating pins, though). Or, the layout has PWR and GND together, which means some pins can be bridged. + +\textcolor{green!60!blue!70}{ +\subsubsection{Temperature Sensors}} +Temperature can be boring, but why not. Let's throw one of these on: LMT84LP . Pin compatible with LM35. Supply current is maybe 8uA. Extremely low. +LM84 (1.5V starts, to 5.5), LM85 (1.8V to 5.5) + +\textcolor{green!60!blue!70}{ +\subsubsection{Gas Sensors}} +Lowest is 5mV as of writing on dkey. Skipping. The SHT would work, but its too expensive. + +\textcolor{green!60!blue!70}{ +\subsubsection{Supercap}} +For now, trying this: +FG0V155ZF + + + + + +\textcolor{green!60!blue!70}{ +\subsubsection{Hall Effect Sensors - Push Pull vs Open Drain Outputs}} +\begin{verbatim}9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputdriveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpullupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the voltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayofsensors +\end{verbatim} From DRV5032 data sheet. + +\textcolor{green!60!blue!70}{ +\subsubsection{Conclusion: Starting Sensors}} +So as a recap, to start with affordable, low power sensors for my project, I have the following types: +\begin{itemize} +\item Temp sensor (cheapest) +\item Magnetic Sensor (hall effect) +\item Movement Sensor (accellerometer) (analog output) (tiny package) +\item capacitive sensor (azoteq)(may only be short range) +\end{itemize} + +Output, I have not determined yet. IR will not work, as its too high power. Unless I dedicate a battery just for the IR diode... Or make it battery powered. I'll start with batteries, but for solar panel and supercap, it will likely not be viable, unless I transmit extremely rarely. That is also an option, however. + +\subsubsection{Farad to mA} +1.5F supercap can supply 1.5A for 1 second. That is 0.025A for 60 seconds, or 25mA for a minute. +Let's stay I use half that, so 12mA for 60 seconds is my supply. If I transmit once every other hour (when in sunlight)... + +\subsection{PCB} +I have built rev2 of the board today. Using an Uno, user must remember to include VCC and GND. So the programming takes up all 6 pins. The 0.1'' headers were slightly close to the resistors, and the top row of VCC and GND headers are separated, so I labeled them V+2, and GND2.\footnote{Forgetting to plug in GND, and or 5v+ (for Uno), while still plugging in the TPI pins, did not break the Attiny10, in my tests today.} + +The 0.05'' pin headers work perfect for scope probes. The extra breakout I made demonstrates this. + +\subsubsection{PCB Programming} + +By default, the Attiny10 idles around 1.5mA (5V), before programming. + +First thing to do, is to program it into a low power mode. + +In order to use low power, whilst using the Uno, I will need to add a jumper to the PCB, +so that you can switch between V+2, and V+1. Three pin jumper. Outside pins are each V+, internal goes to Attiny V+. I'll need to remove the trace on gerber rev2, that goes from 4 to VCC. + +\subsubsection{PCB programming and use} +It's not possible to leave the Arduino plugged in, while testing the Attiny10. +example: Even if you power down the Uno, and use a jumper to change V+ rails, +the power dissipation through the TPI pins (10,11,12,13) will cause a draw of about 545uA, and the Attiny10 will not toggle its led. +Therefore, not only a power jumper is required to use the Attiny, but also +a 4 or 5 pin 0.1" cable for the TPI pins, must be disconnected before using the Attiny. +\footnote{In code section, mplab - tests2, the power draw of the 128KHz internal CLK with PB2 flipping at about 400us a cycle, at 3V VCC is about 115uA. At 2V it is ~95uA.} + +\subsubsection{PCB Rev3} +\begin{itemize} +\item Added jumper to switch between different power rails, so that + Arduino can be left sort of plugged in (turns out, it is still required to disconnect 9,10,11,12,13 pins, so use a 4/5 pin cable). This makes testing low power (2-3V) code, easier, while still programming with the 5V Uno. +\item Added SOT23-6 breakout + \item Moved Resistors further from 9,10,11,12,13 pins. + \item Added separate board for analog Accelerometer. + \item Moved VCC breakout (0.5'' header pins) to connect directly to tiny, not to bottom Voltage rail. + \item Added note about VCC and GND must be connected when programming. + \item Added accelerometer pcb breakout. Package is small, but thanks to pinout/unused pins - is reasonable to solder with hot air. I knew this when I chose it... Then I forgot it earlier today. +\end{itemize} + +\subsubsection{RF Comms} +I want to use RF to communicate with this device. The IR would work, but would require batteries. If I'm going to use batteries I may as well use RF. Ideally, RF without batteries would be nice. + +I searched for LoRa modules, and came across this https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/ + +I've added the datasheets. The RN2483 can be set with a UART, which means two pins on the Attiny. I will want to use a transistor to turn off the module (not using sleep mode), when not in use, so that's another pin. The 4th pin would be for whatever sensor I'm using. Right now, I'm thinking an accelerometer to watch for motion on a door or gate. I may need more pins, as I'd like to be able to switch the accel ic on and off as well. + +There is the Attiny40, and also an Attiny402. Different, but both worth considering. The Attiny40 is covered by my programmer, the 402 is not. 40 is from early 2010's, the 202/402 is from 2017. Also the Attiny20, which is less pins than the 40. But covered by my programmer. I would lean towards the 10 or the 20. 40 is too much IO. + +Attiny10 has I2C on board (TWI). I'm going to stick with the 10. Keep it simple. + +\subsubsection{Present Questions} +questions: +is a two pin UART the best I can expect to find for simple rf comms +is lora a reasonable solution here? I want as low power as possible, + Lora is not the lowest but if I transmit rarely, and for a short time perhaps it won't matter. + +Is there some other way to transmit data? I don't want to use ultrasonic waves, and IR seems to be too much current, as well +as requiring line of sight / lens. + +\subsubsection{Plan of attack} +I'm going to prototype with the Microchip RF modules for now, and see if I can get this working off a solar panel. I have an ADC, and with RESET disabled another IO. Goal is now: + +Configure RF modules w/arduino. + + +Configure RF module (one Uno receiver, other tiny transmitter) + + +Attach any sensor that uses ADC. (temp sensor, resistor light or thermocouple, current sensor (monitoring power supply), and I have the ones I already tested today (but will hold off on - the accelerometer, and hall effect). + +Desired applications +- Temp of hot surface (boiler) monitoring +- Solar current input monitoring. + +As I've already worked with a current sense before in my battery project (Electronics\_Projects\_2019), I will use again the INA169. It seems to be low enough power for my needs, though I will double check in practice. The data sheet lacks obvious power dissipation figures, while sensing, though quiescient is about 50uA. + +\subsubsection{Other Sensors} +I need to verify that the following sensors could be used with low power: + +Light dependent Resistor / Diode + + +Sound sensor (mic) + +\subsubsection{RF Searching} +RF Transceiver ICs require assembly/programming/time, so we want RF Transceiver modules instead. There are a number of roughly 10mA TX active, but that is the lowest I can find. Among these ics (not modules), most are SPI, have their own ARM core... The modules are a bit better in having some that can be controlled by serial. I like the TRM-433-LT, but I will skip this for now (\$20 each). + +I also like the RC11xx-RC232, though the latter is about 30mA TX. That may be the best I can hope for. These two are 433MHz (ISM is 433 - 434MHz). The radiocrafts product is essentially a simplified solution, preprogrammed with a uart which can be used to adjust settings. This option appears to be on part with the microchip offering I've looked at, the RN2483, in fact they both came up on my search results, next to each other. RN doesn't have what IC they use but RC, uses CC1110. + +Another option: + +ZETAPLUS-433-SO is faster than others (500Kbs), and has lower TX (18mA). Up to 2KM range... + +There's more options (over \$18), but for the following specifications, the above three are basically what you can choose from. Ignoring those with high TX power rates (sparkfun), or requires SPI (stmicro) +Specs: +\begin{itemize} +\item In stock +\item Frequency 433-434MHz +\item battery powered vcc range (2) +\end{itemize} +\footnote{There's only 25.} + +I will start with two Radiocraft modules. Let's see how that plays out.\footnote{A set of Dev boards for the radiocraft are \$250. Ouch.} + + +\subsubsection{PCB Rev 5} +\begin{itemize} +\item Added instructions to back of board to speed up getting back to this project after some time. +\item Moved resistors to be further away from programming header +\item Fixed missed connection from JMP to V1 / V2 when I moved barrel plug, and added back the bottom right mounting hole in rev4. +\item Changed prg/jmp/vcc to v1/jmp/v2 (either v rail can be used for programming) +\end{itemize} + +\subsubsection{Input Protection on Accidental Reverse Cable Hookup} +I'm going to want something to block plugging in the dupont cable backwards from breaking things. I had a square wave outputting on one pin of the Attiny10, and programming was going well, with the cable left in, until I removed, then connected it in backwards. The square wave blew something on the Atmega328p of the uno. This led me to quick replacement of the Uno atmega's here: electronics\_projects\_2020/AVRdragon\_Optiboot\_Atmega328 + +I don't know what's better. Make it foolproof, or let people learn the hard way. With the latter, they at least get a way to reprogram blank Atmegas (quite useful with Unos). + +Perhaps instead, a mated connector would be enough on the breakout... + +\subsubsection{Nuts \& Volts 433MHz RF Transmitters} +A recent nuts and volts issue (2019), covered a few sections on RF in one magazine. They covered, transmitters, as well as measuring power output of a transmitter (in separate articles). The RF transmitters they covered were 433MHz, ebay transmitters. The transmitters output the square wave you feed to them. Extremely basic. But also open to modifications and adaptations. The part count is very low, with minimal ICs. (The receivers do have an IC, though.) + +I've bought some of these, and will do some testing. +\begin{center} +\includegraphics[scale=1.5]{../pics/rxtx_433.jpg} +\captionof{figure}{simple rx tx on 433mhz} +\end{center} + +\subsection{Connecting to Programmer} +These notes may be redundant, need to double check. + +When connecting, have a base setup that works as a sanity check. + +It may be possible to blow out atmega328p pins if you leave attiny running, then plug in the cable back to front (i.e. pin 13 in 9). + +Make sure the cable is connected well. Loose cables, will cause the programmer to fail. Solder wires to Uno if necessary. + + +\subsection{Attiny10 Timer Fail} +\textbf{Note: this is a segway, where I tried to get a 6KHz clock out of one of the Attinys for the 60Hz project).} +\\ +\\ + +The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz out of the Attiny using no optimization in mplab and IO as fast as possible. I was able to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out). + +I also learned that the cable I was using to program the attiny10 was giving me much trouble. I ended up soldering one side to an uno. That out of the way, When programming the attiny10 with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno, 3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if it doesn't print that it detects the attiny. It's pretty good about this, and if connected correctly, will just write to the chip, when P is pressed. +\textbf{End Segway.} + + + +\subsection{Further Notes} +https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices. + +leonerd TODO LINK HERE (bookmarks in main mach) attiny815 with rf. notice the coiled antennas + +https://www.eevblog.com/forum/beginners/rf-very-low-power-comms-simple/msg3016400/\#msg3016400 - Forum post regarding this project. + +https://trmm.net/ATtiny10 - Programming Attiny10 with free / open source toolchain + +https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/ - Similar example for Attiny13, adapted but did not work with Attiny10. + +\end{document} + diff --git a/Attiny_Solar_Energy_Harvest/docs/42.tex~ b/Attiny_Solar_Energy_Harvest/docs/42.tex~ new file mode 100644 index 0000000..b7dfb48 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/42.tex~ @@ -0,0 +1,433 @@ + +\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{Door Alarm}} +\author{Steak Electronics} +\date{} +\begin{document} + +%\maketitle + +\tableofcontents +\textcolor{green!60!blue!70}{ + \section{Attiny Solar Energy Harvest Tests}} + +I have the following: +\begin{itemize} +\item Solar panels +\item Attiny 10 +\end{itemize} +To this list, I will add a supercap, and an energy harvesting IC. The goal being to load the super cap during the day, and to run 24/7. I will need an exceptionally low power micro. The super cap will need to be about 3.3V or 5V. +\textcolor{green!60!blue!70}{ +\subsection{Micro Considerations}} +The Arduino Atmega328P is not an option. I'm looking to have a current draw of only 1mA max, (ideally 500uA) when active. Moteino is also not an option for this. Those are made for batteries. I want to be battery free. A super cap, however can be used to store energy. I'll get to that shortly. + +For micros, I have some Attiny10 on hand, and these have a reasonably low power pull in active mode. Let's build those up first. What will the micro do? No idea. I haven't a clue. + +\textcolor{green!60!blue!70}{ +\subsubsection{Micro Notes}} +Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode. +\\ +\\ + + +\textcolor{green!60!blue!70}{ +\subsubsection{Energy Storage}} +I don't want a battery. Let's go with a super cap. The solar panels will only be active some of the time, so I will want to harvest energy with some kind of IC into the cap when the sun is out.\footnote{Reference: www.analog.com/media/en/technical-documentation/technical-articles/solarenergyharvesting.pdf is a start. I'll need to do more research.} + +\textcolor{green!60!blue!70}{ \subsubsection{Make parts, not scrap}} I will +want to make sure that all parts I build are perf board parts, not +breadboard scrap (to be torn down and rebuilt again). This is an Attiny, +so no need to test much, yet. + +\textcolor{green!60!blue!70}{ +\subsection{Programming}} +To program the Attiny10, I'll use the Arduino adapter from the Junk + Arduino blog. I built it up\footnote{Had slight error where the Arduino + board wouldn't read - pins too short on headers, then the arduino wouldn't boot - due to bad connection on perf board shield. Thankfully, the USB port didn't try to run. Protection circuitry cut in on the laptop.}, and was able to Read the memory. In order to upload to the board, you will need a compiler setup. You can possibly do it in AVRGCC, but instead I opted for either Arduino IDE (via Attiny10Core which didn't work), and then went to Mplab. In order for mplab 5.25 to work, it will need XC8 compiler, and there is a pack that can be downloaded through the IDE to get Attiny10 support. + +It appears the AVR Dragon (which I have) can not be used. However, other programmers can be used. Pickit 4, Mkavrii, stk600, I think. + + +\textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}} +Tested this with the blink\_LED.c in code folder. The code is as simple as possible. +It is the following: +\begin{verbatim} +//#include +#include +#include + +int main(void) +{ + // PB2 output + DDRB = 1<<2; + + while(1) + { + // Toggle PB2 + PINB = 1<<2; + _delay_ms(500); + } +} +\end{verbatim} +When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following +hex output: +\begin{verbatim} +:100000000AC020C01FC01EC01DC01CC01BC01AC01B +:1000100019C018C017C011271FBFCFE5D0E0DEBF41 +:0A002000CDBF03D000C0F894FFCF5D +:10002A0044E041B940B95FE966E871E05150604087 +:0A003A007040E1F700C00000F5CFB0 +:02004400DDCF0E +:00000001FF +\end{verbatim} +The content of this hex isn't the focus of this passage. Instead, I want you to review the +results of a D for Dump Memory, by the Arduino Loader. +\begin{verbatim} + +Current memory state: + +registers, SRAM + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00 +0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F +0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12 +NVM lock + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F00: FF FF +configuration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F40: FF FF +calibration + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3F80: 79 FF +device ID + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +3FC0: 1E 90 03 FF +program + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F +4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0 +4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF +4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9 +4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0 +4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF +4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +(...some memory omitted here for brevity...) +43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +\end{verbatim} + +Notice that the "AC020C01F" is set. That is from the hex. But the 01000... +before it seems to be missing. Some deciphering of how the Arduino programs +the Attiny is in order here. It also doesn't end the same. + +Regardless, when programming, the Arduino reports 70 bytes written, and +likewise in the Mplab project memorymap.xml file, it also notes 70 bytes +for the sketch. This lines up.\footnote{Although for an unknown reason, every command registers twice on the Arduino serial monitor, but this appears to be harmless.} + +The blinking LED works. Let's move on. + +\textcolor{green!60!blue!70}{\subsubsection{Conclusion on Arduino Programming Attiny10}} +It's possible, but you have to make a dedicated jig (almost), so it might be easier to use the official programming tools. However, based on this https://www.avrfreaks.net/forum/pickit-4-and-avr-mcu I might not have a choice. So I will use the Arduino for now. But will have to devise what on board parts are req'd for programming, and incorporate into proto board layout. + +\textcolor{green!60!blue!70}{ \subsubsection{IO Port Switching Speed}} +Using the above code without any delay\_ms, I get the following results from a default clock +speed, and a 128KHz clock speed. This test was done to confirm that I could change the clock with +\begin{verbatim} + //Write CCP + CCP = 0xD8; + //change CLK to 128KHz + CLKMSR = 0b01; +\end{verbatim} +There was no issue. +\begin{verbatim} +Default CLK (8MHz? or 1MHz?): 160KHz IO Switch +128KHz CLK: 2.5KHz IO Switch +\end{verbatim} +I am going to pursue 128KHz for starters, for lower current dissipation. Note that with the Arduino loader, it is cumbersome to test and change code as you move along. It is +therefore going to be necessary to use a programmer, with a dedicated header on board. +\textcolor{green!60!blue!70}{ \subsubsection{VCC 1.8V}} +The lowest power supported: 1.8V can be applied, without any configuration +needed. It does not affect IO switching speed (although obviously amplitude is affected). +\begin{verbatim} +128KHz CLK (5.0V): 2.5256 KHz IO switch +128KHz CLK (3.3V): 2.5477 KHz IO switch +128KHz CLK (1.8V): 2.5849 KHz IO switch +\end{verbatim} +As voltage drops, IO increases. +\\ +\\ +\textbf{VCC Dropout voltage:} +\\ +From 1.5, it drops out at 1.248V or so. Comes back at about 1.34V +\\ +\\ +Test size of 1. +\\ +\\ +Can't run this with one (AA) battery, but you could with 2. +\\ +\\ +Current Draw: 128KHz - IO test, 1.8V, 0.08mA (~78uA) (tested w/3478A) +\\ +\\ +\textcolor{green!60!blue!70}{\subsection{Application}} +First, I need a board for these and a programmer, to quickly program. Second, I need an application. I want extremely low power. Hopefully, solar with no batteries, to start. This is extremely low - that is the point. Let's keep this ridiculous. + +Given the power requirements put me under 1mA (with my current panels), I'm considering the following: EEPROMs would require SPI protocol. Doable, but overcomplicated for now. +\\ +\\ +Eink (need to find a small and cheap enough option. So far, they have either too many pins, and/or use too much current. Something like what stores use to display prices would work, but that doesn't get the data out, only makes it readable.), +\\ +\\ +Third option would be RF. That is a viable path, but not today. Let's skip that for now. +\\ +\\ +Fourth option that comes to mind is IR. IR diodes, as in TV remotes, would work well here. I am choosing this as the first project. I will have dumb clients, that consist of - Attiny / IR / Sensor powered by solar. I will have a BBB that receives the IR data, and does all intelligent data gathering. To keep things simple, the IR will be binary ADC data, or otherwise sensor numbers. No SPI, no protocol complexity. That would require space on the Attiny. +\\ +\\ +Let's build some boards based on the above. +\\ +\\ +For sensors: +While building, I came across an option. Hall effect sensors. I think also capacitive sensors can be used. This may find a use in a gate sensor, for when a driveway gate is opened or closed. With a small battery, it would work for years. + +Footprints: I had to make a footprint for this module on board package for one sensor. The solution to get footprints right? copy graphic image and make it into silkscreen on the board. Easy. + +The sensor I looked at was a temp and humidity sensor SHT11 (SHT10 is obsolete). It is low power enough. However, it's \$20. So not in my price range. Otherwise, it would work here. Looks like communication is a shift register, or SPI. + +\textcolor{green!60!blue!70}{ +\subsubsection{Magnetic Current Sensor}} +There is this: +BM14270AMUV-LB +Which is low enough current here (<1mA). But \$7 in qty, and req's I2C. Not today. + +\textcolor{green!60!blue!70}{ +\subsubsection{Accelerometers}} +These are an option. + +Best pinout (for deadbug) is LIS344ALHTR (but lacks vcc down to 1.8) +2nd Best pinout with full 1.8 -3.6 vcc is ADXL337BCPZ-RL7 +(Keep in mind, these are low end options only) +(Analog output only. keep it simple for now.) +Runner up to all above, is KXTC9-2050-FR . But has worse pinout. + +Going with AD part. \$5 in single qty. +Digital output Accelmeters are cheaper. + +All have tiny package sizes. + +Since I am grabbing 1 output only, will need to orient or choose correct output. + +PINOUT: When I said best pinout, I meant that you can solder this by hand or with hot air, without much difficulty, because the layout does not require all pins to be connected (hoping I don't get bit by floating pins, though). Or, the layout has PWR and GND together, which means some pins can be bridged. + +\textcolor{green!60!blue!70}{ +\subsubsection{Temperature Sensors}} +Temperature can be boring, but why not. Let's throw one of these on: LMT84LP . Pin compatible with LM35. Supply current is maybe 8uA. Extremely low. +LM84 (1.5V starts, to 5.5), LM85 (1.8V to 5.5) + +\textcolor{green!60!blue!70}{ +\subsubsection{Gas Sensors}} +Lowest is 5mV as of writing on dkey. Skipping. The SHT would work, but its too expensive. + +\textcolor{green!60!blue!70}{ +\subsubsection{Supercap}} +For now, trying this: +FG0V155ZF + + + + + +\textcolor{green!60!blue!70}{ +\subsubsection{Hall Effect Sensors - Push Pull vs Open Drain Outputs}} +\begin{verbatim}9.1.1OutputTypeTradeoffsThe push-pulloutputallowsfor the lowestsystempowerconsumptionbecausethereis no currentleakagepathwhenthe outputdriveshighor low. The open-drainoutputinvolvesa leakagepaththroughthe externalpullupresistorwhenthe outputdriveslow.The open-drainoutputsof multipledevicescan be tied togetherto forma logicalAND.In this setup,if any sensordriveslow, the voltageon the sharednodebecomeslow. Thiscan allowa singleGPIOto measurean arrayofsensors +\end{verbatim} From DRV5032 data sheet. + +\textcolor{green!60!blue!70}{ +\subsubsection{Conclusion: Starting Sensors}} +So as a recap, to start with affordable, low power sensors for my project, I have the following types: +\begin{itemize} +\item Temp sensor (cheapest) +\item Magnetic Sensor (hall effect) +\item Movement Sensor (accellerometer) (analog output) (tiny package) +\item capacitive sensor (azoteq)(may only be short range) +\end{itemize} + +Output, I have not determined yet. IR will not work, as its too high power. Unless I dedicate a battery just for the IR diode... Or make it battery powered. I'll start with batteries, but for solar panel and supercap, it will likely not be viable, unless I transmit extremely rarely. That is also an option, however. + +\subsubsection{Farad to mA} +1.5F supercap can supply 1.5A for 1 second. That is 0.025A for 60 seconds, or 25mA for a minute. +Let's stay I use half that, so 12mA for 60 seconds is my supply. If I transmit once every other hour (when in sunlight)... + +\subsection{PCB} +I have built rev2 of the board today. Using an Uno, user must remember to include VCC and GND. So the programming takes up all 6 pins. The 0.1'' headers were slightly close to the resistors, and the top row of VCC and GND headers are separated, so I labeled them V+2, and GND2.\footnote{Forgetting to plug in GND, and or 5v+ (for Uno), while still plugging in the TPI pins, did not break the Attiny10, in my tests today.} + +The 0.05'' pin headers work perfect for scope probes. The extra breakout I made demonstrates this. + +\subsubsection{PCB Programming} + +By default, the Attiny10 idles around 1.5mA (5V), before programming. + +First thing to do, is to program it into a low power mode. + +In order to use low power, whilst using the Uno, I will need to add a jumper to the PCB, +so that you can switch between V+2, and V+1. Three pin jumper. Outside pins are each V+, internal goes to Attiny V+. I'll need to remove the trace on gerber rev2, that goes from 4 to VCC. + +\subsubsection{PCB programming and use} +It's not possible to leave the Arduino plugged in, while testing the Attiny10. +example: Even if you power down the Uno, and use a jumper to change V+ rails, +the power dissipation through the TPI pins (10,11,12,13) will cause a draw of about 545uA, and the Attiny10 will not toggle its led. +Therefore, not only a power jumper is required to use the Attiny, but also +a 4 or 5 pin 0.1" cable for the TPI pins, must be disconnected before using the Attiny. +\footnote{In code section, mplab - tests2, the power draw of the 128KHz internal CLK with PB2 flipping at about 400us a cycle, at 3V VCC is about 115uA. At 2V it is ~95uA.} + +\subsubsection{PCB Rev3} +\begin{itemize} +\item Added jumper to switch between different power rails, so that + Arduino can be left sort of plugged in (turns out, it is still required to disconnect 9,10,11,12,13 pins, so use a 4/5 pin cable). This makes testing low power (2-3V) code, easier, while still programming with the 5V Uno. +\item Added SOT23-6 breakout + \item Moved Resistors further from 9,10,11,12,13 pins. + \item Added separate board for analog Accelerometer. + \item Moved VCC breakout (0.5'' header pins) to connect directly to tiny, not to bottom Voltage rail. + \item Added note about VCC and GND must be connected when programming. + \item Added accelerometer pcb breakout. Package is small, but thanks to pinout/unused pins - is reasonable to solder with hot air. I knew this when I chose it... Then I forgot it earlier today. +\end{itemize} + +\subsubsection{RF Comms} +I want to use RF to communicate with this device. The IR would work, but would require batteries. If I'm going to use batteries I may as well use RF. Ideally, RF without batteries would be nice. + +I searched for LoRa modules, and came across this https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/ + +I've added the datasheets. The RN2483 can be set with a UART, which means two pins on the Attiny. I will want to use a transistor to turn off the module (not using sleep mode), when not in use, so that's another pin. The 4th pin would be for whatever sensor I'm using. Right now, I'm thinking an accelerometer to watch for motion on a door or gate. I may need more pins, as I'd like to be able to switch the accel ic on and off as well. + +There is the Attiny40, and also an Attiny402. Different, but both worth considering. The Attiny40 is covered by my programmer, the 402 is not. 40 is from early 2010's, the 202/402 is from 2017. Also the Attiny20, which is less pins than the 40. But covered by my programmer. I would lean towards the 10 or the 20. 40 is too much IO. + +Attiny10 has I2C on board (TWI). I'm going to stick with the 10. Keep it simple. + +\subsubsection{Present Questions} +questions: +is a two pin UART the best I can expect to find for simple rf comms +is lora a reasonable solution here? I want as low power as possible, + Lora is not the lowest but if I transmit rarely, and for a short time perhaps it won't matter. + +Is there some other way to transmit data? I don't want to use ultrasonic waves, and IR seems to be too much current, as well +as requiring line of sight / lens. + +\subsubsection{Plan of attack} +I'm going to prototype with the Microchip RF modules for now, and see if I can get this working off a solar panel. I have an ADC, and with RESET disabled another IO. Goal is now: + +Configure RF modules w/arduino. + + +Configure RF module (one Uno receiver, other tiny transmitter) + + +Attach any sensor that uses ADC. (temp sensor, resistor light or thermocouple, current sensor (monitoring power supply), and I have the ones I already tested today (but will hold off on - the accelerometer, and hall effect). + +Desired applications +- Temp of hot surface (boiler) monitoring +- Solar current input monitoring. + +As I've already worked with a current sense before in my battery project (Electronics\_Projects\_2019), I will use again the INA169. It seems to be low enough power for my needs, though I will double check in practice. The data sheet lacks obvious power dissipation figures, while sensing, though quiescient is about 50uA. + +\subsubsection{Other Sensors} +I need to verify that the following sensors could be used with low power: + +Light dependent Resistor / Diode + + +Sound sensor (mic) + +\subsubsection{RF Searching} +RF Transceiver ICs require assembly/programming/time, so we want RF Transceiver modules instead. There are a number of roughly 10mA TX active, but that is the lowest I can find. Among these ics (not modules), most are SPI, have their own ARM core... The modules are a bit better in having some that can be controlled by serial. I like the TRM-433-LT, but I will skip this for now (\$20 each). + +I also like the RC11xx-RC232, though the latter is about 30mA TX. That may be the best I can hope for. These two are 433MHz (ISM is 433 - 434MHz). The radiocrafts product is essentially a simplified solution, preprogrammed with a uart which can be used to adjust settings. This option appears to be on part with the microchip offering I've looked at, the RN2483, in fact they both came up on my search results, next to each other. RN doesn't have what IC they use but RC, uses CC1110. + +Another option: + +ZETAPLUS-433-SO is faster than others (500Kbs), and has lower TX (18mA). Up to 2KM range... + +There's more options (over \$18), but for the following specifications, the above three are basically what you can choose from. Ignoring those with high TX power rates (sparkfun), or requires SPI (stmicro) +Specs: +\begin{itemize} +\item In stock +\item Frequency 433-434MHz +\item battery powered vcc range (2) +\end{itemize} +\footnote{There's only 25.} + +I will start with two Radiocraft modules. Let's see how that plays out.\footnote{A set of Dev boards for the radiocraft are \$250. Ouch.} + + +\subsubsection{PCB Rev 5} +\begin{itemize} +\item Added instructions to back of board to speed up getting back to this project after some time. +\item Moved resistors to be further away from programming header +\item Fixed missed connection from JMP to V1 / V2 when I moved barrel plug, and added back the bottom right mounting hole in rev4. +\item Changed prg/jmp/vcc to v1/jmp/v2 (either v rail can be used for programming) +\end{itemize} + +\subsubsection{Input Protection on Accidental Reverse Cable Hookup} +I'm going to want something to block plugging in the dupont cable backwards from breaking things. I had a square wave outputting on one pin of the Attiny10, and programming was going well, with the cable left in, until I removed, then connected it in backwards. The square wave blew something on the Atmega328p of the uno. This led me to quick replacement of the Uno atmega's here: electronics\_projects\_2020/AVRdragon\_Optiboot\_Atmega328 + +I don't know what's better. Make it foolproof, or let people learn the hard way. With the latter, they at least get a way to reprogram blank Atmegas (quite useful with Unos). + +Perhaps instead, a mated connector would be enough on the breakout... + +\subsubsection{Nuts \& Volts 433MHz RF Transmitters} +A recent nuts and volts issue (2019), covered a few sections on RF in one magazine. They covered, transmitters, as well as measuring power output of a transmitter (in separate articles). The RF transmitters they covered were 433MHz, ebay transmitters. The transmitters output the square wave you feed to them. Extremely basic. But also open to modifications and adaptations. The part count is very low, with minimal ICs. (The receivers do have an IC, though.) + +I've bought some of these, and will do some testing. +\begin{center} +\includegraphics[scale=1.5]{../pics/rxtx_433.jpg} +\captionof{figure}{simple rx tx on 433mhz} +\end{center} + +\subsection{Connecting to Programmer} +These notes may be redundant, need to double check. + +When connecting, have a base setup that works as a sanity check. + +It may be possible to blow out atmega328p pins if you leave attiny running, then plug in the cable back to front (i.e. pin 13 in 9). + +Make sure the cable is connected well. Loose cables, will cause the programmer to fail. Solder wires to Uno if necessary. + + +\subsection{Attiny10 Timer Fail} +\textbf{Note: this is a segway, where I tried to get a 6KHz clock out of one of the Attinys for the 60Hz project).} +The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed +to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz +out of the Attiny using no optimization in mplab and IO as fast as possible. I was able +to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out). + +I also learned that the cable I was using to program the attiny10 was giving me much trouble. +I ended up soldering one side to an uno. That out of the way, When programming the attiny10 +with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno, +3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if +it doesn't print that it detects the attiny. It's pretty good about this, and if connected +correctly, will just write to the chip, when P is pressed. +\textbf{End Segway.} + + + +\subsection{Further Notes} +https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices. + +leonerd TODO LINK HERE (bookmarks in main mach) attiny815 with rf. notice the coiled antennas + +https://www.eevblog.com/forum/beginners/rf-very-low-power-comms-simple/msg3016400/\#msg3016400 - Forum post regarding this project. + +https://trmm.net/ATtiny10 - Programming Attiny10 with free / open source toolchain + +https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/ - Similar example for Attiny13, adapted but did not work with Attiny10. + +\end{document} + diff --git a/Attiny_Solar_Energy_Harvest/docs/42.toc b/Attiny_Solar_Energy_Harvest/docs/42.toc new file mode 100644 index 0000000..c444d63 --- /dev/null +++ b/Attiny_Solar_Energy_Harvest/docs/42.toc @@ -0,0 +1,34 @@ +\contentsline {section}{\numberline {1}Attiny Solar Energy Harvest Tests}{2} +\contentsline {subsection}{\numberline {1.1}Micro Considerations}{2} +\contentsline {subsubsection}{\numberline {1.1.1}Micro Notes}{2} +\contentsline {subsubsection}{\numberline {1.1.2}Energy Storage}{2} +\contentsline {subsubsection}{\numberline {1.1.3}Make parts, not scrap}{3} +\contentsline {subsection}{\numberline {1.2}Programming}{3} +\contentsline {subsubsection}{\numberline {1.2.1}Testing Arduino Loader}{3} +\contentsline {subsubsection}{\numberline {1.2.2}Conclusion on Arduino Programming Attiny10}{6} +\contentsline {subsubsection}{\numberline {1.2.3}IO Port Switching Speed}{6} +\contentsline {subsubsection}{\numberline {1.2.4}VCC 1.8V}{6} +\contentsline {subsection}{\numberline {1.3}Application}{7} +\contentsline {subsubsection}{\numberline {1.3.1}Magnetic Current Sensor}{8} +\contentsline {subsubsection}{\numberline {1.3.2}Accelerometers}{8} +\contentsline {subsubsection}{\numberline {1.3.3}Temperature Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.4}Gas Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.5}Supercap}{9} +\contentsline {subsubsection}{\numberline {1.3.6}Hall Effect Sensors - Push Pull vs Open Drain Outputs}{9} +\contentsline {subsubsection}{\numberline {1.3.7}Conclusion: Starting Sensors}{9} +\contentsline {subsubsection}{\numberline {1.3.8}Farad to mA}{10} +\contentsline {subsection}{\numberline {1.4}PCB}{10} +\contentsline {subsubsection}{\numberline {1.4.1}PCB Programming}{10} +\contentsline {subsubsection}{\numberline {1.4.2}PCB programming and use}{11} +\contentsline {subsubsection}{\numberline {1.4.3}PCB Rev3}{11} +\contentsline {subsubsection}{\numberline {1.4.4}RF Comms}{12} +\contentsline {subsubsection}{\numberline {1.4.5}Present Questions}{12} +\contentsline {subsubsection}{\numberline {1.4.6}Plan of attack}{12} +\contentsline {subsubsection}{\numberline {1.4.7}Other Sensors}{13} +\contentsline {subsubsection}{\numberline {1.4.8}RF Searching}{13} +\contentsline {subsubsection}{\numberline {1.4.9}PCB Rev 5}{14} +\contentsline {subsubsection}{\numberline {1.4.10}Input Protection on Accidental Reverse Cable Hookup}{15} +\contentsline {subsubsection}{\numberline {1.4.11}Nuts \& Volts 433MHz RF Transmitters}{15} +\contentsline {subsection}{\numberline {1.5}Connecting to Programmer}{15} +\contentsline {subsection}{\numberline {1.6}Attiny10 Timer Fail}{16} +\contentsline {subsection}{\numberline {1.7}Further Notes}{16} diff --git a/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb b/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb index 83b4724..b6bb8fd 100644 --- a/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb +++ b/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb @@ -2,7 +2,7 @@ (general (thickness 1.6002) - (drawings 48) + (drawings 88) (tracks 482) (zones 0) (modules 230) @@ -28,7 +28,7 @@ ) (setup - (last_trace_width 0.2032) + (last_trace_width 0.4064) (user_trace_width 0.2032) (user_trace_width 0.3048) (user_trace_width 0.4064) @@ -9231,6 +9231,46 @@ ) ) + (gr_line (start 69.088 82.804) (end 67.818 82.55) (layer F.SilkS) (width 0.2)) + (gr_line (start 69.342 79.502) (end 69.088 82.804) (layer F.SilkS) (width 0.2)) + (gr_line (start 73.152 75.692) (end 69.342 79.502) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.77 80.772) (end 65.786 81.788) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.77 77.724) (end 64.77 80.772) (layer F.SilkS) (width 0.2)) + (gr_line (start 65.278 76.962) (end 64.77 77.724) (layer F.SilkS) (width 0.2)) + (gr_line (start 66.548 76.962) (end 65.278 76.962) (layer F.SilkS) (width 0.2)) + (gr_line (start 67.31 76.2) (end 66.548 76.962) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.104 75.438) (end 69.596 75.946) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.358 75.692) (end 70.104 75.438) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.104 75.438) (end 70.358 75.692) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.358 75.438) (end 70.104 75.438) (layer F.SilkS) (width 0.2)) + (gr_line (start 68.58 75.184) (end 70.358 75.438) (layer F.SilkS) (width 0.2)) + (gr_line (start 73.406 71.628) (end 73.406 72.898) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.008 71.374) (end 73.406 71.628) (layer F.SilkS) (width 0.2)) + (gr_line (start 62.992 72.136) (end 64.008 71.374) (layer F.SilkS) (width 0.2)) + (gr_line (start 60.198 73.914) (end 60.198 73.406) (layer F.SilkS) (width 0.2)) + (gr_line (start 63.754 73.914) (end 60.198 73.914) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.008 72.898) (end 63.754 73.914) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.77 72.136) (end 64.008 72.898) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.866 72.136) (end 64.77 72.136) (layer F.SilkS) (width 0.2)) + (gr_line (start 70.866 72.898) (end 70.866 72.136) (layer F.SilkS) (width 0.2)) + (gr_line (start 68.072 72.644) (end 68.072 72.898) (layer F.SilkS) (width 0.2)) + (gr_line (start 65.024 72.644) (end 68.072 72.644) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.77 72.644) (end 65.024 72.644) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.516 74.168) (end 64.77 72.644) (layer F.SilkS) (width 0.2)) + (gr_line (start 57.658 74.422) (end 64.516 74.168) (layer F.SilkS) (width 0.2)) + (gr_line (start 57.658 72.39) (end 57.658 74.422) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.77 74.549) (end 65.278 73.787) (layer F.SilkS) (width 0.2)) + (gr_line (start 55.118 74.676) (end 64.77 74.549) (layer F.SilkS) (width 0.2)) + (gr_line (start 55.118 73.279) (end 55.118 74.676) (layer F.SilkS) (width 0.2)) + (gr_line (start 52.578 74.93) (end 52.705 73.66) (layer F.SilkS) (width 0.2)) + (gr_line (start 61.214 75.057) (end 52.578 74.93) (layer F.SilkS) (width 0.2)) + (gr_line (start 61.468 75.311) (end 61.214 75.057) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.008 75.565) (end 61.468 75.311) (layer F.SilkS) (width 0.2)) + (gr_line (start 63.627 75.565) (end 64.008 75.565) (layer F.SilkS) (width 0.2)) + (gr_line (start 65.405 75.565) (end 63.627 75.565) (layer F.SilkS) (width 0.2)) + (gr_line (start 63.754 79.248) (end 63.881 75.311) (layer F.SilkS) (width 0.2)) + (gr_line (start 64.008 79.375) (end 63.754 79.248) (layer F.SilkS) (width 0.2)) + (gr_line (start 65.405 79.121) (end 64.008 79.375) (layer F.SilkS) (width 0.2)) (gr_text "220 to 1K for all R, Connect Arduino Uno 9-13 to \npins indicated, Load Attiny10 TPI Programmer \nSketch to Arduino, Reset Uno to reload script,\nAttiny10 is 5V tolerant" (at 79.375 59.436) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.175)) (justify left mirror)) ) diff --git a/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb-bak b/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb-bak index c3a8545..83b4724 100644 --- a/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb-bak +++ b/Attiny_Solar_Energy_Harvest/pcb/ProtoBoards/attiny10.kicad_pcb-bak @@ -88,7 +88,7 @@ (mirror false) (drillshape 0) (scaleselection 1) - (outputdirectory "gerbers_rev4/")) + (outputdirectory "gerbers_rev5/")) ) (net 0 "") @@ -9833,7 +9833,7 @@ (segment (start 69.088 77.978) (end 70.993 79.883) (width 0.2032) (layer Back) (net 0)) (segment (start 66.04 77.978) (end 69.088 77.978) (width 0.2032) (layer Back) (net 0)) - (zone (net 0) (net_name "") (layer Front) (tstamp 5EFBFE2C) (hatch edge 0.508) + (zone (net 0) (net_name "") (layer Front) (tstamp 5EFEC1C6) (hatch edge 0.508) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))