Something new I built - fun with decade counters

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: lisa, luketeaford, Kent, Joe.

Post Reply
User avatar
guest
Super Deluxe Wiggler
Posts: 4223
Joined: Mon Aug 19, 2013 11:49 am

Re: Something new I built - fun with decade counters

Post by guest » Thu Jun 04, 2020 8:05 pm

yeah, to get the full clock rate out of the atmega you need to run it at 5V. when i did my stompshield for arduino, i used a 3.9k and 3.9nF RC right before the ADC and it worked really well. the 3.9nF was just big enough to not effect the S/H voltage too much, but small enough to not load down the CMOS opamps i was using. the 3.9k for antialiasing sort of makes some of that moot anyways.
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 05, 2020 10:58 am

Good stuff guys. Thanks.

I will look at RC filtering before the ADC here. I will let you know how the 20MHz crystal goes. Should be showing up next week. I have it all hooked up on the bread board now sans arduino and have successfully loaded the boatloader and programs onto the bare 328P with a FTDI cable.

Also waiting on a multi-LED SPI driver because I just realized the Nano for some reason has 2 more pins than the Uno, so I was maxing them out using sepearte pins to drive all the LEDs with a regular shift register, so I had to consolidate and use the SPI chip for the LEDs since you can obviously daisy chain SPI stuff.

I am running the 328 at 5V btw. Already using 5V for the 3340 so I have that onboard anyway.

User avatar
EATyourGUITAR
has no life
Posts: 4854
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Re: Something new I built - fun with decade counters

Post by EATyourGUITAR » Fri Jun 05, 2020 11:05 am

How did you flash a bootloader to a 328P that has no bootloader without using an ISP/ICSP programmer? FTDI= RS232= UART.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 05, 2020 12:20 pm

You have to put the arduino boatloader on the chips using another Arduino. :D Then it's ready to be ISP'd.

User avatar
EATyourGUITAR
has no life
Posts: 4854
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Re: Something new I built - fun with decade counters

Post by EATyourGUITAR » Fri Jun 05, 2020 12:23 pm

I think you said it backwards. You need another Arduino to flash the bootloader over ISP using the Arduino in AVRISP mode with the AVRISP sketch loaded. Then after you have the bootloader you can use FTDI.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 05, 2020 1:11 pm

EATyourGUITAR wrote:
Fri Jun 05, 2020 12:23 pm
I think you said it backwards. You need another Arduino to flash the bootloader over ISP using the Arduino in AVRISP mode with the AVRISP sketch loaded. Then after you have the bootloader you can use FTDI.
Bingo! :doh:

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Mon Jun 08, 2020 12:28 pm

Took a crack at a panel for this guy today:

I'm pretty happy with the layout, only thing I'm not sure about so far is the "N" on the S/H selector. I couldn't fit much in there. The N would be Noise. The A and B are of course(?) the signals from Mod A and Mod B.
TS0_Panelrender_00.JPG
You do not have the required permissions to view the files attached to this post.

User avatar
guest
Super Deluxe Wiggler
Posts: 4223
Joined: Mon Aug 19, 2013 11:49 am

Re: Something new I built - fun with decade counters

Post by guest » Mon Jun 08, 2020 4:27 pm

you could put "noise" under the switch, and maybe run a little line if it isnt clear enough.
openmusiclabs.com

KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Mon Jun 08, 2020 6:45 pm

:agree: A capital "J" horizontal 'cane-hook' line would go well with the other graphics you already have in place too.

I would also -for sure!- put the store button on the *other* side of the LEDs from the Preset. Preset on left, LEDs, Store button or right. The way it is now you *will* accidentally hit it when trying to choose a Preset.

Nice looking module!

User avatar
Tonescape
Wiggling with Experience
Posts: 278
Joined: Tue Jan 27, 2015 10:18 am
Location: Denmark
Contact:

Re: Something new I built - fun with decade counters

Post by Tonescape » Tue Jun 09, 2020 2:17 am

The N makes perfect sense to me, I can't see any real issues with that solution. If you want to keep the same form factor, but make it obvious that it is noise, you could go with a pictogram.

Could you make a render straight on? It's a bit hard to assess the balance at that angel and orthogonal view 🙂

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Tue Jun 09, 2020 10:37 am

Sweet, thanks for the feedback guys. I'm gonna play with the switch some more and switch those buttons as KSS said (I had thought about that. :D), and make a new render of it with normal view.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Wed Jun 10, 2020 11:41 am

After playing around some more, I think it might be more useful to just ditch the input which allows triggering of the S&H, and just have S&H mode by free-running by the main clock VCO. Then the lower right button can toggle between free-running or holding the current sample. Saves a bit of panel space too and declutters that area a little bit.

OH yeah, also I tried playing with the 20MHz crystals, but I did not realize one needs to compile a new boatloader for this to work! If you don't, like I did, the FTDI connection loses sync and the Arduino IDE starts complaining, and you have to close it. Then you open Arduino and it instantly crashes because it has somehow currupted /users/Library/.../Arduino15/. Delete this folder and it works again...had to dig through forum posts to get to the bottom of that. Ayiyi!!

Once i get the code a little more dialed in I'll try it at 20MHz after making the bootloader.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Thu Jun 11, 2020 4:35 pm

Got the S/H mode programmed now to toggle between holding whatever last sampled, and continuous sampling. This works well, and I think this is the way to go. I will make some code to make the S/H mode LED blink at a slow rate when sampling and go solid when held or something like that.

