regulators – Neil's Log Book https://nrqm.ca What could possibly go wrong? Sat, 08 Jan 2011 20:00:02 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.1 How I’m powering my acoustic modem https://nrqm.ca/2010/11/how-im-powering-my-acoustic-modem/ Wed, 24 Nov 2010 05:41:36 +0000 https://blizzle.cybertavern.net/?p=271 Power supply

A ±10 V power supply

I’ve covered how not to power an acoustic modem, and how I’d like to power an acoustic modem, now it’s time to tell how I’m doing it right now.

To restate and clarify the problem: I want to use an acoustic transducer to transmit and receive data via pressure waves.  The transducer I have transmits a 40 kHz carrier wave, and can be driven by up to 20 V.  That means that when transmitting, the circuit must alternate a 20 V signal back and forth between the transducer’s two input pins, once every 25 microseconds.  Additionally when receiving, the transducer’s output signal needs to be amplified into a usable signal.

Indulgent aside: When I started doing electronics it took me a while to get an intuitive understanding of voltage.  Not so long ago it clicked that when you’ve got a voltage source, as long as you’re careful, you can look at it in whatever way is most convenient.  A 20 V power supply is also a ±10 V power supply if you call the voltage at the halfway point “0 V”.  This can be quite powerful, for example, if its easier to see one part of a circuit as ranging from -10 V to +10 V and another part of the circuit as ranging from 0 to 20 V.  Of course doing so adds a wrinkle to documentation and maintenance, but it can make life easier when you’re thinking about the circuit.  (When you’re dealing with power currents (measured in the milliamps rather than the micro- or nanoamps), you also have to consider where the current is flowing and whether or not it’s going to cause noise in the system or blow up your components.)

In the image to the left, I have the red and black wire coming in from a variable DC power supply.  I have it set to 23 V, which provides plenty of room to regulate to 20 V.  This is a drop-in replacement for a few 9 V batteries in series.  To reiterate: this is dumb, a better circuit would only need a 5 V power supply, but as an alright man once said, “The way it is is the way it is.  We gotta deal with what’s in front of us.”

The 10 V regulator only provides a reference.  No current flows from the 20 V rail to the 10 V rail, so the regulator won’t burn out.  A better solution would be to use some precisely matched resistors to divide the 20 V in half.  That would be a bad idea if the 10 V rail was providing power, because then the voltage drop across the resistors would vary with the current flowing through them.  But since it’s only a reference, that’s not a problem.  Resistors would be better because each regulator draws several milliamps of current, whereas large resistances would only draw microamps.  Alas, I haven’t got precisely matched resistors (see the end of the previous paragraph).

In summary: this approach provides a stable, fairly precise ±10 V power supply.  It is perfectly acceptable for now, but in the future it will need to be replaced with a more power-efficient design.  Hopefully the final circuit will only require a 5 V power supply, but in the meantime this solution gives me a lot of room for error and lets me move on to other parts of the project.

]]>
How to power an acoustic modem https://nrqm.ca/2010/11/how-to-power-an-acoustic-modem/ Thu, 18 Nov 2010 22:21:10 +0000 https://blizzle.cybertavern.net/?p=261 I mentioned before that I’m basing my acoustic transducer off the Devantech SRF04 ultrasonic ranger.  I’m removing the piezoelectric transducers from a dead SRF04 unit and using them for my modem.  The transducers, which are the part that generate and receive the acoustic pressure wave that carries data, have a range of about 6 metres or so (one way), are driven with up to 20 V, and resonate at around 40 kHz.

The puzzle I’m working on right now is how best to actuate the transducer to generate a 40 kHz pulse.  The SRF04 does it using a chip that’s intended to convert 5 V logic signals into the ±12 V signals used for the RS-232 serial protocol.  Unfortunately most RS-232 converter chips aren’t made to power an acoustic transducer, and they aren’t able to provide enough current to generate a strong signal.

I bought a couple ADM208EANZ RS-232 converters, which seem like they should be able to provide up to 40 mA.  I didn’t read the datasheet carefully enough and failed to notice that it needs a bunch of 0.1 μF polarized (i.e. aluminum electrolytic) capacitors.  I have 0.1 μF ceramic caps, and I have various electrolytic caps, but I don’t have 0.1 μF electrolytic caps.  The chip will generate +9 V with a 10 μF cap, but it won’t generate the -9 V rail.  I have no idea why some circuits require capacitors with polarity, but if the diagram has a plus sign next to a capacitor you really need to pay attention.  Ceramic capacitors, which don’t have polarity, might not work.

(Most RS-232 converter chips generate ±9 V instead of ±12 V, presumably because ±9 V is easier.  The input is 5 V, then they put that through a voltage doubler to generate 10 V and put that through an inverter to generate -10 V.  Then I guess they put both through something that drops 1 V (a regulator or something to stabilize the output) and you end up with ±9 V.)

