Quantcast
Channel: 5v – Hackaday

Injecting power into a WiFi dongle for the Raspberry Pi

$
0
0

So the Raspberry Pi sometimes doesn’t have the juice needed to run power-hungry USB dongles. The most common issue is with WiFi adapters. The solution has long been to use a powered USB hub, but [Mike Worth] didn’t want to take up that much extra space. The solution he worked out injects power directly into the dongle itself.

The red and white wires coming out of the side provide the 5V source. This is coming from the same USB mains power adapter that supplies the RPi board itself. To connect the wires to the dongle he made an adapter out of some strip board and the shielding from the dongle. The end of the strip board pokes out of the shielding far enough for him to solder on some wire, which is then soldered to the traces on the dongle’s PCB.

You can just plug this in and get down to business. But while he was at it [Mike] added an improvised antenna for better reception. It’s the same type of hack we saw him use for a Bluetooth dongle in this links post.

 


Filed under: Raspberry Pi

USB-ify your Old Cell Phone Chargers

$
0
0

phoneChargerUSBd

If you’re like us, you probably have a box (or more) of wall warts lurking in a closet or on a shelf somewhere. Depending on how long you’ve been collecting cell phones, that box is likely overflowing with 5V chargers: all with different connectors. Bring them back to life by doing what [Martin Melchior] did: chop off the ends and solder on a bunch of USB jacks.

You’ll want to use chargers rated for at least 500mA (if not 1A) for this project, or you may be wasting your time considering how much current devices pull these days. Get your polarity right, solder on a USB jack, and you’re finished. Sure, it’s a no-brainer kind of project, but it can clean out some of your closet and give you a charging station for every room of your home and the office. [Martin] glued the USB jack directly onto the adapters, so there are no tangled cords to worry about. iPhone users will need to do the usual kungfu if you want your Apple device to charge.


Filed under: Cellphone Hacks

Transmitting MIDI Signals With XBEE

$
0
0

What do you do when you want to rock out on your keytar without the constraints of cables and wires? You make your own wireless keytar of course! In order to get the job done, [kr1st0f] built a logic translator circuit. This allows him to transmit MIDI signals directly from a MIDI keyboard to a remote system using XBEE.

[kr1st0f] started with a MIDI keyboard that had the old style MIDI interface with a 5 pin DIN connector. Many new keyboards only have a USB interface, and that would have complicated things. The main circuit uses an optoisolator and a logic converter to get the job done. The MIDI signals are converted from the standard 5V logic to 3.3V in order to work with the XBEE.

The XBEE itself also needed to be configured in order for this circuit to work properly. MIDI signals operate at a rate of 31,250 bits per second. The XBEE, on the other hand, works by default at 9,600 bps. [kr1st0f] first had to reconfigure the XBEE to run at the MIDI bit rate. He did this by connecting to the XBEE over a Serial interface and using a series of AT commands. He also had to configure proper ID numbers into the XBEE modules. When all is said and done, his new transmitter circuit can transmit the MIDI signals wirelessly to a receiver circuit which is hooked up to a computer.


Filed under: wireless hacks

Ask Hackaday: Is The ESP8266 5V Tolerant?

$
0
0

The ESP8266 is the reigning WiFi wonderchip, quickly securing its reputation as the go-to platform for an entire ecosystem of wireless devices. There’s nothing that beats the ESP8266 on a capability vs. price comparison, and this tiny chip is even finding its way into commercial products. It’s also a fantastic device for the hardware tinkerer, leading to thousands of homebrew projects revolving around this tiny magical device.

In every technical document, summary, and description of the ESP8266, the ESP8266 is said to be a 3.3V part. While we’re well into the age of 3.3V logic, there are still an incredible number of boards and hardware that still operate using 5V logic. Over on the Hackaday.io stack, [Radomir] is questioning this basic assumption. He’s wondering if the ESP8266 is 5V tolerant after all. If it is, great. We don’t need level converters, and interfacing the ESP to USB TTL serial adapters becomes much easier. Yes, you’ll still need to use a regulator if the rest of your project is running at 5V, but if the pins are 5V tolerant, interfacing the ESP8266 with a variety of hardware becomes very easy.

