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
Hidden Under a Hat
May 21, 2003
I'm designing a circuit that has a bunch of resistors in parallel, but only one will be closed in the circuit at any given time. I want to be able to switch between resistors through software control, but the only way I know how to do that right now would be to use a relay controller board, manufactured by a company like RelayControllers.com. I feel like there should be an easier and cheaper way to do this. The voltage going through the resistor will be 24 V, and the amperage will not exceed 1 A. Would an open-collector circuit be appropriate for this? I don't know much about those.

Adbot
ADBOT LOVES YOU

Slanderer
May 6, 2007

Hidden Under a Hat posted:

I'm designing a circuit that has a bunch of resistors in parallel, but only one will be closed in the circuit at any given time. I want to be able to switch between resistors through software control, but the only way I know how to do that right now would be to use a relay controller board, manufactured by a company like RelayControllers.com. I feel like there should be an easier and cheaper way to do this. The voltage going through the resistor will be 24 V, and the amperage will not exceed 1 A. Would an open-collector circuit be appropriate for this? I don't know much about those.

If I'm visualizing this correctly, this should be pretty simple. You can use power FETs as the control element for each resistor. Depending on your application, I'm not sure whether a high side or a low side switch would be preferable (someone please help me out!), and depending on that, you may need external FET drivers. But, if you can get away with a low side switch, then the circuit will consist of N N-channel mosfets, and N resistors. You should be able to drive it with just a logic level signal.

I'm honestly not sure whether or not you'll need a heatsink, since that depends on the MOSFETs you'd choose, and whether or not they might be on 24/7.

Regardless, it's still dead simple. This is a workable example for a single MOSFET. There are definitely boards out there that have a bunch of them, but I dont know where to find them.

movax
Aug 30, 2008

If you truly just need (essentially) an analog switch and/or don't want to worry about the FET body diode, you could use a Photo MOSFET / Photorelay. Pricier, but pretty good solid-state approximation of a switch. Toshiba, Avago, Panasonic, etc make nice little SOP4 or DIP6 packaged ones that can do 60V/2A without any issues.

CapnBry
Jul 15, 2002

I got this goin'
Grimey Drawer

PDP-1 posted:

e: Maybe I read their specs wrong - it looks like $5/in2 for three copies, not $5/in2*boardArea*3 like I had thought. That's not so bad then.
Yeah it is actually $1.67/sqin but you have to buy 3 so it comes out to $5. Their turnaround is really reliable too. I just put in an order last night. I got an email saying I'll be on the Sep 13th panel. I know the fab takes 8 calendar days, so Laen will have the boards back on Sep 21. It typically takes him 0-1 day to ship them, and I have them 2 USPS-working days after that.

They're also made in America :patriot: by a fab that supposedly is environmentally responsible about their waste.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

movax posted:

The alternative, since this won't grow past six units and doesn't need to be super extensible is just switching to three CAN messages, one that holds all the DAC values, and two for the motors, and having the nodes burn a few cycles parsing out what they need. The motor update rate is much less critical.
..
In retrospect, the 400kHz I2C interface to the DAC is probably my bottleneck in the system.

I've got some CAN experience, but nothing really high performance. Do you care if there is delay between the updates of the various DACs? If you do, you are probably on the right track combining the data into one register. The software to pull out a value (assuming bitwise and plus a shift or something similar) will be way faster than waiting for another CAN message. Is the software on the other end (Kinect?) prepared to send all the DAC data at the same time or does it generate each separately?

But, if I was days away from bringing the system online, I would wait to do any optimization. You will be able to find out if any of this matters soon enough.

I have never encountered a CAN bus that had 12V between CANH and CANL, only 5V. (It has been awhile since I looked at the spec, but I think 5V is standard)

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

taqueso posted:

I have never encountered a CAN bus that had 12V between CANH and CANL, only 5V. (It has been awhile since I looked at the spec, but I think 5V is standard)

