News for hackers. Stuff that matters.

tomstokes

> Reverse-engineering the Pi 5's MIPI to push 5.6 Gbps from custom MASH sigma-delta ADCs to a Lattice ECP5 FPGA to the Raspberry Pi is serious engineering

Using video interfaces to transfer arbitrary data at high speeds is becoming a common trick for cheap boards with limited interfaces. Video inputs and outputs are generally highly mature and optimized to avoid dropping frames because everyone wants reliable video. Putting arbitrary data into video IO pipelines is a cheap way to get high speed IO through standard interfaces.

There is a cool project that uses cheap HDMI to USB capture devices for high speed data transfer out of cheap FPGA boards that have HDMI output [ https://github.com/steve-m/hsdaoh ]

In a perfect world, using PCIe directly would be a much better solution for a project like this. Having access to PCIe DMA support directly without relying on video IO peripherals is helpful for high speed ADC/DAC applications like this. It would also make the board more portable to other SBCs.

The ECP5-5G can do PCIe 2.0 x2 or PCIe 1.0 x4 which would provide around 8Gbps of data transfer. The problem is that the Raspberry Pi 5 only exposes a single PCIe lane to the user. The other 4 PCIe lanes of the Raspberry Pi 5 SoC are routed to the RP1 chip, which has the MIPI and CSI interfaces that are used in this project. So the data is going through a convoluted path instead of being connected to PCIe directly.

I would have to look at the details more closely, but even using the PCIe 2.0 x1 port (around 4 Gbps after overhead) on the Raspberry Pi would be close in bandwidth to the 5.6 Gbps number they give for their custom MIPI solution.

I think the Raspberry Pi 5 is a good first choice for most projects because it is widely support and has the largest community, but for a project like this the benefits of moving to a different SBC or module with PCIe 2.0 x2 would have been helpful.

Re:Building a 24-bit arcade CRT display adapter from scratch on Wednesday February 04, 2026 @03:42PM (#46891423)
Cool project. Thanks for doing a write-up that includes so much detail.

I do a lot of PCB review for students and makers, so if you're interested I wrote up some notes. Consider this an incomplete review because I only had so much free time, but hopefully this information can be helpful for your next rev or next project.

Design:

- Add ESD protection to all pins exposed by connectors and around the buttons. A simple TVS will work. However, the capacitance of the TVS needs to be small enough to minimize burden on your higher speed lines like USB and VGA. I'd use a cheap TVS for the low speed pins and then maybe look at some dedicated USB-HS protection parts and then just re-use those on the VGA lines. The USB3300 part you're using looks to have some minimal built-in ESD protection but as you observed it's probably not enough for real world use.

- Consider a buffer between your resistor DAC and the output. This could be an op-amp or a dedicated buffer chip. This will let the resistor DAC operate without significant load, isolated from the cable. You can then put a 75 ohm resistor in series with the buffer output to get optimal impedance matching with the 75-ohm VGA cable and load. You can get away with resistors connected straight to the VGA cable for demo purposes, but having it properly buffered and impedance matched will clean up the edges even further.

- Look into the design of an R-2R DAC as an alternative to the weighted-summing configuration you've used. You would want 0.1% resistors at 8-bit depth but you'd only have to buy and manage 2 resistor values (R and 2R) which is helpful when doing hand assembly.

- Better yet: This project is a good place to use a real DAC chip. Resistor DACs are cool to play with and useful for ultra-cheap demo boards where manufacturing cost is a high priority (Like the RP2040 VGA demo) but for a hand-assembled project like this a good DAC chip is great choice. It would shrink your PCB, reduce assembly time, and allow you to choose a physically smaller MCU package because you don't need 24 IO pins for the resistors.

Schematic:

- When using hierarchical schematics it's a good practice to avoid putting ICs and components in the root sheet. I suggest adding additional sheets for the MCU and other parts, then connect the blocks in the root. Treat the root page like a block diagram.

- KiCAD's bus functionality could help reduce a lot of the pins going into your blocks, like USB_D[0:7] and VGA_R[0:7]

- Breaking up that big STM symbol into a couple parts would be a good way to learn how to use KiCAD's symbol editor and would allow everything to fit on standard A4 sheets

- Don't hesitate to add notes to the schematic that might be helpful during debugging, assembly, or for your future self when you return to the project.

- I like to do a cleanup pass on schematics to make sure all labels are readable and there's enough space to comfortably see everything. It's a good practice to get into and pays off when you're tired from a long debugging session and trying to read a schematic. I suggest using the empty space on some of your pages to space components out more so no text is overlapping or hard to read.

PCB:

- You used 0.15mm (5.9 mil) traces almost everywhere. It's best to avoid using small traces unless you have to. You want to stay away from the minimum trace/space of your PCB manufacturer by default and reserve those for only the places where you need it. It will improve yields and make rework easier. Many of your traces could be 0.25mm or 0.5mm without any problem.

- Likewise, avoid letting traces run too close to pads unless you really need to. It's okay when you need to squeeze a trace into a narrow spot, but by default you should try to give as much room between pads and traces and between adjacent traces as you can. The tighter the spacing, the easier it becomes to accidentally short something out during assembly.

- Similar story with vias: Try not to use the absolute smallest vias everywhere when you have space.

- A lot of your vias are grouped together in a way that creates large slots in your ground plane. This doesn't matter too much at the low speeds you're working with, but it's good practice to avoid creating large cutouts in ground planes. The return current has to flow somewhere and those big slots will force it to take a longer path, which increases emissions and distorts high speed signals.

> Reverting to factory state seems riskier than last known good state.

Reverting to factory state is the last resort. You don't have users do it unless there is no other good state to return to on the device.

> Just because that version worked a decade ago, it doesn’t mean it’s compatible with the world today.

That's why I said you have to include this in your test procedures.

When you're planning for the long term you can accommodate for these things on your servers.

> will be booted automatically if all else fails

I prefer to keep the factory firmware reset to a manual process that requires user intervention.

For example, holding down the reset button for 10 seconds after plugging the device in.

In my experience, it's not a good idea to have a device automatically roll back firmware and erase user data after failed boots. These mechanisms get triggered too easily during certain power outages (power comes on then goes off just long enough to cause multiple failed boots) or when users are doing simple things like rearranging their power cables.

You need to have the firmware equivalent of a platform team.

It's common now for medium and large companies to have some variant of a cloud platform team: People responsible for shared practices, infrastructure, and processes in the cloud.

Smart hardware companies have done the same for decades. You have a firmware platform team that handles things like update protocols, recovery protocols, testing checklists, on-device OTA update architecture, and other critical functions.

When you're a company like Samsung that continuously releases and develops products this actually increases your time to market rather than decreasing it. You let each product team focus on the parts of the firmware that make their product valuable and free them from having to roll their own update systems

Two important features I insist on for products I develop:

1. Staged rollout of firmware updates. It’s common practice for apps and software but for some reason it’s less common with firmware. Rolling out to 1% (or less, depending on scale) of devices and waiting a day is cheap insurance. Side note: Build a good relationship with customer service people so you hear about these things immediately.

2. A failsafe firmware reset back to factory state. Some sequence that resets the device completely back to the way it was when it came out of the box, firmware included, as a last resort. In conjunction, your automated tests need to confirm that every factory firmware you’ve ever released can update to the latest firmware.

Re:BloomTech, previously Lambda School, cuts half of staff on Friday December 02, 2022 @09:30AM (#33830828)
> Meta comment: It's intersting to see how many comments on any Bloomtech/Lambda post are very knee-jerk in nature, mostly negative some positive.

Bloom Tech (formally Lambda School) was actually an HN favorite in the early years. Paul Graham spoke highly of them on Twitter and many of us held them up as an example of next generation education done right.

My first hints that something was not right came not from HN, but from talking to actual Lambda School students in the real world. They did not have good things to say about the program. This theme continued in online discussions as more and more anecdotes came out.

That’s when the HN sentiment started changing. By now, anyone following this story has heard countless anecdotes from former students who regret their time there. They may have improved over time (explaining your positive anecdote, I suppose?), but it’s hard to argue that they were always good when even the top comments on this thread are from former BloomTech students talking about how they regret their time there. It’s not really “knee jerk reactions” when it’s coming from the students themselves.

The Bloom Tech founder is a prolific social media influencer. He’s very good at dropping into these situations and talking his way out of bad history and dismissing any arguments against their programs. I bought it for a long time, but I’ve heard too many first-person anecdotes from their students to really trust anything coming out of the company any more. They are too strong at marketing and grassroots promotion.

> because some undeserving person (who is not in their group) might get it.

Surely someone, somewhere feels like this, but it’s more often a strawman argument used to make opposing arguments more easily dismissible.

From real world anecdotes, the concern about things like student loan forgiveness (as the most recent example of an expensive social program being debated) are more about the extreme cost of the program contributing to an ever increasing list of expenditures. People are nervous about the amount of government spending and how it’s being distributed semi-randomly. This goes back to the rampant COVID loans to businesses, the stimulus programs that far overshot their target, and now proposals to give certain households with up to $250K income a free $10K.

People understand that these things do matter in a society where we’re all bidding for a limited supply of homes and such. It’s nice to imagine someone having a reduced debt load, but people still think about where that money comes from and how the uneven distribution of that money gives some people (excluding those who paid their loans off early) a financial leg up in places like the competitive housing market.

It’s all connected. The money must come from somewhere, and we’re all operating within the same markets. It’s disingenuous to pretend that there are no consequences for these programs, which IMO is where politicians fall far short of structuring them and pitching them to a wider audience.

> perhaps arguing that the cost of the something has to come from somewhere.

This is exactly what’s going on. People know that these expenditures ultimately come out of the company’s operating budget, which diminishes the funds available for other things. Installing EV chargers is a great environmental move in my personal opinion, but we can’t pretend it’s unrelated to discussions come raise/bonus time when people are told that their raises are smaller than expected because budgets are stretched this year.

The EV chargers may be a tiny contributor, but they’re still an unbalanced distribution of the company’s funds based on something completely unrelated to performance. People are keenly aware of these things.

Re:Sperm counts worldwide are plummeting faster than we thought on Thursday December 01, 2022 @11:05AM (#33818134)
> Exercise and raising testosterone will have a meaningful effect.

To be completely clear: Taking testosterone will actually worsen fertility. TRT will severely reduce fertility.

Lifestyle changes that improve testosterone (diet, exercise, physical activity of any kind) are correlated with increased fertility though.

Re:I made my own PCBs with a 3D printer on Friday February 14, 2020 @12:57PM (#22328575)
> That makes a lot of sense to me. One of the reasons I stick mostly with software is that it allows for much quicker iteration.

4-5 day turnaround from OSH park is quite fast. Keep in mind that you usually need to order parts from Digi-Key or another supplier when you finish the design anyway. If you have a mistake on a PCB, it's faster to use a tiny stitch wire than to make a whole new PCB.

On a professional level: You can always buy fast turn PCBs if you need them ASAP, but you'll pay for it. Usually cheaper than paying engineers to fiddle with finicky PCB milling or etching machines, though.

> Obviously what you've done here is just getting started, but it points in a really interesting direction. A 3D printer with swappable heads for plotting and an add-on PCB etching kit should definitely have a market.

Chemical etching is more of a novelty these days. A cheap CNC mill produces much better results without the mess and uncertainty of chemical etching: https://hackaday.com/2018/01/04/guide-why-etch-when-you-can-...

On the professional level, several manufacturers make dedicated PCB mills: https://www.lpkfusa.com/products/pcb_prototyping/machines/ These machines have helpful features to index tools to the surface and align the panels as you flip them over for two-layer designs.

Re:I made my own PCBs with a 3D printer on Friday February 14, 2020 @12:23PM (#22328275)
I love seeing DIY PCB manufacturing projects like this. Using the 3D printer as a plotter is a creative take on the traditional DIY process.

For any aspiring EE hobbyists: Manufacturing your own PCBs is almost never worth the effort. You'll spend days or weeks getting the process and tooling right, and you still have to manually wire any vias that connect the front and back sides of the PCB. These DIY PCB manufacturing projects are fun if you're in it for the experience, but very impractical for getting work done. It's quick and easy to order small quantity PCBs online.

OSH Park is a popular option: https://oshpark.com/#services You can get 3 boards in 9-12 days for $5/square inch. If you need the boards sooner, $10/square inch will get you a 4-5 day turnaround time. You won't save any money by buying all of the gear to DIY etch your boards, and you certainly won't save any time.

Re:Ring Doorbell App Packed with Third-Party Trackers on Tuesday January 28, 2020 @08:32PM (#22176259)
Good to hear. I led the UniFi Protect effort at Ubiquiti. Responsiveness and fast time-to-video were our top UX priorities for the system. The WebRTC direct-connect and bypassing cloud servers were big factors in delivering that responsiveness. The added security and lack of monthly fees was another major bonus.
This 75% number is not from a formal study. The number supposedly comes from quotes from 3 different psychiatrists who quoted the same 75% number.

The author verified the 75% number by asking her Facebook followers.

  Do most med students require psych drugs for day-to-day
  survival? I turned my question over to Facebook: “75% of
  med students and residents are taking either stimulants
  or antidepressants or both. True or false?”
She cherry-picked a few Facebook responses to include in the article, but even some of those don't support the author's claim:

  but I have no idea if it’s 75%…I don’t know enough of my
  class well enough to have that info, nor do I think anyone
  does…there are usually cliques of up to 25 people, but for
  people to say they know for sure details of 75% of their
  class would be hard for me to believe but maybe…there is a
  lot of it, I agree with that.
And

  Being completely honest 75% seems a bit high, but I wouldn’t
  be that surprised if it were true
The author's real point is buried at the bottom: Medical licensing requires doctors to disclose their psychiatric history and medication use. Admitting previous psychiatric problems on your licensing form requires a detailed explanation of the condition and treatment. Doctors know this, so they have a perverse incentive to hide their treatment or even avoid treatment at all for fear of risking their careers.
Re:Ask HN: Who is hiring? (January 2018) on Tuesday January 02, 2018 @07:04PM (#16057133)
Ubiquiti Networks | Draper, UT or Portland, OR | ONSITE FULLTIME | ubnt.com

Ubiquiti is a high-performance networking hardware company. Our UniFi Video IP Security Camera team is hiring for several positions in our Draper, UT and Portland, OR offices. Join us to develop our next-generation security camera platform on top of Ubiquiti's industry-leading networking platform.

Senior Devops Engineer - Develop, extend, scale, and maintain our NodeJS cloud services backend. Seeking senior engineers with a track record of NodeJS development at scale.

Senior JavaScript Video Engineer - If you have significant experience with WebRTC video, WebRTC data channels, Media Source Extensions, or any other deep experience with JavaScript and video, we might have a position for you. Our stack includes React, Redux on the front-end and NodeJS with native C++ extensions on the back-end.

Computer Vision Engineer - Implement computer vision functions in our embedded camera systems. Motion detection, object tracking, person detection, facial recognition, and more. OpenCV experience is required, embedded systems experience is a plus.

Additional job listings and more company information available on our website: https://careers.ubnt.com/

Please contact me directly if interested. My e-mail address is available in my HN profile. Onsite preferred, but we do hire remote candidates who have truly exceptional track records.

Older »