WIRING of KY-040 Rotary Encoder plus Demo Code

Do you know a good program for drawing circuts (free that is)?

No. Just attach a hand drawn sketch to the post.