Go Down

Topic: A trash guitar?! MIDI bytes not going through! + Lots of docs! Near success! (Read 823 times) previous topic - next topic

nitronova

I'm working on a cool project and feel like I'm... 90% of the way there???

I have fried all of my microcontrollers and cannot do more testing for a while...

The project is roughly 150 lines of code (less if you don't count the extra brackets haha). It's a guitar made out of Arduino pieces and literal cardboard trash. I'm scraping the bottom of the budget for this one, but when finished will be a nice simple exercise in MIDI controllers.

Here's a doc explaining the project, its parts, the soldering, everything:

https://docs.google.com/document/d/1MgPeDGIF7iaymZIDwfYwpL53XF5NCLxuL7htu2MptI8/edit



Get to the nitty-gritty! Here's the one and only source file:

https://github.com/circuitfry/trashtar/blob/master/trashtar.ino

Leave replies! I'd love to get feedback.

mcnobby

Very cool Idea !!
If i had the time I would love to have a crack at this too
And for feedback... ? what if you hold it next to a Marshall stack ? ;)

Do you have a video of this working ?
http://www.youtube.com/user/Recovered
http://www.smartshow.lighting

mcnobby

I was wondering, I guess it mis-reads if you leave your first finger down and fret on the same sensor with another finger, thus lowering the resistance as there is two contacted areas ? yes ? (a bit like if you try and put two fingers on your laptop mouse pad, it kind of averages between the points)
http://www.youtube.com/user/Recovered
http://www.smartshow.lighting

mcnobby

I see you are using 3 x 7805 regulators for the strips (to protect them?) the input to the regs is 5V, but you are trying to pull 5v out of them. I think these regs require somewhat more than 5v input to give a stable 5vout (like 7v or something). I see what you are trying to do but wonder why you need 3 1A regs ?
If the overall resistance of the strip is 10k, the current flow will be <1mA, so you could easily run all three strips from one much smaller regulator.
Also powering from USB may also have its voltage instability, I have measured some at 4.4V where 5V has been expected. Perhaps if you ran the board from 6V cellpack or a small power supply over 5V to the Vin/RAW pin of the micro board it may help to stabilise things up a bit plus give you the overhead Volts you need for your 5V regulation to the strips :)
http://www.youtube.com/user/Recovered
http://www.smartshow.lighting

nitronova

Very cool Idea !!
If i had the time I would love to have a crack at this too
And for feedback... ? what if you hold it next to a Marshall stack ? ;)

Do you have a video of this working ?
Bahahaha, Marshall stack. I can't promise results but I can find one to stand next to and at least pretend that my ears are ringing with the battle cry of rock and roll!

Nah, no video, yet. It doesn't yet work. Your next quotes address some of my miscalculations. But you CAN watch a video of a similar (more expensive) project by clicking this next link: https://www.youtube.com/watch?v=s3dBox-LB7I

I was wondering, I guess it mis-reads if you leave your first finger down and fret on the same sensor with another finger, thus lowering the resistance as there is two contacted areas ? yes ? (a bit like if you try and put two fingers on your laptop mouse pad, it kind of averages between the points)
I don't quite know if that's how it will work. I think it is supposed to read the first sensor distance it finds.

I see you are using 3 x 7805 regulators for the strips (to protect them?) the input to the regs is 5V, but you are trying to pull 5v out of them. I think these regs require somewhat more than 5v input to give a stable 5vout (like 7v or something). I see what you are trying to do but wonder why you need 3 1A regs ?
If the overall resistance of the strip is 10k, the current flow will be <1mA, so you could easily run all three strips from one much smaller regulator.

Also powering from USB may also have its voltage instability, I have measured some at 4.4V where 5V has been expected. Perhaps if you ran the board from 6V cellpack or a small power supply over 5V to the Vin/RAW pin of the micro board it may help to stabilise things up a bit plus give you the overhead Volts you need for your 5V regulation to the strips :)
That's probably why I'm not getting any readings from those strips! This could reduce the cost for the guitar and simplify the wiring job. Hmm, how do I calculate which regulator I should be using (like a 1mA regulator? Should I be using that?)

Man, I wish I didn't have to rely on cellpacks or power supplies. I owned a USB guitar that worked solely through USB. I wish this guitar could do the same.

Anyway, yeah, I feel like I'm really really close, here. So I'll need to...

1. Replace the 3 regulators with 1 smaller regulator.
2. Hook the new one up to all three strips
3. Either add a supplemental power or figure out how to make USB only work.

--

Another problem I'm experiencing is on the software end. I'm trying to get these bytes to send to a virtual MIDI port (emulated over USB). I found the two pieces of software from the following link:

http://www.instructables.com/id/Easy-3-Pot-Potentiometer-Arduino-Uno-Effects-Midi-/?ALLSTEPS

The software I'm using for virtual MIDI are here:
http://projectgus.github.io/hairless-midiserial/
http://nerds.de/en/loopbe1.html

And I can read the inputs through the Arduino IDE but I don't get similar results in the software. But maybe we'll figure this out after the hardware is done right.

Grumpy_Mike

Quote
And I can read the inputs through the Arduino IDE but I don't get similar results in the software.
What does that mean? The IDE is the app that programs the Arduino, you don't read anything through that apart from keyboard presses and mouse clicks.

Quote
I should be using (like a 1mA regulator?
No, one of the reasons not to use one is that there is no such thing.

None of those things mcnobby told you about will stop you getting any readings. He was just improving your design by pointing out your silly mistakes. If you implement your silly mistakes correctly you will get readings. If you want better advice then you must post a schematic, photos of tangled wires do not cut it.

mcnobby

You could power the device from USB, but I have found some USB connections to give lower than 5v, so I recommend perhaps you look at a buck/boost circuit.. something that will give you exactly 5v regardless of what supply is coming in..

Alternatively, use the USB power and drop the whole regulation thing down to 3.3v [78L33] (still power the micro from the ~5v) so your power to the strips will be 3.3v, but you may need to recalculate the analogue voltages, but I guess that would be just 0.66 of the values you had previously. You should be able to run this direct from USB, which is normally rated at 400mA ish on PCs, my guess is you are drawing most of your power through those LEDs that are on.

Make sure you get some good smoothing on your supply to the strips, as any small dip in voltage will be noticeable on the returned analog readings, probably don't have any flashing LEDs or things that may cause little Vdips

With the two-fingers-on-the-'fretboard'-at-once issue : if you had a finger on the 9th fret and one on the 7th, the average value may work out to be ~8th fret, but to be honest its one of those try it and see things. On a normal guitar, any fretting lower than the highest fretted note on a particular string does not sound, this electronic version doesn't quite work in the same way as you are placing TWO wipers onto the resistance path simultaneously

Probably, and importantly, is the distance from your strips to the board, keep those analogue signals short, or alternatively use some coax/shielded wire (but I cant vouch for this as an improvement)
http://www.youtube.com/user/Recovered
http://www.smartshow.lighting

Go Up