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
clredwolf
Aug 12, 2006

ValhallaSmith posted:

I wouldn't really bother with the questions. Its nice a reference and for learning the basics but much of the details are out of date. The book was published in 89 and 3rd ed has been pushed back more than Duke Nukem Forever.

Anyone know of a book that is a good as AoE but more recent?

The million dollar question. There are some more specific books (ie books that cover in more detail what is covered in AoE in a chapter) that are pretty good, but I have yet to encounter a general textbook that's as good.

A good textbook off the top of my head (can't think of more that are good for hobbyists):

-"Opamps for Everyone", Mancini

clredwolf fucked around with this message at 22:46 on May 12, 2009

Adbot
ADBOT LOVES YOU

clredwolf
Aug 12, 2006

SnoPuppy posted:

What are your OFFSET IN constraints? They're a good idea for all digital designs, and absolutely mandatory for high speed work. Xilinx can make DDR constraints kind of a bitch - what version of ISE are you using? I heard they got better in 10.1.

Rewriting the capture engine shouldn't take long - hour or two tops. All you should be doing is de-serializing a data stream and pushing the result into an async FIFO, to move to a slower clock domain.

If you're meeting timing, the only option is that you're not constraining something correctly.

I'm also assuming you have a test bench so that you can verify correct operation in simulation at least. If you don't, make one. Right now.
Catching problems in simulation is about 1000 times easier than hardware.

Although I'm strictly a VHDL guy, if you post your code somewhere, I might be able to take a look at it. No guarantee whether I can spot an error though.

I had to get my wisdom teeth out last week, so I've made little progress until now. I gave it another whirl today,and this is what I get:

What I want to see:

Click here for the full 736x552 image.


What I actually see (my code):

Click here for the full 736x552 image.


Test pattern (works; I replace U2's .din(captured_dataA) with .din(test_pattern) ):


Click here for the full 736x592 image.


I think it lies somewhere between the input pins and the fifo, so probably somewhere in the adc_capture module. I am really stupefied by this right now though. The adc_capture code is really simple! Ugh, I'm gonna go take a break before the laptop gets a pipe through it...

Code I am using (I pastebin'ed the 3 modules I think the problem lies in):

http://pastebin.com/m6e18c750

Also I'm using Xilinx's FIFO builder to make me a 2048-size fifo. As evidenced by the test pattern, it seems to work okay (it's just a counter that's clocked off the data clock and increments every time it sees a frame sync).

clredwolf
Aug 12, 2006
Close. Robotics club at my university. We're trying to implement a rather sexy sonar system, with this ADC as the core.

1) I did this because I wanted to see if using the same-edge-pipelined IDDR block would be any more effective than the opposite-edge IDDR block. You have to delay the frame sync a little if you do that. (It didn't get me anything so I'll probably roll back to opposite-edge timing, since it's a little neater)

2) Ok I'll give that a shot. I think I'm looking for it right, but my shift register is running in reverse (lsb to msb). I'll switch it the other way because I admit that is pretty confusing.

3) I do have a .ucf, but I don't trust it. I'll look at those docs and see if this helps it along any.

I've got a test bench up, but honestly test benches are my Achilles heel. I never did catch on how to do them really well. I do have a test bench set up for this guy though, I just didn't post it. I'll use that to see if I can get any closer.

I'll be working on this tonight a bit, I'll post results when I get them.

EDIT: Progress...

My testbench:
http://pastebin.com/m124f42b7

My (messy) testbench output (Q1 and Q2 are from fco_ddr):
http://www4.ncsu.edu/~bmhendri/document1.pdf

The new capture module:
http://pastebin.com/m7d7420e8

The, erm, output:

Click here for the full 736x532 image.


Basically I added a DDR decoder for the fco, so I could get 12 cylces of capture from it. Looking for 12'b111111000000 gave no results, and the testbench suggested that 12'b011111100000 might work, and it gave the above results. It's closer, but not quite there. Comparators are 2-stage pipelined, 3 inputs each for best compilation on the FPGA (3-input LUT + flip-flop, right?). I'm too tired to soldier on right now, I think I'm gonna make a big push once I'm all refreshed tomorrow.

clredwolf fucked around with this message at 03:21 on May 14, 2009

clredwolf
Aug 12, 2006
ANIME AKBAR: Kinda, I think I talked about mine a bit in that thread too. Same concept, but 10 feet underwater instead. That converter is *total* overkill for this, but it's worth it to have the amplifiers, filter, and ADC on a single chip (plus I can move to high frequencies later). Unfortunately the evaluation board I've got is running at full blast right now (50MHz clock = 350MHz data clock, where the FPGA gets dodgy at 400MHz), but I guess that's good because if it works at 50MHz it'll work at 10MHz (or whatever) just fine.

I think I'm gonna make another thread in DIY about the whole robot in a few weeks. It's not technically DIY, but we're using a lot of off-the-shelf components and we're doing really gangbusters this year (esp compared to last year, ick). A lot of DIY-type stuff is being used to great advantage. For one we're using a lot of Arduinos! :D


SnoPuppy, thanks again for all the help! It's really helping me move along here, the only other guy I know who's any good at verilog is on vacation. I'm retooling my test bench a bit, I think I've found a few potential issues now. I'll keep at it.

I'm not ever getting matches on 12'b111111000000, even in the test bench. I think I've timed something wrong there. I don't know for sure if the lines are length matched, but I kinda know the guy who designed the board and he's a nazi about line lengths. I would think it's matched pretty well, but I don't have the tools to really check for myself here. I know it works well on their old FPGA code too (they used a DCM with a skew of 90 degrees on the dco, I'm not sure if that affects anything).

