[New + Review] YLP Unicorn 1.0 (1x18650, LH351D, backlit side switch, magnetic tail, TIR lens, ramping)

it’s like in any other unglued flashlight, nothing special, just unscrew the bezel, remove TIR lens, unsolder the two wires from the MCPCB, replace led from the MCPCB outside the flashlight and mount all again

Thank you. What will be the changes after replacing the XP-L HI V2 3C? I have no other diodes

Way more throw (240m against 125m stock) and better tint (for my taste, I don’t like the green/yellow tint from the 4000k LH351D )

I really like the light with the XPL Hi Led

Probably a combination of things.

A lower power-to-mass ratio makes Unicorn’s regulation easier than something like an Emisar D4. And making specific code for just one light is an easier problem than making generic code to regulate a wide variety of lights. However, it’s also very likely that Inferion made a more accurate algorithm, since they approach things more formally like a mathematician instead of just trying things to see what works. And I’m guessing the higher-resolution power controls help too, since it can make very small adjustments. And based on the graph, it also looks like it aims for a very narrow optimal temperature instead of aiming for a wider temperature window.

So as far as I can tell, the differences are because of two things: It was a somewhat easier problem, and it was solved better. It’s not easy, but Inferion did a really good job with it.

Thermal regulation can be sub-optimal in a lot of different ways. For example, if the adjustments are too large or too slow, it can overshoot and oscillate. This happened on ZebraLight’s generation 4 lights, though at least the amplitude of oscillation was reasonably small:

Another common pattern is a zig-zag, especially with FET-based lights. The output sags over time as the battery voltage drops, and then the controller steps up to compensate. The individual step size depends on the PWM resolution, and the total amount adjusted at each step-up depends on how wide or narrow the temperature window is. Here’s how that usually looks: (at the end, the sag is pretty fast, and eventually it can’t step up any more so it’s running in direct drive)

A similar pattern can be seen in other FET-based lights like the MF01S. The result is actually pretty close to optimal, but it could probably stand to have a narrower temperature window to make the step-ups smaller and closer together: (there’s also some visible noise at the end caused by the driver hardware, but the firmware can’t do anything about that)

With something smaller which stays at current-regulated levels, the result looks more like the Unicorn. Output slowly climbs as voltage drops, because there is less extra voltage to burn off. However, it looks like it overshot the ideal level a bit at the beginning before correcting itself:

Or with recent FW3A lights, the regulation generally stabilizes pretty well but it can sometimes wobble a bit on its way to that steady state:

On a light with a lower power-to-mass ratio, the results are usually pretty decent. This graph isn’t as smooth as I’d like, but it’s not really bad either:

Of course, when things aren’t tuned right, the results can turn out pretty bad… like with large oscillations or continuous searching. It really depends.

It is utilized in the most precise and noise-free (but somewhat slow, yes) ADC and DAC everywhere. For example, your smartphone has MEMS microphones with PDM output (example), that have 1 bit, frequency 3.072MHz and dynamic range 105dB. SACD format also has 1 bit and frequency 2.8224MHz. Audio Delta-Sigma ADCs and DACs run at 12.288MHz (though they are usually 3-bit) and have dynamic range up to 130dB. These modulation frequencies are enough for our hearing at much higher frequencies, and moreover we have 8MHz and we work with more inertial eyesight…
By the way, digital audio requires dithering, that is essentially the same thing that we discuss here. And there are great video about that:

It applies even for pictures and present in our monitors, which are, in fact, 18-bit, rather then 24-bit.

Yes, 4MHz/137/65536=0.446Hz, but is should be noted, that discussed restriction of arithmetics is much lower than natural noise of analog part at the same frequency. Concept of quantization error disappears and only white noise of the analog part with a normal distribution remains, which is perfectly fit for filtering. 23 bits are used here just because ~16 are not enough, and ~32 are excessive. At the same time with ~24bit we still have to use dithering. This means that the LSB is noticeable amid analog noise even here.

That is not correct. Instability is introduced by nonlinear distortions because of low resolution of DAC. For example, lets take PWM with 10mA step and offset 7mA (for specific current conditions, such as supply voltage, temperature, etc.), and a setpoint of 35 mA. What should the regulator do? He will periodically jump sharply between 37 and 27mA, achieving an average value of 35mA. He will struggle with non-linearity – one moment the regulation error is +2mA, then all of a sudden it is 8mA, and there is no way to get to zero … This is the way the integrator works in any control system, and it is the basis of the DSM we are discussing. Here it is implicit, but it is here, and operates at a very low frequency. If you try to reduce it as a “noise”, catching on the nearest integer value using hysteresis (which is often done by mistake) these 37 or 27mA will float from external factors, and from time to time jump to the next step sharply and quite noticeably. Here is a good example of such driver:


