HN user

fest

1,074 karma

- I write software. For hardware.

Areas of expertise: * Embedded firmware for (C/C++), * Human-machine interfaces (Qt UIs, industrial HMI panels), * Industrial automation (primarily woodworking),

Recent expansions: * Machine vision for production automation.

Contact me at reinis@wot.lv

Posts3
Comments464
View on HN

When I was doing stepper control on rp2040 I looked into using PIO but the 5 bit counters and 32 instruction limit made it too awkward to use. What worked better for my needs was dedicating 2nd core for just motion control and bit-banging the step/dir signals- simple to implement and good enough for the modest needs I had (just trapezoidal velocity profile for single axis motion).

On this topic I've been wondering why are the air-air heatpumps significantly cheaper than air-water units?

As far as I could tell, there's not that much of a difference (different heat-exchanger, circulation pump instead of a fan, maybe a three way valve for hot water)- but I have hard time seeing how they contribute to the price difference of several thousand EUR.

There are also quite a few conversion projects (where an air-air unit is converted to air-water), so I'm wondering if it really comes down to just higher demand for air-air?

Metallurgical microscopes illuminate the sample "from the top side". The actual implementation even goes as far as making sure the illumination happens on the optical axis of the objective (as if the light was emitted from your eyes/camera, reflected from the sample and then seen by your eyes/camera). They are also called reflected light or epi-illumination microscopes.

Biological microscopes, on the other hand illuminate the sample from the back side (which doesn't work for fully opaque objects).

I like the RP2040 2 years ago

Might as well use PIO to implement I2C or UART :)

PIO actually came in handy for me when interfacing with an x-ray sensor which had 12 or 14 bits long UART data frame- not many micros have such a flexibility in their UART peripherals.

I can't really go into details, but FrontRow wasn't the most bizarre thing Ubiquiti was working on, just the one that got reasonably close before being shelved.

IIRC Access reader isn't the only product the FrontRow R&D cost/stock of parts was tried to be recouped, but at that time I wasn't working there anymore.

This is actually a common problem for test fixtures that involve miniature coaxial connectors (pretty much all of them are rated for few tens of mating cycles): even if the connector on device is used for assembly/repairs and goes through very few mating cycles, the automated test fixture used during manufacture of such a device is expected to last longer.

Most connector vendors have specialized connectors for test fixtures that last much longer (they are also a lot more expensive).

I use a very crude DIY setup for garage doors and yard gate: bought a spare keyfob on aliexpress, took it apart and connected it to wall power supply and ESP relay board running esphome. Works great and will work as long as my garage door and yard gate openers work.

The only drawback is that it's less secure, as it uses RF but I can't be bothered to dig a new cable to gate motor through already paved driveway.

You can also convert the DICOM images to 3D model and print it.

I did it with MRI scan of my head (isolated the brain specifically) and kept it on my desk at work, ready to be handed to whoever came by wanting to pick my brain.

Yes, unfused 10A range would have been my guess, but if device under test doesn't have short-circuit protection, it might as well die during the few tens of milliseconds that the fuse needs to heat up and blow, as well as a user error to be measuring voltage with switch in current measurement position.

They are widely used in narrow circles :)

Two of (arguably the best) open source RC aircraft flight controllers (ArduPilot and PX4) are using extended Kalman filters in their state estimators (essentially sensor fusion that provides attitude/position estimate):

https://github.com/ArduPilot/ardupilot/tree/master/libraries...

https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/e...

I'm not that familiar with cleanflight/betaflight/inav scene to know what the FPV racer flight controllers use.

Hopefully the firmware development won't stall like it was with v4.

Rp2040 is a decent choice for relatively slow speed digital bus multi-tool, but the USB1.1 speeds will be somewhat limiting (IIRC I achieved somewhere around 700-800KB/s of serial data throughput). PIO is also flexible enough for some almost standard-but-nonstandard digital buses (for example, I used it to interface with 12-bit SPI-like interface- not many MCUs support word-widths that are not multiple of 8 for their hardware SPI interfaces).

Having thought about this when I retrofitted a heat pump in my house, I don't see how a buffer helps here.

For a buffer to work, it necessarily needs to be hotter than supply temperature, which means more losses and more work for the heat pump.

Since heat pump can easily adjust the supply temperature, the most efficient system will be the one where the energy delivered to underfloor heating or radiators is just balanced out by heat loss of the building.

Where buffers are useful is heat sources whose power cannot be modulated (my old diesel furnace for example- when it fired, it produced roughly 20kW, with the only adjustment being supply temperature at which it turns off), or where there is a cost to frequent starting/stopping the heat source (I.e. you probably don't want to get up in the middle of night to add wood to a wood-fired furnace, and pellet-fired furnace needs to be maintained more often in such operation mode).

If one really needs 25kW heat source, one really needs a 25kW heat source. There is no clever way around it. The real question is whether one really needs 25kW heat source (which can be answered definitively by either measuring the delivered==required power, looking at the peak continuous fuel consumption (let's say the coldest day or week), or by having accurate heat loss model of the building. In a heating season, the buffer cannot realistically be large enough to significantly reduce the power requirement. For example, 1m3 of hot water when used as a buffer can store roughly 30kWh (when heated 25 degC above supply temperature). My house needed 240kWh of energy in the coldest day, so the buffer would only cover 10% of the needed heat.

I had set up monitoring for my diesel furnace, so I could see for myself what was the peak heat requirement over two heating seasons (10kW continuous in the coldest winter day). So, I selected an 11kW heat pump, which, if needed also has 9kW of resistive backup heaters. It also matched the numbers in energy-efficiency certificate of the house (theoretical calculation based on materials/thickness/local outside temperatures) within 10-15% or so.

It's all relative. It has gotten at least an order of magnitude less expensive over the last 10-15 years- 3D printing, low cost PCB manufacturers, availability and cost of automated machine tools like CO2 laser-cutters.

It has actually gotten to a point where often time is the most "expensive" component of hobby/open-source hardware projects- while the cost of CAD software has decreased (mostly due to competition and increased demand that allows to spread the development cost over larger customer base), the productivity of CAD-related tasks has not increased much, if at all.

GNU Units 3 years ago

Even if it was all metric, in embedded systems you often have to deal with the same measurements in different units, like angles in radians, degrees, centidegrees, length in mm, m, cm, due to various reasons (mostly historical, like integer math being faster than floating point math).

It is getting less frequent in modern code bases that target 32-bit MCUs with hardware-floating point support, but converting large codebases

I recently converted a cheap consumer toaster oven and a hot-plate to PID controllers- I wouldn't expect their thermostats to work at all. In both of them, the adjustable bimetalic switch that controls temperature either at the surface of hot plate or inside the oven... is located right next to the switch itself- quite far removed from the temperature it is supposed to control.

It also means that the actuation temperature varies with room temperature and airflow in the room.

My guess is that they need to be cut using EDM (slow) and need expensive CMM machines to make sure the resulting die shapes match the tolerance. I know you're probably referring to OEM hand crimping tools that cost on the order of 500€/$, but even decent quality non-OEM tools (e.g. Engineer PAD-11) aren't exactly cheap. Though, I hear IWISS ones are usable if you're on a budget.

Google is really not helpful in finding out what the nut-retapping trick is :>

Do you mean cutting the screw to length with a nut on it, which then fixes the thread as you unfasten it?

Of course an experienced developer would have thought about edge cases, but I can see a thought process like: ok, I'm comparing two strings. "" != "123" in languages with built-in string types.

I'm definitely not arguing that C shouldn't be used and everybody should be using <insert-the-currently-trendy-systems-programming-language>: just thinking out loud if improved documentation could prevent at least some of the common footguns.

Though, in this case, manpage doesn't exactly spell out that two strings of which one is 0 chars long results in a match.

I often remember my PHP days in horror, but mysqli_query manpage does warn you about SQL-injections now.

The only way to avoid this kind of scam is buying vehicles that have done the official maintenance/inspection.

Agree, but not everyone here can afford <5 year old vehicle, so people have to do with the means they have. As soon as warranty/lease ends, people generally go with cheaper, non-manufacturer maintenance shops.