electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Logic puzzle - 4017 sequencer length
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Sun Aug 19, 2018 2:52 am    Post subject: Logic puzzle - 4017 sequencer length Reply with quote  Mark this post and the followings unread

Been pulling my hair out trying to solve this Mad

I've got two 4017's chained to create a 16 step sequencer as per the datasheet. Theres a 16 position rotary switch used to change the sequence length from 1-16 total steps.

Been trying to add a 3 position switch which will allow 3 states:
1. Default to 8 steps
2. Default to 16 steps
3. Sequence length set by rotary switch.

Using a double pole toggle switch (on - off - on).

It's working OK so far except there are two glitches:
1. When in '8 step' mode, if I switch to 'rotary' mode when the sequencer has already passed the step set by the rotary, then the sequencer carries on to 16 before switching to the custom sequence length set by the rotary. (i.e it misses its chance to reset and carries on until the default reset after step 16)

2. When in '16 step' mode, if I switch to '8 step' mode during steps 9-16 then the sequence instantly jumps to step 1 which must be triggered by pin 9 of 4017#1 being held high during steps 9-16. (In 8 step mode 4017#1 resets on pin 9)

What I'd ideally like is for glitch 1 - to reset after 8 steps first
And for glitch 2 - to finish the full 16 steps first

Hope any of this makes sense! Laughing Schematic attached.

Any suggestions whatsover are welcome


Untitled.png
 Description:
 Filesize:  20.5 KB
 Viewed:  486 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Untitled.png


Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Aug 19, 2018 9:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Does it work correctly when using only the rotary switch to select sequence length? That is, do the 8 and 16 glitches stop in rotary switch mode?

If so, then why not eliminate the 8 and 16 switches and just use the rotary?

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Sun Aug 19, 2018 1:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeh it works fine with the rotary on its own.

Maybe you're right perhaps I should just stick with what works
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5599
Location: Moon Base
Audio files: 705

PostPosted: Mon Aug 20, 2018 7:06 am    Post subject: Reply with quote  Mark this post and the followings unread

ah fun another puzzle Very Happy

I will look into it but at first glance I noticed a couple of things:
- pin 1 of the 4069 should have a pulldown resistor
- pin 15 (reset) of 4017 #1 should have a pulldown resistor.
- pin 5 of the 4066 is always high.
- there are a couple of unnecessary diodes.

There also seems to be something wrong with the way the 2 4066 switches are connected to pin 13 (CLKEN) of 4017 #1

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5599
Location: Moon Base
Audio files: 705

PostPosted: Mon Aug 20, 2018 8:07 am    Post subject: Reply with quote  Mark this post and the followings unread

I haven't really looked into how and why it works/doesn't work but I cleaned up the schematic a bit.
I am pretty sure U3b can and rather should be discarded. It can probably also be slightly simplified with a mux.


16_8_custom 4017 sequencer.gif
 Description:
 Filesize:  67.5 KB
 Viewed:  443 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

16_8_custom 4017 sequencer.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Mon Aug 20, 2018 9:03 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm impressed how tidy you made the schematic look Phobos! Shocked

Thankyou for doing that, and for the general sense-check.

I'll go and check my wiring then report back
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5599
Location: Moon Base
Audio files: 705

PostPosted: Mon Aug 20, 2018 10:04 am    Post subject: Reply with quote  Mark this post and the followings unread

I think there might be one or more errors in the schematic you posted as I don't see how the 8/16 step modes could work.
_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Mon Aug 20, 2018 1:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

I better go check Embarassed
Back to top
View user's profile Send private message
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Tue Aug 21, 2018 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK I think I might have it:

Pin 9 of 4017#1 sends a 1 into an AND gate. Pin 3 resets a latch (e.g on a 4027) and Pin 2 sets it again but via a 4066 (normally closed). When the latch is set HIGH it enters the AND gate to let pin 9 reset 4017#1

In rotary mode or 16 step mode, the 4066 is opened and the latch does not get set HIGH by pin 2.

This means that changing modes (e.g from 8 step to rotary steps, or from 16 steps to 8 steps) only happens after the sequencer has reset and has a chance to go past step 2 (pin 2 of 4017#1)

A sorry looking schematic is attached


20180821_235109.jpg
 Description:
 Filesize:  4.35 MB
 Viewed:  409 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

20180821_235109.jpg


Back to top
View user's profile Send private message
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Sat Sep 01, 2018 5:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Finally solved this!
Phobos you were right - my first schematic wouldn't have worked. I'd drawn it wrong Confused

The reason it glitched when going from 8step to rotary modes was if the sequence was already past the rotary reset point, then the sequencer had no instruction to reset itself.

The reason the sequencer reset when changing from 16step to 8step mode was that the clock inhibit on 4017#1 was being sent low by changing to 8step mode. This started the clock again on 4017#1 which reset itself after pin 11 (after all 10 steps of the 4017 had finished) which reset the whole sequencer.

I fixed this using latches for both: set on step 1 and reset on step 2 but only when in certain modes. For this i just used a 4066 switch to either allow or prevent the latch from resetting itself.

This meant that changing modes only happens once the previous mode has run full cycle and can be set again on step 1.

Bit of a pointless post tbh Very Happy but I was really pleased!
I'll do a schematic later
Back to top
View user's profile Send private message
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Sun Sep 02, 2018 3:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Here's the schematic. Hope it makes sense. If anyone can spot any redundant parts please let me know.


4017_sequencer.pdf
 Description:

Download
 Filename:  4017_sequencer.pdf
 Filesize:  54.06 KB
 Downloaded:  406 Time(s)

Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5599
Location: Moon Base
Audio files: 705

PostPosted: Sun Sep 02, 2018 8:29 am    Post subject: Reply with quote  Mark this post and the followings unread

I only glanced at it and did spot some things but instead of redrawing it I think I will make a thread with some guidelines
for designing digital circuits. Then you can first try to clean it up yourself which I think would be more helpful.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5599
Location: Moon Base
Audio files: 705

PostPosted: Sun Sep 02, 2018 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

ok, I made a thread which might help you a bit.

http://electro-music.com/forum/topic-70288.html

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CHRISKELLY



Joined: Apr 08, 2018
Posts: 103
Location: England
Audio files: 3

PostPosted: Mon Sep 03, 2018 1:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Phobos. Good of you to put all that info together
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use