Abusing the MAX232

I'm trying to hang an 8-way relay-driver off a USB port, with the circuit b= eing bus-powered.=20

The relays in question need at least a 9v signal, and they can be at the en= d of a 25' wire (DB9DP9). This part is fixed because it's an off-the = shelf part.

The first attempt was to try using an ICL7660 (since I had them lying aroun= d) in voltage-doubling configuration. That worked fine until I actually wan= ted to use the relays [grin]. The 7660 could produce 9v with no load, but a= s soon as I connected just one of the relay pins, the voltage dropped to ~4= v and the relay failed to switch.

So I was wondering if the MAX232 would do any better - I know it's not what= it's supposed to be used for, but all I really want is +10v from the USB's= +5v that will drive 8 relays... I'm supposing that the RS232 drivers would= probably be specced to drive the voltage down a long serial wire anyway, s= o maybe they'll do better ?

If it comes down to it, I can have a separate power-input to the controller= (and basically make it not bus-powered) and then there's no problem, but i= f there's a good way of avoiding that I'd like to know about it :)

Thoughts, anyone ?

Cheers Simon

Reply to
Simon
Loading thread data ...

Wait - that's a *current* problem, not a *voltage* problem. the effective impedance/resistance of the thing is too low to drive with that source. It's really a 4V source with that load; it's just lying through your voltmeter when you test it no-load. That's okay; they all do that.

It might - it has a builtin charge pump. I would not trust one past 5V.

But can't you add another relay at the PC end with enough energy? That would save you having a wallwart at the far end.

-- Les Cargill

Reply to
Les Cargill

Hmm - not past 5v, huh...

Another option I thought of would be something like (

formatting link
) - although I'd = have to put a 680R[*] resistor across the outputs to make sure there's alwa= ys a 10% load on them even if no relays are switched on. Wasting power like= that just seems .... wrong :)=20

I'd assume that this power would be sufficient: The bench PSU reports I'm p= ulling 0.1A @ 5V into the '7660 circuit when I have all 8 relays switched o= n, and the above part says its max output is 0.167A. That ought to be enoug= h headroom.

[*] working it out as requiring at least 17mA of current at 12v, so 12 =3D (17/1000) * R =3D> R =3D 705 =3D ~680 and Power dissipated =3D ~0.2W=20

Yeah, the above isn't really as clear as I ought to have been. When I said = "controller", I meant the USB interface, not the relay. The setup looks som= ething like:

[embedded] [relay controller board]
Reply to
Simon

formatting link
)

- although I'd have to put a 680R[*] resistor across the outputs to make sure there's always a 10% load on them even if no relays are switched on. Wasting power like that just seems .... wrong :)

pulling 0.1A @ 5V into the '7660 circuit when I have all 8 relays switched on, and the above part says its max output is 0.167A. That ought to be enough headroom.

"controller", I meant the USB interface, not the relay. The setup looks something like:

chauvet relay pack that have a 9-way input. Pin 5 is at least 9v, the other 8 are ground-to-enable connections.

would be easy. It's not quite so elegant though, and if I could get it to be bus-powered, I'd prefer it. Hence the questions :)

I've tried exactly that trick with a MAX232. The charge pump is pretty pitiful, even with the outputs unloaded I seem to recall only getting about +8V out, and it dropped pretty sharply as you weighed it down.

Could just roll your own charge pump with diodes and caps, then just have the micro generate a PWM signal into some beefy driver like an LVC3G34, or just a transistor. You'd want to use big caps to keep the droop low, but it seems like you're not talking about all that much current.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
Reply to
Rob Gaddi

So, the AVR (an ATMEGA168A) can source up to 40mA per pin (with a total of =

200mA per device) so I don't think I'd need the driver IC, but while googli= ng for appropriate charge pump circuits, I ran across the LTC1263. This loo= ks as though it can provide up to 90mA at 12v from a 5v supply, which ought= to be plenty! I think I'll get me a couple of these to try breadboarding w= ith :)

Simon

Reply to
Simon

40 mA @ 5 V is still only 0.200 Volt-Amps - assuming the PIO isn't 3.3 or 1.x volt...

-- Les Cargill

Reply to
Les Cargill

I think I'm missing your point. The LVC3G34 has an output drive of 24mA, according to its data sheet. How does it help to put a 24mA driver chip in front of a 40mA pin ?

I'm assuming here that the 2n2222 transistors are always going to be used to switch the 10v supply, so the driver chip would only really be useful if the AVR driving capacity was too low to usefully drive the transistors.

Unless I'm missing something. Usually when I don't understand what someone's saying on here, I'm missing something [grin]

Simon.

Reply to
Simon

What's the resistance of the relay coils?

