Basic web version of the SilverTimer app
SilverTimer is a Progressive Web App (PWA) designed to calculate the time required to achieve a desired silver concentration (in parts per million, PPM) in water using Faraday's law of electrolysis. It’s ideal for users working with electrochemical processes involving silver nanoparticles.
The app calculates the time based on the current (from predefined devices), water volume, and desired PPM, then runs a timer to notify users when the concentration is reached. It supports English and German languages, day/night mode, persists user settings across sessions, and now includes a statistics feature to track usage history.
| Device | Current |
|---|---|
| Maximus Smart 10 by HDT | 10 mA |
| Maximus Smart 20 by HDT | 20 mA |
| Maximus 20 by HDT | 20 mA |
| Ionic Pulser | 5 mA |
Maximus devices can be ordered at ArgentumMaximus
(New devices can be added easily on demand to devices.json)
Live demo: https://ceotjoe.github.io/SilverTimer_PWA/
- Time Calculation: Uses Faraday’s law to compute the time needed to reach a specified silver PPM based on current (mA), volume (mL), and desired PPM.
- Device Selection: Choose from predefined devices with fixed current values via a dropdown.
- Timer: Runs a countdown timer with a stop option, playing an alarm when complete.
- Multi-Language: Supports English and German, auto-detected from browser settings.
- Day/Night Mode: Adapts to device light/dark mode preferences.
- Persistent Settings: Saves device, volume, and PPM inputs between sessions using
localStorage. - Statistics: Records each use of the app, including date, time, device, current, duration, volume, and PPM. This data is stored in
localStorageand can be viewed on a statistics screen. The statistics screen also allows exporting the data as a CSV file. - PWA: Installable on Android, iOS, and desktop with offline support via a service worker.
- Auto-Updates: Updates immediately after deployment, delayed until the timer finishes if running.
- Documentation Link: Includes a link to this README at the bottom of the app.
- Clone the Repository:
git clone https://github.com/ceotjoe/SilverTimer_PWA.git cd SilverTimer_PWA - Serve the App:
Use a local server (e.g., with Node.js or Python):
- Node.js:
npx http-server . -p 8000 - Python:
python -m http.server 8000
- Node.js:
- Open in Browser:
Visit
http://localhost:8000/SilverTimer_PWA/to test locally.
The app is hosted on GitHub Pages at https://ceotjoe.github.io/SilverTimer_PWA/. To deploy your own version:
- Fork or clone this repository.
- Push changes to your GitHub repository’s
mainbranch. - Enable GitHub Pages in Settings > Pages, setting the source to
mainbranch and root directory (/).
- Select a Device: Choose a device from the dropdown (e.g., "Device C (500 mA)").
- Enter Volume: Input the water volume in milliliters (e.g., "1000" for 1 liter).
- Enter Desired PPM: Input the target silver concentration (e.g., "10").
- Calculate Time: Click "Calculate Time" (or "Zeit Berechnen" in German) to see the required time in
hh:mm:ss. - Start Timer: Click "Start Timer" to begin the countdown. Stop it anytime with "Stop Timer".
- Completion: When the timer reaches zero, an alarm sounds until you click "Stop Alarm".
- Access Statistics: From the home screen, click "Statistics" (or "Statistiken" in German) to view recorded usage data.
- View Statistics: The statistics screen displays a table with columns for date, time, device, current, duration, volume, and PPM.
- Export Data: Click "Export to CSV" (or "Als CSV exportieren" in German) to download the statistics data as a CSV file.
- Read Documentation: Click the "Readme" (or "Liesmich") link at the bottom for more info.
Your device, volume, and PPM selections are saved for the next session, and each calculation is recorded in the statistics.
- Open Safari: Launch Safari on your iPhone or iPad.
- Visit the App: Go to https://ceotjoe.github.io/SilverTimer_PWA/.
- Open the Share Menu: Tap the Share icon (square with an upward arrow).
- Select "Add to Home Screen": Scroll and tap Add to Home Screen.
- Customize the Name (Optional): Edit the name if desired, then tap Add.
- Finish: The SilverTimer icon will appear on your home screen. Tap it to launch.
- Open Chrome: Launch Chrome on your Android device.
- Visit the App: Go to https://ceotjoe.github.io/SilverTimer_PWA/.
- Open the Menu: Tap the three-dot menu in the top-right corner.
- Select "Add to Home screen": Tap Add to Home screen.
- Customize the Name (Optional): Edit the name if desired, then tap Add.
- Finish: The SilverTimer icon will appear on your home screen. Tap it to launch.
SilverTimer_PWA/
├── index.html # Main HTML file
├── styles.css # CSS for styling and day/night mode
├── app.js # JavaScript for logic and i18n
├── manifest.json # PWA manifest
├── sw.js # Service Worker for caching and updates
├── alarm.mp3 # Alarm sound file
├── icon-192x192.png # PWA icon (192x192)
├── icon-512x512.png # PWA icon (512x512)
├── devices.json # Device current values
├── locales/
│ ├── en.json # English translations
│ └── de.json # German translations
└── README.md # This file
- Faraday’s Law: Calculates time as
t = (desiredPpm * volume * z * F) / (1000 * current * M), where:desiredPpm: Target concentration (mg/L).volume: Water volume (L, converted from mL).z: Electrons transferred (1 for Ag⁺).F: Faraday’s constant (96500 C/mol).current: Current (A, converted from mA).M: Molar mass of silver (107.87 g/mol).
- PWA Features: Uses a service worker for offline caching and immediate updates (delayed if a timer is running).
- i18n: Translations stored in JSON files, applied dynamically based on browser language.
- Storage:
localStoragepersists device, volume, PPM inputs, and usage statistics. - Statistics Feature: Records each calculation with date, time, device, current, duration, volume, and PPM. Data is stored in
localStorageas a JSON array and can be viewed in a table or exported as a CSV file.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a branch:
git checkout -b feature/your-feature. - Commit changes:
git commit -m "Add your feature". - Push to your fork:
git push origin feature/your-feature. - Open a pull request.
Please ensure your changes are tested locally before submitting.
This project is licensed under the MIT License. See the LICENSE file for details. (Note: Add a LICENSE file if you choose this license.)
- Built with HTML, CSS, and JavaScript.
- Hosted on GitHub Pages.
- Inspired by electrochemical applications of silver concentration.
Note
This app was developed just as a proof of concept for AI supported development with the help of Grok AI. Grok did the research on the Faraday formular for silver, it created the concept for the app and the wole source code. Also the documentatlion like this README.md. I just led it through an iterative approach to finish the app.
Important
- If you're using the timer function, this is currently only working in the foreground. Means the page needs to be open all the time until the timer is finished.
- The real PPM of the metal within the coloidal dispersion will be different due to certain circrumstances while electrolysis. It can only be exactly measured by probing a sample of the dispersion in laboratory. This app is only intended to someway replace the PPM tables which are usually delivered by the manufacturer of the electrolysis device.