Can be 5, 12 or 24 iirc, although it's been about four months since I last did anything with CAN so my memory may be off

movax
Aug 30, 2008

taqueso posted:

I've got some CAN experience, but nothing really high performance. Do you care if there is delay between the updates of the various DACs? If you do, you are probably on the right track combining the data into one register. The software to pull out a value (assuming bitwise and plus a shift or something similar) will be way faster than waiting for another CAN message. Is the software on the other end (Kinect?) prepared to send all the DAC data at the same time or does it generate each separately?

But, if I was days away from bringing the system online, I would wait to do any optimization. You will be able to find out if any of this matters soon enough.

I have never encountered a CAN bus that had 12V between CANH and CANL, only 5V. (It has been awhile since I looked at the spec, but I think 5V is standard)

Yeah, I think I'm just getting antsy. I get a frame every 30 thousand microseconds, which is...gently caress, over a million cycles on the dsPIC, gently caress knows how many on the PC, and the adding the CAN message overhead + I2C overhead doesn't even come close. Kinect app does prepare all the messages at once right now, and then throws them into a queue.

It'll be trivial to switch them over to just picking a specific byte out of the message (read ID from EEPROM, and assign pointer based on that value), so I might get that code ready as a just-in-case type thing.

Otto Skorzeny posted:

Can be 5, 12 or 24 iirc, although it's been about four months since I last did anything with CAN so my memory may be off

Yeah, I think I'm used to automotive stuff or something. You'd have a TJA with Vbat = 12V, Vio = 3.3V and Vcc = 5V. The differential voltage I'm measuring seems to be within spec though.

Hidden Under a Hat
May 21, 2003

Slanderer posted:

If I'm visualizing this correctly, this should be pretty simple. You can use power FETs as the control element for each resistor. Depending on your application, I'm not sure whether a high side or a low side switch would be preferable (someone please help me out!), and depending on that, you may need external FET drivers. But, if you can get away with a low side switch, then the circuit will consist of N N-channel mosfets, and N resistors. You should be able to drive it with just a logic level signal.

I'm honestly not sure whether or not you'll need a heatsink, since that depends on the MOSFETs you'd choose, and whether or not they might be on 24/7.

Regardless, it's still dead simple. This is a workable example for a single MOSFET. There are definitely boards out there that have a bunch of them, but I dont know where to find them.

So the logic level signal is where I think I'm struggling... I understand how transistors work, but until now I've been using all-in-on packaged relay controller boards from RelayControllers.com, which take my commands from my software over RS-232 and then activate relays. There is a step in between sending commands to the board and activating the relay that I'm not understanding how it's done. It seems like you need a switch to send current to the transistor base/gate to allow current to flow from, but then how is that switch triggered? I must be misunderstanding something. I'm very raw in electronics, so as simple an explanation as possible would really help.

Slanderer
May 6, 2007

Hidden Under a Hat posted:

So the logic level signal is where I think I'm struggling... I understand how transistors work, but until now I've been using all-in-on packaged relay controller boards from RelayControllers.com, which take my commands from my software over RS-232 and then activate relays. There is a step in between sending commands to the board and activating the relay that I'm not understanding how it's done. It seems like you need a switch to send current to the transistor base/gate to allow current to flow from, but then how is that switch triggered? I must be misunderstanding something. I'm very raw in electronics, so as simple an explanation as possible would really help.

Ah, I assumed by "in software" you mean "in (embedded) software". The missing link is a microcontroller. Any standard dev. board would work, like an arduino, or msp430 launchpad. The have built in usb virtual com ports, so the only programming would be making the controller respond to serial port commands.

It's not hard, but you'd have to get acquainted with this sort of stuff first, which might not be your cup of tea. I'm sure someone makes a simple USB interfaced MOSFET load controller, but I don't know who. Of course, there are also USB controlled solid state relay boards, which although basically the same thing I'm describing, are still bigger and more expensive than you might need. They are essentially just MOSFET switches controlled by USB virtual com ports, except they generally include optical isolation, can handle AC loads (which requires twice as many MOSFETs), and big, chunky, encapsulated SSR modules.

