Difference between revisions of "Programming Power Fail Logger with Arduino IDE"
Line 1: | Line 1: | ||
− | + | '''Flash the Microcontroller''' with '''Power-Fail-Logger''' Program | |
− | |||
− | |||
− | |||
− | |||
− | Program | ||
Prolific USB-to-Serial Comm Port | 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 | 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''' | '''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'''.<br> | ||
+ | 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).<br> | ||
+ | Select correct target board | ||
+ | In the Arduino IDE click on '''Tools''' Tab - Select '''Board''' then select the '''Arduino Uno'''.<br> | ||
+ | |||
+ | '''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'''<br> | ||
+ | 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 | + | Next Step '''Set up the SD Card reader''' |
+ | |||
+ | ==[[ Power Fail Logger by Microrusty ]]== | ||
+ | |||
==[[Setting Time and Date for the DS3231 RTC]]== | ==[[Setting Time and Date for the DS3231 RTC]]== |
Revision as of 22:26, 25 May 2021
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