4

I've recently become quite interested in building small breadboard computers. I've been reading a site that seems to be aimed for beginners, that builds a simple breadboard computer using the 6502 and some other chips.

When reading the above site I feel like I understand most of what's said, but I have problems with figuring out how to power my breadboard. It seems to be that I need to power the breadboard computer with a +5V DC power supply.

I've seen some single-board computers use USB as a power supply. As I understand it, USB outputs +5V. So I figured: I could probably try and mount an USB socket to my breadboard and use it as my power supply.

I don't have a background in electronical engineering (I'm in my final year on my CS degree, and I've only taken one very basic EE course), so I don't have any idea if doing what I suggest is a recipe for disaster, or a adequate solution.

So, is it possible to use a USB socket to power my breadboard? If so, how would I go about to connect it (schematics would be appreciated).

Thank you!

m.Alin
  • 10,638
  • 19
  • 62
  • 89
tobier
  • 197
  • 1
  • 7
  • I wouldn't touch USB as a power supply. A short may damage some computers motherboards (roasted traces) because of no protection. This isn't the case for all, but it does happen. Use a wallmart adapter + LM7805 regulator, or a lab power supply (or any adjustable one). – Hans Mar 31 '12 at 09:26
  • @Hans - It certainly is no alternative to a lab supply, but if your product is stable, why not? – stevenvh Mar 31 '12 at 09:43
  • I wouldn't call a breadboard a stable product, as there is a big chance of a mistake. Yeah ofcourse the USB power itself is useful, I power complete projects from it too, but I don't like experimenting on it. If it is required, I always use a cheap USB hub with it's own power supply. – Hans Mar 31 '12 at 09:45

5 Answers5

3

USB has the concept of a unit load, which seems to be the cause of some confusion. In USB 2.0 a unit load is 100mA, but a device may draw up to 5 unit loads from a port. In USB 3.0 a unit load is 150mA and you can draw up to 6 unit loads, or 900mA.

So I don't agree with sybreon when he says that a USB powered device isn't capable of doing much. He mentions LEDs as drawing much current, leaving little for the rest of the circuit. Even if your circuit has ten 20mA LEDs your power budget still leaves 300mA for the rest.

stevenvh
  • 145,145
  • 21
  • 455
  • 667
  • 1
    But load greater than one unit has to be negotiated. Otherwise computer is free to cut power. Negotiating it increases complexity of the project and will often requite additional chip just for that. There's also the possibility that computer can't provide more than one guaranteed unit load that should be taken into consideration too. – AndrejaKo Mar 31 '12 at 11:25
  • 'has to be negotiated' is legally true, but I have yet to see a desktop that actively limits the current (beyond having a polyfuse or the like in series). – Wouter van Ooijen Mar 31 '12 at 20:03
3

As Steven said, a normal USB 2.0 bus can provide up to 500 mA at 5 V. However, a device is only guaranteed 100 mA until it negotiates with the host to draw more. Depending on how much power the host has available, it will either grant the device the ability to draw 500 mA or shut it off.

In practise, most desktop motherboards just connect the USB 5 V line to their internal 5 V power supply in series with a polyfuse. Desktops have plenty of power, so it's not worth the expense to put the extra power detection and switching into the hardware. Laptops however have limited power and they often do have the additional hardware. From a laptop you are more likely to only get the guaranteed 100 mA without active communication.

If you are using a desktop to supply the USB power and you can grab 500 mA without talking on the USB, then you get up to 2.5 Watts. Actually you get a little less because the minimum guaranteed USB voltage at full current with the maximum length and thinnest allowed cable is something like 4.3(?) Volts. In practise with a desktop and a short cable, you will get pretty close to 5 V even at 500 mA.

So what you ask it doable, but in the end I'd just get a off the shelf 5 Volt power supply. Nowadays wall-wart style switching power supplies are cheap and available. The minimum you can find will probably supply at least 1 A. That will be more tightly regulated than what you get from USB.

markrages
  • 19,905
  • 7
  • 59
  • 96
Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915
  • Thanks. I'm starting out experimenting with smaller circuits in which a simple battery will work just fine. I'll go with the wall-wart once I move on to the breadboard computer. – tobier Mar 31 '12 at 17:27
  • 1
    @markrages: I think you're going a bit overboard against percieived commercialism. I mentioned the ReadyBoard-02 because it is a example of doing exactly what the OP was asking about, shows you can even derive other voltages, and is also a example of making accurate 5 V from the rough USB 5 V. The full schematic is available from that page, which might have been useful to the OP. Mention of a particular project isn't bad just because it's also sold. You need to lighten up a bit. Note my final recommendation was to buy a wall wart, which has nothing to do with my products. – Olin Lathrop Mar 31 '12 at 20:38
  • If 500mA is enough for you, you may have a wall wart in the form of an iPod or cell phone chargers that uses a USB cable. Some of them are rated for higher currents (I have a Motorola phone charger rated at 850mA that uses a USB cable). – TomG Apr 02 '12 at 02:31
1

While it can output +5V, it has current limitations. If you wish to power your board with it, things can start to go wrong if you need more than say, 100mA for your project.

To put things in perspective, an LED can typically take about 25mA. So, a USB powered project may not be capable of doing very much.

sybreon
  • 1,591
  • 1
  • 12
  • 13
1

Legally a USB conection is not required to provide more than IIRC 100 mA, but I have yet to see a desktop that imposes this limit (laptops might be different). I have seen desktops that crash when you short the USB power, so using it directly in an experimental setting might not be the best idea. A simple solution: put a powered hub in between.

Other solutions: use an unregulated 12V wall-wart + an 7805 linear regulator,or use a regulated 5V wall-wart.

Side notes: if your aim is to program a CPU from the ground up there are numerous easier solutions, google for PIC, AVR, LPCexpresso, etc. If you want a 'real' microprocessor an 6802 (+ eeprom + 6821) provides a smaller solution because it has 128b RAM in the CPU.

Wouter van Ooijen
  • 48,407
  • 1
  • 63
  • 136
0

Because the family has so many tablets \ cell phones we tend to have charging 'stations' as shown in the diagram: the 5V charger that comes with the cell phone \ tablet are repurposed for breadboard projects. You can also (with permission) find assorted DC power supplies from discarded electronics (BestBuy).

Why risk damaging your computer when 5V supplies are inexpensive and plentiful?

Caution should be exercised: calculating the required current to operate your circuit and ensuring that this does not exceed the rating of your power supply / wiring is key to protecting your circuit and avoiding fire risk.

USB Micro-B Breakout Board (Adafruit \ Amazon):

enter image description here

Power supply example:

enter image description here

gatorback
  • 209
  • 2
  • 9