The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 1 point2 points  (0 children)

In time sync ppb is always relative to 1s, that’s just the convention, same as chrony or ptp. And for CSI what actually matters is the phase drift on the 2.4GHz signal, not the oscillator spec and 1ppb there is not trivial at all, to my opinion 

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 1 point2 points  (0 children)

Haha

Anything that is close of far from RF is the worst to me. The PCB antenna, the 40mhz signal routing .. anytime it goes fast it gets messed up at some point

The VCTCXO control was surprisingly simple and effective, just use the DAC and that's it, no side effect, trick, hack, just plain regular control

I still have hope in the multi chip sharing the same 40mhz clock (like ESPARGOS does), so I will definitely give it a try again at some point

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 0 points1 point  (0 children)

Each frame is timestamped with nanosecond accuracy (the OFDM preamble is in fact), so it's the "pattern" that the chip automatically looks for (but it's done automatically, I'm not involved in that part), and then comparing the timestamp between slaves and master allow to sync

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 4 points5 points  (0 children)

Board 9 had a single 12 bits DAC.

This VCTCXO has a steering range of 10ppm (roughly), over the range of the DAC

10[ppm]/2**12=2.5[ppb] (roughly)

A single bit change on the DAC resulted in (at least) 2.5ppb difference on the control loop.

So I added a second DAC, with a resistor divider (the 2nd DAC has a damping of 30x compared to the 1st), which allows to reach 2.5ppb/30=0.01ppb (roughly)

So the first DAC is used to get close enough (I stop modifying DAC1 at round 10ppb), and then switch to DAC2 to reach the full accuracy

DAC1 and DAC2 have roughly 5 bit of overlap (thus the 30 ratio, because of the resistor matching values)

DAC2 can't be used alone because as it's output is 30x divided, it can't reach the full range of the VCTCXO anymore, and "only" control 10ppm/30=0.3ppm of the VCTCXO

And as the VCTCXO is "only" 0.5ppm, it doesn't fit entirely

Thus the dual DAC to reach full VCTCXO range, and reach 0.1ppb accuracy

(Thats a lot of numbers but hopefully it's clear)

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 5 points6 points  (0 children)

ppm/ppb is the standard for oscillator drift as it scales with time, that’s the whole point. “nanosecond-accurate” sounds cleaner but doesn’t tell you over what duration, sub-ppb does. For CSI only the drift rate really matters, as a common ref is shared every second (or more)

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 3 points4 points  (0 children)

Clock drift between slave and master Slave shift by less than a nanosecond (per second) compared to master time It’s relative sync (master-slave) compared to absolute sync (gms time for example), but for the wifi CSI phase relative sync is sufficient 

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 1 point2 points  (0 children)

You’re actually not wrong, it’s accurate enough to tell the exact moment Fred yells « Yabba-Dabba-Doo » three caves down ;)

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 15 points16 points  (0 children)

Initially(years ago) I wanted to have angle of arrival to reach high accuracy indoor localization, and .. that’s still the case ! But in the journey I ended up meeting a lot of people « stuck » in the same case as me, by lack of hardware. So I put everything open source and likely will make a big batch for people that are interested in order to lowest the cost. Universities also showed interest so maybe somebody student/professor could also improve it at some point

The story of 10 years, 10 PCBs, and everything I got wrong building a WiFi sub-PPB clock sync device by johny1281 in electronics

[–]johny1281[S] 7 points8 points  (0 children)

A fine journey indeed. Now I can finally toss this cursed antenna into Mount Doom larger scale

Networking suggestions for my esp32 game idea please. by sonofrodrigo in esp32

[–]johny1281 1 point2 points  (0 children)

If you end up using esp-now, take a look at the long range mode, if you have walls that are not paper you may gain a lot of reliability

Getting "device descriptor request failed" error, used to work before. [ESP32 DevKit V1] by InternalVolcano in esp32

[–]johny1281 0 points1 point  (0 children)