[Radomir]’s evidence for the possibility of 5V tolerant inputs comes from a slight difference in the official datasheet from Espressif, and the datasheet translated by the community before Espressif realized how many of these chips they were going to sell.

The best evidence of 5V tolerant pins might come from real-world experience — if you can drive a pin with 5V for months on end without it failing, there might be something to this claim. It’s not definitive, though; just because a device will work with 5V input pins for a few months doesn’t mean it won’t fail in the future. So far a few people have spoken up and presented ESPs directly connected to the 5V pin of an Arduino that still work after months of service. If this is evidence of 5V tolerant design or simply luck is another matter entirely.

While the official datasheet from Espressif lists a maximum VIH of 3.3V, maximum specs rarely are true maximums — you can always push a part harder without things flying apart at the seams. Unfortunately, unless we hear something from the engineers at Espressif, we won’t know if the ESP8266 was designed to be 5V tolerant, if it can handle 5V signals reliably, or if 5V signals are a really good way to kill a chip eventually.

Lucky for us — and this brings us to the entire point of an Ask Hackaday column — a few Espressif engineers read Hackaday. They’re welcome to pseudonymously chime in below along with the rest of the peanut gallery. Failing that, the ESP8266 has been decapped; are there any die inspection wizards who can back up a claim of 5V tolerance for the GPIO? We’d also be interested in hearing any ideas for stress testing pin tolerance.


Filed under: Ask Hackaday, Hackaday Columns

Taking It To Another Level: Making 3.3V Speak with 5V

$
0
0

If your introduction to digital electronics came more years ago than you’d care to mention, the chances are you did so with 5V TTL logic. Above 2V but usually pretty close to 5V is a logic 1, below 0.8V is a logic 0. If you were a keen reader of electronic text books you might have read about different voltage levels tolerated by 4000 series CMOS gates, but the chances are even with them you’d have still used the familiar 5 volts.

This happy state of never encountering anything but 5V logic as a hobbyist has not persisted. In recent decades the demands of higher speed and lower power have given us successive families of lower voltage devices, and we will now commonly also encounter 3.3V or even sometimes lower voltage devices. When these different families need to coexist as for example when interfacing to the current crop of microcontroller boards, care has to be taken to avoid damage to your silicon. Some means of managing the transition between voltages is required, so we’re going to take a look at the world of level shifters, the circuits we use when interfacing these different voltage logic families.

Do You Even Need A Level Shifter?

It might seem odd to start a treatise on level shifting this way, but the first question for the designer when looking at making a 3.3V part talk to a 5V part should be this: Do I even need a level shifter?

If the 3.3V part is an output and the 5V one an input, the lower voltage part can hardly damage the higher voltage one with overvoltage. And you are not likely to encounter a logic input that might demand so much current that it would damage your output (If you do, use a buffer!). If you are lucky the logic voltage ranges of the two devices may even coincide. For example 3.3V TTL logic shares the 0.8V and 2V thresholds for logic 0 and logic 1 transitions with 5V TTL logic, so a 3.3V TTL output can drive a 5V TTL input without any extra hardware required.

In the other direction, driving a 3.3V input from a 5V output you might expect that a level shifting circuit would be required, and in many cases you would be right. But before reaching for that shifter it’s worth taking a look at the detailed specifications of your 3.3V input. Many devices are designed to be 5V tolerant, and you might be lucky enough to find that your circuit could use one and avoid the extra circuitry. For example the 74LVC series contains a range of 5V tolerant 3.3V versions of many 74-series ICs.

CMOS And TTL: A Level Shifting Cautionary Tale

Comparison of TTL and CMOS logic thresholds with comparison to 3.3V output. NXP application note 240.
Comparison of TTL and CMOS logic thresholds with comparison to 3.3V output. NXP application note 240 (PDF).