It is easy to notice with our eyesight, especially for a number of smooth effects, like ramping. In this case if noise level exceeds the software hysteresis it will be much worse. There will be strong jitter. And it does happen from time to time in practice…

If modulator is used, this effect of jumping between these steps has high frequency and is averaged by natural filters (including the integrator itself in the control system), and the control system, like our eye, sees the desired 35mA, which are stable. Here is an example of such implementation:

Yes, somewhere there at 0.5Hz it will jump to 1/65536 from the basic resolution of the PWM (Vcc/137), but how much is it noticeable to the eye? Are jumps 65536 times larger easier to spot? And it is also important to understand that in this circuit a 1/137 Vcc change in the gate voltage leads to a change in current by a factor of S. We have S = ~70 (SiA448DJ). I.e. jumping on 4.2V/137=30mV we jump on 30mV*70 = 2.1A! In my example, the regulator works with units of milliamps, how so? :slight_smile:

It won’t be noticeable at all, because energy at 122Hz proportionally lower relative to the 250kHz (2048 times lower), and the output of RC-filter has the same ripple level. And it works across the entire spectrum simultaneously, up to our conventional 0.5Hz at 24 bits. Eyesight also acts as RC filter, and the non-periodicity of the process makes the detection of modulation in motion a more difficult task compared to PWM. Even cameras do not see it, unlike PWM, which, at the same time, has a lower resolution.

There are a lot of advantages, and for many years I have been surprised that very few people approach the issue of signal processing from, actually, the theory of signal processing … They intentionally discard the least significant bits of ADC, because they are «noisy», use bare PWM wherever DAC needs to be improvised, etc.

Of course, but specifically in our example, this restriction required ~23 bits with additional tricks, which indicates the effective resolution of the analog part.

Easier to squeeze every last drop out of one method and then add the missing rather than to produce entities because of their rough implementation. For example, here you can go with only one resistor, instead of two additional complex regulators for different ranges. And these three regulators would work together worse than the current solution + resistor, because the parasitic correlated noise has not gone anywhere and does not want to be filtered in any way because of its nature.

Thanks. English is quite hard for me to use. I understand very well, but composing sentences isn’t that easy. That’s why I’m writing with the assistance and it’s taxing.

Thanks. :slight_smile:

All that purple magic of certain unicorn!
A little of both, but mostly “better algorithms”, right.

Inferion, I like the way the backlight on the switch fades when you turn off the light, but notice that when you have the locator LED enabled it will overshoot to dim and the jump back up to the standby level. Was this due to space saving in the code?

Are you talking about this one: 20mm 5 degrees Frosted surface LED Optical lens ?

Yes, it seems to work very well. But I don’t believe it gets 23 bits of effective analog resolution on an attiny25 chip in a flashlight. Even very high-end equipment usually only gets 20 or 21 bits worth, and this is not high-end equipment. When resolution gets high enough, the noise is louder than the signal.

For example, the SACD format is theoretically much higher quality than standard audio CDs. But in practice, the quality is the same. The SACD digital format is more capable, but the effective quality is limited by analog components.

However, it’s good tech and I want to try it. I’m pondering if I can make it work in a way which is portable to a variety of hardware. It would be very nice to get more than 8 bits… even if it was only 10 or 12 usable bits in a C version, it would still be an improvement. Doing it in C in a portable way might be tricky though, especially if I want it to work on dozens of different drivers with different types of power circuits. Another complication is the MCU underclocking I use to save power on low modes. So I’m not sure if it can work in FSM, but I’ll probably try it to find out.

(Er, for context, I made a hardware abstraction layer and UI toolkit called FSM, so it can run the same UI on a lot of different hardware. Any supported hardware can run any UI. I’d love to add delta-sigma modulation tech to that, but it may take some experimenting to find out if it is feasible.)

I’ve been wondering about the purple unicorn magic. It is an interesting branding choice for a flashlight. Can you explain what it means in more detail?

Now I want a purple YLP Unicorn.

No, this one (5 degree)

http://s.aliexpress.com/RjI3iuiE

Thank you Anthon :+1:

I am guessing it’s a Twilight Sparkle tribute. It makes sense if you analyze his words about purple magic, the full model name of the flashlight(Y MLP Unicorn) and his avatar. :slight_smile:

