Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Re: Switcher for guitar pedals on: July 22, 2013, 01:25:43 pm
Nice one, sounds like you're making good progress.

So, here are a few things I learned when I tried making this.

1. Grounding.  You need to be careful with how you ground the guitar signal, and also whether you need to connect the guitar ground to the arduino digital ground, and also the enclosure...  Common sense would dictate that you should probably keep the arduino and the guitar grounds separate, and connect the enclosure to the guitar signal ground, however I found that I had a lot of noise that way, and so ended up grounding everything together.

2.  Power supply decoupling.  You should probably decouple the power supply at each relay with a 100nF capacitor to ground, and anywhere else that's likely to introduce switching noise to the power supply/ground.

3. Ground loops - avoid them, make sure you use a star grounding scheme for your guitar signals.

4. Preset storage.  The arduino has non-voltatile eeprom memory, however this has a limited number of read-write cycles.  My plan was to use an SD card, and to save the presets as a text file that the arduino would read.  Then, if I wanted to do some massive editing of all the presets I could just stick the SD card in a computer and open up a text editor.  I didn't get round to implementing it, but shouldn't be too tricky.

5. Enclosure - it's always a good idea to plan your enclosure from the start, rather than an afterthought.  That way you can build your prototype into it, rather than have everything on breadboard and then have to move it all, potentially causing lots of problems when things get disconnected!

6. The guitar relay boards.  My plan was to make a modular relay board as a PCB.  I did actually design a PCB, you're welcome to the kicad files if you want, although my relay boards are a little unconventional - one has two jacks and two SPDT relays, and the other a single stereo jack and one DPDT relay.  I probably ought to make a double jack and DPDT version.  These PCBs could be made at osh park or similar quite inexpensively, saving lots of time and making it accessible for others to try this out.

2  Using Arduino / Project Guidance / Re: Switcher for guitar pedals on: July 16, 2013, 08:34:17 am
That's the schematic I have based mine on.  The only thing extra to do is normalise the two jack sockets (connect the switches together).  That way if nothing is plugged in and you accidentally switch them you don't get silence.

For detecting switching one way to do it is connect the switch to a digital pin, and to ground on the other side.  You need to enable the digital pin as an input, but also enable the pullup resistor:

pinMode(input, buttonPin);
digitalWrite(buttonPin, HIGH);

When the switch is pressed then the input will go low.  You need to detect that.  You can do this many ways in code, polling, using pin change interrupts (available on any pin), or using the interrupt pins (only two of these on an uno though).  I'm pretty sure you will find lots of articles/forum posts about ways to do this.  Software debouncing is also a good idea so you only get one trigger per button press.

3  Using Arduino / Project Guidance / Re: Switcher for guitar pedals on: July 16, 2013, 03:02:17 am
The main reason is that the relay needs to be set up in a "true bypass" way - like this:



While what you have done will work, the input signal will also be loaded by the output of the FX, probably to the detriment of the guitar tone.  It's better to switch both the input and output.

As for an LED, it's true that if you use a manual switch you will need to use a 3PDT switch to have an LED as well.  However you don't need to with a relay.  To switch the relay on, you energise its coil by sending current through it.  This current is switched with a transistor or FET.  You can also switch other things with that transistor, providing you don't exceed its current capacity.  So, you can simply hook up a series resistor and LED in parallel with the relay's coil so both are switched by the transistor - that way when the relay is on, the LED will be on.

4  Using Arduino / Project Guidance / Re: Switcher for guitar pedals on: July 15, 2013, 10:38:08 am
I looked into this quite extensively last year.  RG Keen has a very comprehensive set of articles on his website about this (http://www.geofex.com/Article_Folders/remoteftsw.pdf), however they pre-date the arduino.  The relay switching modules are good though, and then all you need to do is operate the relays with digital outputs.

Basically you need to use DPDT small signal relays such as the Omron G5V-2, in combination with a pair of 1/4" jacks for each FX.  Each relay module is constrolled by a digital signal.  You can produce this directly from a digital pin, or from a shift register.  I followed this approach, with the intention of having 8 relays for fx, and then some SPST relays for switching amplifier channels etc.  Also I was going to put a midi output, so that each bank could have an associated midi program change.

The schematic by norim_13 is a bit wrong unfortunately, here's a schematic that works (based on RG Keen's)


It's a little unconventional in that I have used two SPDT G5V-1 relays instead of a DPDT G5V-2.  The reason for this was that I have a high gain overdrive pedal which was feeding back with the DPDT relay, so I used two SPDT relays to keep the in and out signals separate.  This worked.
I built a couple of these on veroboard, and also had a breadboard shift-register arduino switching system built.  I would be happy to share code and schematics if you're interested.  My intention was to make something that was modular and open source, but I kind of ran out of steam.

The reason I stopped bothering was this: http://www.thomann.de/gb/harley_benton_fxl4.htm (well actually the fxl8, but that's out of stock).  Kinda boring to buy something rather than build, but I wanted to actually play the guitar rather than spend all my time with a soldering iron (I do enough of that in my job!).  My intention now is to connect an arduino to the 7 segment display so that I can switch other things like amp channels, and provide midi channel changes straight from it.



5  Using Arduino / Project Guidance / Re: Noob trying to make a guitar project using an Arduino and somewhat confused. on: May 27, 2013, 02:19:16 pm
Unfortunately making something that will sample audio and then play it out again in an acceptable way cannot be done using the standard arduino functions.  There is too much overhead in using the functions such as analogRead, and also the PWM output will need to run at a much higher frequency to provide the frequency response required for audio generation.  That being said, it is possible.

See: http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/

This makes use of the timers on the atmega to sample and process the audio data regularly.  By using timer interrupts this makes it a realtime operation, rather than when it gets to that point in your sketch.

In addition, you will probably want to buffer your guitar input and do some level shifting to make sure it's between 0 and 5V.  A simple op-amp buffer will work nicely for this, with a virtual ground created at 2.5V.  A LM324 or other low voltage single supply op-amp will do (given that the arduino is going to massively reduce the fidelity of your signal this op-amp will do fine).

The other thing you will need to do is filter the output to remove the switching noise, the link above has a simple filter.  You can omit the inductors and just use capacitors and resistors though, google RC filter.

good luck!
6  Using Arduino / Displays / Re: TV out doesn't use whole screen on: August 25, 2012, 11:23:51 am
I was just about to post something along the lines of this, as I'm also using the TV out library (to overlay text and graphics data over a composite video signal), and the fact that the pixel data doesn't go all the way to the edge of the screen is very frustrating.

Firstly, this is nothing to do with incorrect PAL/NTSC settings.  The TV out library correctly produces the analogue PAL/NTSC signal so that a TV can detect it and display it properly.  The issue is that there is a blank border around the text/graphics that the library produces.  This is something to do with where the frame buffer is positioned on the screen.  If you use the member function

TVout::force_linestart(uint8_t time)

You can change the horizontal position of the generated image.  This is because it changes the start time of a line with respect to the horizontal sync.


I don't think this is the way to solve the problem, but it's definitely something to do with when the pixel data is output.


So, now, examining video_properties.h reveals some parameters to play with (I've only put the PAL ones):

Code:
//Timing settings for PAL
#define _PAL_TIME_SCANLINE 64
#define _PAL_TIME_OUTPUT_START 12.5

#define _PAL_LINE_FRAME 312
#define _PAL_LINE_START_VSYNC 0
#define _PAL_LINE_STOP_VSYNC 7
#define _PAL_LINE_DISPLAY 260
#define _PAL_LINE_MID ((_PAL_LINE_FRAME - _PAL_LINE_DISPLAY)/2 + _PAL_LINE_DISPLAY/2)

#define _PAL_CYCLES_SCANLINE ((_PAL_TIME_SCANLINE * _CYCLES_PER_US) - 1)
#define _PAL_CYCLES_OUTPUT_START ((_PAL_TIME_OUTPUT_START * _CYCLES_PER_US) - 1)

_PAL_LINE_FRAME determines the number of lines per frame (i.e. the video signal frame), best not to touch that.  However, _PAL_LINE_DISPLAY can be changed, setting this to 312 means that the generated display matches the video frame.  For some reason this cuts off things at the top, so perhaps 300 would be better...  Now I have a feeling that the horizontal position is defined by these two:

#define _PAL_TIME_SCANLINE         64
#define _PAL_TIME_OUTPUT_START      12.5

Will report back if I can get something to work...
7  Using Arduino / Project Guidance / Re: powering Arduino on: August 09, 2012, 09:56:06 am
Using the low dropout regulator on the arduino will be more efficient compared to a regular 7805 regulator.  There's also a diode in there for reverse polarity protection. Unless you need more than what the regulator can provide (1A according to the datasheet, but best not to overdo it so 500mA is a good limit - plenty for your application, unless your transistor is driving a large load), you're probably better off using that because a) you're reinventing the wheel, b) requires fewer components, c) uses a 2.1mm dc connector, which is more secure than sticking wires into the +5v socket, and d) there's the inherent reverse polarity protection.
8  Topics / Science and Measurement / Re: Reading data from fluorometer on: July 11, 2012, 05:58:47 am
RS232 is +-12V, you could cause damage by connecting this directly to an arduino.  To convert these voltages you need a special chip, such as the MAX 232 to convert from RS232 to 5V TTL (http://en.wikipedia.org/wiki/MAX232).

By the sounds of things you don't need an arduino, just either a computer with a serial (RS232) port, or, a USB-RS232 converter cable (equally a FDTI or equivalent cable with the MAX 232 style converter).  Then I'm sure you'll be able to find some open source software which will run on whatever OS you use, with which you can log the fluorometer data.

If on the other hand you would prefer to have a non-pc version, then yes the arduino and a datalogging shield would work, you could log to SD card in any format you so wish.  Just remember to convert to TTL level!
9  Using Arduino / Networking, Protocols, and Devices / Re: NRF24L01 transceiver and 315/433MHz RF links on: June 27, 2012, 11:10:27 am
There are a few things to consider:

The first is more software/hardware - the NRF24L01 uses a proper protocol, is controllable via a library and probably has some handshaking and error checking/correction.  I'm not entirely sure what the 315/433MHz ones are, they may or may not include these things, or it may be that they are literally a transmitter and modulator, and you have to provide the data that's to be sent.  In terms of implementation it might make it more difficult/challenging, and if you have multiple devices you might not be able to distinguish between the two.

The second is more the nature of the EM waves they emit.  Generally speaking, lower frequency means lower power, better penetration, and longer range.  So the 314MHz/433MHz transmitters may perform better in situations where there isn't a direct line of sight etc.  However, an efficient antenna at 2.4GHz is easier to make on a PCB, so performance may be equal.


One last thing is that as you're looking at *cheap* solutions (i.e. not sparkfun branded), the actual implementations may vary.  Someone may have a decent NRF24L01 and get great performance, and someone might have a badly made one and find it's not satisfactory.  But I guess that's the nice thing about cheap components, if they work then great, if not then you aren't losing much for them to go in the parts drawer and for you to buy something better.  For the project you have described however I would imagine that both will perform well.
10  Using Arduino / Project Guidance / Re: Photon Counter Using Arduino on: June 27, 2012, 11:01:16 am
It's not quite counting individual photons, but a linear CCD would allow you to quantitatively sample light, they're used in an arduino based optical spectrometer:

http://myspectral.com/

They even make a linear CCD shield.  Of course you need to provide your own optics, and mount the thing in something to block out ambient light.  Simpler than providing the high voltages required for photomultiplier tubes etc.

What will you actually be measuring?  Regular light, even very low intensity still contains a lot of photons (red light at 1uW is a stream of approximately 3.5x10^12 photons), so presumably this is for some sort of scintillation/astronomy purpose?
11  Topics / Science and Measurement / Re: Arduino as a Quantum Computer on: November 24, 2011, 05:34:52 pm
It's been a few years since I took any QM classes, but my understanding is this of quantum computing:

1. A quantum bit (qubit) can exist in both a state of 1 and 0 or any quantum superposition of these at the same time.
2. This allows all possible permutations of a problem to be calculated simulataneously.
3. When a measurement is made of the system it collapses down onto a one of these solutions.
4. If you repeat the quantum computing experiment enough times then you arrive on the correct answer with enough certainty.

If you read the wikipedia page on quantum computing it says this close to the top:
Quote
Given unlimited resources, a classical computer can simulate an arbitrary quantum algorithm so quantum computation does not violate the Church–Turing thesis.[5] However, in practice infinite resources are never available and the computational basis of 500 qubits, for example, would already be too large to be represented on a classical computer because it would require 2500 complex values to be stored.[6] Nielsen and Chuang point out that "Trying to store all these complex numbers would not be possible on any conceivable classical computer." [7]

So, while it does appear to be possible to simulate a quantum computer without actually possessing physical qubits, the resources required are would soon surpass what is available.  If it were easily possible the computer scientists and physicists would simply simulate a quantum computer system rather than trying to trap atoms or manipulate photons!

With regards to your arduino idea, perhaps it can simulate very simple quantum environments, but I think that cracking cryptographic hashes might be a bit beyond its capabilities!
12  Using Arduino / Project Guidance / Re: pulsating power supply for pump on: October 27, 2011, 04:10:16 am
sounds about right. Use the computer power supply to provide a stable 12V, and use the arduino PWM to control a power transistor  which then drives the pump as shown here: http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads
13  Using Arduino / Project Guidance / Re: Get any kind of info from guitar signal on: October 27, 2011, 04:05:50 am
Quote
Since the guitar will be plugged into effects/amp will my little preamp affect the signal?
Depends what you build.  Let's say you build a pre-amp with a thru output, then the output that goes to the rest of your signal chain will be coloured by the pre-amp, probably not a good idea unless you know what you're doing.  If you split the signal before it goes to the arduino with a buffer then you will be less likely to affect the rest of the sound.

I think you need to get a good idea what the set up of your friend is, otherwise you won't be able to build a decent solution.  This means you need to determine where you can tap off the guitar signal.  Something line level would be best, because it will be a low impedance signal and up to 10V peak to peak, so you just need to step it down a bit with a potentiometer so the arduino can sample it.

Quote
Also, that page shows the line in plugged directly into the arduino through a capacitor and some resistors in parallel, why doesn't it have a preamp?
This circuit is designed for something that is already at line level, i.e. low impedance and many volts, so it doesn't need to be amplified first.

Quote
could I tap into the channels and make the arduino know which one is active
perhaps, depends on the amplifier though, you will likely have to modify something.  Perhaps you could insert a small box in the footswitch signal path that will provide a control voltage for the arduino to say what channel is selected.
14  Using Arduino / Project Guidance / Re: Get any kind of info from guitar signal on: October 26, 2011, 04:33:19 am
How to connect the guitar:
You will need some sort of pre-amp to boost the guitar signal so that it's between 0V and 5V, once you have done that then you can sample it with the analog inputs.  For what kind of amplifier, well a TL072 op-amp based AC coupled non-inverting amplifier, run off the arduino's +5V supply, and with an adjustable gain between 2 and 5 will do nicely.  As an alternative perhaps take the output of an FX pedal, or the FX loop/line out from a guitar amplifier, however this is likely to be more compressed and difficult to make out the attack of the picking.

Synchronising LED's
You need to decide how to sample the guitar signal.  For a code-only minimal electronics approach you could sample it using timer interrupts as shown in this real-time audio FX example http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/.  That will have the guitar signal going into the arduino is sampled at 31.25kHz via interrupts, and then you can do something with it in the main loop. 
Alternatively, you could sample at regular intervals within the main loop using the analog read function.  You could quite easily sample 10 times a second, and then say if the level is above a certain threshold an event will be triggered.
If you're willing to build more electronics then some sort of peak detection circuit might be useful, because then you can just use a digital input.

Good luck!
15  Using Arduino / Project Guidance / Re: Hi all. on: September 14, 2011, 08:15:29 am
well, to detect the height of the rubbish how about a [infrared] led on one side of the bin and a LDR/photodiode/phototransistor on the other.  When rubbish is higher than the line the LED will no longer illuminate the light sensor, and you can trigger something to happen there.

An alternative would be to use an ultrasonic sensor on the lid of the bin, measuring the distance between the sensor and the rubbish. I'm not sure how an ultrasonic sensor might handle an enclosed environment though.

As for the wireless, it depends how you wish to contact people.  You could use an ethernet shield and instruct the arduino to email a group of people.  Or a GSM shield and it could SMS those people. Zigbee/xbee are more for device to device communication, for example you could have an arduino and rubbish sensor at the bin communicating over xbee to another arduino which is connected to the ethernet/a computer, but that seems a little bit pointless as both tasks could easily be achievable with one arduino without the need for an expensive wireless communications shield.
Pages: [1] 2 3