When directly driving logic you’d normally use at 5V from a 3.3V output there is one cautionary tale of which to take heed, a personal confession of an electronic failure. CMOS logic defines its logic thresholds as a percentage of supply voltage, which with a 5V supply puts the logic 1 threshold of 70% well above the 3.3V logic 1. Some CMOS ICs such as the 74HC4053 analogue switch I used in a Raspberry Pi project don’t quite follow this standard and will work from a 3.3V TTL output, so I was lulled into a false sense of security and reached for another 74HC part to connect to my Raspberry Pi with a new design. As you might expect it failed to work, and of course I wasted time looking everywhere else but my defective choice of part. If there is a moral to this story it is to always read the datasheet carefully, and use the TTL-compatible parts such as in this case 74HCT, when they are available.

If your 3.3V device inputs are not 5V tolerant and your 5V inputs lack 3.3V compatible thresholds then sadly you won’t be able to interface them across voltage levels without a shifter circuit. There are many choices available to you including a whole host of dedicated level shifter devices such as these ones from TI, but aside from personal preference some of them will be dictated by your application. Will it be a step-up, a step-down, or do you need a bi-directional level shifter? If you decide not to use a dedicated part or a 5V tolerant gate in your design, here are a few of the many alternatives.

Step-down level shifters

A simple resistive downshifter.
A simple resistive downshifter.

The simplest possible step-down circuit is a resistive divider. Drive your 5V output into a chain of resistors, from which you tap your 3.3V logic input. A chain consisting of a 2.2k and a 3.3k resistor should produce a 3V output from an applied 5V input. It does not preserve the fan-out characteristic of the 3.3V output and you need to be aware of any capacitances that may also reside in whatever logic is connected to it and the effect they may have along with the resistors on fast rise times, but it should suffice for most simple level downshifting tasks facing a hobbyist. There are variations on this circuit that use diodes instead of a resistor to achieve the required voltage drop.

If the divider is not suitable for your application and you still eschew a dedicated shifter, take a look further down the page at bidirectional shifters.

Step-up level shifters

A diode logic level step-up circuit. From Microchip app note DS41285A.
A diode logic level step-up circuit. From Microchip app note DS41285A (PDF).

For stepping up from 3.3V logic to 5V logic and assuming you are not safely within the TTL thresholds as described above such that you can do without a shifter, you will require something a little more complex than the resistive divider in the previous section. The simplest circuit uses a pair of diodes with careful biasing and choice of series resistor as shown in the diagram to the right. The application note it comes from advises that the resistor should be significantly less than the input impedance of the 5V gate, to avoid its being part of a resistive divider with that impedance having an effect on the output voltage.

An inverting MOSFET logic level step-up circuit. Yet again, from Microchip app note DS41285A.
An inverting MOSFET logic level step-up circuit. Yet again, from Microchip app note DS41285A.

A rather more obvious circuit uses a MOSFET or bipolar transistor as a switch, driving the gate or base with the 3.3V logic and taking the 5V logic output from the drain or collector. This is very similar to using a gate with an open-collector output in the same application. This is a simple and reliable circuit, but it must be borne in mind that it inverts the 3.3V logic level.

Bi-directional level shifters

The bidirectional MOSFET level shifter.
The bidirectional MOSFET level shifter.

The circuits in the previous two sections are both only suitable for unidirectional logic lines, but not in the case of a bidirectional bus. As before there are plenty of off-the-shelf bus level shifters from a range of semiconductor manufacturers to choose from, but if these are not suitable for your design then a handy alternative can be made with a MOSFET and a couple of resistors. It’s also worth pointing out that this doesn’t have to be used on a bidirectional bus, it can serve as a general purpose level shifter for the cost of a 2N7000 or similar, indeed this is a personal favourite for this application. You can readily buy this circuit on a breakout board from several electronics suppliers if building it yourself doesn’t appeal. For more information on its operation take a read of the Philips application note AN97055 (PDF), which examines its use on an I2C bus.

