This Tutorial will show you how to upload the latest Spot Welder Software to your Arduino Nano and also how to update the Bootloader of the Arduino Nano.

The new Software is compatible with all V3 and later Arduino Spot Welders.

To upload the Arduino Code of the Spot Welder V3 to the Arduino Nano you need to do some preparation.

Once you have installed the Arduino IDE you need to add three libraries. The “Adafruit_GFX” , “Adafruit_SSD1306” and “SoftwareReset” library.

Install them through the library manager in the Arduino IDE (click: Sketch -> Include Library -> Manage Libraries)

Then go to the SSD1306 library folder (on windows typically like this: C:\Users\Marc\Documents\Arduino\libraries\Adafruit_SSD1306-master ) and open the “SSD1306.h” with a text editor.

In the SSD1306.h you need to define line 51 (#define SSD1306_I2C_ADDRESS 0x3C) and line 69 (#define SSD1306_128_64) . In the latest version of the library its line 55 and 73.

The code should look like this after you changed it:

#define SSD1306_I2C_ADDRESS   0x3C  // 011110+SA0+RW - 0x3C or 0x3D
// Address for 128x32 is 0x3C 
// Adress for 128x64 is 0x3D (default) or 0x3C (if SA0 is grounded)
#define SSD1306_128_64
//   #define SSD1306_128_32
//   #define SSD1306_96_16

After you have done this dont forget to click save.

Now you can go back to the Arduino IDE and open the Arduino Code from the Github project you downloaded.  The file is the Arduino_Spot_Welder_V3.ino . Make sure all unziped files of the Spot Welder code are in the same folder and the folder is named Arduino_Spot_Welder_V3 .

Connect the Arduino Nano to your computer with an USB cable and it should automatically install the drivers for the Arduino Nano. If it does not connect take a look at this site https://arduino-info.wikispaces.com/Nano-USB-Drivers

If the Arduino is connected correctly a new Com Port should show up in your Arduino IDE under Tools -> Port

Select the new Com Port . Also selct as Board: “Arduino Nano” and Processor: “ATmega328”

To update the software on an existing V3.2 Spot Welder you need to set the processor to “ATmega328P OptiBoot” instead of  “ATmega328P” . (See  Step 1 and Step 4 of the “Updating the Arduino Nano Bootloader” Chapter)

)

Finally click on “sketch -> upload” to write the programm into the Arduino Nano. When it is finished the Display on the Spot Welder should show a low battery warning because the default low battery warning is set to 11V.

 

Updating the Arduino Nano Bootloader

That was the easy part of the Software update. If you have done the previous steps your new Software is working with all its functions but you can not use the reboot function of the system menu. The standard Arduino Nano Bootloader has a bug so it will execute the reboot in an endless loop until you manually unplug and power up the Arduino / Spot Welder again. To solve this the OptiBoot Bootloader is needed.

Necessary Tools:

  • Six jumper wires (male to female)
  • Arduino UNO

Please only do this mod by exactly following the instructions. If you do something wrong the Arduino Nano will no longer be programmable by the Arduino IDE and become useless until a new Bootloader is flashed sucessfully.

Step 1

First you need to add the following lines to the end of the boards.txt file.

## Arduino Nano OptiBoot w/ ATmega328
## ———————————-
nano.menu.cpu.OptiBootatmega328=ATmega328P OptiBoot

nano.menu.cpu.OptiBootatmega328.upload.maximum_size=30720
nano.menu.cpu.OptiBootatmega328.upload.maximum_data_size=2048
nano.menu.cpu.OptiBootatmega328.upload.speed=115200

nano.menu.cpu.OptiBootatmega328.bootloader.low_fuses=0xFF
nano.menu.cpu.OptiBootatmega328.bootloader.high_fuses=0xDA
nano.menu.cpu.OptiBootatmega328.bootloader.extended_fuses=0x05
nano.menu.cpu.OptiBootatmega328.bootloader.file=optiboot/optiboot_atmega328.hex

nano.menu.cpu.OptiBootatmega328.build.mcu=atmega328p

A typical location for the boards.txt is C:\Program Files (x86)\Arduino\hardware\arduino\avr . A good editor to do this is Notepad++ .

After you have done this there should be the ATmega328P OptiBoot selectable as the Arduino Nanos processor in your Arduino IDE.

 

Step 2

Next you need to prepare the Arduino Uno as an ArduinoISP device to flash the Bootloader to the Arduino Nano. In theory it should also work to update the Bootloader of the Arduino Nano with another Arduino Nano. But in my case it did not work for some reason. With the Arduino UNO it works fine.

Upload the ArduinoISP Sketch to your Arduino UNO. This sketch is found in “File ->Examples ->ArduinoISP ->ArduinoISP”

