SaabFAN / PM9160_Mk3_PrescalerBoard

0 stars 1 forks source link

Missing Source Code for Attiny #2

Open var-IO-reeks opened 4 months ago

var-IO-reeks commented 4 months ago

Hello SaabFAN,

I'm interested in building your Prescaler Board to retrofit a PM6652 Counter with the channel C option, but I think this project is currently missing the source code for the Attiny you used for the RF detector circuit.

Could you please point me to the repository where you uploaded that code, the "Software" folder of this repo currently only contains an "atstart"-File for the Atmel online configurator, but no C-Code.

Also, is it possible to use a different Attiny for the RF-Detector circuit? I personally don't like the WSON Package of the Attiny1616 because the bottom pad makes hand soldering difficult. Could something like a Attiny402 or even a Attiny202 also work? The Attiny 402 only has 4kB of Flash and only 256B of SRAM, but is available in a SOIC-8 Package and judging from the low complexity task it has on this board (enabling a GPIO output based on a measured analog voltage level), could this be an viable alternative?

SaabFAN commented 4 months ago

Hello var-IO-reeks,

I changed to the AtTiny202. I haven't written any Software so far, since I didn't order any boards yet.

var-IO-reeks commented 4 months ago

Hello SaabFAN,

I made a fork of your project and changed the PCB layout to now accommodate the SOIC-8 Attiny412 (changed my mind about the 202, the 412 is newer and has more flash, but apart from that, pretty identical).

Also, I made some minor changes to the pcb to make it compatible with aislers simple pcb manufacturing plan, fixed a bunch of DRC/ERC errors and realigned the schematic to improve readability.

But since I would like to use that module to retrofit a PM6652 myself, I have some questions regarding the design: As far as I understood it, the RF section is more or less tried and tested (comparable to your reports on the EEVblog about the older versions, from 100MHz-2.5GHz), but what is the current state of the microcontroller-based RF-detector circuit, does that part work as well?

Also, I have a question about whether I understood the working principle of the detector circuit correctly: From my understanding, the RF detector generates a 900mV output to the µC when no RF is applied and a drop of at least 80mV when the lowest possible RF signal amplitude (about 270mVpk at the input of the detector) at the lowest frequency (100MHz) is applied, with higher frequencies or amplitudes, there is obviously an even greater drop in detected voltage. That analog DC voltage level is then measured by the µC and compared with a certain threshold and is used to decide whether the prescalers should be turned on or off. Is my assumption right?

SaabFAN commented 4 months ago

Hello var-IO-reeks,

Yes, the RF-Design is working. I had a previous version where I tried to chain two amplifiers to measure even lower signals, but that design was prone to trigger on harmonics or oscillate on its own. I've got the previous design in my counter currently and since I've bought a NanoVNA and TinySA recently, I can give the prescaler-Board a proper test run. I'll update once I have the data.

The RF Detector works as you describe it. It's voltage is dropping when a strong enough RF-Signal is detected. Upon detecting a lowered voltage, the Micro is taking the Divider-Chips out of RESET and the counter can start counting.

Most of the schematic is a direct copy from the original Philips Schematic with some improvements for easier manufacture at JLCPCB's factory. The 412 is a good choice. I test-compiled some basic software and if some running average in the voltage measurement is desired, 2K of flash are not a lot :D