• Electrical Engineering V3
    3,104 replies, posted
Alrighty folks, I've got a question for you. Now I haven't taken circuits or physics or anything really so what I know has come from a brief period of looking around the internet. I'm looking for a way to take a small line in voltage from a stereo and get it into my arduino. AFAIK the arduino will be damaged from negative voltages which led me to think about trying a simple diode to cut out the negative voltage (because really I'll only need the positive half of the wave anyway), but the issue is that I think diodes cause a nice voltage drop across it right? Well I'm dealing with tiny voltages to begin with so can anyone give me some direction on a good way to do this? Also as for the motorcycle, I have a 1972 DT 250 which also has a 6v system and there are many voltage regulators available for the headlight for pretty cheap. I'm sure you could just buy one for your bike to prevent blowing out the headlight.
[QUOTE=christarp;47871257]Alrighty folks, I've got a question for you. Now I haven't taken circuits or physics or anything really so what I know has come from a brief period of looking around the internet. I'm looking for a way to take a small line in voltage from a stereo and get it into my arduino. AFAIK the arduino will be damaged from negative voltages which led me to think about trying a simple diode to cut out the negative voltage (because really I'll only need the positive half of the wave anyway), but the issue is that I think diodes cause a nice voltage drop across it right? Well I'm dealing with tiny voltages to begin with so can anyone give me some direction on a good way to do this? [/QUOTE] Amplify the audio signal it so the peak voltage output is just under 5 volt (or 3.3volt if low-voltage model) + the voltage drop across the rectifying diode? A op-amp should do the trick with that. A somewhat beefy zener diode with right reverse-voltage specification and a current limiting resistor could be used as extra protection for clipping the output to protect the Arduino, but that's something I only know the theoretical BS about.
So uh, I have accidentally shrunk my oscilloscope. [url=http://i.imgur.com/mQUuClG.jpg][img]http://i.imgur.com/mQUuClGl.jpg[/img][/url]
Just seen this on Reddit [quote]"TX and RX lids: Now attempt to open the Flash sample package from the specimen manual inside the Arduino IDE, Verify it and upload it on your boarding. You will comprehend the TX and RX lids on the panel flashy presenting to you that it is operational and is functioning well. Lastly, the constructed LED linked to Pin 13 will blaze. That is your chief database running. "[/quote] [URL="https://www.mepits.com/project/217/Latest-Project-Articles/How-to-Install-Arduino-software-IDE--on-windows"]Umm... [/URL]
[QUOTE=Leestons;47872062]Just seen this on Reddit [URL="https://www.mepits.com/project/217/Latest-Project-Articles/How-to-Install-Arduino-software-IDE--on-windows"]Umm... [/URL][/QUOTE] Google translate?
Paging Nikomo... The programmer finally came in for that Pro Mini. (took just about two fucking months...) After some fudging about we have your code loaded. The first modification was that the "print" statements had to be changed to "println" as the modem needs the carriage return to inspect the sting to see if it is a valid command. After that I had to add a 10K pulldown resistor to each of the three used inputs because I forgot that this isn't available onboard the micro. [IMG]http://i11.photobucket.com/albums/a166/ballsandy/Computer%20related/IMG_9315.jpg[/IMG] (ignore the two 10K's near the bottom of the photo. I forgot to remove them as they don't go anywhere) Two problems so far: 1 - Commands repeat when input is driven. The modem interprets this as useless data and ignores all commands. Keybounce issue? [code]ATS0=1 ATS0=1 ATS0=1 ATS0=1 ATS0=1 ATS0=1 ATS0=1 ATS0=1 [/code] Or [code]ATD ATD ATD ATD ATD ATD ATD ATD ATD ATD ATD ATD ATD [/code] 2 - Input 2 often crashes the microcontroller, requiring you to reset it. It always spits out the first two characters though before it shits the bed. Both inputs seem to do it if you're sitting on the breadboard. [code]AT<nul>[/code] Again, keybounce fouling it up? Even telling the micro to ignore all input for half a second to a full second second after an interrupt will suffice to remove keybounce, I think. At least it is properly detecting motor state using the third input.
[QUOTE=pentium;47873011]Again, keybounce fouling it up? Even telling the micro to ignore all input for half a second to a full second second after an interrupt will suffice to remove keybounce, I think.[/QUOTE] If you suspect your debounce routine, could always try a hardware one.
That's the thing. I don't believe nikomo included a debounce routine. :v: [editline]OH MY GOD MY HANDS ARE SPIDERS![/editline] Because it's been almost two months, here is Nikomo's code, plus my println changes. [code]//interrupt 0 = D2 //interrupt 1 = D3 void setup(){ //Setup inputs pinMode(2, INPUT); pinMode(3, INPUT); pinMode(4, INPUT); //300 baud serial Serial.begin(300); attachInterrupt(0, dialControlInterrupt, RISING); attachInterrupt(1, AAControlInterrupt, RISING); } void loop(){ } void dialControlInterrupt(){ Serial.println("ATD"); } void AAControlInterrupt(){ if(digitalRead(4) == LOW){ Serial.println("ATS0=1"); } else { Serial.println("ATS0=0"); } }[/code]
Posted this in CIPWTTKT but: [QUOTE]Trying to use this tutorial to learn Arduino; [video=youtube;E6KwXYmMiak]https://www.youtube.com/watch?v=E6KwXYmMiak[/video] But I keep getting stuck on the second bit relating to inputs, The LED stays on when I press the button. Anyone got an clues about what's going on here? Here is my setup: [t]http://i1300.photobucket.com/albums/ag90/TheRoboChimp/Breadboard_zpsr0rzboed.jpg[/t] [IMG]http://i1300.photobucket.com/albums/ag90/TheRoboChimp/arduino%20script_zpsxlcd2iuz.png[/IMG][/QUOTE]
[QUOTE=pentium;47874325]That's the thing. I don't believe nikomo included a debounce routine. :v: [editline]OH MY GOD MY HANDS ARE SPIDERS![/editline] Because it's been almost two months, here is Nikomo's code, plus my println changes. [code]//interrupt 0 = D2 //interrupt 1 = D3 void setup(){ //Setup inputs pinMode(2, INPUT); pinMode(3, INPUT); pinMode(4, INPUT); //300 baud serial Serial.begin(300); attachInterrupt(0, dialControlInterrupt, RISING); attachInterrupt(1, AAControlInterrupt, RISING); } void loop(){ } void dialControlInterrupt(){ Serial.println("ATD"); } void AAControlInterrupt(){ if(digitalRead(4) == LOW){ Serial.println("ATS0=1"); } else { Serial.println("ATS0=0"); } }[/code][/QUOTE] Yeah, don't see anything that would count as a debounce. [editline]4th June 2015[/editline] [QUOTE=RoboChimp;47875697]Posted this in CIPWTTKT but:[/QUOTE] Try changing "pinmode(6,0);" to "pinmode(6,INPUT);" and "pinmode(7,1);" to "pinmode(7,OUTPUT);". I don't know for sure if 1 or 0 count as valid pinmode states.
Is that green wire going to the 5V pin, or are you using some separate source? Did you link the ground of the source with the uno?
I made a thing for a person. Should be able to get ~150A @ 12V out of it. It's like 95% done, just needs a couple quirks figured out. [img]http://i.imgur.com/5jgWisVl.jpg[/img] [URL="http://imgur.com/a/rhS5p"]Full album[/URL]
pretty glossy for mdf what primer did you use?
[QUOTE=No_Excuses;47877418]I made a thing for a person. Should be able to get ~150A @ 12V out of it. It's like 95% done, just needs a couple quirks figured out. [img]http://i.imgur.com/5jgWisVl.jpg[/img] [URL="http://imgur.com/a/rhS5p"]Full album[/URL][/QUOTE] "You need to remove 20 screws to get inside" You're a monster.
Removing screws is fun.
[QUOTE=Leestons;47881081]Removing screws is fun.[/QUOTE] Removing screws is fun. Bumping tables and-FUCK where did that god-damned screw go?!
[QUOTE=Zero-Point;47881117]Removing screws is fun. Bumping tables and-FUCK where did that god-damned screw go?![/QUOTE] I use these for storing screws, really handy. [img]http://www.reallyusefulproducts.co.uk/images/onlineshop/rub/fullsize/b00_14litre30ColSet.jpg[/img]
Holy shit I literally just bought a few of those for the same exact reason.
what about those magnetic cups to store shit in.
[QUOTE=pentium;47873011]stuff[/QUOTE] I figured using a rising interrupt would take care of debounce, but I reckon it's executing the interrupt so fast, the signal is still rising. Maybe it'll work better with debounce. I've never actually implemented debounce before - try this: [code] //interrupt 0 = D2 //interrupt 1 = D3 long lastDebounceTime = 0; long debounceDelay = 50; // 50ms void setup(){ //Setup inputs pinMode(2, INPUT); pinMode(3, INPUT); pinMode(4, INPUT); //300 baud serial Serial.begin(300); attachInterrupt(0, dialControlInterrupt, RISING); attachInterrupt(1, AAControlInterrupt, RISING); } void loop(){ } void dialControlInterrupt(){ if((millis() - lastDebounceTime) > debounceDelay){ Serial.println("ATD"); lastDebounceTime = millis(); } } void AAControlInterrupt(){ if((millis() - lastDebounceTime) > debounceDelay){ if(digitalRead(4) == LOW){ Serial.println("ATS0=1"); } else { Serial.println("ATS0=0"); } lastDebounceTime = millis(); } } [/code] You might have to play around with how much debounceDelay you want. That should work - at least it compiled. Note of warning: Because of how interrupts work, the millis timer won't increment during the interrupt call, so you might have to lower the debounceDelay, because the debounceDelay will actually be delay + the time it takes to execute the interrupt routine.
Interesting question - how would I go about finding a legitimate FT232 breakout on ebay? For this DMX controller, I think I may have gotten a fake one because it cuts out after a minute or so and won't communicate unless I power cycle it. [editline]5th June 2015[/editline] Also how can you tell a fake from a real one? I want to make sure this isn't an issue with FTDI chips in general because that would be a bummer.
[QUOTE=papkee;47887371]Interesting question - how would I go about finding a legitimate FT232 breakout on ebay? For this DMX controller, I think I may have gotten a fake one because it cuts out after a minute or so and won't communicate unless I power cycle it. [editline]5th June 2015[/editline] Also how can you tell a fake from a real one? I want to make sure this isn't an issue with FTDI chips in general because that would be a bummer.[/QUOTE] Some earlier revisions of the legit FTDI USB to UART converter IC's are known to be buggy, and there's also the risk of getting a breakout board with a counterfeit IC.
I've got a 10th week 2014 chip on this board. It looks legit (not crumbling, badly printed or otherwise) but I know that what I'm trying to do with it has been done by many others many times.
[QUOTE=papkee;47887898]I've got a 10th week 2014 chip on this board. It looks legit (not crumbling, badly printed or otherwise) but I know that what I'm trying to do with it has been done by many others many times.[/QUOTE] [url]http://shop.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=182&title=UM232H-B+Modules[/url] FTDI themselves sell them, but not cheaply. There are other types available too, I think molded cables etc.
You could get a breakout from eBay with a probably-fake chip on it, then desolder it, and put a real one on it. Or get a chip from a company that doesn't suck ass, or at least doesn't directly attack you.
Yeah I'm really not too excited to solder something that small though, especially when all I have is a pencil iron. Smallest I've been able to do so far is SOT-223 which is pretty big in comparison.
[QUOTE=papkee;47891323]Yeah I'm really not too excited to solder something that small though, especially when all I have is a pencil iron. Smallest I've been able to do so far is SOT-223 which is pretty big in comparison.[/QUOTE] Home-made reflow ovens, my boy! Also, got a 10-pack of new soldering iron tips from Cheapistan, yaaay! Turns out there's no "well" tip included which is apparantley pretty good for soldering SMDs, boooo.
You can solder pretty much any SMD component with any tip as long as you use flux. A well tip is nice for drag soldering though.
Yeah I've never tried anything small enough to really tell but I haven't started using flux yet. I have heard it's like magic though.
[QUOTE=papkee;47893012]Yeah I've never tried anything small enough to really tell but I haven't started using flux yet. I have heard it's like magic though.[/QUOTE] It IS magic. It's helped me in situations where pin density made it impossible to otherwise prevent bridging. The only downside is that it's generally a bitch to clean off.
Sorry, you need to Log In to post a reply to this thread.