If the ADM208EANZ can power the transducer, I think it will be the best solution.  I see three downsides to using an RS-232 converter:

  1. You’re limited to an 18 V swing (or perhaps even less) instead of the full 20 V.  This isn’t a major problem because the transducer output is roughly a logarithmic function of the voltage input, so the output difference between 18 V and 20 V isn’t very high.  But if you want to upgrade your transducer to something like the Maxbotix MaxSonar-UT transducer, which takes up to 60 V, then you’re stuck at 20 V.
  2. The receiver’s amplifier is a little more complex because you have to operate it on a single rail (i.e. 0 V to 5 V instead of -10 V to +10 V).  This downside is overwhelmed by the upside of not having to generate a  ±10 V power supply.
  3. The SRF04 documentation notes that they had to turn the RS-232 chip off while receiving to reduce noise.  The noise is probably from the step-up converter and inverter that generate the positive and negative voltages.  This is pretty annoying, and now that I mention it I recall that the ADM208EANZ doesn’t have a disable feature.  I might be able to filter the noise.

The upside is that the RS-232 converter can be powered from the same 5V supply as the rest of the electronics.  It doesn’t need a complicated battery assembly or external step-up converter, or a bunch of regulators to generate reliable voltage rails.  It just needs a battery and one 5 V regulator, which is more power efficient and space efficient.

One final comment: ADM208EANZ looks like Adam 20 Beanz.

]]>
World falling apart https://nrqm.ca/2010/11/world-falling-apart/ Sun, 14 Nov 2010 22:43:42 +0000 https://blizzle.cybertavern.net/?p=240 Digikey sent me a bunch of LM395T power transistors instead of 20 V regulators.  Oh no!  I don’t know who to trust any more.

Update Nov 15 – they let me keep the transistors and quickly dispatched a new set of regulators.  Thanks Digikey!

]]>
How not to power an acoustic modem https://nrqm.ca/2010/11/how-not-to-power-an-acoustic-modem/ Sat, 13 Nov 2010 06:42:48 +0000 https://blizzle.cybertavern.net/?p=230 crummy power supply

How not to generate a ±10 V power supply

I feel pretty dumb talking to nobody like this.  My domain name doesn’t even work yet, but I guess logging is what engineers do.  And I’m imaginative enough to see the utility of it: it’ll be nice down the line to have a log to review, writing stuff down helps flesh out ideas, and an open design process will make it a heck of a lot easier to produce open documentation.  It will be tough to expose all my bad decisions and half-baked ignorance (and mixed metaphors), but I can suck it up.

My first project is to build an acoustic modem.  This follows the principle of multiplying work: the modem doubles as my class project for ELEC 571: Underwater Acoustics.  We’ve been using the Devantech SRF04 ultrasonic ranger in the mechatronics lab, and it strongly informs my design.  The SRF04 actually uses an RS-232 chip to generate ±9 V levels, which actuate a piezoelectric transducer.  I took a couple of the transducers from a broken SRF04 to use for my project.

I tried using an RS-232 chip that we had lying around in the lab, but those things have draconian current limits.  There’s no way I can power a whole circuit off of one.  I’m probably going to try it again soon though.

My solution: a DC/DC converter (AP34063N8L) to step up a 7.4 V lithium polymer battery up to 20 V.  Taking half the output as the reference voltage will produce a ±10 V power supply.  With that I can power pretty much anything I want.

I built the circuit shown above based on the AP34063N8L datasheet to step the battery up to 23 V.  It then uses four 5 V regulators to generate 20 V, 15 V, 10 V, and 5 V rails, of which I take 10 V to be the reference.  You may recognize that this circuit is completely ridiculous.

  • Problem #1: the circuit, under no load, draws about 30 mA, or 0.25 W of power (loading it increases the power consumption as you’d expect)
  • Problem #2: the 5 V regulators keep dying.
  • Problem #3: I basically stuck capacitors and inductors anywhere that they wouldn’t cause problems.

Problem #1 is the major stumbling block.  I will probably end up just using a battery pack or a few 9 V batteries to provide the ± rails.  That’s way less cool than using a DC/DC converter (or even an RS-232 converter) but it’s looking like a pretty sweet idea right now.

Problem #2 is interesting.  I’m not sure why, but I blew three regulators in one day.  They weren’t generating detectable heat or anything.  The circuit has the regulators chained together, so for example the one that generates 5 V is referenced to the negative rail and is powered by the regulator that generates 10 V.  The 10 V rail is referenced to the 5 V regulator’s output, and is powered by the 15 V rail.  And so on.  I assume this is a horrible way to do it.  It’s quite conceivable that the output pin on one of the middle regulators can’t sink current from a higher regulator, or maybe there’s some noise getting caught in a feedback loop.  Anyway I bought some 10 V and 20 V regulators.  I want to regulate the 20 V line to get rid of the ginormous ripple voltage coming from the step-up converter.

Problem #3 is mostly due to laziness: “I don’t feel like cutting another jumper wire, I’ll just use an inductor instead.”  And more capacitors can’t hurt, right?  Well, they also don’t help that much.  I did buy some 15 mH inductors to try to filter the power supply a little better.  They will be useless once I give up on this power supply and switch to 9 V batteries, but owning inductors makes me feel cool so it’s okay.

At this juncture it’s worth noting that I’m pretty much broke, so sometimes I’ll do things like build a crummy power supply because it’s cheaper (and niftier) than buying a few 9 V batteries, even though it’s actually way more expensive because I buy spare parts.  This is not my most admirable quality, and hopefully keeping this public logbook will help me develop better habits through shame.  On the bright side, my collection of useful components is expanding.

]]>