This is an example of what I'm talking about, except designed for sutdents and hobbyists, and unassembled. Professional ones will probably be more expensive, unless ordered from overseas.

But, like I said, all of this is probably going to be bigger than it really needs to be.

Warthog
Mar 8, 2004
Ferkelwämser extraordinaire

Poopernickel posted:

I might be wrong, but it looks like some kind of inductor or transformer. It's hard to tell without having a larger picture. Capacitors are pretty standard, but a lot of companies wind their own coils when it comes to high-wattage stuff. There's a good chance that it's a custom coil, but it's also pretty unlikely to have failed if that's what it is.

Thanks - as for larger pictures: there's really nothing to see - it's basically just a solid block with some contacts going in and out...

There's some rust in the pump and I think that's locking up so the coffee-maker is probably fubar

Hidden Under a Hat
May 21, 2003
May if I describe my application a bit more, people could give me suggestions on making it easier.

I'm trying to make a current driver that can dynamically change the amount of current it is limiting. I built the driver according to this: http://www.instructables.com/id/Power-LED-s---simplest-light-with-constant-current/

The second resistor controls the amount of current, so my idea is to have several of these resistors in parallel, each connected to its own relay, with only one active at a time, so I can control the current by activating a particular relay. I can't use a digital potentiometer for this because I'm working with low resistances, in the 0.5-10 Ohm range and all the digital POTs I've seen start a 1 kOhm. The relay controller boards I'm using are pretty expensive, but it's the only way I know how to do this. Does anything have any other ideas for this?

Hidden Under a Hat
May 21, 2003
I also had another question. Is there an website that does custom PCBs and has a simple web utility for drawing the circuits? Or am I pretty much forced to have to learn a PCB drawing software to have one manufactured?

movax
Aug 30, 2008

Hidden Under a Hat posted:

I also had another question. Is there an website that does custom PCBs and has a simple web utility for drawing the circuits? Or am I pretty much forced to have to learn a PCB drawing software to have one manufactured?

You'll have to learn an EDA package sooner or later. If you don't want to deal with EAGLE, companies like ExpressPCB have their own schematic + PCB editor that are nice and lightweight, but are optimized to output files for only that company.

Hidden Under a Hat
May 21, 2003

movax posted:

You'll have to learn an EDA package sooner or later. If you don't want to deal with EAGLE, companies like ExpressPCB have their own schematic + PCB editor that are nice and lightweight, but are optimized to output files for only that company.

That's ok, I'm not an electrical engineer and this would be a one-time deal.

Jonny Quest
Nov 11, 2004

Hidden Under a Hat posted:

I also had another question. Is there an website that does custom PCBs and has a simple web utility for drawing the circuits? Or am I pretty much forced to have to learn a PCB drawing software to have one manufactured?

I had the same problem recently and just went ahead and learned KiCAD. After a few days I finally got a feel for the keyboard shortcuts and now I can go through the process of: Lay out Schematic -> Export Netlist -> Assign components to netlist values -> Import into CAD layout -> Futz with component layout -> Export to FreeRouter -> Re-import back to CAD->Tweak layout a bit

Though reading through that it doesn't seem as easy at it feels now. Honestly the real challenge for me was trying to ensure my board came out as single-sided.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Hidden Under a Hat posted:

I also had another question. Is there an website that does custom PCBs and has a simple web utility for drawing the circuits? Or am I pretty much forced to have to learn a PCB drawing software to have one manufactured?

ExpressPCB is the only one I'm aware of. But, of course, you would be learning a PCB drawing software. Except it is a software package that is somewhat substandard and only works with one boardhouse.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
While we're on the subject of EDA software:

