Need hlp with noisy stuff

Hello, my name is Stefan and i am playing with the Arduino for a couple weeks now. I am quite new to electronics ( but not coding;) ). therefore i dont have no clue about electronics... From buying an Arduino until now i collected and made some parts for a very noise machine like: - a Monotron (hacked with internet guidance) - at first a 11bit R2R DAC with CA3140 decoupling.. - now 3x MCP4275 12bit DACs (one successfully tested but not with the Monotron) - Midibreakoutboard (In/Out/Thru) - Arduino Uno and Seeeduino Mega - 4017, 4030, 4051 [..] 40106 - a couple encoders and other stuff, resistor, breadboard, solder iron and such. Imho the best find: - 2 Keyboards 3.5 octaves, ripped of an older electrical organ Still missing a nice display but that would go to far for now^^ I think you get the picture. Monotron was already working with the Arduino and 11bit R2R DAC, 1V/Oct, random software sequenzer was playing notes and switching with an analog potentiometer between 'programm modes'.

Now i want one of the keyboards checked by the Arduino, recognizing the pressed key and playing the proper note on the Monotron. Here starts the fog. The keyboard has a 3.5 oct range. The manufacturer divided that up into 2 plugs: 4 and 12 pins. Each pin of the 4pin plug leads to the octave, calling octgnd for now. The other pins are the notes, one pin, one note. It would be very hard to modify anthing beyond these two plugs. There are also diodes in this curcuit, one for each key. If keys are pressed, resistance drops from infinite to around 1.6mohm. When bypassing the diode, resistance drops from infinite to zero. So i came up with the following idea: Hardwareside connecting each octgnd to a digital outputpin (4 pins used). Dividing the other 12 pins into 2x6, multiplexing them with 2x 4051 (both can have same adresslines) and route them into 2 digital inputpins. (4pins + 3pins + 2pins = 9 pins for 44 Keys). Now the softpart. Setting first octgnd HIGH (5V), now switching via the 4051 to each of the notepins and checking, when i get a signal. After all 4 octgnd i checked the whole keyboard key by key. Does this work? Frying up the Arduino when i bypass the diode? Better to put a 1k resistor inbetween? Any better ideas?

Next questions is, how can i have a single power supply? 9v batterie for Arduino, 9v batterie for the CA3140 cicuit and 3v batterie for the Monotron, all GND connected. Is it possible just to add another plug to a 9v 1.5A wall wart (GND to Monotron) and power up the arduino and the CA3140 circuit without any other parts?

Thank you all for reading and sry for the long post. I can make some pictures if that would help.

greetz Smai-Lee

There are also diodes in this circuit, one for each key. If keys are pressed, resistance drops from infinite to around 1.6mohm. When bypassing the diode, resistance drops from infinite to zero.

By your description you have a diode in series with a switch. You need to take your ohm meter and find which side is the "positive" and "negative" of the circuit. Do this by swapping you ohm meter positive and negative probe back and forth to find the lowest resistance. http://www.allaboutcircuits.com/vol_3/chpt_3/2.html

If the above is correct... I would make a circuit for the switch like this:

Arduino 5V---- ( +diode- switch combo )--10k resistor---digital input pin "note polarity of diode".

Thx for the link. You suggest: Arduino 5V---- ( +diode- switch combo )–10k resistor—digital input pin “note polarity of diode”.
i would like : Digital pin HIGH/LOW ---- ( +diode- switch combo ) --10k resistor—digital input pin

That way i avoid the 3rd 4051 multiplexer. Uses one more pin, but i should have less electronic parts and easier code.

The attachment shows the actual breadboard layout, nothing powered up or coded, just to see it. Both 4051 are wired similiar, but not all lines are drawn. Adressing lines are marked with the colored dots. As input resistors i set 1k, changing now to 10k. The red drawing right side is the simplified keyboard layout. About the diode direction i am unsure but with the red probe on the octave side ( 4 pin plug) i get some numbers after the diode when a key is pressed. No numbers with the black probe on octave side.
The brown lines show the circuit if i bypasst the diodes. There is a quick question: I have something like 1.7m ohm resistance trough one side of the diode. Does that count as real? Is it possible to save the 1k resistor? Or better bypass it to get a a better HIGH level?

Does this work or should i go for the 3rd multiplexer layout? Any other flaws there?

greetz Smai-Lee

Hi again, i tried the circuit with some LEDs and i got weird errors. Nothing i was able to track down. Hmpf. After a couple hour i gave up. So i borrowed a small masterkeyboard with midi out and soldered the midi bob. IDE up and throwing in some code, bummer, looks like the Arduino lost sometimes a midi message. I was monitoring the keyboard messages on the desktop over USB same time, everthing looked ok. Spent 2 long days to get the timing right. Now i can intercept every message i want :) Then i implemented the new DAC code for the MCP4725 and after some minor software tweaking, everything is running as expected. Now i have an arduino based midi->cv interface including a basic sequenzer and arpeggiator controlling the Monotron so far.

Still a question open: How can i have a single power supply with multiple outputs? A link to a circuit or explanation would be nice. I have a 12v+ power supply, 5A and i know, i need 3x7809 to make 3x9v+. But i dont know anything about the other needed parts to 'shield' each circuit from the other except GND. Anyone please?

greetz Smai-Lee

The Arduino can handle 12v through the power jack. It you are using a shield the power for it comes from the Arduino. You can power small things with the Arduino 5 volts. Can you post some pictures of what you want to power with the 12v?

Hi,
for now it is just the keyboard, the Arduino and the DAC Buffer and in near future the Seeeduino as well. I dont want a solution just for this setup, i want to know, how it is generally done with multiple currents in a single circuit and a single power supply.
And sorry for the bad photo quality, cellphone cam…
greetz Smai-Lee

image043.jpg

i know, i need 3x7809 to make 3x9v+

Why do you need three 9V outputs? Will one not be sufficient, you can connect more than one thing to each regulator you know. Also add a capacitor on the input and outputs of the regulator.

But i dont know anything about the other needed parts to 'shield' each circuit from the other

I have no idea what you mean by this can you explain.