Part of the problem is that I'm having to run ISE through remote desktop, over my lovely cable connection. I don't have a full version on my laptop, and my university lets me use it over remote access only which is kind of annoying. Slows my pace of work way down.

clredwolf
Aug 12, 2006

Poopernickel posted:

This is pretty much necromancy here, but I wanted to mention that Xilinx offers a "free" version of ISE for download called the webpack. It's completely identical to the for-money version except that ISim runs gimpy if you're simulating a design with more than 50,000 lines of code (it warns you to upgrade and then simulates slowly). But who really simulates a design _that big_ anyways?

I need to run an IP core in the full version (the signal decimator/CIC core).

I've sadly been without internet for a few days (thanks AT&T) so it's not necromancy, it's just been sleeping....

UPDATE: I got just a tad step further. Now I seem to be receiving on the right frame (part of it was my testbench had some errors, opps), and then I uncovered this suspicious error:

http://www4.ncsu.edu/~bmhendri/document2.pdf explenation: 'out' is misnamed, it is the input to the capture model. dinA_out is the real output of the block.
http://www4.ncsu.edu/~bmhendri/adc_capture_test.v
http://www4.ncsu.edu/~bmhendri/adc_capture.v

How come the shift registers are changing the SAME cycle that the IDDR registers are changing?

clredwolf fucked around with this message at 03:49 on May 20, 2009

clredwolf
Aug 12, 2006
Yay, I got a testbench working!

http://www4.ncsu.edu/~bmhendri/document3.pdf

Lemme see if it synthesizes and how well it works....

-UPDATE-
Well dog crap, it doesn't work :( Gives me all zeros.

Running it with the test pattern generator fails too, looks like it's not getting a clock...

Time to check my timings again.

-UPDATE2-

Ugh, I lowered the size of the FIFO buffer (yet again) to meet timing constraints. All constraints are met now, and...still all zeros. I don't get it.

I uploaded my .ucf file here. Any possible problems? Do I need to throw a DCM back in the mix?

http://www4.ncsu.edu/~bmhendri/Top.ucf

clredwolf fucked around with this message at 06:04 on May 20, 2009

clredwolf
Aug 12, 2006

Slung Blade posted:

Well, it will probably be ok. I don't have a lot of land and it won't be running flat out all the time.

Are the other calculations sound?

It's pretty sound, keep in mind your motors aren't going to be 100% efficient. Usually it's rated, so look at it, factor that in. If it's 80% efficient, it'll take 12 kilojoules over a second to make 10 kilowatts of output. Also batteries deteriorate over time, so you'll get less and less runtime.

Keep in mind you can also bank batteries in parallel for even more runtime. With the 6V, you get 7.2 Wh/$, while with the 12V gives 8.9 Wh/$. So with two banks of 12V batteries, you get 9984Wh for $1120. It's more cost effective, but more costly too.

Also, your batteries weigh a certain amount, so the more batteries the harder your motors have to work. So too much and your tractor won't move. I'm gonna guess you need a lot of umph to move a freaking tractor though, so it may not be a big deal.

Just some things to think about.

clredwolf
Aug 12, 2006
Just an update, I got that FPGA software for the crazy ADC working. Half of it was replacing the clock, the other half was asking another engineer very nicely for some help. Thanks everyone who helped me out!

clredwolf
Aug 12, 2006
There should be a game called 'find the PIC'. Just rip something vaugely dealing with electricity apart and see how many PIC microcontrollers you can spot.

There's a good reason PICs and AVRs tend to be used a lot. They're incredibly rugged, easy to use processors. The other day, a friend of mine had a board that was powering up AVRs (Arduino Nanos actually) without anything connected on the 5V rail. Turns out he was pushing 24V into one of the analog pins, which was actually powering the part! He fixed the problem, and the analog pin still works correctly!

For a lot of applications, you really don't need much more than a PICAXE or Arduino. Both are nice due to their ease of use. Arduino happens to be open source, and I see a ton of projects out there for it. I happen to like the Arduino better, but both are perfectly reasonable starting points.

If you get an Arduino, I recommend starting with a Duemilanove. Those tend to have the most useful accessories, and most projects are based around them. The Arduino Nano is another good one, and it has the advantage of being able to fit right into a breadboard.

clredwolf
Aug 12, 2006

Shazzner posted:

Hey I've got a question for you guys, I've got some solar panels that are supposed to be used for a car battery, 12V.

Now what I'd like to do it attach them to my electric bike. The power adapter for it says it outputs +24Vs whatever that means.

Could I just hook them up to my battery? Or would there be a problem with the voltage difference?

I was thinking about getting another pair of solar panels and hooking them up in series or am I totally misunderstanding how this all works?

It would work to go in series (24 Volts to 24 Volts).

Solar panels are kinda weird though, you generally have to match them to get good power output. Putting them in series would give you more power, but perhaps not double the power. You have the right idea, and the voltage would work out, but don't expect half the charge time. To do that you'll need strange mystical devices like SMPS.

clredwolf
Aug 12, 2006
In an obsessive rampage I've rigged up an opamp-based headphone amp, but I'm a little less than happy with the results. It hums a lot, and has problems with filtering and some distortion issues even (ARGH!).

So I'm going back to the drawing board a bit. One thing I'm going to do is treat inputs from RCA jacks as if they are differential inputs (I know they are not, but I think it will help with some of these darn ground loop issues). Anyone see issues here? Only thing I can think of is common-mode issues.

I'd like to DC couple this thing to the input source though. Putting caps between the two means I either need big old caps (3uF and above...I'm a little sketched out using such large caps) or larger resistors (more noise). I want to reach for 90 or 100 dB SNR just as a personal goal, so I want to avoid large value resistors if possible.


Another issue is grounding in general. I would like to be able to use a ground and a single voltage for power (like from a battery or a cheap power supply), so that necessitates the use of virtual grounds. I've been using the cheap resistor/capacitor divider network like the Chu Moy uses, but I don't really like it much, it gets thrown off too easy and seems to not like high currents.

My options are: 7805/7905 combo network, resistor voltage divider into an opamp or buffer, or TLE2426 into an opamp or buffer. I'm using some pretty beefy high-current output opamps that pack some serious grunt (~280ma RMS), so I don't think I'll be reaching for buffers anytime soon.

What types of solutions should I be reaching for here? My goals are small size, 18V power, and really good sound. Battery power is ideal, but not really a primary goal.

clredwolf
Aug 12, 2006
There are some ready-made solutions, but they tend to be expensive or bulky. How big is this RC boat?

A really, really easy solution might be to use a Netbook (Nano-ITX board might work too) and a Webcam, and beam the signal over 802.11. Heck, hook up the netbook to an Arduino and write a nice control program.