The company I recently joined is looking to upgrade their 5+ year old version of OrCad. Due to cost, we're also looking at jumping ship. We're looking to compare DipTrace, Eagle, KiCad and the new version of OrCad to each-other. I have experience with Eagle and KiCad, but no experience with OrCad or DipTrace. Can anyone with (recent-ish) OrCad or DipTrace experience proselytize for their package of choice? Nothing we do is extremely cutting edge (nothing above 1ghz, no super-comptact BGAs, etc), and the ability to convert existing OrCad schematics is a plus.

Also, I'm happy to entertain talk of other EDA packages in the same price range. Unfortunately, Altium is right out of our budget, but anything under about $1000 a license is fair game.

sixide
Oct 25, 2004

Zuph posted:

While we're on the subject of EDA software:

The company I recently joined is looking to upgrade their 5+ year old version of OrCad. Due to cost, we're also looking at jumping ship. We're looking to compare DipTrace, Eagle, KiCad and the new version of OrCad to each-other. I have experience with Eagle and KiCad, but no experience with OrCad or DipTrace. Can anyone with (recent-ish) OrCad or DipTrace experience proselytize for their package of choice? Nothing we do is extremely cutting edge (nothing above 1ghz, no super-comptact BGAs, etc), and the ability to convert existing OrCad schematics is a plus.

Also, I'm happy to entertain talk of other EDA packages in the same price range. Unfortunately, Altium is right out of our budget, but anything under about $1000 a license is fair game.

Well, they're all pretty poo poo, but that's standard for any sort of CAD software.

I find KiCad's layout to be subpar on the features front. I recall needing to use dummy traces to do no-relief through-holes. It's pretty good on the ease of use side (well, relatively).

OrCAD is a labyrinthine nightmare but can do basically anything, including things it was never intended for.

longview
Dec 25, 2006

heh.
Actually Proteus 7 isn't that poo poo, not sure if it's powerful enough to replace OrCAD but it doesn't make me want to kill myself when I use it.

I have resigned myself to never ever work with a company that will make me use OrCAD, 4 hours a week last semester was enough. Didn't help that we had to use Pentium 4s on 17" monitors and mechanical mice (in 2012, :cmon:).

Hidden Under a Hat
May 21, 2003
About PCB design: a pad that the pin of the component goes through connects to both sides right? I have a series of pad through-holes, but some of them I want to connect to the bottom layer, and while I can specify that the traces are on the bottom layer, I can't do the same with the pad. I just want to be absolutely sure that traces on both layers can connect to the same pad through-hole.

Arcsech
Aug 5, 2008

Hidden Under a Hat posted:

About PCB design: a pad that the pin of the component goes through connects to both sides right? I have a series of pad through-holes, but some of them I want to connect to the bottom layer, and while I can specify that the traces are on the bottom layer, I can't do the same with the pad. I just want to be absolutely sure that traces on both layers can connect to the same pad through-hole.

With through-hole stuff, yeah, the holes connect to both sides. If you're using surface mount stuff, then you can have pads that are on one side only.

Bad Munki
Nov 4, 2008

We're all mad here.


I've heard that there are LEDs with resistors built in. I can't seem to figure out how to find them on digikey though. Any hints?

Delta-Wye
Sep 29, 2005

Bad Munki posted:

I've heard that there are LEDs with resistors built in. I can't seem to figure out how to find them on digikey though. Any hints?

http://www.vishay.com/docs/83045/tlrg4420.pdf

I hate digikey's search engine, but i found it pretty easy to find some on mouser if you look for LEDs with stupidly high forward voltages, in this case 12V. It's not the actual diodes forward voltage, but the expected voltage across the diode.

CapnBry
Jul 15, 2002

I got this goin'
Grimey Drawer

Delta-Wye posted:

I hate digikey's search engine
Seconded. Mouser's search system is so much better because you can modify your query without using the browser's back button and re-entering things. Also, their "Stocked" checkbox is better than the "In Stock" checkbox at digikey because you can get a better feel for what they actually carry versus just what they have at the time.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Mouser kicks me back to the main index when I hit enter after selecting some filters. Hate that poo poo.