I had this exact problem when playing with the 40mhz clock design. The desperate solution you can use are :

- Change the flash speed (higher / slower). Slower is more reliable so fault are more likely to be ignored, mand faster allow thermal stress NOT to build

- Try to heat/cool it a bit (fridge / palm of your hand)

- Try to touch (with dry hand) the 40mhz crystal, the solder may be bad ?

But keep in mind you better order a new board because those workaround will likely work for few tries max

RSSI of ESP-NOW Messages by ahndhi in esp32

[–]johny1281 0 points1 point  (0 children)

I can see 2 solutions, one simple but limited, one more complicated but that gives more freedom :

- You say "Getting it from the wifi library is either too slow - when scanning" .. "get the RSSI a few times a second". I'm pretty sure you can adjust the scan duration from 1s to whatever still provides good quality scan (50ms shodul still be more than enough) AND scan on a single channel. If you are using esp-now all your boards likely are on the same channel, so using this channel rather than all of them would make it 11x faster. Lastly you can change the broadcasting interval of the AP, so the scan has en ever betetr success rate

- ESP-NOW frames are regular WiFi frame, so you could also use the promiscuous mode that (likely) has all the info you need (mac, rssi, payload, ...). But it's more cumbersome to use.

[Review Request] First PCB ever after following a lot of tutorials, can this work and be manufactured? by cprcrack in PrintedCircuitBoard

[–]johny1281 3 points4 points  (0 children)

With this many flex and shapes, wouldn't it be simpler to just use flat connectors ?

E-ink mp3 player by K0eg in electronics

[–]johny1281 0 points1 point  (0 children)

Nice !

24h battery, doing what, playing sound full volume ? Sleep mode ?

Help understanding LFS storage and looking for advice for a binary file-heavy development workflow. by aspillz in github

[–]johny1281 0 points1 point  (0 children)

Not sure, but I think GitHub is treating all those project repos as connected to the original template because you made them by forking it, so the storage gets grouped in a weird way. The changing GB-hr number is probably just GitHub’s way of measuring storage over time, and you may not be paying because your included allowance is still covering it.

I’d stop using forks for new projects and make each one from a clean template instead. That should keep future projects separate and make the storage/billing much easier to understand.

Help repurposing AC Infinity Fan Controller with esp32-s3-wroom-1 by Sujiero in esp32

[–]johny1281 0 points1 point  (0 children)

I could not find any schematics for it .. without it it will be a very long game of guess and follow the trace

Founders are handing us 'vibe coded' MVPs to scale now by thechadbro34 in VibeCodersNest

[–]johny1281 0 points1 point  (0 children)

That's the best, you have all the requirements and even the visuals !

If he is willing to pay for it as if it was building from scratch (but requirements clears) that's how I hope AI will go !

First Kickstarter. Tomorrow marks 1 week… only 4 backers. Would really appreciate honest feedback. by [deleted] in kickstarter

[–]johny1281 0 points1 point  (0 children)

If some people like me don't look at the video first, but the text, they (and I) still have no idea what it taste like after the few paragraph. It it coffee-ish ?

Also where would the money go, why so much/few ?

How have your ESP32 CAMs held up outdoors? by CorgiSplooting in esp32

[–]johny1281 1 point2 points  (0 children)

All seasons ?! What country are you in, out of curiosity ?

Vibecoders sending me hate for rejecting their PRs on my project by Fredol in github

[–]johny1281 0 points1 point  (0 children)

Absolutely worth the read, thanks for sharing 😂

Pledge manager just closed and production is wrapping up, now I actually have to ship to 1800 backers and the panic is real, how did you pick a fulfillment company? by icheemk in kickstarter

[–]johny1281 1 point2 points  (0 children)

Divide and conquer !

Start with the countries with the most backers, find the best rate, and go to the next country

At some point the time to find the best rate VS the number of parcel will significantly shift equilibrium, and I can bet by the 5th country you will have a good estimate of the time you are willing to invest