Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
SnoPuppy
Jun 15, 2005
Just want to add a few more links:

Linear Technology makes a free version of SPICE available from their download page:
http://www.linear.com/designtools/software/index.jsp

Its not too bad and it has all of their parts included in the library.


Another decent PCB layout tool that is free for hobbyists is CadSoft's EAGLE. The unregistered version does have some limitations, but generally they don't seem to be too much of a hassle for smaller designs.
http://www.cadsoftusa.com/

Adbot
ADBOT LOVES YOU

SnoPuppy
Jun 15, 2005

Chalupa Joe posted:

In my experience, 99.99% of the time where the Auto-router is used, you end up with a board that won't work properly (i.e. susceptible to EMI), as they're all variations on "Drunkard dragging a wet bit of string around".

this page: http://www.alternatezone.com/electronics/pcbdesign.htm has a good tutorial including examples of what, and what not to do when laying out boards.

This is very, very true. Especially if you have switching power supplies, high speed traces or sensitive analog areas, your layout becomes as important as the actual schematic.

I know some people might be put off at the complexity of doing a hand layout using free tools, but realize that even expensive software packages will probably still suck enough to make you do it by hand as well (I'm looking at you Mentor Graphics).

SnoPuppy
Jun 15, 2005

babyeatingpsychopath posted:

I'm asking because it doesn't make sense (to me) to have a resistor when using a single AA battery to light an LED with a max drop of 1.4V. If the battery starts at 1.4V max and only gets lower as it discharges, why put more components in the circuit?

Because what if, due to manufacturing tolerance, your LED only has a 1.3v drop? Or your battery turns out to be 1.5v?
You generally include a resistor as a safety margin and as a way to limit the current into the LED.

SnoPuppy
Jun 15, 2005

SuicidalSmurf posted:

Looking at the specs for this chip on digikey, it appears the supply voltage is between 4.75-5.25v. This will be switching 12vdc. Is there a similar chip with higher voltage capabilities or am I missing something?


Forgive me if this seems like an obviously dumb suggestion, but why not just use a SPDT push button with an "alternate" or "on-on" or "locking" action instead of momentary? Just connect one side to ground and the other to your 12 volts (make sure it is a break before make switch).

This seems like it would be the easiest way to switch 12v, especially if it is carrying some current.

SnoPuppy
Jun 15, 2005

Jabab posted:

I would've thought it would be I=0.03A*3 so 1.5/0.09 because there's 3 LEDs.
Nope. The current in must equal the current out.

Jabab posted:

Also there's different types of resistor like 5% 0.25W resistors for example. How do you know what to pick?

P=I*V

In your case it should be 1.5v * 30 mA = 0.045 W

A 1/4 watt should be fine

SnoPuppy
Jun 15, 2005

babyeatingpsychopath posted:

The thing about opamps is they need dual voltages, because they amplify signals that have both positive and negative voltage. Without positive and negative voltage (or differential voltage, such as from a voltage divider) the opamp just won't work at all. It will "do stuff" but not what you think it should be doing. With DC filter caps on the input and output, it won't do anything at all.

I played around in spice with this for a bit and am convinced that opamps are magic.

Op amps are super easy, especially when compared to trying to do an equivalent circuit with discrete transistors. There are only two rules you have to remember for op amps, assuming you have negative feedback.
1. No current will flow into the input terminals
2. Both input terminals will have the same voltage present on them

The output will do whatever it must in order to satisfy these conditions.

And it is quite possible to operate an op amp without a negative supply - you just will clip at around 0v instead of -Vcc. All you have to do is bias the input of the op amp to a DC offset and AC couple the inputs/outputs, like in his schematic.

While SPICE is a good tool, remember that 95% of the time it is using a simplified model. If you understand how it works then you can then determine if it's doing something reasonable or something stupid - you shouldn't blindly follow tools without knowing what they are doing under the hood.

SnoPuppy
Jun 15, 2005

babyeatingpsychopath posted:

I got an LM317 voltage regulator, and it's totally tits. The datasheet for the thing is 26 pages long, six of which are schematics showing you how to do stuff.

One of the "stuff" things you can do is have digitally selected output voltages using transistor-controlled resistors.

This, I understand.

What I don't understand very well is how this device works. Does it need a resistive load on the adjustment output, or will a differential voltage load work? I'd love to be able to infinitely vary my output voltage using a DAC. I'm not sure if a variable resistor that can be controlled electronically even exists. Does a transistor work this way?

And you can! The easiest way to think about it is that the regulator wants to keep its Vref at some constant voltage (probably 1.25, if I am remembering correctly). It will adjust the output until this is stable, hence why you need the feedback resistor and then the resistor to ground. If you didn't have the feedback, it would just hit one of the rails.

To operate it with a DAC you just need to to replace the ground connection with the output of your DAC. This will allow your DAC to control one of the points on the voltage divider and thus control what the output level needs to be to satisfy the Vref requirement.

SnoPuppy
Jun 15, 2005

DrColossus posted:

I've got a 24 volt, 20 amp power supply and need to run a 12 volt battery charger on it. Is there an efficient way to drop the voltage without just burning it off in a resistor? Ideally it would be able to output 15 amps, but 10 or so would be tolerable.

I've seen commercial products that do what I need, but they all have huge heatsinks which makes me think efficiency isn't their strong point. They're also expensive: I could always just get a 12v supply.

The (possibly) easiest, and least efficient way, would be a resistor/linear regulator combo. Even then, it would have to be quite beefy as you would be trying to dissipate something like 180 watts of power. The other option would be a switching power supply - those are much more efficient, but much harder to design/build/debug. I would bet that those commercial products are actually switchers, as even at 90% efficiency you still have to dissipate around 20 watts (that would need some big heat sinks).

I wouldn't be surprised if your cheapest option is just to buy a 12v 15A supply, rather than attempting to use what you have.

SnoPuppy
Jun 15, 2005

the wizards beard posted:

If you have never designed and implemented that black box or don't know how, then you really shouldn't be using it.

I hate this argument, since you could extend it to so many things that are just used as "black boxes". If I've never built a D-FF from scratch, or a multiplier from gates, does that mean I shouldn't use a micro controller?

While it's beneficial to understand roughly what is going on behind the scene, it isn't always needed. Many times doing it from scratch, while a learning exercise, is also an exercise in time and patience - especially when off the shelf building blocks will do it faster and cheaper. I agree that a basic understanding of the principles make solving problems easier, but that doesn't mean you have to build it from scratch (or even know how it works internally).

For the record, I don't mean to piss on the thread - I really like the explanations/tutorials that are being posted.

SnoPuppy
Jun 15, 2005

mtwieg posted:

This is true some times. Black boxes have legitimate uses, but a lot of designers I know rely way to much on them. If they want a precise constant clock source, they'll buy a high end PLL or whatever for five dollars rather than assembling the six components needed to make a pierce oscillator with fifty cents, which literally works just as well. Need a bandpass filter? They'll get a ten dollar switched cap filter, rather than a dual op amp with a couple resistors and capacitors for a dollar. Need an RF transmitter? Screw a few dozen components for five bucks, lets get a hundred dollar zigbee!

et cetera.

I dunno - even some of your examples are kinda iffy. If I want a precise clock source, I am willing to pay for an oscillator that has < 0.5 ps of jitter rather than try to develop and debug one myself. Plus a stand alone oscillator takes up less space on a PCB than several discrete components. PLLs have their place when you are trying to get two clocks in phase with one another, or when you need to have very low clock skew (zero delay buffer).

You have to realize that when you buy something like the zigbee, you're not wasting all that money compared to $5 worth of components. You get a part with known characteristics and a much easier to use interface. For $5 worth of parts, do you know the approximate bit error rate? The power consumption?

What specifically makes an op-amp an "ok" black box but an oscillator or RF IC not ok?

SnoPuppy
Jun 15, 2005

Blackhawk posted:

I need some help with interfacing 5V sensors to 3.3V circuits. I'm trying to interface a 5V analogue output (0-5V) pressure transducer to a 3.3V datalogger and I want to do it with as little error as possible. The simplest way would probably be using 2 resistors as a voltage divider to drop the 0-5V signal to 0-3.3V however I'm worried about the error inherent with this method and there's probably much better ways to do it.

How precise do you actually want it (and what is the sampling rate)? Also, does the datalogger already have an analog to digital converter? Many PICs and other micro controllers have them built in already, although I don't know if the error will be sufficiently low.

If you don't have any input impedance needs, I would recommend just using a resistor divider network with smaller, high accurate resistors (probably metal film <= 1%). Smaller resistors will have less thermal noise, although depending on the ADC it might be overkill.

SnoPuppy
Jun 15, 2005

Blackhawk posted:

The datalogger is a blackbox, but yeah it already has an ADC. The problem is the ADC in the logger has a fixed voltage range of 0-3.3V and the sensor has a fixed voltage range of 0-5V, and I need to interface the two. The sample rate will be between 500 and 1000Hz.

Well a resistor divider will still be the lowest cost and lowest noise option. a 1K resistor will produce around 4 nV/sqrt(f) of voltage noise. With your bandwidth, that would amount to about 126 nV of noise. How many bits is the ADC (and, more importantly, how sensitive and accurate is the pressure transducer)? That noise is well below even a 16 bit ADC.

The only reason you wouldn't want to use an R-divider is that it will have the effect of setting the input impedance of your ADC at a much lower value, forcing your transducer to supply more current.

Although, since the transducer outputs 0-5v, I would suspect it is already buffered. If you want, look at the max current it can source and make sure that it is less than the current in the R-divider.

SnoPuppy
Jun 15, 2005

pim01 posted:

Great explanation, thanks!

Slightly related question: I'd like to measure ripple/switching noise from a power supply (because it's making one of my amps have a terribly high noise floor). I don't have an oscilloscope, and the scope at work broke. I do have some audio visualization software I wrote, which I can easily modify to use for more general 'scoping prurposes. To use my soundcard's input, I guess I'll have to bring the voltage down to line level, say 1 or 2 volts. Will using a resistor devider still allow me to make somewhat useful measurements?