e: Also, was looking for some electrolytic caps today. Digikey lets me select based on lead spacing, height, and/or diameter. Mouser has none of those parameters filterable.

taqueso fucked around with this message at 21:32 on Sep 14, 2012

Hidden Under a Hat
May 21, 2003
SO what's my best bet for a microcontroller that will take an RS-232 command and output analog voltage signals to activate relays?

Delta-Wye
Sep 29, 2005

Hidden Under a Hat posted:

SO what's my best bet for a microcontroller that will take an RS-232 command and output analog voltage signals to activate relays?

I would toss out an arduino as a recommendation. Relatively easy to get started, has a USB->rs-232 bridge built in, and will output (digital?) voltages to activate relays.

Something else:

http://arduino.cc/forum/index.php?topic=51887.0

armorer
Aug 6, 2012

I like metal.

Hidden Under a Hat posted:

SO what's my best bet for a microcontroller that will take an RS-232 command and output analog voltage signals to activate relays?

If you want to basically make it dimmable, and are going to be introducing a microcontroller to the mix, you could try something with PWM like what is described here.

Hidden Under a Hat
May 21, 2003

armorer posted:

If you want to basically make it dimmable, and are going to be introducing a microcontroller to the mix, you could try something with PWM like what is described here.

Actually I have to specifically avoid PWM, while at the time have a system in which I can have many different LED light intensities. That's why I'm designing a system in which I have many different resistors in parallel, with only one closed in the circuit at a given time, which determines the current to the LED. The expensive part is needing a separate relay for each resistor.

longview
Dec 25, 2006

heh.
Why wouldn't you just put a low-side transistor switch for each resistor? Then you could intermediate steps by enabling two or more transistors as well, giving you more steps. It would also be enormously cheaper and smaller, faster etc.

And you don't need "analog voltages" to enable relays or transistor switches, digital outputs are usually used since you only need on or off (possibly many outputs, but only the two states).

Hidden Under a Hat
May 21, 2003

longview posted:

Why wouldn't you just put a low-side transistor switch for each resistor? Then you could intermediate steps by enabling two or more transistors as well, giving you more steps. It would also be enormously cheaper and smaller, faster etc.

Can you go into this in a bit more detail? I'm just starting to get the hang of transistors, but I'm not quite sure what you mean here. Wouldn't I still need a separate signal to enable each transistor?

Also, I was just thinking, I could have multiple resistors active at once, which would give me a different total resistance, which would also give me more steps.

Corla Plankun
May 8, 2007

improve the lives of everyone
I really feel like at this point your employer should have most of the goons in this thread on salary. Can't they afford to hire an electrical engineer?

Delta-Wye
Sep 29, 2005

Corla Plankun posted:

I really feel like at this point your employer should have most of the goons in this thread on salary. Can't they afford to hire an electrical engineer?

I wish I can find this page I read once with people bitching about folks dropping into IRC to ask (linux? programming?) questions. They always start with "how do I do <blank>?" and after a long QnA session, everyone realizes that <blank> is a useless step to doing something totally different that they could have easily answered if the question was worded right.

That is what Hidden Under a Hat's posting reminds me of. It's never "I'm trying to build a variable-current supply" or "how can i change this resistance dynamically? It's high power etc etc" but "how do I bring resistors in and out of a circuit with a relay?"


Hidden Under a Hat posted:

Actually I have to specifically avoid PWM, while at the time have a system in which I can have many different LED light intensities. That's why I'm designing a system in which I have many different resistors in parallel, with only one closed in the circuit at a given time, which determines the current to the LED. The expensive part is needing a separate relay for each resistor.

Don't you have PWM units in your circuit already? What is going on :psyduck:

Nerobro
Nov 4, 2005

Rider now with 100% more titanium!
I could see the need for that. "I need a ZERO noise power supply for LED's submerged in a bath we're measuring the resistance, inductance, and capacitance of"

