Updated piezo config docs with serial applications #docs

This commit is contained in:
pyr0ball 2019-10-11 15:54:18 -07:00
parent 5cbd1ae131
commit d77ba16cca

View file

@ -1,24 +1,38 @@
## Configurations over UART/Serial TTY ## Serial Terminal Applications
In order to send commands, you will need an application capable of communicating over serial. Please download and install one of the following:
- Windows
- [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
- [RealTerm](https://sourceforge.net/projects/realterm/)
- [Termite](https://www.compuphase.com/software_termite.htm)
- MacOS
- Linux
- minicom - `sudo apt install minicom` || `sudo yum install minicom`
## Updatng Pyr0-Piezo Circuit Parameters over Serial
The Pyr0-Piezo onboard microcontroller can be adjusted over UART/TTY/Serial.
To set the below parameters using serial input, use the following: To set the below parameters using serial input, use the following:
- To change trigger active duration: `TRG_D` [integer for milliseconds] - To change trigger active duration: `TRG_D [integer for milliseconds]`
- To change gain factor: `GAIN_F` [integer for gain state - see note*] - To change gain factor: `GAIN_F [integer for gain state - see note*]`
- To change ADC hysteresis value: `HYST` [integer] - To change ADC hysteresis value: `HYST [integer]`
- To change sensor input pullup vRef low threshold: `VFOL` [integer in millivolts] - To change sensor input pullup vRef low threshold: `VFOL [integer in millivolts]`
- To change comparator trigger high threshold: `VCOMP` [integer in millivolts] - To change comparator trigger high threshold: `VCOMP [integer in millivolts]`
- To change the duration between ADC measurements: `LOOP_D` [integer in milliseconds] - To change the duration between ADC measurements: `LOOP_D [integer in milliseconds]`
- To update the internal vRef constant value **(see notes below): `CONST [long value]`
You can also enable or disable DEBUG output with: `DEBUG` [0|1] You can also enable or disable DEBUG output with: `DEBUG [0|1]`
You can query the current configuration with: `CONFIG` You can query the current configuration with: `CONFIG`
You can query the current state (including ADC measurements) with: `STATE` You can query the current state (including ADC measurements) with: `STATE`
To reset all settings to defaults, use: `RESET` To reset all settings to defaults, use: `RESET`
These commands should be wrapped in this format: These commands should be wrapped in this format:
1CMD INT1 `CMD INT`
Examples: Examples:
@ -29,6 +43,7 @@ Examples:
*Note for Gain Factor: *Note for Gain Factor:
The gain STATE is representative of these values: The gain STATE is representative of these values:
- 0 = 3x - 0 = 3x
- 1 = 3.5x - 1 = 3.5x
- 2 = 4.33x - 2 = 4.33x
@ -48,16 +63,13 @@ with this if you don't know what you're doing!
The reading can be fine-tuned by using a multimeter, and this equation: The reading can be fine-tuned by using a multimeter, and this equation:
``` `scale_constant = internal1.1Ref * 1023 * 1000`
scale_constant = internal1.1Ref * 1023 * 1000
where where
internal1.1Ref = 1.1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function) `internal1.1Ref = 1.1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function)`
```
If the scale_constant calculated is different from the default 1125300, If the scale_constant calculated is different from the default 1125300, update the voltMeterConstant variable in pP_config.h with the correct value or use the `CONST` command
update the voltMeterConstant variable in pP_config.h with the correct value.
## Configuration in firmware ## Configuration in firmware