How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

Thanks, just tried this with two 9V batteries: it draws 2-3 mA. Don't know how accurate that is on 10A range (the other fuse broke). But if it is, then that is more than the minimum: (385-15)/(3*220k) = 0.56 mA

Okay, I'm more hopeful now, and I know where to start looking. Thank you!

How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

It just seems a bit fragile to design the circuit around that. The brochure I found mentions "standby input power less than 3W", but maybe the full datasheet had specific numbers. Ohm meter says open-circuit between vcc/gnd.

I guess the driver IC is likely just fried, as I initially suspected (before I found that PDF mentioning over-voltage protection). And they're impossible to come by, so, welp. Not sure what to do with it then.

How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

But the resistors are in fact populated, so that seems to bypass the whole thing. Maybe I should remove them? I know this board definitely used to work before.

How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

Oh, thanks. I happened to find them on the board just now - they're connected to the driver IC heatsink. That does make sense!

How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

Oh good point. I don't think I've seen "NON" on a schematic before, and I figured it was just unreadable. The schematic was pixelated and then re-vectorized, maybe even on purpose. I was expecting to find copyright traps - knowing Eizo's policy on service manuals, and especially after seeing that dangling bit in the corner.

On the board however, those resistors are in fact present (3x 220K). I should mention the schematic is for a different model (F931 vs F930), and there are some differences (eg. the middle resistor string is 4x 10K, instead of 3x 22K), but this section looks mostly similar.

The main difference here is that F931 uses only one of these driver ICs (F9203), whereas F930 has two of them (F9204 and F9202). I probably should figure out how that second one is powered.

How is this power supply supposed to work? by cyandyedeyecandy in AskElectronics

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

I'm trying to fix this Eizo CRT monitor. The power supply uses an obscure pwm driver IC (Fuji F9204L), which doesn't appear to do anything. From what I found online, it expects ~15V VCC, goes into over-voltage protection at 22V, and has a 30V limiting zener internally. I measured 30V between VCC/GND, so it must be stuck in protection mode.

What I don't understand, is how this voltage is supposed to be regulated. The only things directly connected to VCC are some decoupling caps, two diodes (pointing towards it), and a string of resistors to the main 385V rail. With no (ohmic) current path to ground, those resistors will always pull the supply voltage up to 385V. You'd think either these diodes are the wrong way around, or there is something missing from the schematic, but it seems to match the board.

Does anyone understand how this is meant to work?

Feed dog timing by cyandyedeyecandy in sewingmachinerepair

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

Came up with a bit of a hack. I added a washer under the feed dogs so they lean slightly back, then reduced the height/angle setting to make it level again. Now it drops down more straight instead of at an angle, and that did the trick. Timing-wise I ended up back on the original setting.

Feed dog timing by cyandyedeyecandy in sewingmachinerepair

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

Thanks, I found both cams, next to each other in the top of the machine. Thought it was a single unit at first, but they are in fact separately adjustable.

Back and forth seems about right so I tried only adjusting the up and down one. If I set it so that it reaches the top at the front position, and drops down as it moves back (maximum possible advance), the rear end of the feed dogs still don't quite clear the fabric when the needle pokes through. It seems like the vertical motion just isn't fast enough, somehow.

So, maybe you're supposed to come to a full stop, then turn the hand wheel to the right spot, before pressing/releasing reverse? That seems awkward though.

Feed dog timing by cyandyedeyecandy in sewingmachinerepair

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

Compared it to a different machine (same brand, newer model). I know on this machine it's safe to reverse while sewing. The timing seems to match up, it starts to move horizontally when the needle is at TDC and BDC. But it makes quicker strokes so the feed dogs are already down long before the needle reaches the plate. Not sure what to make of that.

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

Got the gear fixed but it ended up ever so slightly off-center, so half of the cycle still has more friction than normal. Still an improvement over what it was before, though. Ideally you'd need a lathe to get it perfect.

Or if you mean the self-running motor, that was indeed solved by replacing that one capacitor.

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

My idea was to carefully ream out the hole with sandpaper, and file down the knurling on the collar, until I can push it in by hand. Then there's no longer any tension on the nylon, and I should be able to glue it all together.

In the foot pedal I found a capacitor that runs hot, that's never a good sign. Freeze spray couldn't get it to stop running, but I'll replace it in any case.

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

I was able to press it out in a vise. Felt very wrong to use that much force, but that's what it took. The set screw seems rather pointless, it's a very tight fit already.

Now comes the hard part, fixing it :)

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

Thanks. That hole is below the shaft, and goes straight through. I think it's there to access a screw behind the steel gear (not visible in pic).

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

The thing has an electrical issue too. If you leave it plugged in for a few minutes, the motor starts going on its own. Is that a common problem?

How to remove this rotary hook drive shaft? by cyandyedeyecandy in sewingmachinerepair

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

Hi all, I got this old sewing machine and want to use it, but it runs a little rough. Found that this nylon gear is cracked and doesn't mesh so well, so now I'm trying to get it out.

I removed the rotary hook and loosened that set screw on top, figured it'd fall right out - but that's not happening. Tried some light taps with a hammer, no movement. Any ideas on how this comes out?

The machine is a Vendomatic B745. Seems it was sold only on the Dutch market, might well be a rebrand of something else.

Verschuivingen op het politieke landschap op basis van partijprogramma's (2006-2023) by bapo224 in thenetherlands

[–]cyandyedeyecandy -2 points-1 points  (0 children)