Connect you Arduino UNO to your computer, select the Arduino/Genuino Uno as the Board and the Com Port your Arduino Uno is connected to. Then hit “Sketch -> Upload” .

Step 3

Now the Arduino Uno can act as a programmer. Unplug it from the computer and connect the Arduino Nano 6 pin header to the Arduino Uno. Remove the Arduino Nano from the Spot Welder for this step.

Connection:

  • Nano Pin Header Pin 1 -> Uno Pin D12
  • Nano Pin Header Pin 2 -> Uno Pin 5V
  • Nano Pin Header Pin 3 -> Uno Pin D13
  • Nano Pin Header Pin 4 -> Uno Pin D11
  • Nano Pin Header Pin 5 -> Uno Pin D10
  • Nano Pin Header Pin 6 -> Uno Pin GND

Once everything is connected plug the Arduino Uno back into the computer. But this time select Arduino Nano as the Board, ATmega328P OptiBoot as processor and the Com Port the Arduino Uno is connected to. Further down in the menu select “Arduino as ISP” as the programmer and then click Burn Bootloader

The Arduino IDE may complain some failures but if it shows ” Done burning bootloader” the upload was sucessfull.

 

Step 4

Disconnect all the jumper wires from the Arduino Nano, connect it to your computer with a USB cable and upload the Arduino_Spot_Welder_v3 code again as described in the first chapter of this instruction. But this time set the processor to “ATmega328P OptiBoot” instead of  “ATmega328P”.

Now you are able to use the Spot Welders reboot function of the system menu without the Arduino going to an endless reboot loop.

 

