Soulsby Synths Forum

Products => miniAtmegatron => Topic started by: veryfungi on November 25, 2017, 03:17:56 PM

Title: Is Miniatmegatron open source?
Post by: veryfungi on November 25, 2017, 03:17:56 PM
Hello,

I want to make my own miniatmegatron like device. Is it open source, and or, would you be willing to help at all? I think I have it mostly, but I need to know if the pots increase voltage with clockwise, or counterclockwise rotation. Thanks!
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on November 25, 2017, 03:33:46 PM
Hi yes all code  is open source and on github: https://github.com/soulsbysynths (https://github.com/soulsbysynths)
However someone has just alerted me that there is an issue with latest mini libraries.  If you download v2.6 you'll be OK.  Will hope to have working libraries up to date by next week.
thanks
Paul
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on November 25, 2017, 03:35:37 PM
and pots turn clockwise! So fully clockwise will be read as 255 and fully anticlockwise is 0.
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on November 25, 2017, 03:55:54 PM
Thank you so much. :D You're the best!
Title: Re: Is Miniatmegatron open source?
Post by: bobo on December 02, 2017, 10:40:48 AM
Have you made any progress customizing the arduino code? I succeeded in getting the miniAtmegatron working on my Arduino nano with v2.6 of the libraries (thank you Paul!). But as an Arduino beginner I don't have a clue where to start. I am used to the structure of .ino files. But the .ino file for the miniAtmegatron is almost empty, so everything appears to be happening in the libraries. But which library do I start with? Min? Or MinEngine? I understand the function of libraries for subroutines like behaviour of pots of oscillators. But where is the main program flow hiding?
Would be glad to hear some clues on this.
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on December 03, 2017, 10:13:27 PM
Hi - I'll do a little chart showing how the classes all interact with each other.  It's pretty easy once you know this.  The .ino file is just a holder for uploading the project.  All the work is done in the classes now.   Will hopefully add the diagram tomorrow.
Title: Re: Is Miniatmegatron open source?
Post by: bobo on December 05, 2017, 10:09:22 PM
Thanks very much Paul! For the update of the libraries (dind't try it yet) and for the diagrams. At least I found a new folder in github called "docs" which contains an html that opens a lot of info on the classes, files and interaction. This looks very complex for a beginning programmer..  :-\
I thought of the following customizations:
a. add a single din midi in (thru optocoupler)
b. add five pots so you dont need the switch
c. I will need a multiplexer for freeing up digital (a) and analog pins (b)

And if and when I succeed in all that I would like to try to add a 2x16 I2C lcd screen, to replace the 2 multicoloured leds.

I am going to study your diagrams.
Any hints where to start are off course very welcome :)
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on December 07, 2017, 05:20:39 PM
Yes, that's work in-progress.  Still trying to find a way to publish it properly.  Also, I think there's possibly too many diagrams, it makes it look more complex than it is!
Start with the Min class.  That contains a hardware class and engine class. The hardware class handles the electronics, the engine is the processing for the generating audio.  Both of those classes generate events.  The job of the Min class is to pass events between the hardware and engine class.  The idea is that the hardware and engine can be totally independent, so you can port different audio engines to different hardware interfaces really easily.
R.e. your customisations.
a)  Yes totally possible. Even can use a Sparkfun MIDI shield (don't connect the buttons or pots though)
b)  You'll need to remove pots on A4 & A5 as they use the I2C bus.  Then add an external I2C ADC chip.  If you look at the code for the Oscitron Hardware, you'll see how to do this with a Microchip MCP3208 ADC.  So 8 of the pots will come off the MCP3208 and 4 off the Atmega328.  That frees up A4 & A5 to use for the I2C to drive the ADC.
c)  See above.  Just free up A4 & A5 and use the I2C bus.  Then adding an I2C screen at a later date is easy too!

Hope this helps as a starting point!
Title: Re: Is Miniatmegatron open source?
Post by: bobo on December 07, 2017, 06:22:53 PM
This helps enormously, thanks. I don't know the MCP3208 ADC. I planned to:
- remove the RGB LEDs, that frees up pins D5, D6, D9, D10 and D11, and remove the switch, that frees pin D2
- add a multiplexer 74HC4051 which takes 3 digital pins and one analog pin (A3), then 8 pots go to the multiplexer and 3 stay on A0,A1,A2
- A4, A5 are ready to act as SDA and SCL to connect to the LCD 1602 board

That leaves me with 3 free digital pins for further expansion.

That seems easy.  :)
Now the software - not so easy  :'(
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on December 26, 2017, 10:00:44 PM
Hi Guys, I wanted to do an update to my project. A little background. I have been amazed by synths since I was 14. I was very poor and although I did make a few things back in the day, they were really basic. Fast forward from 1975 to now. I have the time and resources to finally make a cool synth. I wanted to start by making one of these and move on from there making a full modular synth myself. When I started working on the pcb I was also researching where synths are nowadays. I learned about eurorack and decided that was the direction I would go. I know the miniAtmegatron isn't a true synthesizer module, but I wanted to get accustomed to making eurorack pcb's and faceplates anyway, so I decided to make the miniAtmegatron into a eurorack format. I have the pcb pretty much ready to order, and a pretty good idea what I want the faceplate to look like. The only modification I made was to remove the 22uF cap, and add in a TL702 in a level shifting amp. The schematic is a mess on paper, but it's basically powered by +/-12vdc + input goes to voltage divider providing 2.5vdc. signal enters through a 50k on - input and 100k feedback to - input. Then the 22uF cap added back to the output. Trying to convert 0-5 into +/-5. I will post a schematic soon. :)

On the aspect of getting more pots on there. Why not add an i2c a2d with 12-16 channels and be done with it. It would have to make coding simpler.

Um can't find a way to tell this thing to upload the images...
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on December 26, 2017, 10:04:45 PM
forgot to mention, it's hp-20

I will share the files as well.
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on December 26, 2017, 10:13:41 PM
128k max jpg is hard to do. lol
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on December 28, 2017, 12:26:36 PM
Wow I didn't even know about that setting - that's bonkers!  I've located it and updated it to a luxurious 1Mb per pic!

Nice PCB - that's got me think about the possibility of an expander board that allows CV control over the parameters. I'd be tempted to put the Arduino serial pins (digital 0 and 1) on a 2 pin header that can be added as an option. This would then allow an expander unit to be connected which would provide more modular friendly inputs.  Use the 6 analogue inputs for CV and some of the free digital inputs for gates.  Then convert them to MIDI CCs which is transmitted over serial to the Euro-Mini.

I might even be tempted to develop that next year if there was a demand for Eurorack miniAtmegatrons! Def worth sticking 2 pads on the PCB for pins 0 and 1 (on a standard 2.54mm 2-way header).

Anyway, just a thought!
Paul
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on December 29, 2017, 01:30:05 AM
Hi Paul,

Thanks for your help. I had already ordered my pc boards, I should have them in a few days. After I verify it works I would gladly share the files. I can provide the gerber files or the eagle files. Bear in mind I just tossed the board together and didn't start with a schematic first. Lesson learned.

I can add the pads for serial no problem, and any other mods needed. I may start over in eagle with a proper schematic. :) I did want to ask you. In an effort to make it a bit more eurorack standard, I wanted to convert the 0-5v audio to 5vpp. I made the board in a way that it can be wired in two ways. It's been a really long time since I studied op amp circuits. It can be wired to pass the dc to the 702 with 2.5vdc on the + input, or put in a capacitor in place of J1, jumper R2 and leave R1 out. Which method would you recommend?

PC boards are really cheap. I have time to work on it, and it looks like fun. Thanks
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 03, 2018, 03:18:42 PM
I was hoping to show off my pc boards, but they are stuck in Chicago with the terrible roads due to the snow and cold. :(

Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 03, 2018, 07:12:10 PM
They arrived after all. :)

I got these 10 pcb's for $5 delivered, in 5 days. Not kidding. www.allpcb.com

I'm still waiting for all the parts to come in. Making progress. Yay!
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on January 05, 2018, 05:31:16 PM
Ah yes - I've also had a few delivery issues over Xmas :(
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 08, 2018, 02:13:41 AM
Hey there Paul,

I'm putting this together and everything is working out well. I am almost ready to test it. Thought I'd share some photos of it. I'm hoping to get some cool sounds from this little project. :) The panel is laser plastic and I noticed the text is too dark in the upper box. I will fix it. I'll make an aluminum panel for it once my workshop is warmer.
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 09, 2018, 05:26:50 PM
I did the face plate over and adjusted the laser settings. I think I like the black better than faux aluminum. Next step is to install the program and start testing. I left off the components for the level shifting and will breadboard the amp first. After it's tested I will populate the board and solder them in. Do you have any input on the circuitry I asked about?
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on January 10, 2018, 10:01:44 PM
Looking really good! The mini uses the big cap as a cheap and easy way to remove the dc bias on the audio output. Considering Eurorack has dual power lines, I'd definitely recommend going to down the route of using the opamp to bias the audio properly.  However you won't need the cap before that stage, you'd want it at the output, along with a 1k resistor, as Eurorack has a standard of  1k output impedance.
Attached is the Oscitron output stage for your reference.  Very similar to yours apart from I derived the 2.5V using a voltage ref. Hope this helps!
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 11, 2018, 09:47:22 PM
Hi Paul, thanks so much!

Today I had set a side some time to test the little bugger. I was surprised about the hex file instead of a normal ino file. I expect it's due to some assembly language code inside the program. Unfortunately the guide I found online didn't work. It instructed me to turn on verbose when uploadig, looking at the actual command it uses and to replace the file locating of the hex file with your file. I used the command prompt, but there was an error, it could not fine a command at c: bla bla. Is there a better way? Thanks
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on January 11, 2018, 11:10:03 PM
You can download all the libraries: https://github.com/soulsbysynths/libraries (https://github.com/soulsbysynths/libraries)
and .ino: https://github.com/soulsbysynths/SsMinMiniAtmegatron (https://github.com/soulsbysynths/SsMinMiniAtmegatron)

or just use Easy Uploader and the .hex file.  It'll def work with any Arduino Uno. I assume you've installed the Arduino IDE which has the Uno drivers.
Click "show console" and copy and paste the error and I'll tell you the issue.
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 12, 2018, 05:48:43 PM
I'm sorry to bother you, this should be easy. I put "easy uploader arduino hex" into google and it laughs at me. I can not find anything called easy uploader. I followed the instructions here, https://forum.arduino.cc/index.php?topic=410618.0

I was using admin command prompt, not power command, so I had to type it in perfectly, which I did, and it basically said windows does not recognize "C:\Arduino\hardware/tools/avr/bin/avrdude as a command. I do want to use the hex file because I am not a programmer at all.

I also don't know which of the two versions I should try. I used the only schematic I could find but now see there were two versions of the circuit board. I really appreciate your help.

Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on January 13, 2018, 11:58:30 PM
Hi - just follow the instuctions on the Downloads page! http://soulsbysynths.com/miniatmegatron-downloads/ (http://soulsbysynths.com/miniatmegatron-downloads/)  It's really easy and doesn't take long.  All downloads are on that page (Easy Uploader and the hexs)
Also a tutorial video here: https://youtu.be/07cy_KiLm8k (https://youtu.be/07cy_KiLm8k)
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 19, 2018, 11:32:21 PM
I'm such a nit wit, I never even thought to look for it on your website. Like duh...  :p

I got the code uploaded... It was, uh, easy. :) I now have a blue LED on the left and a green/red flashing led on the right. Yippy :D They are so bright! I need to swap out some resistors.

I used the version 2 of the code, not sure if it matters, and if it does, what it effects. I need to connect it to an amp and print the instructions, and have some fun. Thanks for again for your help!
Title: Re: Is Miniatmegatron open source?
Post by: veryfungi on January 21, 2018, 12:34:48 AM
hi Paul,

I was able to connect it to an amp and have some fun. Looks like the only thing I messed up is the direction on the A/B switch. I can fix that. I had the manual out and the quick start page. I was ready to test some specific items. :) I can't count the green blinks, or green and yellow, I can't do it. I also don't know if the items roll over or stop when they get to the min or max value. If it stops I should be able to click minus a bunch of times and know I'm at 0, then click + the number you want to select. If it wraps, or rolls over I don't know how to use it. I would much prefer a simple 7 segment display controlled by a shift register. I could wire up a shift register to a display, but I can't program these, so I guess I will keep trying. thanks
Title: Re: Is Miniatmegatron open source?
Post by: paulsoulsby on January 28, 2018, 09:50:11 PM
Quote from: veryfungi on January 21, 2018, 12:34:48 AM
I would much prefer a simple 7 segment display controlled by a shift register. I could wire up a shift register to a display, but I can't program these, so I guess I will keep trying. thanks

The main issue would be that the a shift register requires 3 data lines, but there's only 2 available for the value LED.  You could make use of pins 0 or 1 if you don't intend on using MIDI.  It would take some careful programming to make sure that the time taken shifting of data to the display didn't halt the playout of the sequencer.
Possibly a simpler alternative would be to put a MIDI connection on the front panel (using mini-jack wiring).  Then control it from an external MIDI controller, or even use the Touch OSC or Lemur templates for a graphical interface.  All parameters are available on MIDI CCs.