Everything for Electronics

Tech Forum





Data Transfer Dilemma Answered May 2016

I am a mechanical engineering consultant by profession. I design the mechanical and hardware/software for my client‘s ideas and projects. I then 3D print the mechanical components, fabricate the PCBs, put everything together, and provide my clients with working production-intent prototypes. I love my job!

One of my elderly friends (early 80s) came to me with an antiquated product called “The Electronic Rolodex 128k.” He asked me how he could get the data onto his computer because the LCD on this device is starting to fail and he is no longer able to read the names and phone numbers. I dabble enough in this area where I said that I am very capable of figuring this out. So, I took on the challenge.

The only data I/O on the device is an IR transmitter on the left side  and an IR receiver on the right. There are NO serial ports or any other connectors that would enable me to connect to a computer. The purpose of the left and right transmitter and receiver is so that if you have two identical devices, you can transmit the data from one device (on the right) to the other device (on the left).  

I borrowed an IR to USB adapter from a friend and opened up a Tera Term window. I also used my signal analyzer to determine the appropriate baud rate (4800). I can see the data reception and it seems that I am receiving complete garbage characters. I have played with my signal analyzer and have inverted the signal, swapped LSB and MSB, and many other tweaks.

When that didn’t work, I opened up the device and soldered leads directly to the TX and GND pins at the IR transmitter. I then connected the leads to my signal analyzer and also my oscilloscope. I verified the baud rate and also noticed that the voltage levels were TTL, not RS-232. I borrowed a TTL to USB adapter, but this did not work either.

I came to terms with the fact that the data is compressed and/or encrypted. So, I searched far and wide for some software for this device and I found it ... well at least a similar device. I installed and ran it in a variety of configurations and still cannot get receive data that makes any sense. I have done enough testing and playing around with this product where I can almost write a book, but I still have no success in transferring the data to another similar device or to a computer. I have searched for this device on Google, eBay, Amazon, etc., and they are extinct. I’ve purchased a slightly newer generation of this product, but I do not believe that they are compatible. I have called the manufacturer, but they no longer support the device. So, I am at a total dead end. I have read your magazine for many years and thought that this would be the perfect venue for a Nuts & Volts case study/project for DIYers and the like. I would greatly appreciate any advice that you might have in doing what I originally expected to be a relatively simple problem to solve.

#5162
Neal Rosenblum
Hollywood, FL



Answers

I just had a thought, but it may be too late since the display is getting unreliable. Photograph each record, download the photos to a PC and import those in to Microsoft OneNote. OneNote has the ability to OCR a photo or scanned document.

However if the display resolution or quality is poor this may not work anymore.

Lawrence Bartel
MO

“Google is your friend”, as I keep telling my girlfriend.

A 10 minute search on Google revealed a couple of interesting tidbits:
Apparently, RadioShack had, at one point, sold a computer interface for this device, though given the manual on their web site, I’m guessing it was 20 to 30 years ago.

Also, I saw references in other places that it’s possible to get the Rolodex to transmit a single record. If you really want to decode it, what I would suggest is to set up to record the signature of the IR signal (Digital Storage Oscilloscope?), and have it send a known [short] entry. (Maybe do so a few times in case it’s using something that changes each transmission). Then change one letter in the known entry, and send it again.  With some patience, you should be able to break the code.

(I really doubt that they got very heroic about security on this gadget, especially as it’s quite old.)

Of course, if you really want a challenge, you _could_ decode the LCD code. (Remember that LCDs require a balanced signal, so go both positive and negative to the actual display).

Clark Jones
Gilbert, AZ

It sounds like you have successfully tapped into the data stream in a couple of ways so that is not the problem. What you need is an algorithm for interpreting that data. I suspect your best bet is still the OEM. You have tried calling. Perhaps a politely worded letter to them, explaining what you are trying to do, would find it's way to someone who has been around there long enough to know and with enough time to actually answer. Perhaps you could arrange to have that letter delivered with an order for several hot pizzas and drinks around lunch time.

E. Paul Alciatore III
Beaumont, TX

(I'm not familiar with this device, but I did a lot of similar stuff when this was probably built).

In the early days, the only real serial standard was RS232 which used +/-15V. These 'new pretenders' could not supply this, so many used 0-5V only. This just fell within the spec so that a standard port could talk to it (usually).

There's also the pain of getting handshaking right on adopters etc. You don't have a real port to deal with, having tapped into the IR part, but it could help explain some of the difficulties.

Although there's no RS232 port, data coming via IR may not be reliable without software handshaking (eg XON/XOFF with ASCII), but ASCII is not the only kid on the block. It could be EBSDIC or more likely as memory was always at a premium, encoded with reduced bits (think teletype close with shift-in and shift-out).

If you're determined to do it in hardware, bare the above in mind, and that most interfaces only like standard ASCII.

Or, try to tap the LCD feed? But, as the display is still just working, why not just re-key all the data - surely that would be quicker?

What a challenge! Good Luck!

Sally Jelfs
Brackley, UK

Wow, lots of work so far! Could you stick a chip clip on the memory chip and monitor it while trying a transfer (to force it to dump the DB)? Maybe it isn’t encrypted until the IR transfer, that is, unencrypted coming out of the memory chip.... obviously, assuming there is one.

Pete Lunt
Cary, NC

Opinion: there is some kind of handshaking protocol that needs to take place that doesn’t. In your post on the Microchip board (found while searching for software), you say 700 contacts at guesstimate 50 characters per contact. That should take 58 seconds at 4800 baud. Yet you only see a 1/2 second data burst. I think the unit doesn’t see the handshake, gives up and goes away. Success might depend on getting a similar unit to handshake with.

P.S. I see you are also in Hollywood. Look me up under KM4SJN and I’ll buy you a beer & swap war stories.

Charles Veres
Hollywood, FL

Have you opened the device and identified its processor? The data through the IR ports may be compressed, but the data sent to the display isn’t compressed, and maybe easier to capture as LCD digits and segments.

Then you can convert that back to ASCII and send to a new computer.

The next problem is how to attach to the LCD digit and segment signals without doing any damage to the original device. The scan frequency is necessary to sync the signals at the right moment when being read. The processor ID will give you the correct signal pins and help reading through a second device.

The last solution is to read the data on the LCD one-by-one and type the information manually to the newer computer. It may be the only non-invasive solution.

Raymond J Ramirez
Bayamon, PR


Low Voltage Disconnect Answered May 2016

I am trying to build a Low Voltage Disconnect (LVD) for my 1975 Lincoln Town Car Extended Limousine. The problem is that when I do not use it daily for a longer period, the battery is discharging through some electronics. I have constructed an LVD based on two CMOS 555s connected to a cutoff relay, which is constant on until cutoff. The relay itself draws too much when in the on state. Is there a way to have a relay that draws next to nothing? It should be at least 10-16 amp contacts.

#5161
Claes Kamborn
RORVIK, Sweden



Answers

Yes, there are relays that latch mechanically in the on or off position and draw no current except to change positions. They are listed as alternating or latching relays, and they depend on mechanical linkages to hold the contact position. They are often used in lighting controls and some have large current capacities. One manufacturer, Asco, comes to mind.

Aside from the load terminals there are three control terminals; Common, On, Off. For clarity consider a toggle switch with two solenoids and linkage. One solenoid pulls the switch on, the other solenoid pulls the switch off. Another design uses a single solenoid with an over-the-center linkage design. The one consideration is that the battery still has enough energy to operate the ‘Off’ solenoid when the cutoff point is reached.

One relay that you may seriously consider is made for the GE commercial and residential low voltage controlled lighting systems. The currently available relay is model RR7, it has a single 20A/277 contact and a pair of coils designed to operate on 24VAC, but they may work with 12VDC. Ebay has several listed as GE RR7 Relay, around $20.00 US.

Len Powell
Finksburg, MD

A 16 amp relay will not be sufficient to handle engine starting load current, which can reach 200-300 amps.

A better and simpler solution, and one that I use on numerous vehicles that I have, is to use a Trickle Charger designed to be connected continuously. That type of charger uses a microcomputer to monitor battery state of charge and prevents overcharging and undercharging.

Some modern cars have low voltage disconnects but they typically disconnect too late and while retaining some charge in the battery, it is generally insufficient to start the vehicle.

John Benedict
via email

You can have a relay that takes NO current. This is called a latching relay. It has two states which can be called SET and RESET and a separate coil for each state.

In use, you apply a pulse of voltage to one coil to put the relay in the SET state and likewise a pulse of voltage to the other coil to put it in the RESET state. In your application, your LVD circuit would pulse the relay to the reset state which would disconnect your electronics. You could use a push button to go back to the SET state or another circuit that would sense that the car has been started and the battery voltage is well above the low voltage disconnect value.

There are lots of listings for latching relays and circuits available on the internet.

Mark E. Whitmore
Frederick, MD

A latching relay turns on with one pulse, and off with a different pulse. It will mechanically retain the last position (using no power whatsoever to do so) until the appropriate pulse is received to change it’s state.

A single coil latching relay requires a pulse with one polarity to turn it on and a pulse with the opposite polarity to turn it off. (This usually means using an H-bridge circuit to drive it.)

A dual coil latching relay has two separate coils: one that turns it on and one that turns it off.

DigiKey (www.digikey.com) has listings for both types of latching relays, including ones with contact ratings of 16A at 12VDC.

If you prefer not to build it yourself, LVDs have become popular in recent years in the Amateur (Ham) Radio community. You might check with Amateur Radio equipment suppliers to locate a pre-built LVD.

Clark Jones
Gilbert, AZ

I recommend a latching relay. They come in a variety of styles and maintain their position after the power to the coil(s) has been removed: it is a mechanical memory.

You probably want a two coil style: one coil for on and the other coil for off. A short pulse to the desired coil will set it in that position until the other coil is pulsed. It will remember this position even if all power is removed form the vehicle.

I searched Digi-Key for an appropriate one (12V coil, 16 Amp and higher contacts) and got 41 results.

E. Paul Alciatore III
TX

There are commercially made devices which provide both a low voltage disconnect as well as a timed disconnect. These are commonly used in public safety vehicles to remove the load of two way radios and other emergency equipment when the vehicle is powered off for too long.

I have provided a link for a company that uses MOSFET technology instead of a mechanical relay, thus the current draw for the device will be lower. The link is for a uni-directional relay that I believe may suffice for your application. They also make uni-directional relays for applications where there is a second "cabin battery" such as an RV (Caravan). www.perfectswitch.com/wp-content/uploads/2009/10/Specification-Sheet-Uni-Directional-Relay-GEN3.0.pdf

Joe Leikhim
Oviedo, FL

It must be a long time delay if your car battery can’t sustain a couple of hundred mA max during the on time!

However, to business: I assume that the idea is for your ‘misc’ circuit to come on when the ignition is on, then automatically go off after a specified time when the ignition is switched off. The circuit should handle 10-16A, but use almost nothing.

If that’s the case, then look at the relay C3-R20/DC 12V by RELECO. (RS Components part 350-377) This is a set/reset relay with DPCO contacts rated at 10A DC, so you will need two relays for the rating - preferably feeding 1/2 of the misc load each. (Paralleling contacts will result in burn-out as they are mechanical devices which will lead to one doing most of the work.) To use them, feed each relay’s SET coil through one of its contacts, from the ignition switched line. Thus, when the ignition is turned on, the relays will be SET, then their coils de-energized.

The trigger for the switch-off timer will be active-low, taken from the same ignition line. Add some suppression here to clean it up. Power your timer circuit from the unswiched battery line, with it providing a positive-going pulse to the RESET coils on expiry. (100mA per coil). I leave the details of the timer to you, but a 555 needs a pulse not a level, and the output may need beefing up? This way, the only consumption is that of the timer circuit except during switching.

Sally Jelfs
Brackley, UK

A magnetic latching relay should do the job. You pulse it on and pulse it off, there is no current at all otherwise. I found a suitable relay at Newark, SPDT 12V, 16A, $5.18. Newark #26M2701, mfr: TE Connectivity #RT314F12. There may be others if you do a search for latching relay.

Russell Kincaid
Milford, NH

You might try using a DC-DC solid state relay. Input rages are typically 3 VDC to 24 VDC, so 12 volts DC will be sufficient to turn the relay on. I would get at least a 100 VDC unit due to electrical transients on the cars system, and sufficient current rating for the expected loads.

You can use a hidden switch or a tap off of a load that is switched with the key.

There are many suppliers of these types of relays, a search on Google or Ebaty should get you many suppliers.

Dave Bassett
The Villages, FL

Two solutions come to mind quickly.

1. Use a “latching” relay.
Would have to redesign your 555s to put out pulses - pulse to latch relay ON - another pulse to unlatch relay OFF.

2. Instead of using a relay - use a MOSFET.
Should be fairly easy to do with either a P or N channel mosfet.

Jim Schneids
Redgranite, WI

To test, disconnect one battery lead, connect a test light or meter between the cable and the battery. If the light glows or the meter shows current draw more than 50 ma. then disconnect the voltage regulator and see if the light goes out or the current drops, if so the regulator is likely bad. I have seen this problem before on Fords.

Joseph Syczylo
North Fork, ID

I would suggest maybe a latching relay similar to this one from Digikey - www.digikey.com/product-detail/en/panasonic-electric-works/ADQ23Q012/255-1443-ND/560939.

A latching relay would consume no power at all except at the point of switching. Granted, that may be a little pricey, but if you search the surplus electronics sites (Electronic Goldmine, All Electronics, BG Micro, etc) you can often find one for much less.

Derek Tombrello
Shelby, AL

You may use a relay that does not require constant power to maintain contact state. A “Latching relay” is a generic term that is used to describe a relay that maintains its contact position after the control power has been removed. They allow you to control a circuit by simply providing a single pulse to the relay control circuit.

Latching relays are also desirable when you need to have a relay that maintains its position during an interruption of power.

There are three main types of Latching relays. Magnetic latching, Mechanical Latching and Impulse Sequencing. Contact ratings vary with common ratings at 3 to 10A. If what you find can’t handle your current you can have it drive a slave high current contactor like the ones used in most vehicles.

John Sinks
Edelstein, Ill

Approach the problem from the other end. Put a battery maintainer on the car when it is not in use. Some Volkswagens even come with a solar panel to lay on the dashboard when the car is out of use.

Charles Veres
Miami, FL

You could use a mechanical latching relay triggered by a comparitor or also an SCR as a latching relay. An SCR will not change state until the power is removed, a transistor would momentarily cut the power and a reset button would gate it back on.

But there are two better solutions. Buy a battery tender to keep the battery charged, this will make the battery last much longer. The other possibility would be to buy a low voltage disconnect, they cost less than a new battery, have been engineered to work and are built into a rugged case.

Mark Arnold
Shepherdstown, WV

Before recommending any high tech solution, have you located the electronics that caused the power drain? I recommend doing so by removing the power fuses of each circuit one-by-one until the drain disappears and measuring the current at the battery while removing each fuse. Then analyze if that drain is some important part of the vehicle, such as radio/entertainment/clock that may be on with the ignition off. That drain problem should be solved before using the electronic disconnect.

As for the LVD that you have now, I believe it is a timer based circuit. The relay current may now be acceptable or not needed after the drain problem is solved.

Raymond J Ramirez
Bayamon, PR


Wi-Fi For The Pi Answered June 2016

Could someone please tell me if the ESP8266.01 module is compatible with the Raspberry Pi? And/or where can I find a Wi-Fi and GPS module that are?

#6162
Timothy Harner
via email



Answers

There is an instructable on how to use the ESP8266 with the Raspberry Pi  at www.instructables.com/id/Connect-an-ESP8266. However, I don't recommend that you use it because it communicates over the hardware UART. This will result in an extremely slow 115kbps Internet connection, about 1/100th of the speed of a typical 10mbps cable system connection. It will also tie up the UART which you will need for the GPS.

If you have a Raspberry Pi model 3, you do not need to add a Wi-Fi adapter at all since one is already built into the board. Use a version of Raspbian dated March 2016 or later to avoid driver issues. For older boards the simplest solution for Wi-fi is to use a small USB adapter. I have had success with the Edimax EW-7811Un, available from Amazon and others for $9. It supports 802.11b/g/n up to 150mbps and it's supported by any recent version of Raspbian.

GPS is also straightforward. Most receivers use a simple async serial port and are pre-configured to transfer data at 4800 bps, no parity, 8 data bits, 1 stop bit though this can be overridden in software. Data is transferred using the NMEA (National Marine Electronics Association) protocol. Google "GPS protocol specification" for information about this text-only protocol made up of 'sentences' that are easily parsed to get time and location information. If you are technically adept you can get a ublox NEO-6M or similar 3.3 volt serial GPS module for around $15 from eBay or Amazon and wire it to the serial port. Using the 26/40 pin I/O connector port, 3.3V power is on pin 1, ground on pin 6, Tx on pin 8, and Rx on pin 10.

A more expensive, but beginner-friendly solution, is to use an extender board known as a HAT that requires no hardware interfacing. One such HAT is the "Adafruit Ultimate GPS HAT for the Raspberry Pi", adafruit.com product #2324. This board includes a GPS receiver, internal antenna, Real Time Clock (RTC), and a holder for a CR1220 RTC backup battery. It also has a U.FL connector for an optional external antenna. This will only work with an original or model 2 Pi as changes to the hardware in the model 3 has made it incompatible with this HAT, at least for now. The original Pi and model 2 Pi work fine. This limitation likely exists with other GPS HATs. If you have a model 3 make sure the GPS HAT mfg. specifically claims support for it before you buy.

Mark Lewus
Denville, NJ


Power Supply Replacement Answered April 2016

I have a set of computer speakers which have become separated from their power supply.

Can you help me work out what power supply I need to replace the missing unit?

It may be helpful (to your other readers as well) if you could suggest a general procedure for this sort of situation that avoids blowing up the equipment.

In my case, I have a head start as the power jack plug is labeled with “DC in” and the polarity (center negative). It does not give the voltage though!

If there were no markings at all I would have to work out AC or DC as well. The connector type should be obvious of course, but I could imagine that even this could be difficult on occasion.

#4163
Mike O’Hagan
Aberdeen, Scotland, UK



Answers

One method that I have used successfully is to look for a large electrolytic capacitor inside the unit being powered. Many times there is a filter capacitor connected directly across the power supply input. By checking the voltage rating, you can determine the maximum voltage that can be applied. Since the original design would allow for some margin (let's say 30%), the normal applied voltage would be somewhat lower. A 16 VDC rated capacitor would likely be used with a 12 VDC power supply. Usually the next lower standard supply rating will work.

A voltage regulator at the input can also give you a clue to the power supply rating. If you can read the number on the chip, you can determine its output rating. The input voltage usually needs to be at least 2 VDC higher than the output for proper regulation. This sets the minimum voltage.

You can also use the capacitor polarity markings to get the polarity right if the jack is not marked. Sometimes you will find a bridge rectifier at the input which makes the input polarity insensitive. Hope this helps.

Len
via email

The easy way is to use a variable voltage supply and start with the lowest standard: 4.5V, 6V, 9V, and 12V. So, here's how I've done it: Start with ~ 3.5 volts with the speakers "on" and supplying some input, computer, mp3 player, or a an audio frequency generator. Increase the voltage until it starts playing, then increase the voltage to the next standard that is a higher voltage than the voltage you are currently using. Example: The speakers starts playing at 7.7V so the next standard voltage is 9V so increase it to that and notice how it sounds. If it sounds good at both low and high volume, you're done, now notice the current being used, at lowest and then at highest volume, don't forget to increase the audio output of your supplying device, computer, mp3 player, audio generator (be careful with this one it probably can go way too high for the input to the speakers).

Now build or buy a power supply with the correct voltage and current and get the needed power plug as well. (I have a collection of plugs. I bought ~ 2-3 of each from a supplier in a box with the part numbers, so I can test, use the one, and then order replacements when I use the last one.

NOTE: If the type of voltage, AC or DC, were unknown, then the same steps would work. If it were AC in then the polarity of the DC supply would not matter because behind the socket has to be a rectifier, which could even be one diode and if you then had the wrong polarity it simply would not turn on at all, no matter what reasonable voltage you used. In all probability, they would be using a full-wave rectifier so polarity won't matter and again you just need to find the working voltage and the needed current.

Philip Karras
via email

Unfortunately, there are no rules about what sort of wall-wart connector supplies what voltage, so unless you’re reeling lucky, you’ll have to get into the speaker which takes the power plug. (Marlin, RS or Farnell in the UK should have a matching one). It’s very rare to find AC output adaptions these days, except for printers. A speaker will normally expect DC to minimize hum pickup, as also inferred from the socket label.

Looking inside, check for the voltage ratings on the first few power smoothing capacitors. Check for a local voltage regulator and its spec. If there is one, then you know the maximum you can apply, but as long as you supply, say 5V more than its fixed output, it should be enough. More will dissipate more heat, which may cook it! (Engineered down to a price!) If there’s no regulator, check the amplifier chip spec and choose something lower.

The current rating is usually whatever you can find to replace it with. Facetious, I know, but unless you have a power supply and meter, it can only be guessed from the regulator and amplifier spec sheets. More current capability is better, as regulation will be better.

The info you need might also be on Google?

Sally Jelfs
Brackley, UK

Sure! You already know it’s DC and the polarity. You can make an educated guess that the voltage is between 5 and 12. So connect a variable power supply and go up a volt at a time until the speaker works adequately. Then get the appropriate wall wart and put the variable PSU back on your workbench.

Charles Veres
Hollywood, FL

There are three possible solutions.

First and easiest is to contact the speaker brand or supplier with the model number. They will give you the exact supply information and may even offer to sell you a replacement.

Second, open the speaker that has the DC input and look at the electrolytic capacitors. Search their labels for their WVDC rating, and multiply by 0.8 as a safety factor. For example, if the rating was 15 WVDC, then the maximum power supply voltage would be 12 VDC which is very common. The current rating depends on the load when the volume is maximum, but a good guess to begin with is 0.5 A (500 mA). Get the new power supply, test the speakers with a signal and increase the volume. If the sound gets muddy or distorted, then use a higher current rating, probably adding another 0.1 A or more. The speaker will not use any excess current, but the new power supply must not drop the voltage at the highest volume.

Third and most diffcult is to use a variable DC power supply. Start with 6 VDC and power up the speakers. If the volume is too low, and a higher setting distorts the sound, the circuit is limited (clipping) and needs more voltage. Apply increments of 0.5 VDC and repeat the test until the sound is good at all levels, then note the applied voltage. If it is a strange voltage (for example 8.5 V) then add another 0.5 V and test again.
If satisfactory, then buy or build a new power supply with that voltage and add 0.1 A (100mA) over the current measured on the variable power supply. Good luck and have fun!

Raymond J Ramirez
Bayamon, PR

Two ways I can think of:

1. Can you open the speaker case to access the electronics? If so take a look at the electrolytic and note the voltage ratings - use a supply that is lower voltage than that (observe polarity).

2. Plug the speakers into an audio source, plug in a variable supply (observe polarity), start at 3V and raise it until you get enough output level from the speakers.

Jerry R.
Long Island, NY

A typical supply for these things is 9-15 VDC @ 300-500 mA. I suggest taking a 9V battery, attaching a power plug to it (probably a coaxial), plugging it in and turning the amp on. Chances are it’ll work fine, but the 9V cell won’t last long if you use the speakers for extended periods.

If you’re leery of this shotgun approach, open the main unit and examine the WVDC of any electrolytics on the board. From that info, choose a DC supply 3-5 volts LOWER than the WVDC rating on the caps. IOW, if the caps say “16 VDC”, use a 9 or 12 VDC REGULATED adapter and choose a beefy current rating (i.e. 800 mA or more!) - trust me, peaks in the incoming audio WILL cause sags in the power supply (and distortion), so having plenty of current from the supply is a must!

Ken Simmons
Auburn, WA

Without any details of your computer speakers I’m going to guess they are about 3.5” x 3.5” x 5” and use a LM2822M audio amplifier IC. Assuming that’s the case, the IC can run of a voltage between 3 and 15V. I’d try a 6 to 9VDC supply if you open up the enclosure with the amplifier and confirm its a LM2822M and note the of impedance the loudspeakers. I’d use 6 to 9V when 4 ohm loud speakers are used, or 9 to 12V for 8 ohm loud speakers.

You should find the negative supply terminal is connected to the stereo jack plug sleeve (common signal ground/screen). To use a low voltage AC supply, the amplifier board would need the addition of a bridge rectifier and capacitor large enough to give the required DC voltage with minimal ripple adding a cost that’s easily avoided by using a DC adaptor.

John Swift
Lancashire, UK


Coils and Magnets and Turns… Oh My! Answered April 2016

I have a question about an article I saw where they had a platter of coils and a platter of magnets. They spun the magnets over the coils producing energy. My question is: How do you determine the correct wire size and number of turns, size and the number of coils, and the size and number of magnets to get to a desired voltage and amperage?

Is there a best way to figure out what combination works?

I appreciate any insight or direction.

#4162
Craig MacP
via email



Answers

You can find the American Wire Gauge (AWG) from this formula that I found in the Magnetics Incorporated Ferrite Core catalog and handbook:

        AWG = -4.31*ln(1.889*I/C)    where
        I = the AC or DC current
        C = the current density in amperes/cm2 ; 400 is conservative or you can use 800.

To do any calculations you will need to know the magnetic strength of the magnet, symbolized by H and measured in Oersteds. The magnet manufacturer should be able to give you that info. The H varies with distance so you need that data and how far the coil (I am assuming solenoid coil) is from the magnet. Given the number of turns in the coil and the speed of the magnet, it is possible to calculate the voltage output. That is a complicated procedure and I don’t know how to do it.

For a one off project, it may be better to do trial and error: choose a core, wind a coil, spin the magnet, and measure the voltage. You will need an oscilloscope. Add or remove turns as needed; pretty straightforward approach!

I think the coil should not be much bigger than the magnet and if you have a magnet for each coil and connect the coils in series, the voltages will add. However, you cannot produce a DC voltage that way. You could use a diode to produce pulsating DC to charge a battery.

Russell Kincaid
Milford, NH

There is going to be math. SERIOUS MATH! Number of turns will be given by Faraday's law, at least to a first estimate. https://en.wikipedia.org/wiki/Faraday's_law_of_induction Look about half way down the page where it says, "Faraday's law states that the EMF is also given by the rate of change of the magnetic flux..." And http://hyperphysics.phy-astr.gsu.edu/hbase/electric/farlaw.html There are many more internet sources, but I did say that this will only give you a first estimate. You are going to have to factor in things like the coil resistance and the current that is actually flowing (I^2 R loss) and perhaps others to come up with the final figure.

Wire size: If you are just experimenting with a crude apparatus, like you refer to, then almost any wire size you use will be OK. This is because you will find it very hard to generate any really useful level of current. I would suggest starting with a #24 solid, enamel insulated wire and see if you can even burn it out, I doubt it. But, there are tables for the ampacity of different wire sizes. Since this will be a coil which limits ventilation, you will need a table that takes this into account.

In difficult cases you may have to do the calculations for heat flow from the interior of the coil to the external atmosphere. And, of course, larger wire sizes will have smaller losses (I^2 R) in the coil so that is a factor if you are generating a serious amount of power. https://en.wikipedia.org/wiki/Ampacity

All of these calculations are interrelated so in a serious design you would probably have to go through the calculations several times to arrive at a final solution. And build a prototype to verify them.

E. Paul Alciatore III
Beaumont, TX

This is how I would do it, but I’m devious: Start by figuring out how much voltage and current output you need. Mark these up by 30-50%. Get a brushless DC motor that runs from that much voltage and current. Take out the motor driver circuit and replace it with a polyphase rectifier. (sounds intimidating but really just three to six diodes) You are done.

Charles Veres
Hollywood, FL


Data Logger Project Guidance Answered April 2016

I want to build two projects.

  1. A wireless data logger to monitor temp/humidity at various points in my home to a Windows environment.
  2. A wireless data logger to monitor decibels of sound. I live next to a busy street, and want to experiment with various sound suppression options and monitor success rates.

I would appreciate guidance on platforms, hardware, etc. As always, any insights and feedback are appreciated.

#4161
Mark McCurdy
Grapevine, TX



Answers

For the wireless networks such as yours, I recommend Digi International XBee 802.15.4 modules. They're easy to use and operate across 100 feet indoors. The XBee-PRO modules have a longer range — approximately 300 feet, but they use more power. You can get longer ranges outdoors. Both operate at 2.4 GHz. The XBee modules let you transfer serial information right away. Or, you can configure them with free XCTU software from Digi to transmit API commands to remote devices and have the remote devices respond with digital and analog readings. (No code writing required.)

Internal 10-bit ADCs simplify measurement of voltages from a temperature or humidity sensor such as those sold by SparkFun or Adafruit. The XBee modules have sleep modes that save battery power. They can wake up at a given interval, transmit data, and go back to sleep. The XBee modules operate from two 1.5 volt D cells, so remote power is easy to provide.

Sound measurements require some sort of logarithmic response for decibel values. I recommend you use an LM3915 dot-bar display IC to convert sound levels to dB ranges. Most circuits use this inexpensive IC to drive 10 LEDs in a visual sound meter but you could use the eight most-significant outputs (without LEDs) to drive the eight digital inputs on an XBee module. You'll need a pull-up resistor on each of the eight LM3915 outputs. The LM3915 data sheet provides good application information and example circuits: www.ti.com/lit/ds/symlink/lm3915.pdf.

At the receiving end you use another XBee module and connect it to your PC through a USB adapter such as the SparkFun "XBee Explorer USB" or the Parallax "XBee USB Adapter Board."  A serial terminal emulator on a PC lets you see the received information. You could write a VisualBasic program to parse the raw data from the XBee into in degrees, percent relative humidity, and decibel ranges, and then save data in a file for later analysis.

For more details, circuits, and software, I recommend, two books, "The Hands-On XBee Lab Manual," and "Wireless Sensor Networks." The first provides information that directly relates to your needs. The latter concentrates on use of the ZigBee protocol for networks of sensors, but you must use XBee ZigBee modules.

Jon Titus
Herriman, UT

Maybe a bit complicated, but appears to be a solution: www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/?ALLSTEPS

Pete Lunt
Cary, NC


Cranky Flashlight Answered February 2016

I have a three-LED hand-crank flashlight. I’ve included a copy of the PCB (orange) hoping to find out where the problem may be. The switch (SW1) provides two modes of lighting: one LED only (LED2) and all LEDs (LED1-LED3); in the OFF mode, the hand-crank is to be used in order to recharge the 3.6V rechargeable battery.


The hand-crank flashlight works in either of the two modes ONLY WHEN the hand-crank is being used. When I stop hand-cranking it, that’s when lighting stops. I assume the li-on battery is not being charged (no white stuff around it for poor connection).


The black/plastic transistor is marked as SC8050. NTE (NTEinc.com) doesn’t have a replacement for it. Can someone suggest a replacement and if it’s NOT the transistor, suggest where the problem might be?

#2163
Nate Franklin
Schererville, IN



Answers

First, I would check the voltage coming from the crank generator, if there's no voltage there then that's the problem. Usually mechanical devices die before electronics. Assuming the generator is working and you have more than 3.6 V (you need 3.72 for Li-ion batteries usually), the transistor is probably a three-pin regulator and the added other parts are to keep it to 3.72 volts. Any three-pin regulator will work OR you can buy a complete Li-ion charging circuit from China for under $5. I think I bought five of them for around $5 at one time.

Philip Karras
via email

I've just signed up to the tech forum and noticed the question #2163 Cranky Flashlight; two things stand out.

1, The zenner diode ZD1 should not be a 1N4148 and needs to be replaced by a zenner diode as close as possible to 4.9V, since the voltage at Q1's emitter will be about 0.6 to 0.7 V lower than ZD1's cathode.

2,  The transistor Q1 is not connected correctly to work as a voltage regulator in conjunction with ZD1 and the 47 ohm resistor. Note - the full part number is 2SC8050.

The diagram shows the corrected flash light circuit with the base and emitter transposed.

John Swift
via email

The zener diode/transistor combination are a voltage regulator to provide an upper limit to the battery's charge voltage.  (see schematic) 

Somewhere on the internet a few years back, perhaps on Youtube, someone suggested replacing the failed battery with a 1 Farad memory back-up capacitor. At the time Jameco carried a 1.5 Farad capacitor of the same physical size, and with some minor board modification I was able to mount it in place of the battery. It now seems to work better than with the original battery.

Russ Wesp
via email

Use a DMM to see if the Li-ion battery is being charged when the crank is being turned. The battery should have around 4.1 VDC across it if the charging circuit is working correctly. A replacement for the 2SC8050 is the SS8050 (try www.mouser.com/Semiconductors/Discrete-Semiconductors/Transistors/Bipolar-Transistors-BJT/_/N-ax1sh?P=1z0z63xZ1z0z60l&). The Li-ion battery may need to be replaced because it cannot hold a charge. So if you have the correct voltage across the battery with the crank turning, you probably need another battery.

Tim Brown
via email

I've drawn the attached schematic to show what I believe the design intent for this flashlight was.  It is a little different than the presented board, but works to explain what is probably wrong.

Since the lights come on when cranked, the full wave rectifier section is working and the transistor is conducting. I believe the intent of the ZD1, R4 and Q1 is to maintain the voltage at the battery at a safe maximum level. This would occur if ZD1 was actually a zener diode instead of a 1N4148. The zener diode would have a breakdown voltage somewhere between 4.3 and possibly as high as 5.1 volts. The battery would then be held below the zener voltage by the BE drop of the transistor, for the range of values mentioned 3.6 and 4.4 volts. 4.4 volts is really too high, but 5.1 volt zeners are cheap and widely available so the manufacturer may have cheated a bit.

This is not a very sophisticated charge control circuit. The spec sheet for the battery allows no more than 50 mA of charging current. Depending on the generator this could easily be exceeded by this design. The most likely problem is a dead (not just uncharged) battery. The battery could be dead because of age or overcharging. The overcharging may not only be because of the unsophisticated circuit. A shorted transistor would make the problem worse, as would an open zener diode. 

If the transistor is shorted virtually any silicon NPN transistor will work as a replacement, as long as it can handle at least 50 mA. It will be easier to use if it has the same ECB arrangement of leads as the SC8050. A quick look through catalogs gives 2SC2655, TS13003 and APT27H as candidates.

Finally, there may not be anything wrong at all. I have similar flashlights, and when left unused for a long time it takes a lot of cranking to get the battery charged enough to light the lights. If the generator is specified to not exceed the battery limits too much it should take almost half an hour to bring a completely discharged battery to full charge, and probably at least half that to get it to where it will light the LEDs.

Warren Wilderson
Shady Cove, OR

It looks like part of the PCB track connecting the cathodes of the 3 LED’s is missing from the diagram. The zenner diode can not be a 1N4148 (a small signal diode), you need a 4.7 or 5.1V zenner for the simple voltage regulator to limit the voltage applied to the battery to about 4 to 4.4V. Check the transistor connections. I expect the 2SC8050 collector should go to C1’s positive terminal, the base to the junction of the 47 ohm resistor and the zenner cathode, the emitter then goes to the battery positive terminal.

John Swift
Lancashire, UK

Several things seem amiss. Diode 3 should connect to diode 4, probably under R1,R2, and R3. This would complete the negative part of the circuit. Zener diode 1 is not a zener if it is a 1N4148. This is a small signal diode with a reverse break down of 75 to 100 Volts and with E-B junction of Q1 probably protects the generator overvoltageing of the circuit Speaking of Q1, the SC#### is in the form a Japanese transistor just a 2 first. Search the internet for a 2SC8050. The picture of the switch does not appear an ON-ON-OFF but an ON-OFF-ON. Now to what wrong, since it works when cranked everything except the battery is working. When not cranking the circuit fails, then battery is not charging. A bad solder connection to the board, a bad connection to the battery, or just a bad battery. I would suspect the battery A voltmeter across the battery would give you the answer.

Allen Baker
via internet


Snap, Crackle, POP Answered March 2016

Is there a method or modification to prevent the loud pop when removing the headphones from the jack on my tube audio system?

I tried a capacitor across the jack to minimize the pop which worked, but at the expense of all the highs in the music. I’m kind of an audiophile type, so a reduction in sound quality is unacceptable to me. Anyone have a better solution to try?

#3162
Andrew Slater
Saginaw, MI



Answers

The pop is caused by DC reaching the jack. Even if there is a blocking capacitor in the headphone line, you still get the pop before the capacitor charges. Whatever you do, you must reduce or eliminate the DC on the jack. A 470 (?) ohm resistor across the jack will moderate it. If that doesn't suit, get one of Jameco's 1:1 audio transformers. Connect the primary from the set output to ground. Connect the secondary from the jack tip to ground. That should eliminate even the worst case.

Chip Veres
Miami, FL

I would wire a 100 ohm resistor across the socket so there is always a DC path across the amplifiers output.

John Swift
Lancashire, UK


Don’t Burn The Pi Answered March 2016

I’m working on a project that requires putting a Raspberry Pi board into a small waterproof box. There is no air circulation for cooling. Is it likely the board will overheat and destroy itself? If so, how can I prevent a meltdown? I’m thinking of using thermal grease and pressing the processor heatsink against the enclosure. Could this work? Any other suggestions?

#3161
Samuel Ortiz
Dallas, TX



Answers

I have quite a bit of experience building underwater LED lights for technical diving and well know the challenges of dissipating heat. You didn't mention what kind of material the enclosure is. Don't use plastic, plastic will just insulate and heat build up inside the box will probably destroy the Pi.


The best solution is use an aluminum box, I'd suggest some sort of rubber adhesive sheet to affix (and insulate electrically) the board to the box with a hole cut out for the processor which is in contact with the aluminum.


The thermal grease (use only a tiny bit) will wick heat to the box and the entire box will act as a heat sink.

Howard Sandroff
Northfield, Ill


Thirst For Knowledge Answered February 2016

I’ve been an NV subscriber for years. I have an interest, but not a proficiency — yet. Some articles I understand, some I do not, and I really would like to get to the point where I can run with most things presented in each issue, as well as in other magazines. Coming up on retirement, I will have more time to invest in areas of interest. So, I’m looking for guidance in a couple of directions.

1. I want to get proficient building things using small microprocessors (home automation, data loggers for temp and humidity, robotics, small handheld computers, hacking appliances, other??), but I’m not sure where to start and the best way to learn. I’ve built a few PCs over the years, and while I would have to dust off my memory, I have programmed a little in the past with Visual Basic and SQL.

2. I want to get more knowledgeable in AC/DC electronics. I’ve taken a basic fundamentals course at community college a number of years ago, but would like to refresh that and get on a path to continue building my knowledge base in all aspects, be it AC/DC electronics, computers, communications, etc.

3. I have a two year old grandson and I want to get him excited about technology, programming, math, engineering, etc., at age appropriate levels, and see what — if anything — he might want to do with the knowledge as he gets older. Figuring that almost any profession he chooses will benefit from exposure and proficiency in this area, and it can’t be accomplished overnight.

Any insights, thoughts, sources, books, coursework, etc., anyone can share would very much be appreciated, as well as any thoughts on where you see all this going in the next 20 years, so maybe I can guide my grandson to get out in front of things.

Thank you in advance for anything you can share.

#2161
Mark McCurdy
Grapevine, TX



Answers

I have worked with various microcontrollers over 30 years and the hard part was always the overhead getting started. The Arduino Uno has less overhead and can do interesting things. As for education, I learned a remarkable amount studying for a Ham Radio License, even if I never needed the license.

David
via internet

Get a copy of The ARRL Handbook for Radio Communications  (www.arrl.org/arrl-handbook-2015). It contains a lot of theory in an understandable format. It also contains full schematics and plans for projects. Go to www.arrl.org/arrl-publication-dealers to find a dealer near you.

Mark Peterson
Plymouth, MN

Page 15 of 35 pages ‹ First  < 13 14 15 16 17 >  Last ›