19 thoughts on “Arduino Spot Welder Software Update Tutorial

  1. Gavin says:

    Hi, I wonder if you can assist me.
    I have followed all the instructions and loaded the required software.
    On initial load all seems well and then some gremlins roll in.
    I am not using a battery though, I am connected to a AC/DC 12v transformer.
    If I disconnect the A0 voltage measure pin I get the “Battery LOW ” alarm, but the battery value displayed toggles between random values ranging from 0 to 25 v ??
    Also initially when I turn the rotary encoder the direction of increment and decrement is n the opposite direction. After a few minutes of operation either direction only increments the values. Any schematics available, or suggestions ?

  2. Lukas says:

    hi, I have an error during compiling the arduino sketch Arduino_Spot_Welder_V3.2.1.ino. I burned the optiboot via external stk500v2 programmer. could you help me with this please? the compiler log is:
    ——————————–
    Arduino: 1.8.5 (Windows 7), Board: “Arduino Nano, ATmega328P OptiBoot”

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Kinga\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=OptiBootatmega328 -ide-version=10805 -build-path C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921 -warnings=none -build-cache C:\Users\Kinga\AppData\Local\Temp\arduino_cache_373438 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Kinga\Downloads\Arduino_Spot_Welder_V3.2.1\Arduino_Spot_Welder_V3.2.1.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Kinga\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=OptiBootatmega328 -ide-version=10805 -build-path C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921 -warnings=none -build-cache C:\Users\Kinga\AppData\Local\Temp\arduino_cache_373438 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Kinga\Downloads\Arduino_Spot_Welder_V3.2.1\Arduino_Spot_Welder_V3.2.1.ino
    Using board ‘nano’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Using core ‘arduino’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Detecting libraries used…
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library\glcdfont.c” -o “nul”
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp” -o “nul”
    Generating function prototypes…
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\preproc\ctags_target_for_gcc_minus_e.cpp”
    “C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags” -u –language-force=c++ -f – –c++-kinds=svpf –fields=KSTtzns –line-directives “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\preproc\ctags_target_for_gcc_minus_e.cpp”
    Compiling sketch…
    “C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset\src” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library” “-IC:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src” “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp” -o “C:\Users\Kinga\AppData\Local\Temp\arduino_build_76921\sketch\Arduino_Spot_Welder_V3.2.1.ino.cpp.o”
    C:\Users\Kinga\Downloads\Arduino_Spot_Welder_V3.2.1\Arduino_Spot_Welder_V3.2.1.ino: In function ‘void stateMachine()’:

    Arduino_Spot_Welder_V3.2.1:539: error: expected primary-expression before ‘(‘ token

    softwareReset(STANDARD); // This will not work with the standard bootloader. Must use OptiBoot.

    ^

    Arduino_Spot_Welder_V3.2.1:539: error: ‘STANDARD’ was not declared in this scope

    softwareReset(STANDARD); // This will not work with the standard bootloader. Must use OptiBoot.

    ^

    Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
    Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
    Using library SoftwareReset at version 3.0.0 in folder: C:\Users\Kinga\Documents\Arduino\libraries\SoftwareReset
    Using library Adafruit_GFX_Library at version 1.2.3 in folder: C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_GFX_Library
    Using library Adafruit_SSD1306 at version 1.1.2 in folder: C:\Users\Kinga\Documents\Arduino\libraries\Adafruit_SSD1306
    Using library EEPROM at version 2.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM
    exit status 1
    expected primary-expression before ‘(‘ token

    • Marc Schoenfleisch says:

      I dont know exactley what the problem is there. Seems something wrong with the softwareReset library.
      You could use Version 3.2.2 of the Spot Welder Software. Then you dont need the Optiboot which seems to cause the compiling problem.

      • EUGENY VORONKO says:

        Dear Mars. I think that you have a bug in the program. I’m using a board with the OptiBoot v6.2 bootloader, but your sketch v.3.2.1 does not compile and reports the same error as in the above message from Lukas. I checked the boot loader with the test code of the WDT:

        #include
        void setup() {
        wdt_disable();
        Serial.begin(9600);
        Serial.println(“Setup..”);

        Serial.println(“Wait 5 sec..”);
        delay(5000);
        wdt_enable (WDTO_8S);
        Serial.println(“Watchdog enabled.”);
        }
        int timer = 0;
        void loop(){
        if(!(millis()%1000)){
        timer++;
        Serial.println(timer);
        digitalWrite(13, digitalRead(13)==1?0:1); delay(1);
        }
        }

    • Brandon says:

      One thing these instructions dont mention is the versions of the libraries you need to add. If you use the later versions of Adafruit_GFX and SSD1306 it wont compile. Look carefully at the pictures you will see which versions you need to use. GFX 1.1.5 and SSD 1.1.1 if you use later versions it wont compile. the later the version the longer the error report. Hope this helps someone.

  3. Stoyan Platchkov says:

    Hey Thanks for the vitamin gummies =) should i be updating the software on my unit i got today? just curious what that does.
    Thanks

    • Marc Schoenfleisch says:

      It depends which version you got on your welder.
      If you already have V3.3 it is not necessary to do an update.
      In the last software update to 3.3.1 was just a very little improvement for wrong foot switch wiring detection.

  4. Tony Morton says:

    Hi Marc
    The changes you describe to SSD1306.h are not compatible with the latest version and I get the following error message when I attempt to compile: “height incorrect, please fix Adafruit_SSD1306.h”
    I cannot see how to change SSD1306 to give the correct size of display. Can you help?

  5. Tom Eldon says:

    Hello please can you help?
    After installing the software and building the spot welder, it works fine apart from the rotary encoder.
    I’m not sure if I have a broken encoder but every time I rotate it, it is very unpredictable. If I rotate it slowly on the main screen it functions normally and sometimes goes in the opposite direction but if I rotate it on the battery voltage screen, it is completely random.
    I have checked the wiring against the schematic and it all seems correct, maybe I have a bad rotary encoder.
    The encoders switch is functional and every turn pins B and A close to ground, I haven’t checked the exact timings as I fully don’t understand the output of the encoder.
    Another thing it might be is the software but I have tried it on two Arduinos and the same thing happens.
    Please could you help as I am very confused?
    Thanks

    • Marc Schoenfleisch says:

      That sounds like a defective rotary encoder. Sometimes the internal contacts in the encoders are bad so they do not put out a good signal when turning.
      You can try to get some contact spray into the encoder by spraying it on the shaft and then turning it multiple times. I already fixed a few encoders this way.
      After the contact spray is applied wait a few hours and then see if it works.
      If this does not fix the problem the encoder needs to be replaced with a new one.

  6. Paul says:

    I just wanted to leave a reply for people who may be having issues getting everything to work like I did. I just stumbled my way through the guide and the most important thing is pick the EXACT same version for each library you need to download. The only one that is different is the Adafruit_SSD1306 library, I had to use 1.1.2 because 1.1.1 was not listed and it had the proper lines to modify in Adafruit_SSD1306.h unlike the newest version . Before you just click install for the libraries, open the pull down menu to pick the appropriate version. Once I got that in order everything else worked, Thanks Marc I am looking forward to testing this thing out.

  7. Josh Briese says:

    Hi, when not using the welder what is the proper way to store it? Do you take everything off of the battery? I noticed there is no on/off switch.

    • Marc Schoenfleisch says:

      When you want to store it for a longer time its best to completely remove everything from the car battery.
      For quick on and off switching you can add a switch in the thin red cable that goes from the battery + pole to the welders green screw terminal.

  8. Charles Gibbs says:

    Hi Marc.
    Thank you for your relentless efforts on the spot welder project.

    I would kindly like to ask if it would be possible to use an Arduino uno for this Software of yours Instead of the nano?

    Thank you kindly
    Regards
    Charles from Namibia

Leave a Reply

Your email address will not be published. Required fields are marked *