project to clone Ed Sheeran's Chewie II

Started by jovid196168, March 08, 2017, 07:21:00 PM

Previous topic - Next topic

caspercody

Thanks Slacker!!

Unfortunately I only have (2) digital out puts left on my Uno board. 

I am guessing jovid196168 only has (2) left also?

Might need a bigger Arduino board.

What can we use the Analog pins for?

Thanks
Rob



caspercody

Actually, can we use the analog inputs for the switches, which would leave the digital ports open for outputs to the LED's?

slacker

#62
If you set the analogue pins as outputs then digitalwrite treats them the same as digital pins, see the note here https://www.arduino.cc/en/Reference/DigitalWrite, so you can use them as extra digital pins.
If you're really short of pins you could use a non latching shift register like a 74HC164, then you only need two pins, depending on how fast the shiftout command is doing this possibly means the LEDs will briefly flicker or change colour whilst the data is being written. If it's fast enough you won't notice it.

EDIT: you can use the analogue pins as digital inputs as well https://www.arduino.cc/en/Reference/DigitalRead

ElectricDruid

If you get really desperate, you can wire up a resistor string and then put the buttons from each junction of the string to the pin. Like that you can use one analog IO pin to test several buttons.
The limitations are that only one button can be pressed down at once, unless you get really clever, and the coding gets more complicated because you have to work out in software what you've saved yourself in hardware.
Alternatively, you could do some matrix arrangement of the buttons. That saves pins once the numbers go up, and I'd definitely recommend it over an ADC input for most purposes. Although I do often use one ADC input to detect a three way On-Off-On switch.
The best page on how to deal with lots of switches or buttons is this one, Imo:

http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/

It lists *every* possible way of doing it and looks at hybrid approaches with a bit of one and a bit of the other too. There's a load to learn there - it's good stuff.

Tom

jovid196168

#64
Thank you very much, I'm buzzing it fully works. Just had to change the pedals HIGHS AND LOWS around. Because they are sustain pedals. When they were first pressed in midi monitor it said note off then on. But it's all good now, I've ordered a couple 74HC595's and bi colour led's with 3 legs. I have done a lot of research on them, but I just can't seem to find a tutorial showing bi coloured led's and also switches using shift registers. I am really stuck on how they connect to one another. Yeah I'm running out of pins, don't want to go buying another arduino. Want to build one on perfboard but I don't know what arduino I would need. And also I've neber used perfboard before so I don't know how they work and how I'd go about building an arduino on to it.

caspercody

Does anyone know what the analog pin numbers would be (in the program)?


caspercody


ElectricDruid

Quote from: jovid196168 on April 10, 2017, 05:19:36 PM
I've ordered a couple 74HC595's and bi colour led's with 3 legs. I have done a lot of research on them, but I just can't seem to find a tutorial showing bi coloured led's and also switches using shift registers. I am really stuck on how they connect to one another.

The 74HC595 is a serial-to-parallel chip, so it tends to get used for output. It'd be ideal for the LEDs. You clock out the state of the LEDs into the '595, then toggle the latch pin at the end and the LEDs all switch to their new state.
The equivalent in the other direction (parallel-to-serial) is the 74HC165 or 166. They're virtually the same. This is the easiest for switches, since you can connect all the switches to the inputs, and then clock out the state of eight switches at a time.
I guess you *could* use a '595 to test a load of switches, but the software would get a bit more involved. You'd have to have all the switches wired to the 595, and then the other end of each one commoned together to a Arduino input pin tied high by 10K. You'd use the '595 to take each switch low in turn and then test the arduino input to see if that switch is pressed. But that involves writing the entire latch for every switch, whereas using the '165 involves reading the latch once for all switches, so it's a lot quicker and easier.

HTH,
Tom

slacker

#68
Quote from: jovid196168 on April 10, 2017, 05:19:36 PM
I have done a lot of research on them, but I just can't seem to find a tutorial showing bi coloured led's and also switches using shift registers

Using 3 legged bicolour leds is just like using two separate leds. One of the legs is a common anode or cathode and then you just treat the other two legs as though they were separate red and green leds. You shouldn't need to use shift registers for the switches you have enough pins on the arduino for them and can just use the shift registers for the leds.

Quote
Want to build one on perfboard but I don't know what arduino I would need. And also I've neber used perfboard before so I don't know how they work and how I'd go about building an arduino on to it.

The easiest way would be to use 0.1" pin headers soldered to the perfboard and plug the Ardunio you've got into those. The other way is to buy an ATmega328P chip, and use your existing Arduino to program that with your code, there's a tutorial here https://www.arduino.cc/en/Tutorial/ArduinoISP you want the last  breadboard example. Doing this means you need to add the 5 volt regulator and the rest of the circuitry the chip needs yourself. I would go with the easy option :)