You might be able to AC couple to your sound card's input. Just put a large value capacitor directly in the signal path. I would double check with a volt meter first though (I have never done this and it seems like it could be dangerous to stick high voltages near your PC). What is the voltage of your power supply and the switching frequency?

The problem with a resistor divider is that it will cut into your dynamic range significantly. For example, if you are trying to see 1v of ripple on a 20v power rail, you have already reduced your dynamic range by a factor of at least 20. If you AC couple then you should effectively block the DC components of the signal while passing only the ripple.

Also, how do you know your noise floor is higher without access to a scope? It could very well be a ground loop introducing the noise. Ripple wouldn't show up as broad band noise - just some wide-ish spikes in the spectrum.

SnoPuppy
Jun 15, 2005

Fatal posted:

I'm still waiting for some components (so I can test this question) but I was wondering what would happen if I only attach a positive voltage source to an opamp Vcc (+) and nothing to the negative input? Would it only show the positive part of the output signal, nothing at all, or blow up? As a side question, any elegant way of producing a negative voltage source besides putting two batteries in series and grounding the junction point?

If you ground the negative rail, everything in the opamp will be referenced to a "virtual ground" that is Vcc/2. Thus, you would need to AC couple the input and outputs, otherwise you will get a signal that has a strong DC offset.

