Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32] Add Hardware Version detection #203

Open
SmittyHalibut opened this issue Jan 28, 2025 · 4 comments
Open

[ESP32] Add Hardware Version detection #203

SmittyHalibut opened this issue Jan 28, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@SmittyHalibut
Copy link
Collaborator

Read Sense_VP and Sense_VN, they're either HIGH or LOW.

Sense_VP / GPIO36 Sense/VN / GPIO39 Hardware version
LOW LOW v1.x, v2.0b
LOW HIGH unused
HIGH LOW v2.0d
HIGH HIGH v2.0c

The original intent was to also use Hi-Z as a detectable state by setting internal pull-ups and pull-downs, but the Sensor pins don't have output drive hardware. So we're stuck with external drives.

The good news is, they are analog pins, so we can provide analog voltages with voltage dividers to provide more states going forward. For now, we're just going to use HIGH and LOW.

@SmittyHalibut SmittyHalibut added the enhancement New feature or request label Jan 28, 2025
@SmittyHalibut SmittyHalibut self-assigned this Jan 28, 2025
@SmittyHalibut
Copy link
Collaborator Author

Oh! This also fixes the fact that squelch never closes on v2.0 hardware. The squelch detect pin changed in v2.0; we need to detect the hardware version to make this software change.

@SmittyHalibut
Copy link
Collaborator Author

Oops. This is a dupe of #122.

@SmittyHalibut
Copy link
Collaborator Author

#205 is the PR for this.

This was referenced Jan 29, 2025
VanceVagell pushed a commit that referenced this issue Jan 30, 2025
* ADC_ATTEN_DB_12 is only defined in some versions? #198

* Hardware version detection. Fix v2.0 always-open squelch. #203

* Hardware version detection. Fix v2.0 always-open squelch. #203

* Cleaning formating/indenting from merge wackiness. No symantic changes. #203
@dkaukov
Copy link
Collaborator

dkaukov commented Feb 4, 2025

Hi @SmittyHalibut @VanceVagell
On the 1.7b board, I had to add pull-down resistors on GPIO36 and GPIO39 to ground. Without them, the hardware version detection was unreliable—sometimes reporting incorrect values. It seems like floating inputs are causing intermittent issues, though the occurrence is quite rare. It might be worth updating the documentation and release notes to mention this for others who might run into the same problem.

Also, if the hardware version were displayed in the UI, it would be easier to detect and troubleshoot issues like this. 😉

VanceVagell pushed a commit that referenced this issue Feb 5, 2025
* ADC_ATTEN_DB_12 is only defined in some versions? #198

* Hardware version detection. Fix v2.0 always-open squelch. #203

* Hardware version detection. Fix v2.0 always-open squelch. #203

* Cleaning formating/indenting from merge wackiness. No symantic changes. #203

* Added NeoPixel support. #207

* Removed dependency on Adafruit NeoPixel. Added breathing. #207 #208

* Cleanup proposal

* Pedantic integer math changes. Explicit uint16_t cast, fix "color-1".  #208

* #208 (review) #208

---------

Co-authored-by: Dmitry Kaukov <dkaukov@opentable.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants