rbaron
6528565fad
Moves photoresistor all the way to the top & adds test pad
2021-10-09 10:16:42 +02:00
rbaron
85643fe41e
Cleans up debugging code
2021-10-09 09:33:50 +02:00
rbaron
79384cd6b2
Accidentally cleaned up too much
2021-10-09 09:33:23 +02:00
rbaron
ded36d1c3d
Cleanup leftover tests
2021-10-09 09:33:23 +02:00
rbaron
697e0022d1
Plots fabrication files
2021-10-09 09:33:23 +02:00
rbaron
bebf8c0a13
Adds code for reading the phototransistor values
2021-10-09 09:33:23 +02:00
rbaron
d3ed9a3311
Fixes Q4 (phototransistor footprint)
...
It was not marked as SMT, so the exported position file didn't include
it.
2021-10-09 09:33:23 +02:00
rbaron
934f9cc883
Plots fabrication files
...
This also adds ~15mm to the length of the board. This extra clearance
should help prevent shorts when watering plants.
2021-10-09 09:33:23 +02:00
rbaron
5ee0fa52fe
First step in adding the phototransistor
...
- Updates schematic
- Updates the PCB layout
- Generated BOM file
2021-10-09 09:33:23 +02:00
rbaron
16d1a21433
Merge pull request #16 from jhbruhn/feature/photo_fix_overflow
...
Fix ADC Overflow with dark environment
2021-09-30 18:18:09 +02:00
Jan-Henrik Bruhn
44adefedb3
Fix overflow in very dark or noisy situations
2021-09-30 10:24:51 +02:00
rbaron
141add87bb
Merge pull request #6 from yuvalabou/main
...
Adds photoresistor
This PR introduces a photoresistor (LDR) on the board. The code has also been updated for sampling the LDR, estimating the illuminance in lux and encoding that value in the BLE payload.
2021-09-24 19:11:56 +02:00
rbaron
9b90d5a112
Disabled debug and set deep sleep time to 5 minutes
2021-09-24 19:08:10 +02:00
rbaron
ef2bfcdadd
Updates #ifdef's to #if in main.c
2021-09-22 22:43:49 +02:00
rbaron
e1f385adbd
Fixes #if PRST_HAS_LDR check in ble.c
2021-09-22 22:39:19 +02:00
rbaron
d8aea1d4ef
Introduces version-specific config & condition BLE lux encoding
...
In the BLE service data payload, one of the reserved bits is now used to
indicate whether or not the ambient lux value is encoded in the packet.
Bit 0 of the first byte is now the `has_lux` bit. If it is set, bytes
16-17 in the service data will contain the ambient lux. If `has_lux` is
not set, bytes 16-17 may not exist (for compatibility with older
firmwares) or may hold meaningless values.
This commit also introduces version-specific configuration in
prst_config.h. Photoresistor config, for example, is only meaninful for
version 1.1.x.
2021-09-22 22:39:11 +02:00
rbaron
a00559a98b
Uses better LDR x lux model
2021-09-22 22:38:30 +02:00
rbaron
ba361e099c
Adds LCSC part number to the R9 photoresistor
2021-09-22 22:38:30 +02:00
rbaron
6f98aa34b1
Calls nrf_gpio_cfg_output(PRST_PHOTO_V)
2021-09-22 22:38:30 +02:00
rbaron
d2daefaf46
Updates ambient brightness estimation code
...
Also renames the `lux` field from `photo_read_t` to the more generic `brightness`.
2021-09-22 22:38:30 +02:00
rbaron
be366d5c3c
Updates BLE packet payload documentation
...
Adds the new ambient light values.
2021-09-22 22:38:30 +02:00
rbaron
a3943bc298
Updates PHOTO_V pin to P0.29 in prst_config.h
2021-09-22 22:38:30 +02:00
rbaron
b56e930546
Generates footprint position file & BOM
2021-09-22 22:38:30 +02:00
rbaron
2e31a488f2
Plotted gerbers and schematic PDF
2021-09-22 22:38:30 +02:00
rbaron
0e5f8b8f9d
Updates PHOTO_V pin to use pin P0.29 from both modules
...
- Updated schematic
- Updated pcb layout
2021-09-22 22:38:30 +02:00
rbaron
9c6fdfacfc
Bumps revision to 1.1.0
...
Merges both drill files into a single one.
2021-09-22 22:38:30 +02:00
rbaron
e32803d44d
Improvements to photo resistor-based lux estimation
...
- Code now compiles
- Estimation of the photo resistor resistance works
- Lux estimation from the photo resistor resistance needs more work and calibration
- Lux is now encoded in the BLE advertisement payload
2021-09-22 22:38:30 +02:00
chentadot
dcd0fc4ae1
Calculate photoresistor and some other fixes ( #3 )
...
prst_adc_photo_read() now calculates the photo resistor and return it as the lux level.
Added debug logging and fixed some syntax errors.
2021-09-22 22:38:30 +02:00
chentadot
c9b05859e4
First draft for Photoresistor
...
the code now should setup and use the photoresistor and read it's value by the adc.
the returned value is 0 just as a place holder until the correct values are measured.
2021-09-22 22:38:30 +02:00
Yuval Aboulafia
64b2bcc6c6
simplify voltage divider
2021-09-22 22:38:30 +02:00
Yuval Aboulafia
fdd3a929da
Update GERBER
2021-09-22 22:38:29 +02:00
Yuval Aboulafia
9698f3eccb
minor adjustments to silkscreen
2021-09-22 22:38:29 +02:00
Yuval Aboulafia
66e1781b07
Supply V to photoresitor using nrf pin
2021-09-22 22:38:29 +02:00
Yuval Aboulafia
5fc298f57c
Add Photoresistor
2021-09-22 22:38:29 +02:00
rbaron
31570f08e2
Merge pull request #14 from jhbruhn/feature/nrf52833_pin_fix
...
Fix pinout for fast discharge pin on E73...E
2021-09-03 19:00:47 +02:00
Jan-Henrik Bruhn
60071b5fde
Fix pinout for fast discharge pin
2021-09-03 12:01:24 +02:00
rbaron
5c71363258
Merge pull request #13 from jhbruhn/feature/nrf52833
...
Support for E73-2G4M08S1E (nrf52833) module
2021-09-02 21:02:57 +02:00
Jan-Henrik Bruhn
05efd7474c
Fix typo in code readme
2021-09-02 20:02:24 +02:00
Jan-Henrik Bruhn
683cd692ae
Fix indentation and default value for PLATFORM
2021-09-02 19:46:10 +02:00
Jan-Henrik Bruhn
da049fd8ad
Set optimization back to previous value
2021-09-02 15:48:46 +02:00
Jan-Henrik Bruhn
1aa07b4d74
Add platforms to readme
2021-09-02 15:45:33 +02:00
Jan-Henrik Bruhn
7c8394e709
Add support for nrf52833 based module
2021-09-02 15:40:19 +02:00
rbaron
a034827ddc
Adds img/wiki/swdpins.jpg
2021-08-08 15:31:03 +02:00
rbaron
70dada1f0a
Updates README.md with official ESPHome support for b-parasite
...
fixes #8
2021-05-31 21:41:52 +02:00
rbaron
753e5d8325
Adds the E73-2G4M08S1C module to the BOM and pick-and-place files
...
Note: the pick-and-place of the E73 has not been tested, since the module is currently unavailable at LCSC.
2021-05-31 21:13:00 +02:00
rbaron
795fc46849
Updates docs for data encoding in the BLE advertisement packet
2021-05-02 20:20:39 +02:00
rbaron
837a30ba03
Adds the whole MAC address in the advertisement packet
2021-05-02 12:14:52 +02:00
rbaron
19f9a68b3b
Bump RTT logger buffer from 512 to 1024
...
It was swalloing some of the messages when debugging.
2021-05-02 11:32:45 +02:00
rbaron
dfc5a40717
Updates bridge docs
2021-05-01 18:42:58 +02:00
rbaron
c110810334
Attaches two least significant MAC address bytes to advertisement packet
2021-04-26 20:41:41 +02:00