Remember, voltage is just the difference between two arbitrary points (one of which is normally ground, but not necessarily).

SnoPuppy
Jun 15, 2005

Cannister posted:

So I've got a question, and I figured if there was anywhere to turn for reliable knowledge it was SA.

I'm designing a pair of circuits that act as remote I/O controllers for a series of home-made servers. I've got one board whose power supply will be the 5v line from a computer power supply. The schematic and protoboard are finished and functioning, and now I'm on to the PCB design. I'm brand new at this and not really sure what to do a lot of the time. I'm designing the board using Eagle 5.0.0 Light. I think I've got most of it worked out, but there are a few things I could use a little assistance with:

1) Ideally I'd like to place a reciever for a standard 4-pin Molex connector (like this guy) built into the PCB board. I have no idea where such a part would exist in the standard Eagle Libraries. Any ideas? The socket labeled X2 is the Molex 4-pin duel line, and I need it all in one line. That one's just filler on the schematic.

2) If I can't find such a connector in the standard libraries I could then resort to putting 4 solder-pads on the PCB board and just solder the wires straight in. I've never done this so I'm unsure how large should the solder-pads be? Are they just holes in the PCB board with a little metal ring around them or did I find an image of somethign else.

3) What's a via? Is it just a spot where the built-in lines on the board (what are those called?) cross from one side to the other?

4) I used Eagle's "auto" function to lay out those built-in lines for all of the devices. Is it something I can trust? I'll include an image of what it gave me below - if anybody with experience sees any blaring problems please point them out to me as I want to get this right - it's for work and I'm an intern looking for a good letter of recomendation. Any help will be extremely appreciated.



1) Not sure - its possible that they don't have one. Do they have a connector section? Try looking there - you may have to find a similar part to put down.

2) Look at the data sheet for the connector - it will tell you the exact mechanical dimensions for the part, including pin pitch/solder pad size. Normally "solder pad" refers to a surface mount connection and a plated through hole is for through hole pins or wires. If you decide to solder wires, just drop down 4 header pins - those should be through hole.

3) Yes

4) I never like to trust the auto router in any tools. You can almost always do better by hand routing it, but its your call. I would have to examine the routes a bit more to offer anything definitive in your case.

SnoPuppy
Jun 15, 2005

Jonny 290 posted:

Those waves do not have a voltage or current, but they will induce a voltage or current as they pass through a conductor.

