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
DethMarine21
Dec 4, 2008

bobua posted:

ok, so i have a max232 chip on a circuit that I was powering from a dc power supply. Everything was great. I could communicate over serial at a good 200ft of cat6 no problem. I hooked it up via a battery(12v car battery, not in a car) and lost communication.

First thing I did was check the power. The circuits good, everything is powering up ok and getting the correct voltages. Second thing I did was swap the 200ft cord for a 6ft. Still no communication. I suspected something to do with ground. I don't really understand what would be different between a bench power supply and a battery in that respect, but I shorted the ground pin on the pc's serial port directly to the ground pin on the battery and it started working.

Can someone explain what's going on?

That definitely sounds like a ground issue. I have a similar problem with a custom PCB with a really bad ground design; it works using a battery but is very susceptible to EMI due to ground loops and internal noise. Even just attaching a ground lead from a benchtop supply makes it work perfect.

You should examine your ground structure and make sure it is sufficient and there are no loops. If you have an oscilloscope you can probe for noise. If you think your ground is sufficient then you might benefit from adding some bypass capacitors where needed.

Don't quote me on this, but I think the reason a benchtop supply can act different from a battery is that the benchtop supply is probably earth grounded. When a circuit is powered by just a battery it has a floating ground and things like insufficient ground structure and ground loops become a much bigger problem. I'm still trying to wrap my head around most of this.



peepsalot posted:

A lot of newer cars do exactly that. I've heard it's more common on trucks. Some of the newer nissans including my 2011 370Z reports fuel consumption, instantaneous, trip average, estimated miles till empty, etc.

Yeah, now that a lot of cars are starting to get trip computers it's trivial to add an instant MPG display. Although my 328i is from 1996 and it has one :v:

Adbot
ADBOT LOVES YOU

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Slanderer posted:

Wait, really? Are you connecting up multiple battery chargers at once or something? That's just a lot more than I would've expected this to cost you...

I could have up to 3 chargers going at once, and going by what's printed on the back of them the input amperage totals about 5 amps. Look at the pure sine wave inverters on Amazon...

Actually it looks like I'd spend over 200 easy.

Hidden Under a Hat
May 21, 2003
Could y'all clarify something for me? With PWM control of LEDs, are the LEDs actually flashing super fast (would high-speed photography catch an LED in an off state) or is it just changing the average current/voltage the LED is receiving (the LED is always on, but just emitting less light because of less average current)? I'm using a 240 Hz controller, so even at the lowest settings any flashing if it's occurring is not detectable by human eye, but since we are using these in a scientific setting to grow photosynthetic organisms, it might matter physiologically.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Hidden Under a Hat posted:

Could y'all clarify something for me? With PWM control of LEDs, are the LEDs actually flashing super fast (would high-speed photography catch an LED in an off state)

Yes

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

peepsalot posted:

A lot of newer cars do exactly that. I've heard it's more common on trucks. Some of the newer nissans including my 2011 370Z reports fuel consumption, instantaneous, trip average, estimated miles till empty, etc.

Really? From what I had read you generally had to estimate instantaneous fuel use from instantaneous mass air flow (with the assumption that the engine is always running under the stoichiometrically optimal 14.7:1 ratio). If the new stuff just reports it that makes poo poo real simple.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

DethMarine21 posted:

That definitely sounds like a ground issue. I have a similar problem with a custom PCB with a really bad ground design; it works using a battery but is very susceptible to EMI due to ground loops and internal noise. Even just attaching a ground lead from a benchtop supply makes it work perfect.

You should examine your ground structure and make sure it is sufficient and there are no loops. If you have an oscilloscope you can probe for noise. If you think your ground is sufficient then you might benefit from adding some bypass capacitors where needed.

Don't quote me on this, but I think the reason a benchtop supply can act different from a battery is that the benchtop supply is probably earth grounded. When a circuit is powered by just a battery it has a floating ground and things like insufficient ground structure and ground loops become a much bigger problem. I'm still trying to wrap my head around most of this.



I ended up breaking out one of the wires in the cat6 and connecting it to the 'post regulator' ground and all is ok, although I am curious if that matters.

battery & power supply ------------cat6-----------switching power regulator(12v to 5v)-|-Circuit

