How To Change The Thunder Sound Level That Causes A Lightning Strike
What’s In This Page
This page is for use with the XXXXXX thunderstorm. It is a step-by-step guide for updating the threshold value in your Arduino Mini Pro sketch using an FTDI programmer.
If you are using a phone, at the bottom of the page there are links to many supplies for modelers. Otherwise those links are in the sidebar to the right. You can also find other information by using the search function that is in the navigation bar above.
The Latest Information
Anything new and page updates are posted on X (formerly Twitter), Rumble and Facebook.
It is easy to keep up with the latest by following us on either of them.
Free Help
If you have questions, comments or need help with this ,or any other project, or animating your own diorama or train layout scene, either go to our Free Help page click on the button to the right.
What You Need
Step 1:
The Arduino Pro Mini board that has controls the thunderstorm.
FTDI USB-to-Serial adapter (FTDI programmer)
Your computer with Arduino IDE installed
The existing sketch (with the threshold value)
Step 2:
Open the Arduino IDE
Connect the FTDI adapter to your computer via USB.
Open Arduino IDE.
Go to Tools → Board → Arduino Pro or Pro Mini.
Select the correct Processor (e.g., ATmega328P, 5V, 16MHz).
Select the correct Port under Tools → Port.
Step 3:
Modify the Threshold Value
Your current sketch will have a line similar to this – int threshold = 750;
Change this value to your desired threshold.
500 will make the lightning flash at lower values of the thunder sounds.
1,000 requires the sound to be louder to make the lightning flash.
Step 4:
Connect the FTDI Programmer to the Arduino Pro Mini
Below is a text version of the instructions.
Identify pins on FTDI Programmer:
GND
VCC (3.3V or 5V depending on your Arduino Pro Mini version)
TX
RX
DTR (sometimes labeled as RTS)
Connect wires:
FTDI GND → Arduino GND
FTDI VCC → Arduino VCC
FTDI TX → Arduino RX
FTDI RX → Arduino TX
FTDI DTR → Arduino DTR (or RESET through 0.1µF capacitor)
Step 5:
Upload the Updated Sketch
Click Verify to compile the code.
Click Upload to send the new sketch to your Arduino.
Wait for Done Uploading message.
Step 6:
Test the Setup
Disconnect the FTDI programmer.
Power your Arduino Mini Pro from its normal power source.
Verify the lightning simulation now triggers at the new threshold.
Video Demos
Threshold 750 – click here
Threshold 1000 – click here
Free Help
If you have questions, comments or need help with this ,or any other project, or animating your own diorama or train layout scene, either go to our Free Help page click on the button to the right.