For what it's worth the average level of a signal needed for clear FM reception (what FM radio, police radios, etc) is around 0.16 uV. Field strengths are measured in 'microvolts per meter'.

Also, the Darlington doesn't have much to it. At the cellular frequency range you are generaly using FET transistors or more likely MMIC's (monolithic microwave integrated circuits) which are a relatively new tech, bascially an easy to use amplifier block in one chip. Very high frequency and microwave tech is hard to engineer and build, and MMIC's make a lot of commodity situations much simpler.

I'm a digital guy so I don't really know too much about the black arts of RF design, but I have been wondering what types of gains are required in an RF front end. For example, if I have an average FM antenna, what would the induced voltage from an average FM station be (so I would know how much to amplify to feed an A/D)?

I know this is probably too open ended to get much of a response, but I have been curious about some rough numbers (is it on the order of uV? nV?)

SnoPuppy
Jun 15, 2005

BeefofAges posted:

No, not really. A compiler is generally smarter than all but the most geniuslike of programmers. Programming in assembly is also much, much slower than using a high level language.

I sort of agree. I think that knowing how to program in assembly gives one a much greater appreciation for the underlying hardware, leading to more efficient programming in a higher level language. Sometimes you can really trim down an inner loop by writing in assembly, since you can cut away any and all unnecessary instructions.

But, depending on how complicated the ISA is, many times a modern compiler will produce faster/better code. This is especially true for processors with a more complicated architecture.

For a RISC ISA, it may not make much of a difference in performance, but C will usually be fast enough until you are trying to squeeze out the last cycle. In addition, it is much faster to program in C vs asm.

Then again, C is basically assembler with some syntactic sugar...

SnoPuppy
Jun 15, 2005

JawnV6 posted:

Are you expecting to be called out on this? Would you care to back that up at all or are you just trolling?

All I meant is that straight C is pretty low level. There are very few things that you could do that wouldn't be obvious how to do in assembly. And, unless it relies on some obscure opcode, you can generally turn assembly into C.

SnoPuppy
Jun 15, 2005

BattleMaster posted:

No, most hand-written Assembly code doesn't have an analog in C. It's hard enough to accurately decompile a program written in C back into C.

Edit: For instance, a lot of hand-written Assembly code will do fancy things with CPU registers and the stack (if applicable on your hardware) that you can't represent in C because C abstracts both of those things. Hand-written subroutines and flow control and often look and act nothing like C functions and flow control statements as well.

Initially I was referring to a RISC ISA, which generally doesn't have too many 'fancy' instructions. I will grant you that a CISC ISA will be significantly more complicated, although usually that just moves the advantage to the compiler (because its easier for a tool to deal with all the different instructions).

Lets take a look at a common RISC architecture, MIPS. You can do basic math (add/sub/mult/div) and basic logic operations (as well as shifts). There are a handful of compare, branch and jump instructions (6-7 maybe?) and a few ways to address memory. Nothing is very fancy and its pretty easy to see how you would accomplish the same thing in C. Granted, depending which compiler is used, the results may be very different, but I imagine that a good compiler could produce similar code. This is especially true if the coder understands the hardware and how the compiler will generate instructions.

I think its important to understand assembly - knowing the hardware makes you a more efficient coder. Its just that C is much easier to read and faster to code.

SnoPuppy
Jun 15, 2005
I know its a long shot, but I have an electronics related question and this seemed like the best place to ask it.

I have some 40 KHz ultrasonic transducers that I am using as a pulser/receiver pair. I am able to transmit and receive pulses just fine, but I am trying to get high range resolution and am running into some issues. It appears that my receiver continues to oscillate after the receive echos, giving me what looks like a longer pulse. This is bad, because two objects that are close together are not distinguishable (their echos overlap).

Is this just a function of my cheap rear end transducers? Or is there something that can be done to reduce this echo? Right now the RX side is just AC coupled into an A/D.

Originally I was going to try to send a coded pulse out and convolve the echo with the transmitted pulse to compress my returns (similar to RADAR), but this ringing effect makes that almost impossible.

SnoPuppy
Jun 15, 2005

Cross_ posted:

I did some ultrasonics range sensing a long time ago- so take with a grain of salt:
For timing pulse travel duration we used a comparator on the receiving end that would trigger upon reaching an adjustable threshold. Even if your transducers ring (and we did not notice such behavior with our devices) those signals would not exceed the maximum amplitude you get from the initial pulse. Of course if you are trying to detect phase shifts (and higher precision) then that would be more problematic. One issue we did see in our system was the reverse: the transmitter amplifier was slow to reach its peak output. We ended up priming it for a fraction of a second before closing the switch to the speaker.

I have no clue what you are saying here, but if you want high speed readings I would recommend putting some kind of time code on top of the signal. It's secondary echoes (delayed reflections) that gave us huge problems.

The maxbotix sonar board has gotten some good reviews. Here's their FAQ:
http://www.maxbotix.com/MaxSonar-EZ1__FAQ.html

I appreciate the response!

I am actually using a 500 Kilo-sample/second A-D converter to sample the return echos (after they have been amplified), so I get the raw 40 KHz return echos with which to do signal processing on.

Right now I am just sending a burst of 10 cycles out and listening for the return echo.

What I want to try to do is selectively invert the phase of the transmitted burst (i.e. two cycles at 0 deg, three at 180 deg, another at 0 deg, etc). Basically binary phase shift keying.
By doing this, you get a signal that has very nice auto correlation properties (see: http://en.wikipedia.org/wiki/Barker_code).
It allows you to spread your tx power out over time, so that you don't have to have a really high powered pulse, while still giving the resolution of a very narrow pulse. If you tried this with a normal burst, you wouldn't be able to distinguish between objects that are close together because the echos overlap.
This might explain it a bit better: http://en.wikipedia.org/wiki/Pulse_compression

The problem is that it requires you to shift and detect phase changes in only a few cycles. Since my receiver seems to ring, I can't detect the alternating phase of the echo (it just looks like a long burst).

I suppose I could try to send an FM chirp - it has similar auto correlation properties, but unfortunately most ultrasonic transducers have a very narrow bandwidth (bad for a chirp). Either way, it might be the best I can do.

SnoPuppy
Jun 15, 2005

mtwieg posted:

What kind of transducers are you using? Do they require a DC bias to set the diaphragm tension? If so, the bias level may be a factor. It effectively acts to dampen the elastic membrane's motion, so if it's underdamped you'll get some ringing, whereas if it's overdamped you'll have slow response time.

My senior project happens to be SODAR ranging (though it uses a continuous signal instead of pulses). Pretty cool stuff. The effective Q of your transducer and conditioning circuitry will inherently cause some ringing; there is no way around that.

Also it sounds like you're shooting for a really high data rate on a slow carrier. In general the carrier frequency should be at least ten times the baud rate, if not hundreds.

The transducers I am using are very cheap - 5 bucks at sparkfun. I have pretty much given up on using them for high bandwidth/high resolution sensing, just due to the bandwidth limitations (only ~4KHz so I am limited to ~10cm). I can get the first echo just fine, but if I have objects which are close together, I just get one big echo instead of two distinct ones (due to the bandwidth issues). And you're right of course about the high data rates for such a low bandwidth system.

The SODAR sounds interesting - how does it work with a continuous wave? Wouldn't there be range ambiguity at every wavelength multiple (or do you use multiple receivers in a bistatic configuration)?

SnoPuppy
Jun 15, 2005

mtwieg posted:

So far we've been running the transmit and receive and the cross correlation with a PC, with sample rates of just 125Ks/s, and we get clear peaks in the correlation up to a meter away (we're shooting for 3m). Ultimately it will be running off a FPGA which will be sampling at up to 1Ms/s, which should improve things considerably. How good the ultimate correlation will be isn't certain.

As for acoustic realities, one of our biggest concerns is crosstalk between directly between the TX and RX. This shows up as a correlation peak at some really short delay, and also causes noise across the correlation. Also our TX transducer, of course, isn't totally directional, so we might try to columnate the signals with some sort of fixture.

As for the TX/RX buffers, I think they're a few thousand samples wide, and at the increased sampling rate it might approach something like 20K.

I'll likely post about it once it's done near the end of the semester, assuming my group is okay with it.

Very interesting - I imagine you should be able to get 3m distances if you are illuminating your target for a long period of time, assuming your Rx is sensitive enough. Do you have any issues with detecting moving objects due to doppler shift (or is it being used strictly for static scenes)?

Also, the easiest way to deal with the crosstalk would just be to hold off acquiring samples during the beginning of a tx cycle - you might loose near range, but it shouldn't be much. You probably don't have to hold off for long, since you're using a long white noise code.

If you don't mind my asking, what transducers are you using? I may want to get some for my project (since mine are cheap and crappy)...

SnoPuppy
Jun 15, 2005

Sweevo posted:

I'm trying to build something to control a heated seat in a car. I did some reading and came up with this:



It uses an 741 op-amp as a comparator, and I want the load to switch off when the seat goes above a pre-set temperature.

R3 is a NTC thermistor attached to the seat
R4 sets the temperature cut-off point
LOAD is the heater element itself - approx 5 amps, 2.5 ohms.

It's adapted from a circuit I found online, but the original used a transistor to control a relay, which I wanted to avoid as the relay clicking on/off every few seconds would be annoying. So I replaced it with a MOSFET (Q1). Have I done this right?

Am I calculating to power dissipation of the MOSFET correctly: P = I^2 * Rds(on), which gives approx 1 Watt (assuming typical MOSFET parameters). This doesn't seem much for a 5 amp load.

That seems like it could be right (assuming RdsOn = 40m Ohm - this will change depending on your Vgs).

One thing I would worry about is the heating element changing resistance as it gets hot. This could lead to more than 5 amps of current draw, so I would make sure that your FET is a little oversized. Also don't forget to put a heat sink on it - 1 watt is still a lot of power for what I assume is a relatively small package


unknowns posted:

Wait, is 1W the power being dumped into the seat? If so, that's nowhere near enough power for you to feel. You're going to need at least 30-40 Watts distributed evenly over the seat, unless you're trying to heat something a bit more...specific.
I believe he is only worried about the power being burned in the FET, not the actual heating element. Given his numbers, the heater should burn 62.5 watts.

SnoPuppy fucked around with this message at 07:00 on Oct 22, 2008

SnoPuppy
Jun 15, 2005

MAH POKEYMANS posted:

I don't think a 741 will be able to source enough current to toggle that mosfet. I would look into using a buffer or open collector hex inverter, 7406, to get more current into the gate. As long as you exceed saturate the gate with Vcontrol>Vgs you will start the switch up but with very little current it is going to take a very long time to get the mosfet conducting.

What is a "long time" for you? Based on looking at a few random datasheets, it looks like the gate capacitance for power MOSFETs is in the nF range with very little leakage current. Most 741s should be able to dump at least 25 mA, so I think it should work.