Attached a wire to the circuit side of the regulator. Don't quite understand why that matters... I mean, shouldn't I have just been able to connect directly to the battery? I know I would get a voltage drop on the positive size because of the resistance in the cat 6, but isn't the negative side common to the entire circuit?

ANIME AKBAR
Jan 25, 2007

afu~
So I learned something cool recently.

I was testing a power supply and long story short, I needed some precise current sense resistors. All I had on hand were some not-so-precise 0.1ohm resistors, so I had to resort to actually measuring their actual resistant with a 4 wire test. Hooked up the measurement appropriately, but noticed that the measurement would always start +/-20% from 0.1ohms and slowly converge towards near that value. Every time I handled the resistors the error would come back, then slowly go away.

I puzzled over this for a bit until the director for the lab (who is also pretty much the guy who got me into electrical engineering in the first place) comes over and says "oh, it's thermocouple effects." Meaning the alligator clips I was using to connect to the resistors were acting as thermocouples, and when there was a temperature differential between the resistor leads and the clips (caused by my touching either), a voltage would develop. The voltage could be positive or negative depending on whether I was touching the clip or the lead, and which side of the resistor I was handling. He was absolutely right. The test current of the measurement was only 1mA, so the error voltage from the thermocouples was on the order of 10uV. Which is surprisingly huge for a crappy thermocouple and very small temperature changes. But still possible.

So it got me thinking about how this kind of stuff is handled in precision circuitry. Even solder joints between an IC and a PCB (and the bondwires inside ICs) will act like a thermocouple, and all you need is a thermal gradient across the PCB and you get tiny DC offsets all over the place. I've found that there are tons of bizarre tricks for dealing with this effect in precision instruments. Like thermally coupling IC pins to each other, orienting rows of pins orthogonal to the thermal gradient, using PCBs with enhanced thermal conductivity, etc...

RF engineers often get smug about how they are masters of "black arts." gently caress that, nowadays almost everyone has HFSS/ADS to take care of most of that. You want black art? Built a nanovoltmeter with 1ppm stability from 0-85 degrees C.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Hidden Under a Hat posted:

Could y'all clarify something for me? With PWM control of LEDs, are the LEDs actually flashing super fast (would high-speed photography catch an LED in an off state)

Correct, and this is actually becoming a big issue for automotive photography. A lot of the trim and marker lights on new cars are now LEDs which are PWM driven, and often they appear off or partially out in photos as they're being caught during an off cycle.

longview
Dec 25, 2006

heh.

Slanderer posted:

I'd imagine that chargers with linear regulators wouldn't care *that* much about the harmonics, but simpler switching regulators might--I'm no expert on that, though. Laptop power supplies are generally pretty sophisticated, though, so I can see why they could handle a really lovely waveform....yet I'd really be hesitant to do it, though.
I've ran SMPSes off of straight DC with no problem, I think most non-actice PFC supplies can work with pretty lovely AC supplies since it's all just rectified as the first stage. The PFC circuitry might not be very happy with frequency and voltage being all over the place and lots of harmonics though.

Jonny 290 posted:

Correct, and this is actually becoming a big issue for automotive photography. A lot of the trim and marker lights on new cars are now LEDs which are PWM driven, and often they appear off or partially out in photos as they're being caught during an off cycle.
It's also annoying me, since I see the flickering when I move my eyes. How hard is it to just switch at like 20 kHz where literally nobody could see it?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Otto Skorzeny posted:

Really? From what I had read you generally had to estimate instantaneous fuel use from instantaneous mass air flow (with the assumption that the engine is always running under the stoichiometrically optimal 14.7:1 ratio). If the new stuff just reports it that makes poo poo real simple.

I mean it reports it on a little builtin dash gauge/screen(VFD maybe?) with a button to flip through modes. Not sure about reporting those exact values directly over OBD if that's what you're asking.

Also vehicles won't be targeting 14.7 AFR all the time, only really at light cruise and lower RPMs. At wide open throttle it's closer to 12, and on decel it's infinity/undefined(injectors off).

A better estimate would be based on injector pulse width * cylinders * injector flow rate, which I'm pretty sure is how the factory computer calculates it.

movax
Aug 30, 2008

Hidden Under a Hat posted:

Could y'all clarify something for me? With PWM control of LEDs, are the LEDs actually flashing super fast (would high-speed photography catch an LED in an off state) or is it just changing the average current/voltage the LED is receiving (the LED is always on, but just emitting less light because of less average current)? I'm using a 240 Hz controller, so even at the lowest settings any flashing if it's occurring is not detectable by human eye, but since we are using these in a scientific setting to grow photosynthetic organisms, it might matter physiologically.

Our meatbag eyes/ears are very easy to trick, but this doesn't stop some people from messing up horribly and choosing switching frequencies that are visible/audible. Especially irritating if you're younger and can still have your high frequency hearing, I go insane near SMPS that are switching at human frequencies.

ANIME AKBAR posted:

So I learned something cool recently.

I was testing a power supply and long story short, I needed some precise current sense resistors. All I had on hand were some not-so-precise 0.1ohm resistors, so I had to resort to actually measuring their actual resistant with a 4 wire test. Hooked up the measurement appropriately, but noticed that the measurement would always start +/-20% from 0.1ohms and slowly converge towards near that value. Every time I handled the resistors the error would come back, then slowly go away.

I puzzled over this for a bit until the director for the lab (who is also pretty much the guy who got me into electrical engineering in the first place) comes over and says "oh, it's thermocouple effects." Meaning the alligator clips I was using to connect to the resistors were acting as thermocouples, and when there was a temperature differential between the resistor leads and the clips (caused by my touching either), a voltage would develop. The voltage could be positive or negative depending on whether I was touching the clip or the lead, and which side of the resistor I was handling. He was absolutely right. The test current of the measurement was only 1mA, so the error voltage from the thermocouples was on the order of 10uV. Which is surprisingly huge for a crappy thermocouple and very small temperature changes. But still possible.

So it got me thinking about how this kind of stuff is handled in precision circuitry. Even solder joints between an IC and a PCB (and the bondwires inside ICs) will act like a thermocouple, and all you need is a thermal gradient across the PCB and you get tiny DC offsets all over the place. I've found that there are tons of bizarre tricks for dealing with this effect in precision instruments. Like thermally coupling IC pins to each other, orienting rows of pins orthogonal to the thermal gradient, using PCBs with enhanced thermal conductivity, etc...

RF engineers often get smug about how they are masters of "black arts." gently caress that, nowadays almost everyone has HFSS/ADS to take care of most of that. You want black art? Built a nanovoltmeter with 1ppm stability from 0-85 degrees C.

Yeah, that's Seebeck effect right? We use some insanely expensive PCB laminate these days for our charge amplifiers (Hydrocarbon Ceramic from Rogers with surface resistivity > 10^9 MOhm). I believe the old product had a guy manually calibrate by adjusting air wires over FR-4 with a tiny screwdriver :stare:

Had a guy from Vishay come in too, and show off some of their precision resistor products. I found it cool that you can buy (at a price of course) pre-aged resistors, where they accelerate them through their lifetime so they've somewhat "settled" when it comes to variance due to temperature.

Base Emitter
Apr 1, 2012

?

longview posted:

It's also annoying me, since I see the flickering when I move my eyes. How hard is it to just switch at like 20 kHz where literally nobody could see it?
Its legitimately nontrivial for a high current LED driven by a DC-DC converter, because the converter is generating high frequency pulses and the PWM needs to operate at a much lower frequency in order to have a decent range and not mess with the converter. You'll see those frequency limits if you look at the data sheets for LED driver power ICs.

the wizards beard
Apr 15, 2007
Reppin

4 LIFE 4 REAL

ANIME AKBAR posted:

"oh, it's thermocouple effects."

There is an internal Tektronix assembly document from the 60s floating around online that details the use of a certain type of solder with a lower Seebeck coefficient than the usual Lead-Tin when used with copper. They had to use dedicated irons with dedicated tips in a dedicated assembly area to prevent contamination. Crazy stuff.

the wizards beard fucked around with this message at 00:16 on Jun 8, 2012

