🧡 How to make simple cable drawings using Wireviz (detailed manual)?

Introduction

If you designing electronic devices sooner or later you need a cables for connection any external modules (sensors, buttons, lights...) πŸ™„

High-level developers have a full assembly of device, including each cable drawing with each wire, terminal, housing, terminals.
ImageImage

➑ But for DIY or small project we can't afford it, so for documentation you can take a look at the light text-base tool Wireviz.

Installing

1) Install Python on your system (if not installed):

Image

2) Open the command prompt (Win + R β†’ type cmd):

  1. cmd

Image

Install WireViz with following command:

  1. pip3 install wireviz

Image

3) Download GraphViz (required for WireViz to generate graphics).Β 

Image

❗ If GraphViz not installed you'll get error:

failed to execute WindowsPath('dot'), make sure the GraphViz executables are on your system PATH

To make it open official site and download the latest version:

Image

Unzip downloaded archive:

Image

Press Win and search for Edit the system environmental variables:

Image

Open System Properties and press on Environmental Variables:

Image

In theSystem variables list find Path, click on it and press Edit...

Image

Then press New and specify path to the earlier unzipped folder with software:

Image

To verify, run:

  1. wireviz --version

Image

βœ” Installation was successful, the installed version of WireViz is visible in the terminal.

Example

This is a simple custom cable forΒ oscilloscope that I typically use for pin headers, wires or low-frequency signals:ImageIt's pretty clear how to make it using ordinary table, but remember, that is just example and special drawing will be much more technically correct:

BNC28AWG RD

RED CLIP

28AWG YE

BLACK CLIP

Using

Open any folder and download or create (Right Click -> New -> Text Document) a .yml file there called WRD.yml with the following content:

  1. metadata:
  2.  
  3. title: BNC <-> CLIPS
  4. pn: DEV-CBL-001-R01
  5.  
  6. authors:
  7. Created:
  8. name: Refcircuit.Com
  9. date: 2025-06-18
  10. Approved:
  11. name: Refcircuit.Com
  12. date: 2025-06-18
  13.  
  14. revisions:
  15. A:
  16. name: Refcircuit.Com
  17. date: 2025-06-18
  18. changelog: Initial commit
  19.  
  20. template:
  21. name: din-6771
  22. sheetsize: A3
  23.  
  24. connectors:
  25.  
  26. X_CLIP_VCC: &clip_t # https://lcsc.com/product-detail/Banana-Connectors-Alligator-Clips_Changzhou-Amass-Elec-20-135-1_C99180.html
  27. pinlabels: [VCC]
  28. type: Test Clip Red Banana Connectors
  29. manufacturer: Changzhou Amass Elec
  30. mpn: 20.135.1
  31. supplier: lcsc.com
  32. spn: C99180
  33. subtype: male
  34. color: RD
  35. image:
  36. src: IMG/20.135.1.png
  37.  
  38. X_CLIP_GND: # https://lcsc.com/product-detail/Banana-Connectors-Alligator-Clips_Changzhou-Amass-Elec-20-135-2_C99181.html
  39. <<: *clip_t
  40. pinlabels: [GND]
  41. type: Test Clip Black Banana Connector
  42. mpn: 20.135.2
  43. spn: C99181
  44. color: BK
  45. image:
  46. src: IMG/20.135.2.png
  47.  
  48. X_BNC_SCREW: # https://grobotronics.com/bnc-connector-male-screw-terminal.html
  49. pinlabels: [VCC, GND]
  50. type: BNC Connector Male - Screw Terminal
  51. manufacturer: PRC
  52. mpn: 20.135.1
  53. supplier: grobotronics.com
  54. spn: 39-00011844
  55. subtype: male
  56. color: BK
  57. image:
  58. src: IMG/BNC-SCREW-TERM-MALE.png
  59.  
  60. cables:
  61.  
  62. C:
  63. colors: [RD, BK] # number of wires implicit in color list
  64. gauge: 0.25 mm2 # also accepts AWG as unit
  65. show_equiv: true # auto-calculate AWG equivalent from metric gauge
  66. length: 0.4 # length in m
  67. shield: false
  68. mpn: UL1007-24AWG
  69.  
  70. connections:
  71. -
  72. - X_BNC_SCREW: [1]
  73. - C.C1: [1]
  74. - X_CLIP_VCC: [1]
  75. -
  76. - X_BNC_SCREW: [2]
  77. - C.C1: [2]
  78. - X_CLIP_GND: [1]
  79.  

Also create an IMG folder and add the .png images of used parts there (this is optional):

Image

Next, in the path line, write cmd and press Enter to open the terminal directly in the folder (so that you don’t have to specify the path manually):

Image

Write the name of the script and the name of the file together with the extension, press Enter:

  1. wireviz WRD.yml

Image

Several files should be generated, as indicated by the message in the terminal window and the files themselves:

Image

Let's check them, they all open and can already be used (.pdf):

Image

Download Example

  1. GitHub: https://github.com/Egoruch/WIREVIZ-BNC-CLIP-CABLE
  2. Server (directly): wireviz_wiring_diagram.zip

Image

Conclusions

🟒Technical documenting is very important for precise and high repeatability
🟒Because Wireviz it's text-made the generated result (drawing) looks very similar to from any engineer
🟠You should often generate drawing to check result because it's pretty easy to make mistake in .yml file

Image

176
No comments yet. Be the first to add a comment!
Cookies?