Yeah you probably wont be pushing a 10 ns pulse through it, but to replace a relay? It probably only needs to operate in the Hz range. And even if its turn on time is long, it should only be noticeable if it is on the same order as the duration of the heating (when something is on for a minute, you don't notice a 1ms delay).

SnoPuppy
Jun 15, 2005

navi posted:

can anyone help me with this? Im pretty stuck. :(

Do they need to all be on at once?

You could run them all in parallel, just use a different resistor for each group. I.e. the blue LEDs would need to drop 1.5v across the resistor and draw 175 mA. This gives a resistor value of around 8.6 ohms which would need to dissipate a little more than 0.25 watts.

The red LEDs might be able to wired up at two in series then put those two in parallel. This would give a total drop of 5v. Although you this seems like you wouldn't need a resistor, its always a good idea to include a small value in case your power supply is not exact. Say 1 ohm.

How long does this need to run? All of these LEDs are going to draw some power, and I don't think that you'll get much more than an hour or so out of 4 AAs.

edit: here is what I mean:

SnoPuppy fucked around with this message at 17:17 on Oct 27, 2008

SnoPuppy
Jun 15, 2005

navi posted:

Would this work? :siren: 35A should be 35mA oops :siren:

it would need to run for a couple of hours, maybe 4 per full charge.

You need to have 3.5v across the blue LEDs and 2.5V across the red LEDs - your design has two red LEDs in series (~5v drop) connected in parallel with the blue LEDs(3.5v). This would either overload one or underload the other - neither is what you want. In the schematic I posted, each group of LEDs has their own voltage dropping resistor for this reason.

Regarding the power issue, it really depends on your batteries. Since you aren't using any switching power supplies, a lot of power is being burned in the resistors. The LEDs are going to have a fixed current for a fixed voltage - using a higher voltage only means you are burning more power in your resistors. Ideally you want a power source that can be set to exactly what the LEDs need (very little wasted power).

Now that I think about it, since you have 4 AA batteries you could generate 2 voltage rails (a 3v and a 4.5v rail) and use those to power the red and blue LEDs. The downside is that the batteries will discharge at different rates, but it would be more efficient (it would also change the circuit).

Do you know how much charge your batteries can provide? This will let you figure out an approximate running time.

SnoPuppy
Jun 15, 2005

mtwieg posted:

And also I wanted to post the sodar project, but I don't know a decent way to share a 15MB PDF. Any suggestions?

Does your school give you any web space for projects? I know mine did, at least while I was still a student.

Or a google doc - I think they can import PDFs, but there might be a size restriction. If you cut out images you might be able to shrink the size a good deal.

SnoPuppy
Jun 15, 2005

schnarf posted:

I don't know, but you don't need a 100+ kHz sampling rate for audio. 48k is the highest useful rate; 96k is used but pretty much unnecessary. Human hearing is pretty much nonexistent above 20k, and the only reason you see significantly higher sampling rates is to give some wiggle room for the lowpass filters in the A/D converters.

Look at the spectrum of a signal that is sampled near the nyquist and one that is sampled much higher (say 10x). Even looking at the waveform should show you how higher sampling rates will be useful - a 48 KHz sample rate ADC will only have 2.4 samples per cycle at 20 KHz. Even at 10 KHz you only have about 5 samples/cyc.

In addition to providing less distortion, better sampling rates also tend to have better SNR and ENOB, although strictly speaking this is a function of how much jitter is on your clock circuit.

SnoPuppy
Jun 15, 2005

clredwolf posted:

I found some 50pos headers for $1.50 on digikey after some further poking around. I was under the impression they would be much cheaper than that, oh well...

I assume they are just 2.54mm pitch pin headers?

edit: That was probably not what you were looking for. It looks like 1.50 is not too bad. Mouser does have a 50 pin header for 1.31, but that's only like 12% savings

http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMukXCIZ6E1E4HOzt1DWXh1DyXiLE%252bTxXnc%3d

SnoPuppy fucked around with this message at 19:29 on Feb 17, 2009

SnoPuppy
Jun 15, 2005
Debugging RF interference/emission problems is a convoluted black art with a bit of magic and hand-waving thrown in. It can be a very painful, time consuming process, even for people with experience.

What type of cable are you using and where were you adding the ferrite chokes (both ends?). For what its worth, ferrites seem to help radiating noise more.
An MS paint drawing of the setup might be helpful.

Also, are you sure that it's interference causing the flash to not turn on? It seems like the only symptom is you have the RX connected to the flash, and when you tell it to "go", nothing happens. Is this right?

SnoPuppy
Jun 15, 2005

ANIME AKBAR posted:

And none of this really addresses my original question, which is how I could interface a device to an existing phone line on the hardware level. I'm open to other means of transmitting data, but a few acronyms don't help me. I need to know more specifically how the interface might work.

I would seriously try to find some type of off the shelf system. Realize that you will have to not only design, but manufacture (in quantity!), support, distribute etc. all of these devices. The EE stuff is only a small portion of the design. Also, unless these devices are small and portable, no one is going to want to carry one.

That aside, I would try to keep the design simple. Transformer couple the phone line and use an op-amp buffer to connect it to a micro controller. I'm not sure on the exact voltages, but I believe that a POTS system runs at up to around 50v, so a step down would almost certainly be necessary.

A decent micro should be able to generate and decode DTMF tones. It would also allow for easier upgrading and bug fixes, as well as interface to an RF module.

SnoPuppy
Jun 15, 2005

clredwolf posted:

Also, companies will hire you on the spot if you mention that you know what Verilog is, that you've messed with it once or twice, or that you know a guy who knows a guy who programs verilog. That's not even that exaggerated. It's a great skill to develop for the budding engineer, and it's going to be a major skill for hardware hackers for a long time to come. Same goes for VHDL, although I see far more projects in Verilog now...

I'm gonna have to white-night the VHDL here :). Most companies are either Verilog or VHDL houses, and both are quite common (or so I'm told, I come from the vhdl side). If you happen to be familiar with the language that the company uses, good for you. If you don't, and you're a competent digital designer, no worries!
It's all syntactic sugar anyway.

They can both do the same stuff in the end, but personally, I like VHDL and I think it seems to be more supported/used.

In either case, when dealing with an HDL, it's important to always know what actual circuitry you want to implement. Once you know that, you should be able to figure out the language. In a way, its like assembly programming - unless you know the underlying hardware and what you want to do with it, you won't get far.

And to your comment about LabVIEW, you'd be surprised what you can get from companies if you call them and ask nicely (esp. if you're a student) - many times you can get either free or very reduce cost software/hardware by asking nicely.

Think about it - they know that if you are familiar with their products, you're more like to use them once you're out of school.
This applies to other items such as well; when I did my senior project, I got a $200 evaluation board from Analog Devices for free, just because I asked.

SnoPuppy
Jun 15, 2005

Poopernickel posted:

One thing to keep in mind is that there are often advantages in clarity to using split clocks. For example, say I have a process I need to sample at 20kSps and a 1MHz clock. I can simplify the timing constraints on much of the design (and also make it easier to understand at a glance) by dividing 1MHz down to 20kHz and then using 20kHz for all sampling-related processes. This kind of clock management is fine (and even encouraged) but keep in mind that an FPGA typically has a limited amount of clock resources.

I disagree. Gating clocks in an FPGA makes timing related stuff way more difficult, because now you have to account for delays on your clock net through logic elements and such. This makes timing analysis very, very hard and will introduce a poo poo ton of jitter on your clock net. And the absolute last place you want jitter is on your clock net.