If you're willing to go surface mount anyway, you might want to consider using a boost regulator -- generating a few hundred mA at 9V from 5V should be easy.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

I don't have that to-hand, I'd have to measure them. Previously all I've do= ne is have the non-bus-powered approach and a 9v wall-wart connected via a =

2n2222 to the AVR. That worked fine :)

=20

Are there any that don't need so many support components ? It's been a whil= e since I used one of those, but I seem to recall needing inductors and cap= acitors, sometimes resistors as well, according to the 'example circuit' th= ey usually have in the datasheet...=20

What was attractive about the LTC1263 was the power output (90mA) with only= 4 caps (2x 0603, 2x0805). Of course, it's relatively expensive in small qu= antities (~$7) so if there's a better (read: can supply the power and has a= small BOM requirement) option, I'm all ears :)

Cheers=20 Simon

Reply to
Simon

I hadn't looked yet. I am not sure what the LVC3G34 would do for you.

Sounds like a plan then. I was simply estimating the AVR driving capacity at a ( seemingly inadequate ) .2 V-A, and simply hanging that on the FLASH Vpp driver chip would not have changed that capacity.

If you have a nice three-legger ( the 2n2222 ) driving the Vpp chip ( the LTC1263 ) then I expect you are golden.

Sadly, the elegance is lessened, but I'd take adequate current over elegance.

If you got it figured out, don't pay any attention to me - all I have is pieces of the thing on this end! :)

-- Les Cargill

Reply to
Les Cargill

Looks like I was on a hiding to nothing...

According to the bench supply, when supplying with 9v, the current draw of the relays (when all are switched on) is nearly 400mA - and measuring each relay's resistance gives ~163 ohms, which ties in. I hadn't expected the resistance to be so low.

Given that USB's absolute maximum current draw is 500mA at 5v, I somehow doubt I'll be able to fabricate sufficient energy to energise all the relays [grin]. If I did, I'd expect a Nobel prize for physics for solving the world's energy issues :)

Looks like it's going to be a wall-wart solution after all.

Reply to
Simon

Physics dictates an inductor and a cap, at minimum. You should reasonably expect a minimum of inductor, cap, two resistors and a diode. But those can all be pretty small: I've got some of those circuits supplying 100mA at 5V in the space of a dime.

Well, it was the 90mA that made me ask about the coil resistances -- before you spend a bunch of time on that part, you should ask yourself if it'll deliver the goods when all the relays are on.

Any voltage-doubling circuit is going to sag as the current goes up, for that matter, so you need to pay attention to that factor, too.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

done is have the non-bus-powered approach and a 9v wall-wart connected via = a 2n2222 to the AVR. That worked fine :)

r

ile since I used one of those, but I seem to recall needing inductors and c= apacitors, sometimes resistors as well, according to the 'example circuit' = they usually have in the datasheet...

ly 4 caps (2x 0603, 2x0805). Of course, it's relatively expensive in small = quantities (~$7) so if there's a better (read: can supply the power and has= a small BOM requirement) option, I'm all ears :)

if you already have something than can make a ~50/50 pwm, transistor, inductor and diode

formatting link
for a relay you don't need much regulation

or something like

formatting link

-Lasse

Reply to
langwadt

A relay's hold-in current (and voltage) is lower than its activation current (and voltage). You could, if you were bound and determined, make a circuit that only draws lots of current on pull-in, then settles down to the hold-in current.

That's assuming you don't want to switch the relays arbitrarily fast, and that you don't mind considerable complexity. Otherwise -- use that wall wart.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

formatting link

Most every old 10Base-2 ethernet adapter used to have one of these.

Reply to
Jim Stewart

Lesson learned: starting a design before you've acquired the actual task specifications tends to be a waste of time.

Reply to
Hans-Bernhard Bröker

Good idea, except that his measurements most likely are of the hold-in case, and even those are already well outside his power budget (3.6 Watts needed, only 2.5 available).

Reply to
Hans-Bernhard Bröker

The way he states it, he is not measuring the activation current or the hold-in current, he is just measuring the current at 9 volts which is likely higher than either of the other two values.

Rick

Reply to
rickman

Use 8 5V relays that draw less than 100mA or 500mA, depending on what spec you are designing to.

For example (

Reply to
Spehro Pefhany

Ahhh. No.

The relay doesn't regulate itself to the hold-in current: it's just a dumb coil and switch. The circuit designer can make a drive circuit that starts out at high current (by putting the rated voltage across the coil), then dropping to a lower current (by switching in a resistor, or switching to a lower voltage). But it complicates things.

Most small relay circuits just switch in a voltage and essentially hold the relay current at the activation level or above.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.