jmcaleenan884

Will this pedal be available for purchase?

caspercody

You can buy one at:

http://sonnit.co.uk/

But it is very easy to build. I just built one with the switches, since I once a laptop and set the laptop next to the switches.

jmcaleenan884

I have been in touch with sonnit.co.uk
But this clone of Ed Sheerans one just sounds and looks much better, I would rather have it

jovid196168

Don't know if anyone can help, but I'm stuck now. I have built my pedal with Roland sustain pedals and it works great. I've spent the past week or two trying to figure out how to add the LED's with shift registers. I've connected them all up on breadboard correctly and programed the common cathode to turn on green or red when pressed. But does anyone have any idea how I can actually get say the LED above track one to light up red when in record mode and the light up green when the track is playing? I'm guessing I have to use triggers or something maybe midi notes? I'm on the last bit of this pedal now. I just want it finished now

ElectricDruid

I *think* Slacker had the answer several posts ago:

Quote from: slacker on March 27, 2017, 12:59:42 PM
If you want Mobius to be able to send commands to the pedal you will need to add a MIDI In socket to the Arduino and then program the arduino to turn the LEDs on and off depending on the MIDI commands Mobius sends it. If you google "midi in arduino" you should find schematics and code examples for using MIDI in.
I don't know anything about Mobius but it looks like you can script it to send MIDI commands, there's a thread on their forums asking something similar http://www.circularlabs.com/forums/showthread.php?t=1420 that's probably the best place to get help with Mobius scripts.

So you need the Arduino responding to MIDI, and then you need Mobius scripted to send a message. It wouldn't really matter *which* MIDI message you use, unless you want to integrate other stuff with this system. If it's just for talking between Mobius and your Chewie2, use whatever you like. Let's say you get Mobius to send a C2 Note On message when you go to record mode on track1, and a C2 note off for play mode. And then a D2 for track2, E2 for track3, etc.
The Arduino then has to receive those MIDI messages (they're several bytes) and parse them and then turn on/off the appropriate LEDs.

How much of that have you got already? At least some of it, I'm guessing.

HTH,
Tom

jovid196168

Sorry that's really lazy of me I didn't check back to what had already been said. I thought it would have to be done through midi notes. I understand what you are saying, Justin don't know how to write that as in a arduino program. I started attempting to add the LED's and programming them. I'm having to use shift registers now as I'm running out of pins. So it took about a week or so to figure that out a little. Still not fully figured. I attempted to just write the simple code to turn a common cathode LED green when a button was pressed then turn green when that same button was pressed. I almost got there, but my coding is all over the place. So arduino throws up an error because I need more discipline with brackets. But because I haven't done much programming I don't know what's right or wrong. I'm starting to give up a little on the project I don't want to like. You guys have given me a bit of hope but I really need some help to get this sorted I'm not going to lie. I've tried to search circularlabs for things along the lines of led's with midi and track statuses. But no one will reply to me on there at all. I do have a midi female connector on my circuit and it is currently sending midi messages to mobius with each pedal. My pedal works how I want it to, just want to add these LED's and also a pixel ring


Ch3zpufs

Hey I'm making one as well. I have been working on it since may 2016 because i had no clue how the stuff worked and I barely worked on it but now I'm almost complete but I'm having a bit of trouble with the software and coding.

The reason the led is yellow is because he is overdubbing.

You have to make a seperate input for a VGA cable and input to the monitor as it will run separately to the Arduino. Its basically a second monitor that is mirroring your computer.

Hope I helped,


jovid196168

Hey, are you that's great? I sorta gave up on mine. I made it to the point where it would work as a loop pedal but I wanted to add the led functions but didn't know how to. Could I personal message you? I need some help if you would? I don't have any knowledge to program arduino

bensonixxx

Hello People! I've been following this thread for a while now and also saw the instructables for this midi controller. ive been wanting to build my own since and finally i decided to give it a shot. and now Im in the process of gathering the items needed. I will be using an Arduino Uno for this. also i wanna ask if its okay if i use a cheaper Stompbox switches instead of the sustain pedal (not sure what its called) similar to what ed sheeran uses in his chewie monsta coz its kinda expensive its like 10bucks each here.. Im completely new to this stuff but since all of stuffs needed like sketch and scripts and others are provided freely here. thanks to the generous people in the community. I hope i can make this work.

JNH1277

Hi guys,
    I am going to make this project from scratch.  Really looking fwd to making this.  I have started a course on Arduino to get my head around it.  If anyone has a complete guide to how the chewie 2 is made would be most appreciated.  Eg wiring diagram etc.  I let you know how I go :)