Difference between revisions of "Programming Power Fail Logger with Arduino IDE"

From media_wiki
Jump to: navigation, search
Line 1: Line 1:
'''Flash the Microcontroller''' with '''Power-Fail-Logger''' Program
 
 
 
'''Test the connectivity from the programmer to the Power Fail Logger board'''
 
'''Test the connectivity from the programmer to the Power Fail Logger board'''
 
   Using '''AVRDUDE''' validate the '''USBTiny''' is communicating with the '''Power Fail''' Module Microcontroller
 
   Using '''AVRDUDE''' validate the '''USBTiny''' is communicating with the '''Power Fail''' Module Microcontroller

Revision as of 22:38, 25 May 2021

Test the connectivity from the programmer to the Power Fail Logger board

 Using AVRDUDE validate the USBTiny is communicating with the Power Fail Module Microcontroller
 Connect the USBTinyISP to the AVR-ISP-6 pin header J7 on the Power Fail Logger PCB .
 On laptop using Windows CMD terminal type the following. Make sure you are in the AVRDude directory.
 avrdude -c usbtiny -p m328p -v
 
For more information about using AVRDude refer back to this link 
 ==AVRDUDE Class==

Connect Serial Port to the RS232 Port

 Plug into your laptop USB port the Prolific USB-to-Serial Comm Port 
 Connect the Prolific USB-to-Serial Comm Port to the RS232 Port on the Power Fail Board 
 Connect the TX, RX, and Ground Pins to J4.
         Prolific         J4 Power Logger
             TX      -    RX
             RX      -    TX
             GND     -    GND
 Use Windows Device Manager to validate which Comm Port is used. You will need this later.

Set up the Arduino IDE

 Connect the USBTinyISP to the AVR-ISP-6 pin header J7 on the Power Fail Logger PCB.
 In the Arduino IDE click on Tools Tab - Select Programmer then select USBTinyISP.
In the Arduino IDE click on Tools Tab - Select Port then select the Prolific Port (Example Comm6).
Select correct target board In the Arduino IDE click on Tools Tab - Select Board then select the Arduino Uno.

Flash the Microcontroller with Power-Fail-Logger Program

 Paste the above program Power-Fail-Logger Program.ino into the Arduino IDE.
 In the Arduino IDE click on Sketch Tab - Select Upload Using Programmer
 

Validate the Power-Fail-Logger Program is running

 After program has uploaded   Validate 
 In the Arduino IDE click on Tools Tab - Select Serial Monitor
Once the program has finished loading hit the Reset button on the Power Fail Logger Board. You should see the correct time and date display in the Serial Monitor.

Next Step Set up the SD Card reader

Power Fail Logger by Microrusty

Setting Time and Date for the DS3231 RTC


Power Fail Logger by Microrusty