You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
4.8 KiB

4 years ago
  1. \documentclass[11pt]{article}
  2. %Gummi|065|=)
  3. \usepackage{graphicx}
  4. \usepackage{caption}
  5. \usepackage{xcolor}
  6. \usepackage[vcentering,dvips]{geometry}
  7. \geometry{papersize={6in,9in},total={4.5in,6.8in}}
  8. %\title{\textbf{Door Alarm}}
  9. \author{Steak Electronics}
  10. \date{}
  11. \begin{document}
  12. %\maketitle
  13. %\tableofcontents
  14. \textcolor{green!60!blue!70}{
  15. \section{Attiny Solar Energy Harvest Tests}}
  16. I have the following:
  17. \begin{itemize}
  18. \item Solar panels
  19. \item Attiny 10
  20. \end{itemize}
  21. 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.
  22. \textcolor{green!60!blue!70}{
  23. \subsection{Micro Considerations}}
  24. 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.
  25. 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.
  26. \textcolor{green!60!blue!70}{
  27. \subsubsection{Micro Notes}}
  28. Must run at 1.8V / 1MHz per front page of data sheet, for 200uA draw in active mode.
  29. \\
  30. \\
  31. \textcolor{green!60!blue!70}{
  32. \subsection{Energy Storage}}
  33. 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.}
  34. \textcolor{green!60!blue!70}{ \subsection{Make parts, not scrap}} I will
  35. want to make sure that all parts I build are perf board parts, not
  36. breadboard scrap (to be torn down and rebuilt again). This is an Attiny,
  37. so no need to test much, yet.
  38. \textcolor{green!60!blue!70}{ \subsubsection{Testing Arduino Loader}}
  39. Tested this with the blink_LED.c in code folder. The code is as simple as possible.
  40. It is the following:
  41. \begin{verbatim}
  42. //#include <xc.h>
  43. #include <avr/io.h>
  44. #include <util/delay.h>
  45. int main(void)
  46. {
  47. // PB2 output
  48. DDRB = 1<<2;
  49. while(1)
  50. {
  51. // Toggle PB2
  52. PINB = 1<<2;
  53. _delay_ms(500);
  54. }
  55. }
  56. \end{verbatim}
  57. When programmed in Mplab, with XC8 compiler, and Attiny10 support, I get the following
  58. hex output:
  59. \begin{verbatim}
  60. :100000000AC020C01FC01EC01DC01CC01BC01AC01B
  61. :1000100019C018C017C011271FBFCFE5D0E0DEBF41
  62. :0A002000CDBF03D000C0F894FFCF5D
  63. :10002A0044E041B940B95FE966E871E05150604087
  64. :0A003A007040E1F700C00000F5CFB0
  65. :02004400DDCF0E
  66. :00000001FF
  67. \end{verbatim}
  68. The content of this hex isn't the focus of this passage. Instead, I want you to review the
  69. results of a D for Dump Memory, by the Arduino Loader.
  70. \begin{verbatim}
  71. Current memory state:
  72. registers, SRAM
  73. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  74. 0000: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  75. 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  76. 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  77. 0030: 00 00 00 00 00 00 03 00 00 79 00 03 00 00 00 00
  78. 0040: B7 AD AE FA 58 70 63 6B FB 5A B4 1B FF FF 35 3F
  79. 0050: 67 D7 33 43 DF 5F FB 72 C9 7D FE E9 9D C5 00 12
  80. NVM lock
  81. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  82. 3F00: FF FF
  83. configuration
  84. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  85. 3F40: FF FF
  86. calibration
  87. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  88. 3F80: 79 FF
  89. device ID
  90. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  91. 3FC0: 1E 90 03 FF
  92. program
  93. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  94. 4000: 0A C0 20 C0 1F C0 1E C0 1D C0 1C C0 1B C0 1A C0
  95. 4010: 19 C0 18 C0 17 C0 11 27 1F BF CF E5 D0 E0 DE BF
  96. 4020: CD BF 03 D0 00 C0 F8 94 FF CF 44 E0 41 B9 40 B9
  97. 4030: 5F E9 66 E8 71 E0 51 50 60 40 70 40 E1 F7 00 C0
  98. 4040: 00 00 F5 CF DD CF FF FF FF FF FF FF FF FF FF FF
  99. 4050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  100. 4060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  101. (...some memory omitted here for brevity...)
  102. 43E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  103. 43F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  104. \end{verbatim}
  105. Notice that the AC020C01F is set. That is from the hex. But the 01000...
  106. before it seems to be missing. Some deciphering of how the Arduino programs
  107. the Attiny is in order here.
  108. Regardless, when programming, the Arduino reports 70 bytes written, and
  109. likewise in the Mplab project memorymap.xml file, it also notes 70 bytes
  110. 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.}
  111. The blinking LED works. Let's move on.
  112. \end{document}