Sometimes the cleanest way to design a nice readable schematic in Proteus is to create a separate model with its own graphical symbol with pins attached to this model, not the fastest way but a kind of proper approach within a normal working process.
I was interested in the encoder as you may know, which is not available in the standard proteus component library, starting from a simple drawing of the symbol I would like to use at higher levels:
Don’t forget to add the right pins on the symbol, they are all in the menu item called “device pins”.
Then we need to save our new device in the library, to do so we should highlight the whole thing, then make a right-click and “Create a device”. Then all is kind of intuitive and easy to follow steps.
I built the encoder by principles I described in the previous article – two signals shifted by a certain phase. First of all, let’s create the emulator of such signals:
Shortly about the emulator: 3 sources of CMOS pulses, p90 has 90 degrees shift from p0, p180, as you can think, has 270 degrees heh (don’t ask why I called it p180, I don’t remember). Outputs have p0 and p90, or p0 and p180. Pins Up and Down are dedicated for the button connections, A and B – encoder pins.
The frequency I used is 50Hz, I thought it should be fast enough for even quite an impulsive person, rotating the know.
Now create the schematic, insert the encoder device and agree to “connect hierarchical module”. Then right-click the model and move to sub-schematic. Here inserting our emulator with relays, and it is done.
The model can be found here.