Brozekiel
Jul 20, 2007
So I've been working on some bookshelf speakers (from the DIY Speaker thread in the A/V Forums) and am finished with the crossover. Because of the way I'm designing the boxes, I can't fully test how the crossovers work in the sealed enclosure without having them stuck in there forever (or having to destroy part of the enclosure to retrieve them again) and was hoping to verify my crossover circuitry. No one has responded to my post in the the other forums thread for over a week :( I thought I'd ask here!

I've never built a circuit before. Having said that, I've checked over it multiple times (before and after it was soldered) and can't see anything obviously wrong to my untrained brain. If you can get through the horribly lovely wire tracings I've done, would someone mind telling me if I did this right?

Here is what the circuit should look like:



Here's my awful drawing (In. = Input; RS125 = Woofer, W; XT25-Neo = Tweeter, T):



(bonus) top of the crossovers - much neater!



God help me if I have to un-hotglue all of these and re-do it. You don't even want to know what the back of those look like.

Brozekiel fucked around with this message at 00:56 on Jun 8, 2012

ANIME AKBAR
Jan 25, 2007

afu~

movax posted:

Yeah, that's Seebeck effect right? We use some insanely expensive PCB laminate these days for our charge amplifiers (Hydrocarbon Ceramic from Rogers with surface resistivity > 10^9 MOhm). I believe the old product had a guy manually calibrate by adjusting air wires over FR-4 with a tiny screwdriver :stare:
Yeah ultra high impedance circuitry is a whole other can of worms. A while back Keithley donated some old but high performance electrometers to the lab, and one of these days I'm going to crack one open and see what's up (certainly destroying it in the process).

quote:

Had a guy from Vishay come in too, and show off some of their precision resistor products. I found it cool that you can buy (at a price of course) pre-aged resistors, where they accelerate them through their lifetime so they've somewhat "settled" when it comes to variance due to temperature.
The US military used to do this with tantalum capacitors (their failure rates decrease after some initial aging), but it turned out that the average lifetime of a batch of aged capacitors was still the same as a batch of new ones. But the aged ones have less variance, blah blah blah, :10bux: :10bux: :10bux:

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

peepsalot posted:

Also vehicles won't be targeting 14.7 AFR all the time, only really at light cruise and lower RPMs. At wide open throttle it's closer to 12, and on decel it's infinity/undefined(injectors off).

Yep, the 14.7 assumption is a bad one. Also, if you're coasting in gear long enough a lot of newer cars will stop injecting, but the MAF reading won't zero.

peepsalot posted:

A better estimate would be based on injector pulse width * cylinders * injector flow rate, which I'm pretty sure is how the factory computer calculates it.

Unfortunately injector pulse width isn't exactly universally reported via the OBD-II interface and I CBA to wire something to measure it myself :(

Blotto Skorzany fucked around with this message at 03:40 on Jun 8, 2012

ANIME AKBAR
Jan 25, 2007

afu~

Brozekiel posted:

So I've been working on some bookshelf speakers (from the DIY Speaker thread in the A/V Forums) and am finished with the crossover. Because of the way I'm designing the boxes, I can't fully test how the crossovers work in the sealed enclosure without having them stuck in there forever (or having to destroy part of the enclosure to retrieve them again) and was hoping to verify my crossover circuitry. No one has responded to my post in the the other forums thread for over a week :( I thought I'd ask here!


Here is what the circuit should look like:



Here's my awful drawing (In. = Input; RS125 = Woofer, W; XT25-Neo = Tweeter, T):



(bonus) top of the crossovers - much neater!