And it can introduce timing problems that occur on compile to compile, depending on how logic get rolled together. It's ok if your data glitches, just so long as its enough before your clock edge. If your clock glitches, then all sorts of bad stuff can happen.

Use clock enables - that's what they're their for.

SnoPuppy
Jun 15, 2005

clredwolf posted:

I haven't used a Lattice, I've only worked with Xilinx and Altera FPGAs. We're looking to use some generic FPGAs for random data routing, I'll have to look into them and give them a try.

Provided their software isn't terrible...

FWIW, I've heard that their tools kinda suck and aren't supported anywhere near as nice as xilinx/altera. Also keep in mind that both Xilinx and Altera have lower end FPGA lines, so I wouldn't rule them out.

Maybe Lattice has a cost edge when you're dealing with really high volume?

SnoPuppy
Jun 15, 2005

Poopernickel posted:

Another price to factor in (especially if you're working in small volumes) is the price of the development software. I know that Xilinx/Altera will basically take out your wallet and poo poo in it when you call them up to license some tools, and they will continue to do so every year for the rest of your unhappy life. If you need the EDK license, it just keeps getting more and more "groovy."

edit: Although, depending on your needs and the license agreement you might be able to just use their free webpacks for your development.

If you're a student, usually the webpack is good enough, and if you really need a license they might just comp you one (or give you a large discount). EDK might be a little bit different though, but playing the student card can get you pretty far.

However my company does enough business with Xilinx to where we don't pay for any dev tools, so I may be a little out of touch.

SnoPuppy
Jun 15, 2005

Poopernickel posted:

woah, how do I hook that up? What kind of volumes do you guys buy?

Not sure on actual numbers/volumes, but I think the dollar amount is a few million.

SnoPuppy
Jun 15, 2005
Drawing out a schematic of how things are connected would be useful.

The serial to parallel chips are fairly normal. Generally you shift in your data serially and then clock it to the output pins. This way you only need 1 serial connection for any number parallel connections. I imagine that all the LED serial/parallel chips are connected together such that the serial out of one feeds into the serial in of the next one.
As for how to drive it, you can probably get away with bit banging it out of a micro controller. Maybe even a PC parallel port.

Is the UCN5821 in the middle of the resistors connected to the power supplies?

Not sure what the differential drivers and other stuff is for, but I imagine it's related to turning on the power supply transistors.

SnoPuppy
Jun 15, 2005

Hillridge posted:

I recently had to reattach a couple caps I busted off my ipod when I opened it to fix the home button. What size are these things? They look smaller than even a 201 package, but I'm used to 603s so maybe I'm wrong about that. Excuse the file name, I originally thought they were ferrite beads.

Well 0201 is the smallest I've come across, and they look like grains of sand. According to wikipedia, there's one size smaller, 01005, so I suppose it could be that...

These small parts are a pain in the rear end if you have to do any rework. And they make PCBs harder to build :argh:. I blame cell phone manufactures.

Adbot
ADBOT LOVES YOU

SnoPuppy
Jun 15, 2005

Snaily posted:

I'm contemplating getting into FPGAs for a battery-powered project, and with a few hours of searching it seems that the Actel IGLOO nano devkit at ~50 bucks is a pretty decent deal. It has the AGLN250 chip on it, for reference. Now, I'm curious as to how much power one could cram into this thing. Gates, Macrocells and VersaTiles means very little to me, so I was hoping for some general explanation (e.g. "you could build a USB stack in that!" or "yeah, the blinky LED demo patterns are about it").

Please help me out, and continue discussing FPGAs!

Honestly, I would recommend sticking with Xilinx/Altera. They are the two biggest FPGA manufactures and, while I haven't used Actel's tools, I've heard that most of the smaller vendors kinda suck as far as development environments go.

You also might want to look into a larger CPLD, depending on what your design needs. They generally have lower power numbers than FPGAs and you don't have to worry about loading them at power on.

As far as telling if your design will fit, it can be tough. The different FPGA vendors count things slightly differently, which complicates the problem even more.

For example, I know Xilinx switched to a larger, 6 input LUT (look up table) starting at the Virtex 5, but then multiplied their datasheet numbers by a "correction factor" of 1.5 to match the traditional 4 input LUT. The downside of this "improvement" is that a good deal of existing designs were written to take advantage of a 4 input LUT-flip flop structure, and thus didn't see as much improvement by moving to the supposedly bigger device.

Hmm maybe I should do a write up of basic FPGA tech...

The best way to tell is to mock up a design and compile it. That way you know how full you will be before you start spending money. What are you planning on doing? I'm sure that would help people here make more informed suggestions...

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply