# Crazy idea of the day - Constant Blade ID monitoring

**URL:** <https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847>\
**Category:** ProffieOS\
**Created:** [January 21, 2023, 8:09pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847 "2023-01-21T20:09:49Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![TheJediSmuggler](https://crucible.hubbe.net/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@TheJediSmuggler](https://crucible.hubbe.net/u/TheJediSmuggler)\
**Post date:** [April 14, 2023, 7:50pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/21 "2023-04-14T19:50:33Z")

</div>

![IMG_4081](https://crucible.hubbe.net/uploads/default/original/2X/9/990881a0b192f7125d1494d298adbfb5cc66431b.jpeg)

This was the diagram I initially used to get Blade ID working in a thin neck saber. This setup didn’t monitor Blade ID constantly though, and adding that second resistor in the emitter can be a little tricky depending on the hilt and chassis. It was said this setup simply helped differentiate between different states with help of Blade ID and resistors.  
I think it kind of mimicks what SnapshotBladeID was supposed to do?

For Proffie V3 though, I don’t think this method would be even necessary 🤔

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [April 14, 2023, 7:53pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/22 "2023-04-14T19:53:04Z")

</div>

With the pullup (or the V3) AND proper resistors everywhere (in the blade and in the grenade section.) I think it should be easy to make a parallel configuration work, and it would be able to tell if the grenade section is connected or not. Of course, you’d have to use the formula for parallel resistors to figure out what values the blades would actually generate:

blade id value = \frac{1}{\frac{1}{grenade id resistor} + \frac{1}{blade id resistor}}

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [April 14, 2023, 8:47pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/23 "2023-04-14T20:47:51Z")

</div>

This circuit diagram is misleading.

1. You have a blade ID resistor in the hilt section, get rid of that.
2. Blade IDs shouldn’t connect to the BP (blade detect) pin. (Unless you short BP to -, then it’s fine.)
3. It doesn’t show a blade ID resistor in the blade.
4. The blade ID resistor in the thin neck section can go either on the “thin neck pcb” or on the “emitter pcb”, or anywhere in between. (Between the black and the green wire.)

It’s probably easiest if the resistor in the thin-neck section is significantly larger than the ones in the blade. Like maybe use a ~47k in the thin-neck section and a ~4.7k in the blade.

---

<div class="post-metadata">

**Author:** ![baldusi](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/baldusi/32/70_2.png) [@baldusi](https://crucible.hubbe.net/u/baldusi)\
**Post date:** [April 14, 2023, 9:13pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/24 "2023-04-14T21:13:11Z")

</div>

@profezzorn there’s something I don’t understand. If I follow the wiring diagram, on the first PCB he lacks a second data pin. And he puts the second PCB in a series config. This would negate any connection to the actual blade, since the Data would just be repeated by the PCB LEDs and thus any blade resistor could not be sensed.  
It would work if he put the second PCB in mirror mode (V2, I think) or if he changed the first PCB to a rotary connector with extra pins.

---

<div class="post-metadata">

**Author:** ![TheJediSmuggler](https://crucible.hubbe.net/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@TheJediSmuggler](https://crucible.hubbe.net/u/TheJediSmuggler)\
**Post date:** [April 14, 2023, 9:16pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/25 "2023-04-14T21:16:46Z")

</div>

I see. I won’t be using that diagram again in any case. A hilt-side Blade ID resistor was seen in the Proffieboard manual, but perhaps it needs to be phased out from the manual?

So to sum up all this info and see if I understood it correctly:

1. To have different “states” (blades, control of all LEDs) in thin neck hilts, I’d need a Blade ID resistor in the grenade and in all my blades (with different values per blade, say ~4.7K and ~6.8K)
2. For standard hilts, only a Blade ID resistor in the blade would suffice
3. For 1 and 2, I can calculate the ID and resistor values with the formula stated above. But ~47K for the grenade/thin-neck section and ~4.7K (or another value for another blade) would be good
4. No SnapshotBladeID would be needed for this method
5. Will the Proffie V3 have constant Blade ID monitoring as a default? According to the POD, I need to use #define BLADE\_ID\_SCAN\_MILLIS 1000 and `#define BLADE_ID_TIMES 10`. But will I also need a `#define BLADE_ID_CLASS` and `#define SHARED_POWER_PINS`? And would this be the same for the Proffie V2?

I think I’ll be needing some new blades if yes to 1. If it can give me the features I was looking for, then it’ll be worth it.

---

<div class="post-metadata">

**Author:** ![TheJediSmuggler](https://crucible.hubbe.net/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@TheJediSmuggler](https://crucible.hubbe.net/u/TheJediSmuggler)\
**Post date:** [April 14, 2023, 9:21pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/26 "2023-04-14T21:21:12Z")

</div>

It was a while ago, but I wired my hilt exactly as the wiring diagram said I should. Through the Serial Monitor and scanid I was able to detect 3 “states”:

1. Chassis-only
2. Chassis inserted
3. Blade inserted

All had different scanid values. The only problem was that the ProffieOS couldn’t instantaneously switch between the 3 states without flipping the kill switch ON or OFF. Someone in the Proffieboard Support Group on Facebook came up with this method and it “worked” for him. I have no clue how it managed to work though.

---

<div class="post-metadata">

**Author:** ![baldusi](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/baldusi/32/70_2.png) [@baldusi](https://crucible.hubbe.net/u/baldusi)\
**Post date:** [April 14, 2023, 9:25pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/27 "2023-04-14T21:25:07Z")

</div>

1. Yes if you want to differentiate between blades. If you have them all pretty close in size, you can get away since the No Blade and Blade Present states are easily distinguished… in theory. Look into my [Constant Blade ID testing thread](https://crucible.hubbe.net/t/proffieos-7-5-beta-testing-blade-id/3178).
2. Again, yes, if you want to differentiate different blades.
3. Theoretically, yes. In practice, you better just test with `scanid` the actual numbers in the serial console.
4. SnapshotBladeID is the method of detection, there are many.
5. Constant Blade ID monitoring is a ProffieOS 7+ feature. V1/2/3 and Teensy should have it (if the hardware allows, only tested them on V2)

---

<div class="post-metadata">

**Author:** ![baldusi](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/baldusi/32/70_2.png) [@baldusi](https://crucible.hubbe.net/u/baldusi)\
**Post date:** [April 14, 2023, 9:27pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/28 "2023-04-14T21:27:47Z")

</div>

The problem is that per default, ProffieOS only reads the BladeID at startup or if a Blade Present pin is short. But now with ProffieOS 7, you don’t need it, you just enable constant monitoring. Incidentally, we have been testing and `#define BLADE_ID_TIMES 10` is not really needed. Unless your Blade ID values have so much noise that the values overlap.  
PD: you should really consider using a rotary connector on the grenade.  
The [Shtok’s Rotary Connector](https://thesaberarmory.com/collections/shtokcustomworx/products/shtokcustomworx-rotary-neopixel-2-button-pcb-connector-set) is excellent, but may be overkill.  
The [Battery and Speaker](https://thesaberarmory.com/collections/shtokcustomworx/products/shtokcustomworx-battery-and-speaker-pcb-connector-set) should work, too. Just use the speaker pins for Data1 and Data2.

---

<div class="post-metadata">

**Author:** ![TheJediSmuggler](https://crucible.hubbe.net/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@TheJediSmuggler](https://crucible.hubbe.net/u/TheJediSmuggler)\
**Post date:** [April 14, 2023, 9:41pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/29 "2023-04-14T21:41:37Z")

</div>

1. And with these resistors, you can also see if a chassis is inserted or not, correct?
2. Yeah, that would be the first thing I’d normally do
3. Cool, good to know constant monitoring can be enabled from ProffieOS7

Using the Rotary connector or Battery/Speaker connectors would be the easiest way to do it. But I’ve been looking for a way to make it work with the NPXL connectors, as I’d like to have some LEDs on top of a chassis. So if all I have to do is add a few resistors to make BladeID work, then I’m willing to try it. Worst case, I’ll just settle for a the non-LED connectors and save the blinkies for the emitter LEDs.

Besides, my current blades have been sanded too much, so it’s a good excuse to build some new ones.

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [April 14, 2023, 9:48pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/30 "2023-04-14T21:48:04Z")

</div>

> [@TheJediSmuggler](#):
>
> I’d need a Blade ID resistor in the grenade

Only needed if you want to have different settings for “thin neck section connected” and “thin neck section” not connected.

Seeing differences between blades without resistors may still work, but there is absolutely no gurantee. You’ll have to try it to see if works.

> [@TheJediSmuggler](#):
>
> Will the Proffie V3 have constant Blade ID monitoring as a default

No, at least not for now, constant blade ID monitoring is a configuration option.

> [@TheJediSmuggler](#):
>
> But will I also need a `#define BLADE_ID_CLASS` and `#define SHARED_POWER_PINS`? And would this be the same for the Proffie V2?

`BLADE_ID_CLASS` is only needed if you want something other than the default. For a V2 board, I would recommend adding a pullup resistor and then use that blade ID class instead, since it is more reliable, for a V3, the default should be fine.

> [@TheJediSmuggler](#):
>
> #define SHARED\_POWER\_PINS

This is generally always needed when running constant blade id scanning, because the power pins are shared by the WS2811 blade class and the scanning code.

> [@TheJediSmuggler](#):
>
> #define BLADE\_ID\_TIMES 10

This one might not be needed unless you see problems with your readings.

---

<div class="post-metadata">

**Author:** ![TheJediSmuggler](https://crucible.hubbe.net/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@TheJediSmuggler](https://crucible.hubbe.net/u/TheJediSmuggler)\
**Post date:** [April 14, 2023, 10:09pm UTC](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847/31 "2023-04-14T22:09:53Z")

</div>

> [@profezzorn](#):
>
> Seeing differences between blades without resistors may still work, but there is absolutely gurantee. You’ll have to try it to see if works.

I see. Well, I guess I can build one new blade with a Blade ID resistor and see if my current blade without resistor can be distinguished. I don’t know how different the values will be between those 16 LEDs on the Shtok V3 connectors and that non-resistored blade though… We’ll see.

Either way, I think I understand it all much better now. Thanks for all the info and clarifications, I learned a lot today! 😃

[Previous page](https://crucible.hubbe.net/t/crazy-idea-of-the-day-constant-blade-id-monitoring/2847.md?page=1)
