Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
I would find a wall wart thing, but I'm trying to put this into something that I might sell a few of, so I can't simply "find" things and incorporate them.
[...] does anyone know of a schematic that does something like this?
For DC power...Do you guys think I should go with 12V, in case I want to incorporate anything else later, or should I go with 5V, because that's all I really need (and regulation will be really easy).
So, just a quick question. If something can provide .5 amps at 9V, it can provide .9 amps at 5V? I know the regulator will take some power, but how much? Secondly, since I'd be using LEDs that will probably run at 3.5ish V and 30ish mA, and I'd be controlling them with resistors, how does THAT factor into the equation?
So if I were something like this in my project, what else would be involved in the "power regulation". A couple capacitors and maybe an inductor? I'm trying to plan out a price range here.
Hi,you could get VA in = VA out, but in this non-ideal world
Only your total current factor in. You might get the idea to run more than one LED for each LED in the schematic, if not now, perhaps later and what other stuff would you drive from the supply besides LEDs and the controller?
I am still not sure what voltage you want out, 5V or 12V?And at what current?Do you plan to use A/D-C? And if so, how many bits precision? (That decides how noise free it has to be).
Oh, I only used 8 bits precision instead of the 10 offered. I don't know if that is really accurate, or not that much. I chose it because there are two places for the result of the ADC. One holds 8 bits, and the other holds 2 bits. I read that it is possible to read only the most important 8 bits, so that's what I did. (It was much easier that way.)
I also do this at times for not critical ADC measurements in PICs. I Left Justify the ADC result and only use the upper 8bits.
if I only use 8 bits, is it really (Vin*255)/Vref?
So I don't exactly know how stable a power source has to be for ADC to function correctly, but I see the importance now
I want 5V output. I found this on digikey. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=T977-P6P-ND . It provides 1A at 5V DC. I looked for one between 500 mA and 1A, but couldn't find any. I figured if I could power 25ish high power LEDs (40mA) then I have all of my bases covered. And when it's only 1 or 2 dollars more for twice the amperage I'm happy. Plus it's an energy star adapter, so power isn't wasted. However, if I actually need more than 5V to get a regulated 5V output, I also found this one. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=T1019-P5RP-ND I don't really know which one I need, but either is fine.
Yes I do plan to use the analog/digital converter. However, it doesn't have to be extremely accurate. I do see where the source would affect the accuracy, since the ADC uses source voltage as a comparison number. However, the way I see it is that the thing I'm adjusting with the ADC, the total brightness factor (TBF), is relative. I'm not doing precise calculations with them. Plus, what's the lower limit for recognizing LED brightness changes in humans? Is the (in)accuracy of the ADC going to change the brightness to a point where someone would recognize it? My point is that it doesn't need to be extremely accurate. Oh, I only used 8 bits precision instead of the 10 offered. I don't know if that is really accurate, or not that much. I chose it because there are two places for the result of the ADC. One holds 8 bits, and the other holds 2 bits. I read that it is possible to read only the most important 8 bits, so that's what I did. (It was much easier that way.)
Anyway, I made a discovery about noisy power. [...] The voltage varies from 5.07 to 5.12. This wreaks HAVOK on ADC. So, I used a much more stable power source (a 5V switching regulator and lab bench PSU), and it worked much better, not even close to perfect, but better. So I don't exactly know how stable a power source has to be for ADC to function correctly, but I see the importance now.
Hi,How is your circuits analog reference voltage decoupled and such (a schematic would help).
I'll throw a 5V LDO on-board regulator together, but the analog side will probably still need attention.
Uh... as I'm new to ADC, I used the most simple circuit available. I don't think I decoupled anything (although I have read about it). I simply took a wire and ran it from my 5V+, to the Vref. HOWEVER, I wrote a program to blink LEDs to tell me what the resultant value from the ADC was, and it's stays constant. It's been sitting in front of me blinking 1, 3, 2 (132) for 10 minutes. (I think I could have done this an easier way.) That makes me doubt that the ADC is my problem. Regardless, I want to have a very constant power source.
I wish I could learn how to design those things.
(So I don't have to keep pestering you for schematics )
Where do you learn that kind of stuff?
Hi,Nice way to check the A/D-C, but did you try to change its input to get different readings or was it just open circuit?
You'll have to make sure the analog reference has a direct feed (with nothing else tapping from this line) from where the supply enters the board and then add 1..2 decoupling caps as close to the pin as physically possible. 4µ7 and 10n in parallel or something in that vicinity should do.
Of course! If I understand what you are asking, I had a potentiometer hooked up to the ADC. I really wanted to see if I got values from 255 all of the way down to 0, or if it was more like 250-5. It turned out to be the former although it's VERY touchy to try to get specific values. I thought the POT was the problem originally. I thought maybe whenever I turned it the dial wouldn't stay in a the same spot causing for some wobble. However, that was not the problem.
I understand the REASONING for the capacitors. They store energy in an electric field (between a negative and positive plate), so that whenever a high demand time comes they can simply provide energy FROM the field to the circuit preventing "noisy" power. I THINK I understand the reason for 2 capacitors. One big cap for large power spikes, and one small one for smaller wobble. (Large caps won't be able to do anything about tiny power fluctuations.) Am I correct?
Also, the direct feed? I understand WHY, just not the HOW. So I should have one +5V wire that powers my MCU and other things, then I should have a separate +5V line that goes to Vref? Aren't both of those +5V coming from the LDO supply? (If I use the LDO supply) If so then how does that work, because the two would still essentially be connected to each other?
I will be using a PCB, so that solves some of the problems.
Hi,Some are 270°, some are 3600° or more.
So, we grab the "signal" where it's the cleanest and feed it to the reference without allowing any consumers to taint that lead. Right at the analog reference pin, we buffer with caps that'll lower the impedance at the point and provide noise dampening.Don't be scared if you don't get some (or most) of it, the above will be several books if you want a full explanation and you will get it over time, just grab what you get (and need) at the present.
Certainly!I guess you know that stripboard isn't PCB (which is an acronym for Printed circuit Board?(Despite the name, it's neither wood for making poles in clubs for grown up single males )
Mine's a cheap 270˚ servo from radioshack!
[...] the last few degrees of the POT all gave values of 255
EDIT: It was my programming. I was dividing an int by a double, to get a percentage 0<=x<=1. Because it was an int, when the calculation would result in something less than 1, the result would simply be zero. I don't know where the flickering was coming from. I fixed it. There doesn't seem to be any change resulting from the instability of the ADC at all. (At least none that I can see). My rounding function slows my program down a whole lot though. Again this doesn't matter in the long run, it's just an observation.
I understand. I just thought ANYTHING connected to a source, regardless of position (close to source, or far) affected EVERYTHING that was connected to it. For example, I thought that even though we'd grab the reference from the clean point, the things connected further down the line would affect the reference. Apparently I was wrong. Chalk that one up to inexperience!
[...] being a chemist and all, so it shouldn't be that hard. I believe the timing would be the hardest part.