It can be a worry, when you first have to ensure that different logic levels are safely interfaced. Will my 5V Arduino harm this 3.3V sensor? We hope that after reading this piece you’ll have some more confidence, and we’ve equipped you with enough to make some sense of the topic. We’ve not covered every possible technique, but if you read some of the attached application notes and then search the web for real-world usage they should fill in any gaps.


Filed under: Engineering, parts, slider

Vampire Charger is a Rugged Anything-to-5VDC Converter

$
0
0

USB sockets providing 5 VDC are so ubiquitous as a power source that just about any piece of modern portable technology can use them to run or charge. USB power is so common, in fact, that it’s easy to take for granted. But in an emergency or in the wake of a disaster, a working cell phone or GPS can be a life saver and it would be wise not to count on the availability of a clean, reliable USB power supply.

That’s where the Vampire Charger by [Matteo Borri] and [Lisa Rein] comes in. It is a piece of hardware focused on turning just about any source or power one might possibly have access to into a reliable source of 5 VDC for anything that can plug in by USB. This is much more than a DC-DC converter with a wide input range; when they say it is made to accept just about anything as an input, they mean it. Found a working power source but don’t know what voltage it is? Don’t know which wire is positive and which is negative? Don’t even know whether it’s AC or DC? Just hook up the alligator clips and let the Vampire Charger figure it out; when the light is green, the power’s clean.

The Vampire Charger was recently selected to move on to the final round of The Hackaday Prize, netting $1000 cash in the process. The next challenge (which will have another twenty finalists receiving $1000 each) is the Human-Computer Interface challenge. All you need to enter is an idea and some documentation, so dust off that project that’s been waiting for an opportunity, because here it is.

Stepping Down Voltage with Reliability

$
0
0

The availability of inexpensive electronics modules has opened up a world of opportunity for more complex projects to be completed quickly. Rather than designing everything from scratch, ready-made motor modules, regulators, computer vision modules, and control modules all ready to be put to work after arriving at one’s doorstep. Sometimes, though, these inexpensive electronics aren’t all they’re cracked up to be, so [Jan] decided to produce them from scratch instead.

[Jan] is the creator of several robots, and frequently makes use of 3.3V and 5V step down modules, but was not happy with the consistency offered by the prefab modules. The solution to this was to build them from scratch in a way that makes producing a large amount nearly as easy as ordering them. The boards are based around the SY8105 chip, and are built in two batches for the robotics shop based on the two most commonly needed output voltages. With their design they get exactly what they need every time, without worrying about reliability from a random board shop overseas.

The robotics shop is called RoboticsBrno and they have made the schematics available for anyone that wants to build their own. That being said, the design does not make considerations for low noise since it isn’t required for their use case, but if you’d prefer something simple and reliable this will get the job done. It’s also important to understand the limitations of the parts in a build that are built by a third party, although power supplies are a pretty common area to make improvements on.

USB Power Has Never Been Easier

$
0
0
USB to Dupont adapter by [PROSCH]

USB cables inevitably fail and sometimes one end is reincarnated to power our solderless breadboards. Of course, if the cable broke once, it is waiting to crap out again. Too many have flimsy conductors that cannot withstand any torque and buckle when you push them into a socket. [PROSCH] has a superior answer that only takes a couple of minutes to print and up-cycles a pair of wires with DuPont connectors. The metal tips become the leads and the plastic sheathing aligns with the rim.

The model prints with a clear plus sign on the positive terminal, so you don’t have to worry about sending the wrong polarity, and it shouldn’t be difficult to add your own features, like a hoop for pulling it out, or an indicator LED and resistor. We’d like to see one with a tiny fuse holder.

If you want your breadboard to have old-school features, like a base and embedded power supply, we can point you in the right direction. If you are looking to up your prototyping game to make presentation-worthy pieces, we have a host of ideas.




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>