Going much smaller will be hard, but it's not impossible, especially if you don't mind craptacular image quality. You can even beam the video signal as analog, which might be much easier (don't quote me on that).

clredwolf
Aug 12, 2006

Aluminum Record posted:


Pocket Headphone Amplifier
PC Fan Controller w/LCD for Temperature Monitoring
FM Transmitter for MP3 Player

Aside from that, do you guys have any recommendations on other projects would be good for me to get started with?

The Cmoy is a good one. Try doing one with an active virtual ground too (ie put an opamp in it to hold the virtual ground at it's point, rather than using resistors and caps), it'll improve bass response and make it perform better. Something I've learned tinkering with mine. I can provide more details if you want.

Also look into some kits. Things like robotic line followers are fun projects to start with. Also there are a ton of amplifier projects out there, from tube amps to high end solid state amps to low-part-count curiosities that actually perform very well indeed. Tube amps are fun to build, they use some pretty exotic topologies and it's interesting to see how it was done 'in the old days'. There's a good kit floating around that uses 11BM8 tubes and a nice feedback topology.

Eventually you start to see little improvements here and there, especially when you do some coursework and start applying it. I've made 3 revisions to the Cmoy design, and I'm about to make a 4th with lessons learned from the 3rd. It's a fun process.

Aluminum Record posted:

Also, my dream job right now would be to work for a company like Intel, or NASA. Aside from getting good internships between my sophomore/junior and junior/senior years and having a good GPA, what other things should I be doing that would make me stand out for when I graduate? Any clubs I should look for/join?

IEEE, Robotics Clubs (I'm a huge fan of them for practical learning), and if your university has it, co-ops (they're like internships but typically easier to get into).

clredwolf
Aug 12, 2006
Some friends of mine and I have gotten together an interesting assortment of equipment:

2 Stage Light transformers (massive, massive beasties)
1 Ignition Coil (2 if I ask nicely)
1 47uF capacitor (don't know the voltage, but it came with the stage light thing so I assume very high)

We can probably get lots more of this stuff too. I was wondering what fun way to kill ourselves project we can use this stuff for. My friend wants to make a gauss gun or a coil gun, but it seems like those rely on having large capacitor banks and lots of current.

Would it be possible to have a cap at one end at high voltage, and 'pulse' it really fast to get lots of current but low voltage at the other end? This seems like it wouldn't work very well to me, but theoretically it should be fine...

We can get some ridiculously high voltages though. These transformers are rated for a lot. I think we can almost hook a security alarm battery up to a beefy MOSFET and a 555 timer, and get some AC charge going. Maybe a big rear end marx generator? Hrmm...

clredwolf
Aug 12, 2006

catbread.jpg posted:

You can use the transformers as one-shot pulse transformers to get lots of current out of a cap by charging it and hooking it up to the HV side.

e: if you were really cool you could make a combined charging/rectification/pulse discharging system.

Hrmmmmmm..... (in regards to the edit)

This just gets more and more interesting. I like it.

Idea you gave me looks like:

battery -> DC/AC -> xfmr-> rectifier -> cap bank (HV) -> xfmr -> xfmr -> rail (LV)

Now, how do I keep those discharge xfmrs from saturating.

Wait, I know:

battery -> DC/AC -> xfmr-> rectifier -> cap bank (HV) -> big rear end IGBT -> xfmr -> xfmr -> rail (LV)

Arduino (PWM output) -> Optoisolator (and a good one at that) -> IGBT Gate

:science:

clredwolf
Aug 12, 2006

catbread.jpg posted:

I was thinking charge from the mains, assuming that the lighting transformers have a mains input?

What are the specs of the transformers, I have no idea what a lighting transformer is and google doesn't help. If they are designed to be current-limiting (through the leakage inductance, then they probably won't be great as pulse transformers.

You sooooo want an SCR.

e: you plan to step down the voltage twice?

e2: you want to PWM it? Why? I don't really see that happening.


Yeah, I was playing with it in a simulator, didn't quite work out the way I thought it would. I was thinking the transformer would discharge slowly, or wouldn't let the entire pulse carry through (like how a square wave will get this 'slant' to it if you pass it through a transformer). After some thought, that's wrong, the entire pulse from the cap will make it through because it's constantly changing as the cap discharges. It's by a function of euler too, which conveniently passes through unscathed. Opps.

So yes, I want an SCR.

Now I'm trying to figure out how best to use the transformers. I will look at them tomorrow, they're not at my apartment. I don't think they are current limiting. In any case, I still have the ignition coil, which may end up being the more exciting coil to use in any case.

And I'm debating if I want to do mains charging or not. There's the safety factor, and the 'lets make this portable' factor too.

In any case, an ignition coil (lets say I use this, not sure what the light xformers are) has turns of about 100:1. That corresponds to Rs*(100)^2 if I hook it up so that the HV side is the primary. So that means 10,000x the impedence is seen.

So, I want the most current transfer possible. Do I go for power transfer anyways? My instinct says yes, my equation says more current^2 = more force.

But the resistance of the iron while this thing is accelerating is going to change as it's moving, right? Just like in a motor.

I guess I need to read up some more on the gauss gun's physics. I know capacitor ESR is going to play a huge role in this too, since the maximum power/current is going to depend on whether or not I can match that ESR value.

clredwolf
Aug 12, 2006

Exitlights posted:

Edit: I've narrowed the problem down further to just the battery causing the weird problem. Could it be a product of voltage instability in the battery? Is there some way to combat this?

Do you have a schematic for this connection?

Also, if you're using a max232, you can't drive it at over 5V. Always check the silly things first before diving into the hard ones...

clredwolf
Aug 12, 2006
I've seen that happen before actually, with 0.1uF surface mount caps. Near as I can tell, it has something to do with overvolting them. You would think that would make them fail open, but apparently this is not always the case...

clredwolf
Aug 12, 2006
Easiest way is to tune the frequency, and yes let us see board pics. If they use an LC or an RC circuit to set the outgoing frequency this could be a very easy fix (and since it's cheap, I'm willing to bet it's what they did). They could also use a crystal or an IC of some sort to set the frequency, although both are more expensive for radio and probably not used for this. Crystal is harder but possible to replace, IC quite hard unless you can hack it. Should be an interesting project either way.

clredwolf
Aug 12, 2006
Lower your diameter to get the size down, it increases the resistivity of the wire. You'll probably need only a thin (but structurally weaker) piece. If you're looking for something really small, you will have to look into coiling it or using different material (coiling isn't too bad). Keeping the wire from shorting becomes a bigger issue then.

I would be very cautious sticking low resistance things into electrical outlets, getting shocked is no fun. Why do you need such a large amount of thermal power in a small spot anyways? Trying to emulate a Pentium 4?

clredwolf
Aug 12, 2006
Anyone know where to find a crapload of enamel wire cheap? Time to make a big sparky thing.

(Friend of mine and I decided to work on a Mini-SSTC, and then turn it into a computer-controlled sparky thing.)

clredwolf
Aug 12, 2006
My guess is EMI filter, gets rid of power line noise. Could be wrong though...

No idea which pin is which...if I'm right there should be two pairs of 'shorted' pins if you test them with a meter (as in, 2 pins are negative side, two pins are positive side).

clredwolf
Aug 12, 2006

ANIME AKBAR posted:

Does anyone here have experience working with Cyclone III FPGAs or anything similar? I'm planning on laying out a daughtercard for one of their devkits but I'm getting confused by some of their pin naming conventions. Specifically, the device I'm looking at (the EP3C16F256C8N) has many I/O's with names like A12, L5, R15, etc, basically a letter then a number of some value between 1 and 16. All of the pins are divided into eight banks. However, there doesn't seem to be any correlation between the name of a pin and which bank it belongs to. So how is this information relevant for design? I assume there's some strategy to selecting pins for various functions. Should I have pins from the same bank grouped together to do functions, or should I pay attention to the names of the pins?

Each 'bank' is a collection of pins in roughly the same area. If you divide up the I/O pins into 8 squares you roughly get a bank. Look at your FPGA in Quartus and you'll see something like this:


Click here for the full 960x701 image.


Each color is a bank.

Look at the pin map in Quartus II (look at Pin Assignment). A mouseover on each pin should show it's functions, and the shape of the pin gives a hint as well (p and n means it can be used as a diff pair, triangles are power, 'step function' is a clock, etc).

The pins are grouped into banks because you can set each bank to a different driving voltage, if you want. You can set the VCCIO to 3.3V, 2.5V (for LVDS/diff pair stuff), 1.8V, 1.2V, etc, so you don't have to use a ton of level shifters if you have a rainbow of voltage values for all of your chips.

edit: Also, good luck on your job search AA! I'm in the same boat, just about to graduate and looking like hell for employment. Lots of interviews, no offers yet here :( Seems like you've got it in the bag though, just don't give up!

And yeah, every place hiring now wants 5+ yrs experience....

clredwolf fucked around with this message at 03:38 on Dec 17, 2009

clredwolf
Aug 12, 2006

PilotEvan posted:

I decided to set it to 6V and put 3 red LEDs (with 2.0 forward voltage each) in series and, as expected, that worked. I put 3 green LEDs (with 2.1 forward voltage each) which surprisingly worked too. According the formula you used (and I later found here but thanks though) it shouldn't have worked because the LED voltage drop would be 6.3V versus the 6V from the source, right? I guess it's not as sensitive as I thought it would be? Or is there something I don't know about?

There's three possibilities:

1) They're not as bright, in which case the LEDs are a bit cold, and their forward voltage drop is a little lower than 2.1V. The turn-on voltage in a diode is kind of a crapshoot anyways, it's very dependent on temperature, the voltage across it (which makes for some interesting math), and possibly even the alignment of the planets. It just happens to be close enough to 2.1V, or 0.7V or whatever under most circumstances that we can just estimate it. And it's (usually) damned stable too.

2) If your AC/DC is just a rectifier and not a linear regulator, it could be peaking beyond 6V. In which case, the LEDs would light up for a brief instance every cycle...so it would look dim but work.

3) Your AC/DC is flat out lying to you.

clredwolf
Aug 12, 2006
I2C and SPI are getting pretty important for controlling external parts. UART with an FTDI chip letting you hook up USB is almost a must, just for the ease of controlling the FPGA and debugging what is going on.

Microchip has a couple of nice options for easy Ethernet. The Microchip ENC28J60 has a SPI interface to Ethernet, which is low-speed but low on the i/o count too. A better option might be the PIC18F87J60, which comes with built-in ethernet (10mbps)! With that you get a few choices of interfacing (I2C/SPI/USART/gpio) and access to the PIC's on-board peripherals as well.

On the different side, you can look at something like the AVR®32 UC3A series, Microchip PIC32 series, or TI Stellaris® 6000 ARM series and interfacing with those. All have Ethernet controllers built in. Depends which families you like working with best (AVR, Microchip w/MIPS, TI with ARM).

And on the really crazy idea side:

Hook up a TI OMAP35x series processor. No Ethernet, but full USB2, SUPER powerful, . Look at a Beagle board for a good idea of what you can do (and how difficult said thing is to do) with the OMAP. What I would do for interfacing is to hook up the FPGA to the memory bus, and turn the FPGA into asynchronous 'flash memory'. The OMAP won't know the difference, and now you cam move data from FGPA to processor at some very high speeds (200 MBps+ might be possible!), and also use certain adresses in the flash memory as 'device controllers'. WAYYYYYYY overkill, but would be a hilariously powerful dev board. Students might love you for being able to mess with a full OS, or might kill you for the massive software-induced pain that might come of this (although Beagleboard has a pretty active community for OMAP projects).

clredwolf fucked around with this message at 05:13 on Dec 19, 2009

clredwolf
Aug 12, 2006
Eh, just giving some ideas, you can hard code the MCU to make it more challenging to interface with. So'kay if not, I totally understand not wanting to mess around with more complexity than you have to.

Also, why not move the h-bridge drive MOSFETs/BJTs/IGBTs/ICs to a daughtercard connected by a cable, or even better an el-cheapo fiber link? That would help isolate noise pretty well. Art of Electronics has a $10 (or so) fiber link circuit for just these types of apps, and I'm sure you can find cheaper components nowadays.

Sounds like motor control is going to be a big part of that lab, from the shopping list you put up...

clredwolf
Aug 12, 2006

macpod posted:

Can any of you suggest good reading material on rf stuff? Ground planes, pcb trace widths, rf vs digital grounds, etc are all a mystery to me. I can follow datasheet design rules, but I would be much happier understanding why I am doing these things.

The Art of Electronics has a good chapter on RF stuff, it touches and goes on most topics but you get a good amount of info. Definitely a book to get if you don't have it already. Besides that, David Pozar's Microwave Engineering is the gold standard textbook, but it's pretty dense for self-learning.

Some websites cover some information on RF. http://www.microwaves101.com/ and http://www.rfcafe.com/ are more meant for industry insiders, but they have some good tutorials and tips/tricks to help out. http://www.amanogawa.com/ has some really excellent Java animations and calculators to help out with RF stuff.

HAM radio and old army manuals are good sources for (somewhat)-easy-to-digest information on this arcane magic.

macpod posted:

Two of the burning questions in my mind are:
- I used a calculator to figure out the size of the 50 ohm trace for my particular pcb board type and it did not seem to take into account the length of the strip.. so length doesn't matter? Only width and the strip's distance to grounding planes? What is the 50 ohms referring to? Why is 50 ohms such a popular value too? I have searched around and can't find a solid explanation for this.

What Cyril Sneer said. Length does matter though, a lot. If it's not matched up you lose a lot of energy and get standing waves. Length however does not affect the characteristic impedance, which you can think of as similar to the resistivity of a material (more length = more resistance), but special for RF stuff.

macpod posted:

-Is it normal to have the ground plane for the rf signal be the same ground used by all other digital signals or should this have been separated. From reading around it seems it is fine to join them.. but in the past it was preferred to use more than one plane.

Generally you keep them separated if you can. You can merge them, but you may get weird effects that usually stem from your digital circuits dumping lots of high frequency noise into your delicate RF circuits. It's more important that you keep your supplies separated, as Cyril pointed out. Use different regs for your RF and digital circuits if at all possible, or at least shove an inductor or ferrite bead between the supplies if you have to use the same reg. Decoupling caps on RF components is a must (usually a 1uF cap connected between the supply pin on the IC and ground, with as short a trace as possible), and you should do the same to digital components to keep them happy and not dumping toxic waste noise into your system (digital circuits are kind of jerks).

clredwolf fucked around with this message at 17:03 on Jan 2, 2010

clredwolf
Aug 12, 2006
Sparkfun is totally down here. I think they DDoS'ed themselves.

clredwolf
Aug 12, 2006
I got the main screen to load!

edit: They've only given away $1,600 so far.

clredwolf
Aug 12, 2006
I just got a 'is temporarily closed' site. Did they just kill their servers?

clredwolf
Aug 12, 2006

babyeatingpsychopath posted:

Is this feasable?

Yes. Invest in some power resistors before you start testing on/blowing up SLAs though.

My thought is that it will have 2 stages: constant current, then constant voltage. Maybe a third 'off' stage. With a PIC controlling everything that should be fairly easy (hint: use state machines, they're your friend).

babyeatingpsychopath posted:

How should I go about this? Is a 48V power supply doable?

I've seen 48V and 50V electronics before, so there's probably transformers or even switchers (AC-DC or DC-DC converters) out there for this. The more current the better, but don't go overboard or you can fry the batteries. I think 5 amps might be a max for this project. (more amps = faster charge time)

babyeatingpsychopath posted:

I was just thinking a transformer and full-wave rectifier to get to 48VDC, maybe a filter cap to smooth ripple somewhat, then a linear regulator to get to 5 or 3.3V to power a PIC with a temperature, voltage, and current sensor.

That'll work. Most SLA chargers I've seen don't actually use the temp. sensor. A switching supply will use less energy, however I'd suggest looking at getting that as a self-contained module and NOT a DIY, switching supplies are not for the feint of heart.

babyeatingpsychopath posted:

Any ideas on how to get a 48V signal into a 3.3 or 5V PIC besides a voltage divider?

Battery? Transformer off the A/C line? I mean you're not gonna get a thunderbolt to the head for having two plugs for this type of thing (just buy another power strip).

babyeatingpsychopath posted:

How should I rig a current sensor?

Three words: isolated sense resistor. Look at using a sense resistor, and an isolated amplifier like an iso 124 (expensive, but worth it for not shocking yourself). Some really rugged opamps can do it too, but you'll need to still isolate it somehow.

babyeatingpsychopath posted:

What's the best (1 degree accuracy) temperature sensing solution for under $8?

Note sure here, there's a lot of temperature sensors out there though. Sometimes you can work with funky configurations until something falls out that works well (whetstone and kelvin bridge configurations can be extremely accurate).

babyeatingpsychopath posted:

Any big gotchas that might loom out of the darkness to blow this thing up?

Overvolting the batteries, reverse polarizing the batteries (it WILL happen, how will you fix it?....hint: it can be a pretty easy fix), shorts...any time you work with things over 5-12 volts you have to be mindful of what you are doing. Respect the machine, for it can be dangerous.

Oh yeah, and please please use fuses on your household side, and probably on your battery side too.

clredwolf
Aug 12, 2006

ante posted:

I built an amp for my car, but the left speaker only gives off a buzz. If I touch its filter cap, it starts working again.

Do you have an oscilloscope, or can you otherwise figure out what frequency this ringing is happening at? That can tell you a lot about where your instability is.

Also, I'm assuming you're using a NFB configuration. Do you have low pass filters in your gain loop? Is everything properly grounded? Are you using a virtual ground, and if so how? How are you handling ground from your input (ie tying it to your amp ground, or using it to drive your virtual ground)?

clredwolf
Aug 12, 2006
Moving cities sucks, just started a new job and getting moved around kind of sucks. I moved out so fast I got whiplash (or at least my bank did, thanks for deactivating my card assholes)! Hopefully I can start actually visiting my threat more often, maybe even clean it up a bit (when I have time, hahaha).

On the plus side, I made a career jump from silicon to avionics, so now I get to make real stuff that does real things! Yay!


evilmonkeh posted:

Does anyone have any recommendations of somewhere in the UK where I can order some pin headers + connectors and some nice multi-core cables so that I can knock up some decent connections between circuits? Fed up of having rubishy wires everywhere! Thanks!

Get yourself some nice D-Shell connectors. It's sooo worth the effort. Use DE9s for small stuff, DB25s when you need to route a bus, and DD50 when you want to use a serious(ly large) cable.

Solder is a pain in the rear end on those connectors, that's the big downside. At work we have crimp connectors, which are an absolute godsend. They're prohibitively expensive for DIY stuff though (I'm not paying $14 for a DE9 connector), but oh so sexy.

Mouser has a UK site, their prices seem reasonable to me. Here are some searches I ran:

0.1" headers, crimp and solder cup: http://uk.mouser.com/Interconnects/Headers/_/N-28bzo?P=1z0wxp6Z1z0z4xuZ1z0xbxz

DSub connectors, solder wells, sorted by price: http://uk.mouser.com/Interconnects/D-Subminiature-Connectors/_/N-2d8uj?P=1z0xbc4Z1z0xbxzZ1z0z6siZ1z0z2lh&Ns=Pricing|0

Adbot
ADBOT LOVES YOU

clredwolf
Aug 12, 2006

Aluminum Record posted:

Hoping someone can tell me if I'm thinking about this right. I'm taking Physics 2 and I'm trying to understand just what exactly is happening at the electron level (and a typical alkaline battery) in a basic circuit.

Let's just say we've got a typical 1.5V AA battery connected to a resistor. The battery is creating an electrical potential of 1.5V, by separating positive and negative charges. While we think about the current "flowing" out of the positive terminal of the battery, what in fact is happening is that the electrons are being "pushed" away from the negative terminal and "pulled" toward the positive terminal by the electric field created by the batter. For that to happen, they have to pass through the resistor, where they slow down. To slow them down, you have to do work, which for a resistor is in the form of heat.

I also wanted to understand what is happening in the battery, so I looked up the half-reactions for an alkaline battery. At the cathode (the positive terminal), the half-reaction is:
2MnO2(s) + H2O(l) + 2e− -> Mn2O3(s) + 2OH−(aq)
The way I understand it, the manganese dioxide reacts with water and 2 electrons. The "limiting reagent" in this reaction is the electrons, which it gets through the electrolyte connecting the positive and negative terminals (the electrolyte allows electrons to flow between the two without allowing the reactants at the anode and cathode to react with each other). At the anode, the reaction is:
Zn(s) + 2OH−(aq) -> ZnO(s) + H2O(l) + 2e−
So this reaction essentially yanks 2 electrons off of the solid zinc, so they can flow through the electrolyte to be reacted with the manganese dioxide at the cathode. The battery "goes dead" when there one of the reactants at either the anode or cathode runs out.

Is this pretty much what is happening in a circuit as simple as that?


Depends on how deep down the rabbit hole you want to go, but prettymuch yes.

One thing to understand though is that the electrons smack into other atoms, which cause them to eject electrons. That way, the 'flow' is much like water through a pipe, where it may take quite some time for one molecule of water to exit the pipe but when one molecule enters the pipe, another molecule comes out the other end very quickly.

Wires in fact are resistors, there's nothing really that special between the two. Wires have a well known resistance, depending on the material and the geometry. The difference is that wires typically have much smaller resistance, down in the milliohm range or less, where resistors are typically 0.1 ohms up to millions of ohms. They use materials like carbon and nichrome, which have a higher resistivity/lower conductivity. In those, it is much harder for electrons to 'jump' from atom to atom imposing an energy loss we see as heat. Metals typically have many free unbounded electrons, which move around from atom to atom nearly freely. There are superconductors now too, which have genuinely free movement of electrons and create some crazy effects.

(It gets much more complicated, some materials don't behave nice and have complex resistances, others can change their resistance based on a variety of factors like temperature, voltage, and even light)

If you hook a wire to the two terminals of the battery, it will get hot. It's a resistor, just a very small one, so current flows very freely.

So...yes.

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