Programming Power Fail Logger with Arduino IDE

From media_wiki
Jump to: navigation, search

Flash the Microcontroller with Power-Fail-Logger Program

Prolific USB-to-Serial Comm Port

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

 Connect the USBTinyISP to the AVR-ISP-6 pin header J7 on the Power Fail Logger PCB .
 Using AVRDUDE Validate the USBTiny is communicating with the Power Fail Module Microcontroller
 On laptop using Windows CMD 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

 Using a Prolific USB-to-Serial Comm Port Plugged into your USB Port.
 Connect the TX, RX, and Ground Pins to J4 on the Power Fail Logger Board.
         Prolific         J4 Power Logger
             TX      -    RX
             RX      -    TX
             GND     -    GND
 Use Windows Device Manager to validate which Comm Port is used.

Set up Programmer

 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.
Connect the Prolific USB-to-Serial Comm Port to the RS232 Port on the Power Fail Board Use Device Manager to validate which Comm Port is used. 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