|
1082
|
Forum 2005-2010 (read only) / Interfacing / Does anyone sell an ISP for Pro Mini?
|
on: February 20, 2010, 05:30:19 am
|
|
I've just gotten my Arduino producing some sounds and I noticed the boot time was a bit long. As I'm gonna be putting these in props I sell, I would like to get rid of the delay if possible.
My research tells me that the only way to do that is by burning a new bootloader, and that to do that I need an ISP cable, but Sparkfun doesn't seem to make one for the mini.
I've found the page with schematics on how to modify one of the six pin ones to work with the mini, but I'd rather not cut one apart and solder my own. I'd prefer a high quality one with female connectors. (I solder machine pins to my pro minis so I can plug them into an IC socket.)
So, does anyone sell these? Or will I be forced to destroy a pretty cable to make an ugly one eventually?
(I would prefer a USB model btw.)
|
|
|
|
|
1084
|
Forum 2005-2010 (read only) / Interfacing / Should I disconnect battery when uploading sketch?
|
on: February 19, 2010, 03:02:33 pm
|
|
I have an Arduino Pro Mini, and I'm gonna be hooking a 9v up to the RAW and GND pins. I want to know if I need to unplug the battery when I plug in my Sparkfun 5v Basic Breakout board to upload a new sketch.
I suspect it won't be an issue, but I know the breakout board also provides power, and I didn't want to risk overloading something.
|
|
|
|
|
1086
|
Forum 2005-2010 (read only) / Interfacing / Re: Multiplexing - I need to run this idea by someone
|
on: February 18, 2010, 08:22:50 am
|
One more question.  If I expand the circuit out like this, and have pin 1 set high, pin 2 set low, and pins 3 and 4 set to an input state, is that still going to light the correct LED? It's not gonna cause a short or something, will it? I'm guessing it will work fine, but I don't like guessing. :-) (Just an aside, I should probably flip the led's around here so the anodes and cathodes are the opposite way, because the indexing pattern will be screwy if I keep them this way.)
|
|
|
|
|
1087
|
Forum 2005-2010 (read only) / Interfacing / Re: Multiplexing - I need to run this idea by someone
|
on: February 18, 2010, 07:46:45 am
|
If so, do I need redistors on the columns, or will just the rows suffice So that circuit I drew will work? And I can remove the resistors from either the rows or the columns? That's great! If I remove the resistors from the rows, then that means I can multiplex four 20 segment led bargraphs off my Arduino Pro using just 14 pins and 4 resistors! (Or just 13 pins and 5 resistors if I got creative with the wiring and treat them like eight 10 segment bargraphs.) I just hope I can multiplex them fast enough to avoid flicker. But I'll cross that bridge when I come to it. A little flicker won't neccesarily be a game killer. Anyway, thanks for all the help!
|
|
|
|
|
1089
|
Forum 2005-2010 (read only) / Interfacing / Re: Multiplexing - I need to run this idea by someone
|
on: February 18, 2010, 07:26:02 am
|
Here is the circuit I'm proposing, maybe this will help:  So, looking at this, let's say I I set pin 1 high, pin 2 low, and pin 3 to an input state. What will happen? My intuition tells me, that current should flow from pin 1 through the top led, and then down to pin 2, and that the second led below it, on the loopback, shouldn't light. And if I then reverse that and set pin 1 low and pin 2 high, then the reverse should occur. And lastly, if I set both pins to an input state, then neither led should light. Is this correct, and if not, why?
|
|
|
|
|
1090
|
Forum 2005-2010 (read only) / Interfacing / Re: Multiplexing - I need to run this idea by someone
|
on: February 18, 2010, 06:52:50 am
|
No. One pin can only be in two states (zero or one) This driving technique is called Charliplexing, google it. It involves setting a pin as a high impedance, so a pin has three states Aren't these two statements conflicting? Also, I don't need to google Charlieplexing, I already did. That's what gave mt the idea for this technique. I said so much at the satrt of my post, and even posted a schematic from the article. Two LEDs controlled independently can have four states, therefore you need to be able to set four states in software. The minimum number of pins for four states is 2. I undertsand what you're saying, but when I said I wanted to control the LEDs independently, what I meant was I wanted to be able to turn one or the other on, or both off. That's three states. And can't that be done with Charlieplexing and that third input state? That second circuit will not work. First off if the pin is low then the top LED is lit. If the pin is high both LEDs are lit. I don't understand.  If pin 1 is set high (+5v), then electricity should be flowing from it, through the bottom LED, and to ground, which I assume is 0v. How can the top LED light though? Oh... wait, I see. I failed to take into account there is a direct path through the second LED to ground. DUH. Hm... This driving technique is called Charliplexing, google it. Okay, but my question, now reworded, still stands: Can the 2 LED version of Charlieplexing be used to control the rows in an array of LEDs, to reduce the number of pins needed for the rows by half?
|
|
|
|
|
1091
|
Forum 2005-2010 (read only) / Interfacing / Multiplexing - I need to run this idea by someone
|
on: February 17, 2010, 04:31:53 am
|
Hey guys, I've been planning to build a project where I need to control four 20 segment led bar graphs, and I've been considering my options for how to control them with my Arduino Pro Mini. Multiplexing is one obvious solution, but dividing the array up into 8 10 segment sections would still require 18 pins, which is too many. Other solutions I've looked at are leaving out a few of the led's on each end, shift registers, and charlieplexing. None of which are particularly appealing to me, for various reasons. Charlieplexing got me thinking though. I was looking at this graphic in the Wikipedia article about it:  And I wondered... why use two pins to control two leds? Why not do this?  So I looked up whether that was possible, and I found this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1249317220Which says you can indeed use this method to turn one led on, or the other, but if you want to turn both off, you need a diode. But that only applies to one pin connected through two leds to Vcc and Ground. Now, at this point, I must admit, I've reached the limits of my knowledge of circuits, but this is the idea that came to me: If you can do the above... if you can indpendently control two led's from one pin, could you use this to reduce the number of pins needed to drive an array? What I'm imaginging is an array where every other row has the led's reversed, like so: (-+)(-+) (+-)(+-) The idea being to connect rows 1 and 2 to pin 1, and colums 1 and 2 to pins 2 and 3. Setting pin 1 high would then give the led's in row 1 the potential to light, while the leds in row 2 would not conduct. (I am indexing here with 1,1 in the lower left corner because I am designing a vu meter, btw.) Then, setting pin 2 low would cause led 1,1 to light, while setting pin 3 low would cause led 1,2 to light. Of course there is the issue of what happens when you expand this out. What if there were four leds in each column? Then you would have two leds in each columnt that would be set high or low. But this is where the charlieplexing comes in. There's that third state. Could you set all the unused pins to an input state perhaps to make this work? What do you think? Would this allow me to multiplex a 20 x 4 matrix of leds with just 14 pins, or a 10x8 matrix with just 13, instead of the 18 or 24 pins which would normally be required? And without a bunch of extra diodes? What I like about this idea is that the wiring would be really simple, and I don't think there'd be issues with leds burning out if the code crashes. Ofcourse that assumes this would work at all. And I have no idea if it would.
|
|
|
|
|
1094
|
Forum 2005-2010 (read only) / Interfacing / Re: Do I need a resistor with a piezo?
|
on: February 12, 2010, 05:11:58 am
|
But wait... I used the LED array wizard to calculate how big of resistors I needed to power my LED's. I input 20ma of current, and the voltage across the LED, and for my blue and white led's it spit out 82 ohms. So what's going on here? Is my calculation about needing a minimum of 150 ohms of resistance per pin wrong, or did I not input the correct value into the led wizard for the current? You're supposed to input the current you want to flow across it, aren't you? And the voltage you want to run the LED at? Here's the LED calcualtor I used: http://led.linear1.org/led.wizFor the blue and white LED's I input 3.5v and 20ma. Is using an 82ohm resistor here going to stress my pins? Or is there something else going on with the LED's that makes them different from the piezo? God I just know it's gonna end with me blowing this thing up.
|
|
|
|
|
1095
|
Forum 2005-2010 (read only) / Interfacing / Re: Do I need a resistor with a piezo?
|
on: February 12, 2010, 05:03:52 am
|
No it was about a piezo. You sure about that? Hello, I'm writing a tutorial for newbs (also as a newb) that describes how to play music using an Arduino and CEM-1203 buzzer. http://parts.digikey.com/1/parts/42-buzzer-2-048khz-12mm-pc-mount-cem-1203-42.html"Type: Magnetic Transducer, External Drive" Even the spec sheet you posted in the thread refers to it as a magnetic buzzer: http://www.sparkfun.com/datasheets/Components/CEM-1203.pdfIt is not so much the current that it takes but the fact that a piezo looks like a capacitor. If you apply a voltage across a discharged capacitor initially it looks like a short circuit. Therefore you are stressing the arduino's output pin. This makes perfect sense. I was actually wondering about this, but since folks were saying it didn't need one because it behaved like a capacitor, I assumed that the current was so brief that it didn't hurt the pin. I'm now thinking though that while it would only flow briefly when charging the piezo, in order to make sound the thing's gotta charge and discharge thousands of times a second, doesn't it? So it might as well be a constant current. Hm... So what's the smallest resistor I need to keep the current below 40ma? Based on R = V / I, I calculate it to be: R = 5v / .040 amps Or 125 ohms. And resistors often have a +-5% tolerance, which if I understand that correctly means a 125 ohm resistor might actually be as little as 114 ohms. So to be safe I should go with one that is at least 132 ohms. That sound about right? Luckilly, I ordered some 150 ohm resistors, so I guess I'll stick one of those on there.
|
|
|
|
|