Hello im making a led vu meter with a lm 3914 IC. Here is the datasheet http://www.ti.com/lit/ds/symlink/lm3914.pdf. Im doing the 1st schematic in the datasheet. Im using the 2 formulas right below the schematic for the calibration and LED brightness My R1 is 660 making Iled=18mA (2x330 in series, because i dont have a 660 resistor) and R2 is 82 ohms (330 220 220 in parallel). The range of the leds is about 1.6 volts. Im powering it with a 9v wall thing Im planning to wire it between my computer and my 2.1 speakers. Today i figured out the resistor values and tested it with the pc cranked to the max and all leds blinked yey. so far so good but as i was watching the leds blink, it must have been working for 2-3 minutes and when i turned it off the chip was really hot. I checked for shorts, bad wiring and whatever. nothing found. Then i read in the datasheet, that Vled should be < V+ and in my case its the same. I checked the internet for other schematics and all of them were powering the leds from the source that is powering the chip without any dividers resistors or whatsoever. Can someone hint me what im doing wrong? I even tried adding the 10uF cap like the dotted line says, it didnt help.
Then the desire of more buttons and knobs came and a diy arduino shield was born (Such a genious board arduino is, such a stupid error to make the spacing awkward :-/. With longer headers and some crafty bending its fixable.) http://s14.postimage.org/emblrhl74/SDC10382.jpg
This is the final layout, box is made from 3mm thick very dense fibre board i found on the street. (Someone had thrown away his kitchen drawers and stuff) http://s12.postimage.org/g0hxos04c/SDC10390.jpg
Everything in place ready for soldering. It looks like a mess, but i prefer to call it controlled chaos http://i.imgur.com/8gA8d.jpg
If someone wants the schematic, let me know. I know everything is not fancy and shiny, but hey thats my first box i made and the first arduino project i made. Many thanks to Addidis for helping me go through all of this http://www.jeselectronics.com/
ps. sorry for the pics being as url but they are too big.
thank you I have some pics of the building process, but i dont really know how and where to make a blog. If i get some free time (university started) i will put some pictures here
Hi people, i finished my first project! Its an arduino based midi controller. 3x8 channel multiplexers fed into the arduino and with a usb midi converter its connected to the PC. Arduino is powered via the usb cable the converter uses. Heres a video : If you want i could add the code and the schematics!
Hi people, i started playing guitar when i was 13. As every guitarist i love effect pedals . Then i decided to start making electronic music. All the VSTs amazed me, envelopes, filters, oscillators. My question is, in which field should i look into to learn how to manipulate sound waves in hardware with real parts, like understanding how an equaliser is built (how it works, what happens if i replace a resistor from 10k to 100k.), like understanding an oscillator - sine triangle square sawtooth. Filters lowpass highpass, bandpass. Distortion, modulation. all of those things im very interested in. Its easy in software you just click click click, but i want to learn to make it. Bad news is if i want to learn this and see what im doing - i should get an oscilloscope and they are a bit expensive. Im new in electronics, but im learning fast. I have my arduino from 1 month and i almost made my first big project - a MIDI controller DJ mixer with the help of a friend of course. (im pretty deep in the MIDI things, but ask me to make something else and im blind).
Hi, im making a hardware debounce for a button. I read about hardware debouncing and i made this debouncing circuit with a pulldown resistor.
Code:
5v GND | | | 47k resistor |--0.1uf cap-------| |---button---------|------Pin on a Multiplexer-------Arduino
Im not using a schmitt trigger inverter, because im not sure i need it, i read that arduino has inverters on every pin. As i was testing it i pushed it around for 5-10 minutes and the button stopped working. Then i found a tutorial for hardware debouncing, this one http://www.labbookpages.co.uk/electronics/debounce.html It says that the fast discharging of the capacitor can burn the buttons legs and it should be discharged via R2. So i thought i have burned them up with my circuit because the capacitor is not discharging through another resistor. So i wired up another button like the tutorial said using R1=47k R2= 10k C1=0.1uf and D1=1N4004 (without the inverter) giving me around 6ms until it reaches logic 1 and used this code
Code:
#include <AnalogMuxDeMux.h> AnalogMux amux(13, 12, 11, A0); // Define Mux #define NO_PINS 8 int lastbuttonState =1; void setup() { pinMode (13, OUTPUT); // Selector pin pinMode (12, OUTPUT); // Selector pin pinMode (11, OUTPUT); // Selector pin pinMode (A0, INPUT); // Mux Common OUTPUT Serial.begin(9600); } void loop() { // Read the values from the button int sw = amux.AnalogRead (1) / 1023; if (sw != lastbuttonState) { if (sw == 0) { Serial.print("pressed"); Serial.println(sw * 127); } }
pressed0 /This is when i pressed it depressed127 / Everything else from here is when i depressed it pressed0 depressed127 pressed0 depressed127 pressed0 depressed127
Can anyone help me debounce it properly, tell me where my mistakes are and what should i do. Do note im fairly new to Electronics. Thank you in advance. PS. Im making hardware debounce, because im making a MIDI controller mixer and the built up software delay would eventually lead to big latency and it not responding on time.
omg im stupid im sorry i meant vHigh not vHigh1. NVM though a friend told me to add the command that saves the state in the if statements big brackets (where serial.write is)
The correct fix is the 1st guy's answer thank you guys!
1. Yes the if statements are not triggering the Serial.write 2. Note in my code
Code:
int vHigh = amux.AnalogRead(2) / 8; // Library command to read the pot from the pin on the mux - amux.AnalogRead(pinnumber) int vMid = amux.AnalogRead(3) / 8; int vBass = amux.AnalogRead(4) / 8; int vHigh1 = amux.AnalogRead(5) / 8; int vMid1 = amux.AnalogRead(6) / 8; int vBass1 = amux.AnalogRead(7) / 8;
Serial.write(vHigh) // or vMid or vBass according to the if statement the if statement for vHigh is just a simple if the value has changed no matter how - print the value of the pot. Whatever (except vHigh) pot i turn nothing is getting printed. When i turn the vHigh pot it prints its value from 0 - 127 3.
If i write Serial.println in the if statements nothing is being read. If i write them outside the if statements its just 0-1023 / 8 (0-127) For high 1 its being read 0 - 127
When i replace all Serial.write with Serial.println, it prints the buttons with their values - either 0 or 1. When i rotate the pots it prints only for pot1 (vHigh, in the code its right after the buttons). When i rotate all other pots nothing happens (im running them through a multiplexer, there is no problem with the multiplexer. If i make all the if statements like the one for pot1 - all pots work, though not the way i want them to.)
Still not working . It has an LED to monitor the incoming signal FROM the arduino so when i power it up it flashes, so the first time it loops it works, though when i rotate it fast or slow, doesnt send data. Im starting to think i should not Serial.write(analogRead(ofthepot)) but something modified. I thought something happened to the hardware so i changed it to the buggy state (only vHigh!=vHighState) and it works, tho the sent data is with values 1 2 1 2 3 2 3 4 3 4 5 6 5 6 5 6....... And im thinking i should use unsigned int or something for the analogread, because if i rotate it from 127 towards 0 it would give a negative value (pot - pot before)
Here im putting the code with the things you people said.
Code:
#include <AnalogMuxDeMux.h> #define THRESHOLD 2 AnalogMux amux(13, 12, 11, A1); #define NO_PINS 8 int vHigh = 0; int vHighState =0; int HighEQ = 0; int vMid = 0; int vMidState =0; int MidEQ = 0; int vBass = 0; int vBassState = -2*THRESHOLD; int BassEQ = 0; int vHigh1 = 0; int vHigh1State= -2*THRESHOLD; int HighEQ1 = 0; int vMid1 = 0; int vMid1State= -2*THRESHOLD; int MidEQ1=0; int vBass1 = 0; int vBass1State= -2*THRESHOLD; int BassEQ1=0; int lastbuttonState =0; int lastbuttonState1 = 0; byte CC=176; byte ON=144; byte OFF=128; byte switch1=1; byte switch2=2; byte pot1=3; byte pot2=4; byte pot3=5; byte pot4=6; byte pot5=7; byte pot6=8; byte on=127; byte off=0;
hm... replaced it like you said for all the pots, still same thing Serial.write isnt triggered... :/
Also i got this from the reference site
Code:
Warning Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results. abs(a++); // avoid this - yields incorrect results
a++; // use this instead - abs(a); // keep other math outside the function