With the extra jack dispensed with, I was able to let the S/H selector switch text breathe more. I like this a lot better. Also implemented the suggested changes. Here's a front-on render with no perspective mode:
TS0_Panelrender_01.JPG
You do not have the required permissions to view the files attached to this post.

KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Thu Jun 11, 2020 5:01 pm

Store button still right next to Preset??

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Thu Jun 11, 2020 5:40 pm

KSS wrote:
Thu Jun 11, 2020 5:01 pm
Store button still right next to Preset??
You have to hold it down 2 seconds though or it does nothing. Figured that is safety enough?

I guess I could move it over to the right of the 5 LEDs and then shift those over? :hmm:

KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Thu Jun 11, 2020 5:48 pm

As before said, even 1 second holds are a *major* PITA. Long press mode changes are the bane of modern synths.
Yes, slip it far right, slide the LEDs left and shorten the hold time considerably. 1/2s maybe? Still requires a deliberate touch, but not WTF does this take so long. It's mere ocation makes it safe, instead of relying on a long-press crutch. Right next to the knob, with nothing else nearby, you have to want to press it.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 12, 2020 11:12 am

Great point. I'll do just that.

Yesterday I had 2 other good accomplishments:
1) I made code for the EEPROM so now the preset arrays are pulled out of EEPROM at start up and also the store function writes to EEPROM. I also stored the "factory presets" (triangle, saw, etc..) in a seperate block of EEPROM so that there will be a long button press sequence (this time I think it's OK :D) to reset all of the presets to the defaults.

2) I realized that in free-running S&H mode, the unit works as kind of a cool bit crusher effect if you feed it audio. I will put a video up when I get a chance. But, basically it's like a real time 8 bit sampler with adjustable sample rate that is clocked by the main frequency.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 12, 2020 11:28 am

S&H mode with a kick drum passed through it (clicking sound about halfway is changing the range of the function generator currently serving as the main VCO on the breadbard to a higher one):


KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Fri Jun 12, 2020 3:28 pm

Complaint seen most often about digital modules is not coming up in the last condition when shut down. Instead coming up always in some default state, completely or somewhat ignoring what was set up last time at shutdown. Avoid that and your modules has better chance of success.

Agree a LOOoong press to restore defaults is OK.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 12, 2020 5:08 pm

That's a good point on the start up condition. I think I can implement this without too much trouble. That's the nice thing about microcontrollers, you can make quite a bif of changes for "free", as in not having to modify a board or change a component.

And, Store button has been moved!:
TS0_Panelrender_02.JPG
You do not have the required permissions to view the files attached to this post.

KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Fri Jun 12, 2020 6:11 pm

:tu:

Looks like a long press could give you 64 presets! :hihi:

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Fri Jun 12, 2020 8:35 pm

KSS wrote:
Fri Jun 12, 2020 6:11 pm
:tu:

Looks like a long press could give you 64 presets! :hihi:
Uh, oh, you gotta stop giving me ideas! :lol: :lol:

So, I already got the setup memory stuff done. Works like a charm. Turn it off, and it comes back just the way ya left it! Also, I shortened the preset store a lot (it's a little under a second now. Feels about right). The recall factory preset code is working too. The sequence is you go into S&H mode, then toggle to hold, and then hold the S/H button down for 3 seconds. The S&H led will begin to blink slowly. Release, then the factory presets will be pulled out of EEPROM and the S&H LED blinks rapidly for a short time, and then it's ready to rock. :tu:

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Tue Jun 16, 2020 11:06 am

Started laying out the boards for the next prototytpe. For Thru-Hole (mostly), it is now a 3 PCB stack. The middle board is basically all digital stuff (the ATMEGA, the DAC, the pots MUX, and the LED driver IC, as well as the +5/-5V regulators. The rear PCB is all the analog stuff from the first proto (the segement MUX, the counter, all the summing amps, and the 3340.

I'm pretty happy with the way the S&H system works now and am giving up on worrying about OCing the ATMEGA328P for now, because it's more complicated than one would think. The problem is that in 2016 or so, Atmel made a revision (K) to REMOVE the full-swing crystal circuit, so you don't have the correct fuse bit settings to go past 16MHz unless you have a chip made before some point in 2015 IIRC. So, f**k it. It's honestly pretty smooth for anything under 10KHz or so, which is fine, IMO.

I also used the last input on the uC and the 2nd pole on the S&H selector switch to tell the uC when the S&H source is noise, so that instead of running the continuous, max speed loop in noise mode, it samples segments 1-12 from noise, THEN dumps that to the DAC, all at a "LFO" rate that you can select by moving slider #1. This way, you don't just hear straight noise, but you get an ever-changing random waveform that updates at a speed you desire (or paused with the S/H button same as if Mod A or Mod B was selected).

KSS
Super Deluxe Wiggler
Posts: 2482
Joined: Mon Jan 25, 2016 7:28 am

Re: Something new I built - fun with decade counters

Post by KSS » Tue Jun 16, 2020 1:29 pm

Sounds cool! Or rather *reads* like it will sound -and in use, play- cool! ;)

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1451
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: Something new I built - fun with decade counters

Post by devinw1 » Sat Jun 27, 2020 11:08 pm

Got the new boards built up and everything seems to work as expected! I spent the day installing a new door on my shop so no time for synthing but I should have some demos and such tomorrow or soon I hope.

Here's the build; there's a digital board (mostly) with the +/-5V supplies, and then the new analog board (which is a lot like the beta 1 prototype only it's using the MUX506. :tu:

[attachment=0]IMG_20200626_173453.jpg[/attachment]
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Music Tech DIY”