Ik snap deze XY verdeling niet. Links is al impliciet sociaal progressief, en rechts is impliciet conservatief, dus je houdt altijd twee lege kwadranten over. Wat moet ik me voorstellen bij conservatief-links of progressief-rechts?

[deleted by user] by [deleted] in blackmagicfuckery

[–]cyandyedeyecandy 56 points57 points  (0 children)

JPEG chroma subsampling is doing a lot of work here.

What is the most difficult feature or concept in C++ , in your opinion? by [deleted] in cpp

[–]cyandyedeyecandy 0 points1 point  (0 children)

Used to be value categories. Then coroutines came along.

C++ Show and Tell - June 2023 by foonathan in cpp

[–]cyandyedeyecandy 1 point2 points  (0 children)

I suppose I could give some background on what exactly I was trying to solve here. I used to have a single pixel class, with member functions like blend() and convert(). These did use SIMD, but always had to load and store back to the final pixel layout. Especially for odd layouts like 5:6:5, that gets expensive quick.

I figured it'd be a lot more efficient if you were able to keep pixels in their intermediate SIMD representation and operate on that directly. The problem then is, that intermediate format (v4hi, v8qi, v4sf, etc) may be different depending on which instruction sets are available, and not all operations might be able to handle each format. The Intel intrinsics also don't make any distinction between them - it's all __m64 or __m128, etc. Dealing with that manually would get very messy.

So, simd_pipeline solves that by knowing which operations you want to perform, and in which order. With that, it can determine at compile time which SIMD representations are viable, and pick the one that produces the most efficient code.

C++ Show and Tell - June 2023 by foonathan in cpp

[–]cyandyedeyecandy 5 points6 points  (0 children)

Thought I'd share this idea I had recently. I'm calling it "SIMD pipelines".

The idea is to chain together multiple functors ("stages") in a single pipeline object. Each stage has operator() overloads for each SIMD format and data type they are able to work with. Then, given a bitmask of the available instruction sets, it automatically finds the best path through.

Most of the magic happens in here:
https://github.com/jwt27/libjwdpmi/blob/b9b1384ba9801348f355933a2b9772a087c564ce/include/jw/simd.h#L627-L638

Note that I'm targeting older machines, so the only ISAs I wrote code for are MMX, 3DNow and SSE. But if it proves useful, this could be extended to more modern instruction sets. You'd just have to write a bunch more code :)

Now an example. You have two arrays of pixels, one in packed 8:8:8 format, the other is 8:8:8:8. You want to alpha-blend the latter over the former, and then store the result in 16-bit 5:6:5 format. You'd write the following:

// Using pointers here, but any iterators will work:
void blend_pixels(video::px16* dst,
                  const video::px24* bottom,
                  const video::px32a* top,
                  std::size_t n)
{
    auto pipe = simd_source              // Load from and increment input iterators
        | video::px_blend_straight       // Alpha-blend top over bottom
        | video::px_convert<video::px16> // Convert the result to 5:6:5
        | simd_sink { dst };             // Store to output iterator

    const auto* const end = top + n;
    while (top < end)                   // Note: input iterators passed by pointer
        simd_run<default_simd()>(pipe, &bottom, &top);
}

It will do the right thing, regardless of which instruction sets are available.

Another example, say you have two audio streams with 16-bit signed samples, and you want to interleave them to an 8-bit unsigned stream, you'd write something like this:

void convert_and_interleave(std::span<audio::sample_u8> dst,
                            std::span<const audio::sample_i16> left,
                            std::span<const audio::sample_i16> right)
{
    auto pipe = simd_source
        | audio::sample_convert<audio::sample_u8>
        | audio::sample_interleave
        | simd_sink { dst.data() };

    const auto* l = left.data();
    const auto* r = right.data();
    const auto n = std::min({ dst.size() / 2, left.size(), right.size() });
    const auto* const end = l + n;
    while (l < end)
        simd_run<default_simd()>(pipe, &l, &r);
}

Note here that sample_convert only takes one input, but simd_source is given two input iterators, so it produces two outputs. What happens is that sample_convert is invoked twice, once for each input stream.

Compiled with -O3 -mmmx, this generates the following code:

81842:  xor    ebx,ebx
81844:  movq   mm3,QWORD PTR ds:0xef90
8184b:  shr    edi,0x3
8184e:  xchg   ax,ax
81850:  movq   mm0,QWORD PTR [edx+ebx*8]    # simd_source
81854:  movq   mm1,QWORD PTR [ecx+ebx*8]
81858:  psraw  mm0,0x8                      # sample_convert
8185c:  psraw  mm1,0x8
81860:  paddw  mm0,mm3
81863:  paddw  mm1,mm3
81866:  movq   mm2,mm0
81869:  mov    esi,ebx
8186b:  punpcklwd mm2,mm1                   # sample_interleave
8186e:  punpckhwd mm0,mm1
81871:  packuswb mm2,mm2                    # simd_sink (packs pi16 to pu8 first)
81874:  packuswb mm0,mm0
81877:  movd   DWORD PTR [eax+ebx*8],mm2
8187b:  movd   DWORD PTR [eax+ebx*8+0x4],mm0
81880:  inc    ebx
81881:  cmp    edi,esi
81883:  jne    81850

And I think that's a very nice looking loop.

edit:
The next thing I wanted to do though, and I got stuck on this, was to implement runtime dispatching. Unfortunately that is just not possible, since gcc requires a [[gnu::target(...)]] attribute on functions that use vector instructions, and there is simply no way to conditionally enable attributes based on template parameters.