Saturday, November 21, 2020

Bitcrusher tested

I got the bitcrusher from JLCPCB working today. Last week I discovered that some of the tiny 0402 resistors had lifted from their pads, so the input filter did not let the signal through. Last night my wife soldered them (I love her and how skilled she is, those parts are soooo small!), and today I was finally able to test everything.

The left pad of the two 0402 resistors have lifted. Not sure if this happened in production or when the pins were soldered.


I am still surprised at how recognisable the output is at 1 bit 27kHz. It has a lot of noise, but the music is still very audible. I am still not entirely convinced that it does not leak from the input, but when I reduce to 0 bits everything goes silent so I guess it is actually possible,

I had a lot of trouble getting the sample rate high enough, currently the max is at 27kHz with a 1:1 prescaler on timer 1 and a timer start value of 0xFEFF. Changing to 0xF0FF drops sample rate to 2kHz, so it's really sensitive. I need to work more on this but I am fairly confident that 44kHz should be possible.

I still want to confirm that the filters work as expected and have a 20kHz cutoff, but if that works as expected I think I'm ready to mass produce the filter. Perhaps just doing a quick input SPI check first.


Here is my test setup btw, for future reference.



I've also tested the filter response for the input filter. It works fairly well although there are some slightly strange things going on. 

First of all, at 10-15kHz, the output signal (what the ADC sees) is amplified slightly, before it drops towards 20kHz. At 20kHz it is close to what I see in the simulation, so that's great. At 25kHhz it is even lower than what was simulated. There is also some distortion on the sine wave, not much but visible. I'm not too worried though, as this is not a hifi system. The tests sounded good enough to me. I'm more worried about the phase shift I see even at low frequencies, They may be very audible if the signal is mixed with the original. We'll just have to see (hear).

5kHz - no amplitude difference but a slight phase change

10kHz, the output has suddenly increased by 0.2V (5-10%)


At 20kHz we have a very visible attenuation. The filter is designet for 20kHz cutoff

Heavy attenuation at 30kHz





Friday, November 6, 2020

Shanpu switches

 I got a shipment of sample switches from Shanpu in Taipei today. I had to pay full DHL express freight but they were very nice and sent me the samples for free. I will be able to buy directly from them in multiples of 100 of each item, and the price ends up at around $1.4 per switch including cap, but shipping and a rather steep low-volume fee of $100 for orders below 1000 means the real cost is closer to $3-4 depending on the number of switches I buy.

There are several switches to choose from. All are rated at 1,000,000 cycles!

The SPH2S has an audible click and a short travel of 0.2 to 0.3mm, 190 +/- 50gf force

The SPH2T has a very audible click and a medium long travel of 0.4 to 0.6mm, 230 +/- 50gf

The SPH2N has a no audible click and a very long travel of 1.0 to 1.4mm, 60 +/- 40gf


Then there is a low profile version, but it is only rated for 100,000 cycles, so unless it is more suitable due to the low profile, I should really go for one of the others.

The SPFSP1 has an audible click and a short travel of 0.2 to 0.4mm, 200 +/- 50gf force


In some ways I like the N version best, it sits somewhere between the keyboard switch feel of the Nord keyboards and the normal clicky synth button. It doesn't feel quite right somehow though, it's like the travel is a bit too short or something.

The T is a bit too noisy for me, so that leaves me with the S. The click feel of the S is closest to the D50 when comparing to some of my synths. It is a little bit on the heavy side though, switching between it and the N makes me think I like the feel of the N better.


But then there is another issue - caps.

I ordered six different caps in four different designs

YCA085C, a 9.6mm round, transparent black cap with a "lense" effect on top. It turns out that it is glossy, and because of the way it has been made, with a hole in the center, the light is rather uneven. Not too much, but it is not the best.

YCA151A, same as YCA085C, but one mm shorter and Ice color (translucent white). The light is much better, but this may simply be because more light gets through due to the color, or it is because it is 1mm shorter. I have to retest the black one with a smaller diode. Of course, its white when switched off, so it will not blend into the design if I choose a black front panel.

YCA080C, an 8mm round transparent black cap. It has a more frosted look and is flat on top. It looks really great and the light is much better too. It has ONE major drawback though, and that is that it's only 3.3mm long. If I use a 3mm panel, or a long travel switch, it is simply too small for me. It's really a shame, because it's hands down the winner when it comes to looks. Oh, and it would be a perfect match for the 8mm black alu 

YCA059C, an oval transparent black. It is too small for my liking.

YCA044A, a square, 7.5mm ice white cap with a slightly rounded top. It looks good, but is too thin, and the led is clearly visible through, so I can't use it.

YCA043C, a square, 7.5mm transparent black cap with flat top. Unfortunately it is simply too transparent and completely useless. It WOULD however make a perfect base for glueing the black 8mm alu caps on top of, if I want to use them with the same switches. I may even use them for the red square Aliexpress caps.

Bonus test: The red square aliexpress caps look ok with the led, though they have an internal pattern that is very visible. It doesn't really look like they are meant to be backlit.

That means that I'm probably down to two options: The biggest round transparent black cap with whatever switch I like the best, or the 8mm round cap with the S-model switch and a thinner panel. I must test if I can get away with 2mm aluminum.


Update:

1 - There is an even better option for attaching aluminum caps: They sell a 5mm round cap, YCA052, which probably will fit very well inside the aluminum - perhaps with a 1mm gap that could possibly be filled with glue? There is also a 6mm one, YCA046. Perhaps I should buy both just to check. BTW: The top of the alu cap may be too thick for this option, but the extra cost of buying 100 caps is so little that it would be stupid not to do so.

2 - For the switches where the led will NOT be used, it would be possible to put a piece of black cardboard inside and coloring the edges of the cap holder black to get a much darker cap - the white parts shine through and making the insides black helped a lot.

3 - changing from a 270Ohm to a 150Ohm for the thicker transparent black cap helps. Still not as good as the other though, so I definitely have to test 2mm aluminum panels.