God help me if I have to un-hotglue all of these and re-do it. You don't even want to know what the back of those look like.
All in all that looks quite nice for someone whose never built a circuit before (except the layout drawing, I can't even look at that for more than ten seconds). You even aligned the three inductors orthogonally to reduce coupling, well done. Did you wind the inductors yourself? What kind of power level is this for? 10-20W per speaker?

As for verifying whether they work properly, you'll need some actual instrumentation (oscilloscope and function generator). Assuming you've simulated them beforehand (you did, right?), the main source of error is going to be the inductors, especially if they're hand-wound. I don't suppose you have any way to actually measure inductance.

ANIME AKBAR fucked around with this message at 14:02 on Jun 8, 2012

Delta-Wye
Sep 29, 2005

To be honest, if that diagram is an example of your attention to detail on the back, I do not have high hopes for it's functionality. If the layout on the front is an example of your attention to detail and neatness, I'd say you're in good shape.

That diagram is awful and is probably why noone would help you, it's impossible to read.

Brozekiel
Jul 20, 2007

ANIME AKBAR posted:

All in all that looks quite nice for someone whose never built a circuit before (except the layout drawing, I can't even look at that for more than ten seconds). You even aligned the three inductors orthogonally to reduce coupling, well done. Did you wind the inductors yourself? What kind of power level is this for? 10-20W per speaker?

As for verifying whether they work properly, you'll need some actual instrumentation (oscilloscope and function generator). Assuming you've simulated them beforehand (you did, right?), the main source of error is going to be the inductors, especially if they're hand-wound. I don't suppose you have any way to actually measure inductance.

Thanks, but to be honest I didn't build the circuit. I suppose I should have been more clear - I was hoping that I had successfully replicated that circuit. The whole speaker project is basically a guided DIY project found here. It's been very enjoyable so far but will be significantly less if I have to re-do my crossover! The speakers should be able to handle just about as much power I can (reasonably) throw at them. It's not a very efficient crossover design so they will like power; probably 20-150 watts. The upside is that it's a simple crossover to make with a very flat tone response curve.

Delta-Wye posted:

To be honest, if that diagram is an example of your attention to detail on the back, I do not have high hopes for it's functionality. If the layout on the front is an example of your attention to detail and neatness, I'd say you're in good shape.

That diagram is awful and is probably why noone would help you, it's impossible to read.

I will spare your eyes and not post a picture of the rear-side then!

As I said, I've never soldered a circuit together before, although I do know how to solder, so I'm not worried about the connections. The back is a mess as exemplified by the lovely drawing I made, but it's not (terribly) hard to trace where the wires are going to and coming from. However I can see how if you're used to looking at very neat circuits that this would make your eyes bleed. I guess I was just hoping that someone could get past its unsightliness and do a quick check that I had connected everything correctly. The two x-overs are exactly the same in reality and the one on the right is neater, so if someone might just verify that one I'd be very appreciative!

p.s. I did not make any of the components by hand - they are all audio-grade parts from parts-express.

Brozekiel fucked around with this message at 18:56 on Jun 8, 2012

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Print out a copy of the original schematic. Start making a list of the connections "Component x Lead/Pin n - Component y Lead/Pin m". Each time you write down a connection, mark the wire on the schematic with a highlighter or something. When you are done, you will have a list of all the connections. Every wire on the schematic should be crossed off.

Then take your "as built" drawing/schematic, and go down the list. For each connection in the list, mark off one of the lines on the drawing. Cross off the line on the list. At the end, all the lines on the drawing and the list should be crossed off. You may want to do the marking on a photo of the crossover, so you are sure you didn't make a mistake when creating the as-built drawing.

Slanderer
May 6, 2007

taqueso posted:

Print out a copy of the original schematic. Start making a list of the connections "Component x Lead/Pin n - Component y Lead/Pin m". Each time you write down a connection, mark the wire on the schematic with a highlighter or something. When you are done, you will have a list of all the connections. Every wire on the schematic should be crossed off.

Then take your "as built" drawing/schematic, and go down the list. For each connection in the list, mark off one of the lines on the drawing. Cross off the line on the list. At the end, all the lines on the drawing and the list should be crossed off. You may want to do the marking on a photo of the crossover, so you are sure you didn't make a mistake when creating the as-built drawing.

No need for all that--we're only dealing with 2-lead passive components. It's a lot easier just to trace the circuit nodes:

Look at your circuit schematic, and identify the common points in your circuits--the nodes. Each will will connect to 2 or more components. Label each node, and then start tracking them on the circuit. Make sure each node connects to all the parts it should, and none it shouldn't. Sucess!!

I just looked quickly, but I think your circuit has 7 nodes. So it's pretty easy.

Brozekiel
Jul 20, 2007

Slanderer posted:

No need for all that--we're only dealing with 2-lead passive components. It's a lot easier just to trace the circuit nodes:

Look at your circuit schematic, and identify the common points in your circuits--the nodes. Each will will connect to 2 or more components. Label each node, and then start tracking them on the circuit. Make sure each node connects to all the parts it should, and none it shouldn't. Sucess!!

I just looked quickly, but I think your circuit has 7 nodes. So it's pretty easy.

Awesome! This is basically what I did before and after I soldered everything together, but I kind of just followed the circuit around and verified each "node" in sequence as I got to one. It looks like everything is good!

DahtBard
Jan 7, 2011

Well, that's one way to do it.

Brozekiel posted:

Awesome! This is basically what I did before and after I soldered everything together, but I kind of just followed the circuit around and verified each "node" in sequence as I got to one. It looks like everything is good!

Bit late, but I've also built that kit. Great buy in my opinion, they sound amazing for the price.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

This thread is almost on page two, so I'm going to 'save' it as an excuse to tell you guys more about my terrible problem.


'Side A'
12v battery
pandaboard pc

'Side B'
Circuit that starts at 12v, .2 amps(goes up to 1 amp) (12 to 5v switching regulator, 3.3v linear regulator - starting at .3 amps, goes to about 2 amps)

The 'starts at' is pretty much a standby, when active the circuit starts pulling the higher amperage.

Side A and side B are connected by X ft of cat6(1 pair for RX\TX rs232) 3 pairs for power.

All was well with this thing working from a bench power supply. All was well when I powered at least one side from the dc power supply. Things got messy when I switched both to a battery. At 100ft, everything works fine. At 200ft, things fall apart completely.

Voltages are good all around, and all devices are working properly, but serial communication gets REALLY dirty. Unusable. And a little wacky. For example, the communication is perfect until the device goes into high power usage, then transmission goes pretty bad. I'm sort of thinking that the pc and the device have different ground references, but with them being so far apart, I don't really know how to fix something like that(or if that's even it). I've been able to do some weird stuff like add diodes to the power lines, but then even weirder things happen, like the pc refusing the boot with the com port plugged in. Any ideas?

Krenzo
Nov 10, 2004

bobua posted:

Any ideas?

Different ground references are allowed when communicating between two devices, but then you have to design your system for AC coupling (put a small capacitor between the cable and your receiving circuit) and use a communication format that is designed for it. If you don't, one problem is that sending many instances of a 0 or 1 in a row will cause the average voltage to float to an indeterminate level. Also, how are you synchronizing the clocks of your two boards?

bobua
Mar 23, 2003
I'd trade it all for just a little more.

Krenzo posted:

Different ground references are allowed when communicating between two devices, but then you have to design your system for AC coupling (put a small capacitor between the cable and your receiving circuit) and use a communication format that is designed for it. If you don't, one problem is that sending many instances of a 0 or 1 in a row will cause the average voltage to float to an indeterminate level. Also, how are you synchronizing the clocks of your two boards?

I'm not sure I know what you mean. Side B isn't a pc, it's just a max232 chip attached to an arduino like device. I've done a lot of googling and never saw anything on ac coupling and rs232. Talk slow for me, I'm retarded.

ANIME AKBAR
Jan 25, 2007

afu~
AC coupling won't work for RS232, but you can use optocouplers for isolation. That's probably your best bet.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

Wouldn't an optocoupler require a seperate power supply? I feel like there is a problem I'm not understanding, as this thing works on a bench power supply but not a battery.

SnoPuppy
Jun 15, 2005

bobua posted:

This thread is almost on page two, so I'm going to 'save' it as an excuse to tell you guys more about my terrible problem.


'Side A'
12v battery
pandaboard pc

'Side B'
Circuit that starts at 12v, .2 amps(goes up to 1 amp) (12 to 5v switching regulator, 3.3v linear regulator - starting at .3 amps, goes to about 2 amps)

The 'starts at' is pretty much a standby, when active the circuit starts pulling the higher amperage.

Side A and side B are connected by X ft of cat6(1 pair for RX\TX rs232) 3 pairs for power.

All was well with this thing working from a bench power supply. All was well when I powered at least one side from the dc power supply. Things got messy when I switched both to a battery. At 100ft, everything works fine. At 200ft, things fall apart completely.

Voltages are good all around, and all devices are working properly, but serial communication gets REALLY dirty. Unusable. And a little wacky. For example, the communication is perfect until the device goes into high power usage, then transmission goes pretty bad. I'm sort of thinking that the pc and the device have different ground references, but with them being so far apart, I don't really know how to fix something like that(or if that's even it). I've been able to do some weird stuff like add diodes to the power lines, but then even weirder things happen, like the pc refusing the boot with the com port plugged in. Any ideas?

Just to make sure I understand, you have a large load on the end of the CAT6 cable, but the power is provided from the other end. Correct?

You said 3 pairs for power - is that 3 power pins and 3 ground pins? Are you using the power and ground on the same twisted pair or different twisted pairs?

When you were probing the power rails, where were your power and ground probes?

A schematic would help.

If I had to guess, there are probably several effects going on.
One is the DC resistance of the cable itself. At several hundred feet, this is likely to be ~5 ohms per wire. Assuming you have 3 ground and 3 power, your B side ground might be 1.6V higher than your A side ground (assuming 1A current draw).
This is bad because now your "0" voltage on the B side is really 1.6V on the A side. And the "0" on the A side is -1.6V on the B side.

The other effect is the wire inductance.
This won't matter if you have a steady state load, but it definitely plays a part for switching loads. A switching load will cause current pulses on the power rail. This normally wouldn't be a problem, except in your case the power rail is a long wire. A wire is basically an inductor, so it will cause voltage spikes every time your switching supply switches. Depending on how much inductance, and how much current the switching supply draws, this could result in significantly higher voltages than you expect.

You could reduce this effect by placing enough capacitance on the input of the switching regulator to deal with any transient currents that would occur. You also might want to add a small amount of series resistance on the power rail to help de-Q the LC network formed by the wire and the input capacitance.

bobua posted:

Wouldn't an optocoupler require a seperate power supply? I feel like there is a problem I'm not understanding, as this thing works on a bench power supply but not a battery.

You don't need a separate power supply, you would place the opto-coupler at each receiving end (i.e. at the RX of the pandaboard and RX of side B). You might still have to have some extra circuitry though, because the ground references might be different enough to always keep the optocoupler "on" in the high current mode.

The only way to really get around that is to carve off another line for digital ground return, and not tie that into the system ground.

SnoPuppy fucked around with this message at 01:13 on Jun 13, 2012

Krenzo
Nov 10, 2004

bobua posted:

I'm not sure I know what you mean. Side B isn't a pc, it's just a max232 chip attached to an arduino like device. I've done a lot of googling and never saw anything on ac coupling and rs232. Talk slow for me, I'm retarded.

I haven't worked with RS232, but it looks like it does the clock syncing for you. So ignore that question. By looking at Maxim's page, they sell chips that have opto-couplers built in for isolation.

I think you should definitely read up on differential signaling, and try to use that in future projects. That's what ethernet cable is designed for and works very well.

SnoPuppy
Jun 15, 2005

Krenzo posted:

I haven't worked with RS232, but it looks like it does the clock syncing for you. So ignore that question. By looking at Maxim's page, they sell chips that have opto-couplers built in for isolation.

I think you should definitely read up on differential signaling, and try to use that in future projects. That's what ethernet cable is designed for and works very well.

Yeah, he really should be using RS-485/RS-422 for this. It's pretty much what they were designed for.
Unfortunately they also use 2x as many pins, which he doesn't have if he's using 3 pairs for power.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

SnoPuppy posted:

Just to make sure I understand, you have a large load on the end of the CAT6 cable, but the power is provided from the other end. Correct?


You said 3 pairs for power - is that 3 power pins and 3 ground pins? Are you using the power and ground on the same twisted pair or different twisted pairs?

When you were probing the power rails, where were your power and ground probes?

Yes, blue\bw is negative, green\gw is positive, the oranges are split off for trying different things, but I've had the most luck with tying orange with positive and orange-white with negative to reduce the overall resistance.

I've measured in different places. I of course measure the + and - at the devices inputs on each end, just to make sure they are getting the proper values, but I've also tried measuring the negative terminal of the battery and the negative end of the far side circuit(positive too) I'm seeing a .25v difference. I've also measured the negative pin on the com port of the pandaboard to the negative size of the far curcuit and I get about a .19v difference.

SnoPuppy posted:


You could reduce this effect by placing enough capacitance on the input of the switching regulator to deal with any transient currents that would occur. You also might want to add a small amount of series resistance on the power rail to help de-Q the LC network formed by the wire and the input capacitance.
Can you explain more indepth on the series resistance?

SnoPuppy posted:

The only way to really get around that is to carve off another line for digital ground return, and not tie that into the system ground.

Are you saying to use one of the orange wires to connect the far side ground to the ground pin on the pandaboard? If so, wouldn't that make a ground difference problem worse, since it would be traveling through 1 cable instead of 3?

Krenzo
Nov 10, 2004

SnoPuppy posted:

Yeah, he really should be using RS-485/RS-422 for this. It's pretty much what they were designed for.
Unfortunately they also use 2x as many pins, which he doesn't have if he's using 3 pairs for power.

One option would be to use half-duplex signaling like USB where the same differential pair is used for both RX and TX.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

bobua posted:

Can you explain more indepth on the series resistance?

You'd be using some capacitance to balance out the line inductance, and in doing so you create an LC circuit, which by nature is going to oscillate at its resonant frequency. By adding a resistor in series with the power rail you damp the oscillation (the Q or quality factor to which he referred is the inverse of the damping ratio zeta) and prevent it from loving with your circuit.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

So actually add MORE resistance to the positive side? How do I know how much?

Which brings me to another question, besides just trying this thing over and over, is there anyway to see if I'm making any progress? Am I looking for something in particular on an oscilloscope?

Krenzo
Nov 10, 2004
Can you post pictures of what you're seeing on your oscilloscope when it's working vs when it's not working?

bobua
Mar 23, 2003
I'd trade it all for just a little more.

ok, this is either weird or what you guys told me to do.

I switched BOTH oranges to negative, so the negative rail has less resistance than the positive rail. This didn't seem to do any good, as I still got transmission errors.

Then I took a 4.7uf 50v capacitor and connected both terminals to the positive rail. Now it works, no transmission errors. That's great and all, but I'd like to understand why this worked, so I can improve upon it.

edit: umm... I was wrong I guess. I tried out a couple of different caps to see if the affect was the same, and none of them worked. When I went back to the 4.7uf, it still didn't work. I just got some weird luck that minute I guess.

bobua fucked around with this message at 04:35 on Jun 13, 2012

bobua
Mar 23, 2003
I'd trade it all for just a little more.

Krenzo posted:

Can you post pictures of what you're seeing on your oscilloscope when it's working vs when it's not working?

When working.... it's a very defined signal, when not working, it's ripply as poo poo, like a 5v spread from peak to trough 2-3 waves in 5us.

Shorting the ground pin fixes it immediately.

SnoPuppy
Jun 15, 2005

bobua posted:

When working.... it's a very defined signal, when not working, it's ripply as poo poo, like a 5v spread from peak to trough 2-3 waves in 5us.
That sounds like ringing due to the cable inductance. Can you take a scope screen shot and post it?
Have you looked at the power rail at the part with your scope? Does it also show ringing?

Also, when you're probing, how long is the scope ground lead? It should be as short as possible to minimize probe parasitic effects.

bobua posted:

Shorting the ground pin fixes it immediately.
What does this mean?

bobua posted:

Then I took a 4.7uf 50v capacitor and connected both terminals to the positive rail.
You should connect the capacitor between power and ground. That sounds like you just shorted the capacitor leads together, which as you found, does nothing.

edit:
Also, try to put power and ground on each half of the twisted pair.

SnoPuppy fucked around with this message at 06:05 on Jun 13, 2012

Adbot
ADBOT LOVES YOU

longview
Dec 25, 2006

heh.
I have a small audio circuit that's powered by a step-up switching converter, I want to reduce the RF noise coupled to the output (a few mV).

The switching module runs at around 100 kHz, and I'm using ceramic bypassing caps near the ICs and electrolytics near the supply, I was thinking about adding a series inductor to the supply.
I'm concerned about instabilities during transients, how should I calculate the correct value/what frequency do I calculate for?

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