Arduino compatible Luna Mod Looper

Picture of Arduino compatible Luna Mod Looper
The Luna Mod Looper, basically lets you record a sequence using a potentiometer to control the pitch of the note, and then play it back and add affects. Ever since I saw videos of the Luna Mod being played, I wanted to build my own. However, the project required a picaxe microcontroller, which I have none of, and have no experience with. Fortunately, after a few web searches I came across some code for a Luna Mod for the attiny45 or the arduino. this project requires much less hardware than the original project, and allows you to add much more affects (although for this I chose to just keep it simple and add later) because the arduino still has a lot of unused pins, and a lot of room for more complex code. Along with being pretty easy to build, this is very fun to play with, and works very well.

Remove these adsRemove these ads by Signing Up

Step 1: What you will need

Picture of What you will need
You will need:
-an arduino uno / clone or an ATtiny 45 and a way to program it (i.e. a programming shield for the arduino)
-two pontentiometers (value does not really matter)
-a buttonswitch (the original project called for momentary but I used a push on push off switch so I wouldn't have to hold it)
-two LEDs and cases 
-resistors to go with the LEDs (i.e 220 ohm)
-spst toggle switch
-1/8" audio jack
-DC female power jack
-project box

dsilva331 month ago

really cool project

amplex1 year ago
for (int i=0; i<63; i++) //64 individual notes played

This actually will play from 0-62 which is 63 notes. I could tell because I made a pseudo-funky-drumbeat with it with this sequence:

int steps[] = {300,100,100,100,500,100,100,100,

So, to get it to play an even 64 notes, you can do <=63 or <64. I used this:

for (int i=0; i<64; i++)

And it works as it should. Nice 'ible though! Thanks for sharing this!  Remember seeing this Luna Mod and wanted to make it before, now that I have tons of spare parts lying around it is finally mine.  =D  Now to just make a step sequencer that will work with it.  Add a button to go into step mode, and a button to go inbetween the steps, then your momentary can play the current note, hmm, maybe I will work on this for fun today.
Also, I suspect the issue is rooted in the ATtiny45's clockspeed (1 MHz or 8 MHz vs. the Arduino's ATmega328 which runs at 16 MHz). If you could confirm any of this that would be great
Higgs Boson (author)  konstantino1 year ago
You do need to change the output/input pins in the code for the ATtiny. There are enough I/O pins, but you have to keep in mind that the pin number you see on the chip may not be the number you use to define in the code. Look up the data sheet or pinout diagram of the ATtiny to figure out which pins to use. As for the clock speed, I think it would ultimately be better to have a higher speed, but for the range of notes you would get out of this I don't think it would make too much of a difference.
Hi there, I'm rocking an ATtiny45 and everything seems to be working functionally. That said, the sound output doesn't sound *nearly* as good as yours -- it sounds more or less like a series of irritating ticks that I can speed up or slow down.

Do you think there are any changes made to the values in the code when using it for the ATtiny rather than the Arduino? I'm also using a 1/4" jack for audio output rather than 3.5mm if that makes any difference. Let me know if you have any thoughts1
yovelba2461 year ago
can you make new scheme about that project?
Because I did not understand the scheme.
thank you. (sorry about my english).
Higgs Boson (author)  yovelba2461 year ago
I'll try to draw one on eagle when I get the time.
agm881 year ago
this project honestly reminded me of skrillex in the video
Higgs Boson (author)  agm881 year ago
rarebeasts1 year ago
Awesome project. Thanks for sharing this with us!
Higgs Boson (author)  rarebeasts1 year ago
umfan1101 year ago
im new to the arduino i ordered one for fun and im really flusterd because i dont know the language i know html and thats about it i really want to add more effects synth but i do not know how to
Higgs Boson (author)  umfan1101 year ago
When I first started with arduino I got a book called Getting Started With Arduino. It is very beneficial to anyone getting started. You could also look for some online tutorials on instructables or If you have the IDE and everything you could try changing some of the parameters on the example sketches to see what they do.
TobaTobias2 years ago
I dont understand pin 1,2,3. Whats N.L?
Higgs Boson (author)  TobaTobias2 years ago
Sorry my hand writing is not the best. It says N.C. meaning not connected, and pins 2 and 3 are connected to the wiper pin of the two pots.
robokid962 years ago
This is great!
one problem im having though. the led blinks regularly when the speaker is not plugged in, but when i plug the speaker in it starts spazzing out.
any idea why?
also just to be sure, when using an atmega 45 what pins should I define in the code?
Higgs Boson (author)  robokid962 years ago
I am not entirely sure why that would happen, but it would be very useful to know how your circuit is setup. If you could show a schematic or something that would be good.

When you say atmega 45 I assume you mean ATtiny45. For that you can use pretty much any pin you want for the different components just as long as the speaker is one of the pwm pins. I included a schematic showing which pins to use on step2. keep in mind that the pin numbers you define in the code are not the same pins you attach everything to. I attached the speaker to pin 0, the button to pin 1, the LED to pin 2 and the two pots to pins 3 and 4. define everything in the code using those pins, but look on the schematic for how to connect everything.
Oh right! That was it, I had the wrong pins defined.
Great project. When I saw the original LunaMod I hoped someone would do it with the arduino.
Higgs Boson (author)  robokid962 years ago
Yeah. That is one thing that is pretty confusing about the attiny. Other than that it is pretty easy to use.
gracesmith2 years ago
Good Idea!
Higgs Boson (author)  gracesmith2 years ago
TobaTobias2 years ago
Nice! Im using an 85, what pins are you using?
Higgs Boson (author)  TobaTobias2 years ago
For the ATtiny85, you would do everything the same as the 45. They are almost identical. Look at the schematic with the ATtiny45 for what pins you can use.
This is so good! Thank you for sharing!
Higgs Boson (author)  audreyobscura2 years ago