I recognize the Twilight Sparkle reference. What I’m wondering is why this theme was chosen.

Personally, I love purple and I think purple unicorn magic is awesome. MLP is a great show. It is primarily intended for young girls though, so I don’t often hear it mentioned here. MLP has a very different demographic than most of the people in flashlight groups. However, the show also has male fans called “bronies”, which serves as a way for men to rebel against traditional gender roles… but this often brings controversy. It tends to be a political topic, and the brony community has been ridiculed by conservative media.

I like the unicorn theme. I often have a purple flashlight clipped to my purse, and sometimes even wear matching earrings or shoes. But most flashlights focus on more masculine and military themes. For example, Warrior, Armytek Predator, Intimidator, Dominator, Raider, Fury, Marauder, Titan, Siege, and things like tactical strike bezels.

So the Unicorn is an interesting choice, and I wonder why a purple unicorn magic theme is used. Perhaps there is an interesting story behind it? Maybe I found a kindred spirit?

Since I’m not a guy, I sometimes find it tiring that so many flashlights are marketed with someone else in mind. It seems like they’re not meant for me. So it is nice to see a quality flashlight with a more gentle theme which might be at home in a girl’s bedroom next to the jewelry.

Here is what Google Images shows for the phrase, to give a better idea what associations it has in the west:

I love it. I want to get a purple Unicorn to go with my purple FW3A:

(image credit: Klayking)

Yes, I didn’t want to fill that space with cosmetics. This memory better be dedicated to functionality.

Yes, there are some craftiness in it. Look:

1. According to the oversampling theory, increase in amount of samples leads to an increase in dynamic range by N times and signal-to-noise ratio (SNR) by sqrt(N) times. That is, if I have a sampling frequency 16 kHz, I’ll get ~17.5 ENOB (Effective Number Of Bits) at a frequency 0.5 Hz. Provided that noise is optimal. ENOB restriction is completely missing. We can even get all 24 ENOB and more out of such low-end equipment, as AVR ADC – the question is only in time. And required amount of time is much higher, when one doesn’t use high-end equipment, yes. Still, there are plenty for that – the subject of operation isn’t a sound, but mere light…

2. So why am I talking about 23 bits, when in fact the calculated ENOB is 17.5 in that case? It’s all about subsequent processing of data from such an ADC. During this time, N samples, 10 bits each, are accumulated, and in order to save all 17.5 ENOB it’s necessary to filter 10+N bits. This becomes apparent when constructing a filter. For our theoretical 0.5Hz, we get 25 bits. But in practice, the noise of the analog part is not optimal and ENOB is slightly lower (1-2 bits). Noises would be summed up according to a quadratic law, and dithering is required.
So it turns out that in practice 24 bits + dithering give the optimal resolution of arithmetic. In this case, ENOB is about 16 at frequencies of about 1 Hz. It’s important to keep in mind, that ENOB can’t be transferred through variable with the same number of bits – those are different things.

3. Since the regulator has hardware local feedback, the MCU doesn’t need to operate at high speed, and it aggressively suppresses ADC noise by receiving all these 16 ENOBs. This is a good resolution, considering that the dynamic range of the driver is only 300. So why can’t I do moonlight then? And again we’ve came back to our noise, necessary for oversampling work. You have to get it from AVR artificially, and it’s not perfect here.

Considering all the above statements, we can conclude, that SAR ADC are not efficient for such tasks. For a good result, it is necessary to use Sigma-Delta Modulators with filters designed for a certain task. And modern MCUs provide such peripherals (e.g. STM32H7). I have some experience in this area as well, because I work with digital acoustics.

[loading…]

I’ve liked that art of familiar artist:

And I’ve started using it as avatar. What did I like in it? It’s me, in a way! I’ve spent all my childhood in the house of my grandfather, who was one of the founders of the Engineering Institute, in which they developed a drill for the Soviet moon rover. And in this house there was the same arbor with the same view on nature and sunsets. Full of grape vines, where I loved having a cup of tea and digging through various interesting things and reading various interesting technical magazines under the light of an old lamp, covered with insects and spiders. And we’ve had plenty of all that stuff. As a child, I’ve already knew how to assemble a nuclear reactor, a laser, an X-ray apparatus, and I’ve had enough fun with voltages of tens thousands volts and explosions, which I made with chemicals, that I found :slight_smile: . In general, I’ve had childhood. They say here: “A man is a boy, which survived”.

And also I prefer working specifically at night. And yes, I know that character, she is the same curious bookworm and has relatively profound skills.

Why unicorn? To think about it, things, that we do – magic of our time. We give life to very complex and incomprehensible things. We possess “secret” knowledge that is not accessible to everyone. I’m often told: “Things you do are some kind of magic to me”. Yes, there is something to it. Digital Signal Processing, for example, outright called “”Black Magic”:Amazon.com - it is not even understood by “Mages”, as it requires a special skill… There are spells that allow you to get an interesting result from a boring piece of metal. And when they ask me “how/why…” - it’s easier to explain this with magic than to describe everything in detail, as I’m doing it here…

Every developer has his own «handwriting», often recognizable. In such context, the colour of my handwriting might me the colour of magic of mentioned unicorn – purple.

//————————————————————————

Okay, enough about unicorns, let’s talk about flashlights. YLP Unicorn was planned as continuation of Gryphon series at the beginning, but when first sample of Unicorn ended up in YLP hands, it was clear, that it’s something new and requires new name. Whole forum have thought long and hard about alternative to the name initially suggested, but came up with nothing. Reasons are as follows:

  1. [I’m too shy to write that]
  2. Flashlight has been designed as workhorse. Unpretentious, hardy, inexpensive, and well performing its task.
  3. Unicorn was planned as alternative to ZebraLight. “looks like Zebra”.
  4. A Unicorn is often used to describe the perfect partner. This flashlight is, of course, far from perfection, but so far, it has managed to push many ZL back to the shelfs, encouraged many people to try something other than cheap flashlight, act as gifts or addition to collection, was bought twice by people, just in case. And it has even got attention of people, who haven’t even heard of 18650. It seems that whole “Fonarevka” is walking with these now. So that means there’s something to it…
  5. Flashlight is quite clever and convenient. One could say there is magic in it! And looking to the charts one could find even black magic. Though, truth is, I’ve collected a whole list of things I’d like to change in it. But that’s fine…

Such a nice description, maybe I’ll even buy one myself… :stuck_out_tongue:

Because it’s fun and YLP are also sometimes like kids, they’ve liked the idea :). Moreover, they were the ones, who suggested that (I was too shy to propose such name, though thought about that).

Yeah, it is. But it’s nothing, compared to the creative community around it, that appeared some time ago. Thank goodness, I was there that time and even participated in it. Hardly we’ll see something like that ever again.

Same thing with games, violence is everywhere. Games like “”Firewatch”:https://en.wikipedia.org/wiki/Firewatch” are quite rare and I’ve grown tired of intrusive aggression. Maybe I grew out of it.

The style of flashlight is more formal and neutral and aimed at a wide audience. But in rare conditions, you can see its purple hue - you need to accidentally catch specific lighting:

Nice light, very well built excellent quality, absolutely LOVE the design/knurling and the UI is outstanding……but the area around the switch needs to be machined down closer to the switch retaining ring, I have to use the thumb nail to activate, not a fan of the optic, emitter looks abit off center on a white wall and it is ringy but is acceptable outside, also my OCS would not allow the off indexed battery tube and tail cap. So I machined the tube and cap to align with the switch…… and added a couple of trit’s I had laying around…

I’m seriously thinking about throwing it on the mill and machining off the guarding around the switch and polishing it to a mirror finish on the buffing wheel… I like this light that much. :+1:

How is the low mode? You really like this light?

Tempted to order one now, but I agree with you on this. If you have a design like this, things should align.

It looks to be about 3-5lms, it registers 1lm on my Maukka T/A 4” tube which most lights don’t even register and 840lm at Max.

Not a fan of the Zebra Light looking or even Zebra lights themselves (yes I have a few) the Zebra light design/look is kind of extremely played out, but for the money it’s hard not to like it for what you get…bang for the buck yep it’s got it and then some… I like that…

Edit: I should be clear-er about liking the design/look of this light, I really mean/meant I like the design and look of the battery tube and cap machining and knurling…the head design not so much :smiley:

Completely agree, there’s no functional issue with this little jump at all.

I see. Sounds like it’s time for a right angle version in that case…

Also Anton, I tried it in the freezer and it still won’t budge, I must not be getting enough grip or the threads are slightly stuck. I’m sure it would open easily with a vice or pliers, but I’d rather not mar the finish and I have no desire to change the LED so I’ll leave it. I suppose I would prefer a stainless bezel with points for loosening it, like the Sherp S15 has, but it’s not a big deal.

I wonder if yours is set deeper then mine or we just have different thumbs. I very much like the depth of the switch.