3D-Resistor Color Bands

3D-Resistors with Color Bands

Only useful for Graphic ‘Show & Tell’ but, thinking about Resistors that I commonly use, I jimmied-up a quick 3-Click process in FreeCad for setting Color-Bands and exporting Step files. Perhaps I’ll make a FreeCad plugin for it (TBD).

The pool of Resistors I use in hobby projects is a small handful but, if other Users are interested, as time permits, I’ll create more… I won’t make a career of it but, easy enough to do from a list of requests, if interested

My Baseline resistor is:
Body-Length = 6.3mm
Diameter = 2.5mm
Pitch ≈ 7.62
Leg-Length =
Resistance = tbd

4 Color-Bands and/or Tolerance Band - I won’t bother (I don’t need them)

If you post requested BDPLR values, I’ll make them while the BlackCoffee keeps pouring (no rush…)

Example of 10kΩ

10kΩ.step (40.2 KB)

2 Likes

I think leg length is too long. It will stick out too much on the other side.
Other than that - great job!
I can contribute with other band colours if there will be many people interested in using them.

Indeed, they are (that’s the way I like them - all of my models are consistent). However, if Users request a Length, I’ll do it…

1 Like

Personally I think this is a great idea :grinning: and I would love the plugin if you find the time.
:mouse:

1 Like

Related, have a look at:

I could probably reduce the WRL file size but, I see no reason to use WRL’s. Yes, the WRL images are a bit nicer but the WRL is not usable beyond photos.

Thus, I’ll stick with STEP.

For the 10kΩ resistor;
The Step file is 41kb
The Wrl file is 1.4Meg

Screen Shot 2023-02-01 at 07.36.26

1 Like

Very good, colourfull 3d models are great.

To be able to use it in kicad you then need not only one symbol and 3d-model per resistor, but also a dedicated footprint right? or is there any consistent way around that because that sounds like a lot of pain in managing :sweat_smile:

Thank you ‘all’ for interest and I welcome ideas and questions…

There are a few ways to handle doing this and I haven’t decided which but, thus far, this is what I’ve been thinking:

• Plugin or Stand-Alone App? (either but, most likely Stand-Alone that can also be run from a Kicad Plugin)

• User makes Footprint (or I will provide one ?) but it will use my Step file

• GUI Pop-up panel with Check-Boxes to select Colors for each Color-Band. User selects the colors and clicks button to change the colors on the baseline resistor used in the Footprint (and it will be reflected in Kicad’s 3D-Viewer)

My intention is to have the code change the colors of resistor in the placed footprint rather than to change colors of library step files (that will reduce the quantity of step files to only a few baselines) so, only the Step used in the footprint will contain color change

Haven’t spent much time on this yet but I have succeed in identifying what I need to do with the Step files… image below shows my prototype file for testing (posted only to show I’ve been doing something beyond thinking…)

I may have a GUI panel for testing soon…

1 Like

Next step is finishing the GUI:

Below is the current layout (prelim, especially the Blue Background :rofl:) - how important is it to Display the Band’s Value? (colors are good enough for me but I’ll entertain adding Values if enough interest…)

Thanks

2 Likes

Looking great to me and I personally don’t need the numbers but some might though :smiley:

Hello, I am not sure if this has already been proposed:

If I want to show a THT-DIP IC WITH socket I select BOTH 3D models and superimpose them virtually plugging the IC into the socket.

For resistors one might use 10 or more 3D color rings scaled over the desired resistor shape ? These rings would cover all codes and all cylindrical resistors !?

OK, I confess this means a lot of additional work :smiling_face:

Chris

That’s actually very good idea @chris9 :+1:

The only disadvantage are diameters of THT resistors and the rings for each colour should be made for each available resistor diameter.

Other than that it sounds like everyone can apply it easily to own projects if needed.

Thank you for the compliment, makes a dull monday much better ! :hugs:

I imagined it should be possible using the X/Y/Z scaling possibilities in KiCad. I use them to modify ELKOs in 3D. Its not always perfekt but for color rings it might be good enough ?

Again, it IS manual work, but on the other hand, THT-resistors aren t THAT many today.

Oh yes. Sorry, forgot about scaling. That should work indeed. I usually just use rotating and offset :slight_smile:

Several creative ideas/approaches to accomplishing Colored Rings…

For my approach, I chose to simply make Footprints with a single ‘edited’ STEP file and to Edit the step file via an App I’m coding.

That way, no worry about different diameters, scaling or body lengths and some resistors have non-uniform end-swells.

I’ve gone through several iterations and coding is in process (not rushing so, a few more days and several more cups of coffee…).

But, below is the current GUI. I decided there is no need for the App to make new Footprint; using a step with colored bands is straight forward and Users will be able to simply change the 3D-step in their existing or, new footprints. And, can do it from a Kicad Plugin or Stand-Alone App.

UPDATED: Added Video of Preliminary App - next step is to finish the STEP file work and perhaps add the Resistance Value to lower-left corner (tbd)…

1 Like

I’ve considered this topic aswell, but my only conclusion was: if I’m going to do this at all, I’m going to do it big, once and for all. The color-banded multi-pitched multi-bodysize resistor STEP model generator to rule them all.

Then I thought it through, and quickly parked the idea in the fridge again :slight_smile:

I might be missing something, but why create an app to manually create/change color bands? With the emphasis on manual. Is this for ‘just a few values’ ( I know how that goes…) or in order to generate massive libraries? Or to avoid using an MCAD tool?

Out of the gate:

• User Creates a Footprint the usual way and adds a 3D STEP file to the Footprint the usual way.
A Baseline STEP that I will provide will be the Only one that will work (because I add code-hooks)

• Then, User changes the Colors of the Baseline and saves as New Step
(or, saves-as if just changing an existing colored STEP. Saving will enable saving with custom name such as, “R_20kΩ_qtrW”

User can build a Library of the colored Baseline’s with desired names…

Pretty simple and I’ve already made the Kicad Plugin but, will prefer to have the Plugin call the Stand-Alone App, rather than run the full python code (will need changing only one line of plugin-code)…

Though preliminary, I generated a Stand-Alone App and set the Plugin to call it… just to give the idea to kick around :laughing:

Is it possible to read the resistance value and make bands accordingly? Options: manual, like here, and automatic like I suggested. Then of course there are more options: how many color bands there are in the real physical resistor.

Yes, it’s very possible to ‘read’(then parse) resistance input and use it for selecting the Bands/Colors and I thought about including it, as well as displaying the selected values. In fact, there are a number of things I considered but…

I decided to not make a career of this project - I wanted to keep it simple. My only goal was/is to change the colors in a straight-forward way and avoid code that may keep me re-visiting various user’s ‘system’ problems.

In fact, though I hope the Stand-Alone app will not have problems on Windows and Linux; I no longer have machines with those systems so, I can’t go through the full process of testing. If it works for some folks and not for others, I’m okay with that.

But, I may use the Lower-Left corner for an Input and Display field… depends on the amount of Caffeine on a given day :rofl: