Skip to content

Commit

Permalink
Refactoring and 3. party libs
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Aug 21, 2023
1 parent f2ce04a commit 637d140
Show file tree
Hide file tree
Showing 17 changed files with 1,614 additions and 1,186 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/LibraryBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native"
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro
# STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
# STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace
#############################################################################################################
Expand Down
57 changes: 55 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -618,4 +618,57 @@ an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Build Status](https://github.com/ArminJo/SoftStart/workflows/LibraryBuild/badge.svg)](https://github.com/ArminJo/SoftStart/actions)
[![Hit Counter](https://hitcounter.pythonanywhere.com/count/tag.svg?url=https%3A%2F%2Fgit.luolix.top%2FArminJo%2FSoftStart)](https://github.com/brentvollebregt/hit-counter)
![Hit Counter](https://visitor-badge.laobi.icu/badge?page_id=ArminJo_SoftStart)

Generates TRIAC control pulse for soft start of motors used in circular saw, angle grinder and other DIY tools.

Expand All @@ -14,7 +14,7 @@ Generates TRIAC control pulse for soft start of motors used in circular saw, ang
![Eagle schematics](https://github.com/ArminJo/SoftStart/blob/master/extras/SoftstartPlugIn.png)<br/>
The eagle files are [here](https://github.com/ArminJo/SoftStart/blob/master/extras).

- Instead of 330 ohm at PB0 you can use a series of 120 ohm with a 220 ohm with 10 nF parallel.
- Instead of 330 &ohm; at PB0 you can use a series of 120 &ohm; with a 220 &ohm; with 10 nF parallel.
- The current sense circuit is only required for the plug in soft start adapter mode (`LOAD_ON_OFF_DETECTION` is enabled) to detect power disconnect. In this case the current is limited to 2 A (~ 450 W) if you using 1N4004 diodes. For more power you may use 1N5004 instead and/or use 2 diodes in parallel.

# How it works (after calling startRamp())
Expand All @@ -29,7 +29,7 @@ This mode outputs the timer counter value forever (at 115200 Baud (@1MHZ) at pin
Both values must be the same.
The output format is: `<counterForPositiveHalfWave>|<counterForNegativeHalfWave>\n`<br/>
You have to use an isolation transformer to safely read this value.<br/>
I have not yet tested it, but using **two 1 MOhm resistors instead of the ramp speed trimmer should work too**.
I have not yet tested it, but using **two 1 M&ohm; resistors instead of the ramp speed trimmer should work too**.

# Fuse values
FUSE VALUES for **embedded version**, which requires **fast start**, since soft start must begin as soon as power is on.
Expand All @@ -47,7 +47,7 @@ You may use the default values or enable additional Brown-out detection eg. at 4
To customize the software to different requirements, there are some compile options / macros available.<br/>
Modify it by commenting them out or in, or change the values if applicable. Or define the macro with the -D compiler option for global compile (the latter is not possible with the Arduino IDE, so consider using [Sloeber](https://eclipse.baeyens.it).<br/>

| Option | Default | File | Description |
| Name | Default value | File | Description |
|-|-|-|-|
| `LOAD_ON_OFF_DETECTION` | enabled | SoftStart.cpp | If enabled, the program does not start with ramp at boot up time, but waits for interrupt at LoadDetectionInput (pin 6). This is useful, if you want to build an plug in soft start adapter. It only starts working when the attached device is switched on, e.g. a load is detected. |
| `START_PHASE_SHIFT_DEGREES` | 160 | TRIACRamp.h | Initial delay of TRIAC trigger impulse. Values from 0 - 180 degrees, but the extremes make no sense. |
Expand All @@ -56,17 +56,17 @@ Modify it by commenting them out or in, or change the values if applicable. Or d
| `TRIAC_PULSE_BREAK_MICROS` | 400 | TRIACRamp.h | Length of break between (multiple) trigger pulses. |

# Modifying compile options
### Modifying compile options with Arduino IDE
### Changing include (*.h) files with Arduino IDE
First, use *Sketch > Show Sketch Folder (Ctrl+K)*.<br/>
If you did not yet stored the example as your own sketch, then you are instantly in the right library folder.<br/>
If you have not yet saved the example as your own sketch, then you are instantly in the right library folder.<br/>
Otherwise you have to navigate to the parallel `libraries` folder and select the library you want to access.<br/>
In both cases the library files itself are located in the `src` directory.<br/>
In both cases the library source and include files are located in the libraries `src` directory.<br/>
The modification must be renewed for each new library version!

### Modifying compile options with Sloeber IDE
If you are using Sloeber as your IDE, you can easily define global symbols with *Properties > Arduino > CompileOptions*.<br/>
If you are using [Sloeber](https://eclipse.baeyens.it) as your IDE, you can easily define global symbols with *Properties > Arduino > CompileOptions*.<br/>
![Sloeber settings](https://github.com/ArminJo/ServoEasing/blob/master/pictures/SloeberDefineSymbols.png)


# Pictures
| | |
|-|-|
Expand Down
Loading

0 comments on commit 637d140

Please sign in to comment.