SnoPuppy
Jun 15, 2005

Delta-Wye posted:

I wish I can find this page I read once with people bitching about folks dropping into IRC to ask (linux? programming?) questions. They always start with "how do I do <blank>?" and after a long QnA session, everyone realizes that <blank> is a useless step to doing something totally different that they could have easily answered if the question was worded right.

Gah - I think I know exactly what you're talking about, and this is going to bug me too.

For a comedy option, he could always use a precision current sink with a DAC to modulate the LED intensity! He could even use a filtered PWM as his DAC! :v:

Corla Plankun
May 8, 2007

improve the lives of everyone

SnoPuppy posted:

Gah - I think I know exactly what you're talking about, and this is going to bug me too.

Its called the XY Problem :o:

Delta-Wye
Sep 29, 2005

Corla Plankun posted:

Its called the XY Problem :o:

Bingo, thanks!

http://www.perlmonks.org/?node_id=542341

It's not so much that I mind Hidden Under a Hat's questions so much as I'm a bit frustrated I don't feel like I'm being as helpful as I could be.

Hi Baku Shyo
Nov 7, 2009
This might be a bit of a weird question: I'm building a circuit in Multisim that requires a 4051 IC, unfortunately it doesn't come with one and the only one I can find for download gives me this error when I try to import it:



Any suggestions?

PrBacterio
Jul 19, 2000
So I've got a fairly simple (but probably incredibly stupid :downs: ) question: I've started playing with one of those Xilinx FPGA development boards recently, and now I'd like to generate some sounds using it. So my plan is to solder an audio jack to a pin header to plug into one of the connectors on the board that are connected to some pins on the FPGA, connecting one pin for each channel of audio, and then to use a PWM signal to generate different audio signal levels, and have a simple RC lowpass filter rigged in between to reconstitute the PWM signal I generate using the FPGA into something that won't blow my speakers (and also to scale the FPGA's 3.3V logic level to an appropriate audio signal level), like this (lovely MSPaint circuit diagram warning):

Now seeing how this is the first time I'm doing something like this though I've no clue how to choose what kind of capacitor to use for this purpose, or if it even matters. Though an electrolytic seems to be the wrong choice probably. I'd guess some kind of film capacitor is what one would use for this...? Or do I just derive my desired capacitance and then just pick whatever type is cheapest available with that value?

Adbot
ADBOT LOVES YOU

karoshi
Nov 4, 2008

"Can somebody mspaint eyes on the steaming packages? TIA" yeah well fuck you too buddy, this is the best you're gonna get. Is this even "work-safe"? Let's find out!

PrBacterio posted:

So I've got a fairly simple (but probably incredibly stupid :downs: ) question: I've started playing with one of those Xilinx FPGA development boards recently, and now I'd like to generate some sounds using it. So my plan is to solder an audio jack to a pin header to plug into one of the connectors on the board that are connected to some pins on the FPGA, connecting one pin for each channel of audio, and then to use a PWM signal to generate different audio signal levels, and have a simple RC lowpass filter rigged in between to reconstitute the PWM signal I generate using the FPGA into something that won't blow my speakers (and also to scale the FPGA's 3.3V logic level to an appropriate audio signal level), like this (lovely MSPaint circuit diagram warning):

Now seeing how this is the first time I'm doing something like this though I've no clue how to choose what kind of capacitor to use for this purpose, or if it even matters. Though an electrolytic seems to be the wrong choice probably. I'd guess some kind of film capacitor is what one would use for this...? Or do I just derive my desired capacitance and then just pick whatever type is cheapest available with that value?

What´s up FPGA DAC buddy? I wrote a simple 16bit delta sigma DAC running at 100MHz. At those speeds, just grab a small cap, all you wanna do is dump the >MHz frequencies to GND.
Disclaimer: I'm not an EE, I advance by the "one million monkeys with one million breadbords" method.

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