Showing posts with label usb. Show all posts
Showing posts with label usb. Show all posts

Tuesday, July 9, 2013

USB Powered PIC Programmer

This simple circuit can be used to program the PIC16F84 and similar "flash memory" type parts. It uses a cheap 555 timer IC to generate the programming voltage from a +5V rail, allowing the circuit to be powered from a computer’s USB port. The 555 timer (IC1) is configured as a free-running oscillator, with a frequency of about 6.5kHz. The output of the timer drives four 100nF capacitors and 1N4148 diodes wir-ed in a Cockroft-Walton voltage multiplier configuration.

Circuit diagram:
usb-powered-pic-programmer-circuit-diagramw
USB-Powered PIC Programmer Circuit Diagram

The output of the multiplier is switched through to the MCLR/Vpp pin of the PIC during programming via a 4N28 optocoupler. Diodes ZD1 and D5 between the MCLR/Vpp pin and ground clamp the output of the multiplier to about 13.6V, ensuring that the maximum input voltage (Vihh) of the PIC is not exceeded. A 100kΩ resistor pulls the pin down to a valid logic low level (Vil) when the optocoupler is not conducting. The circuit is compatible with the popular "JDM" programmer, so can be used with supporting software such as "ICProg" (see http://www.ic-prog.com).
readmore...

Wednesday, July 3, 2013

USB Converter


Does this sound familiar: you buy a small piece of equipment, such as a programming & debugging interface for a microcontroller, and you have to use a clunky AC wall adapter to supply it with power? It’s even worse when you’re travelling and there’s no mains socket anywhere in sight. Of course, you can use the USB bus directly as a power source if the supply voltage is 5 V. If you need a higher voltage, you can use the USB converter described here. This small switch-mode step-up converter can generate an output voltage of up to 15 V with a maximum output current of 150 mA.
USB Converter
The LM3578 is a general-purpose switchmode voltage converter. Figure 1 shows its internal block diagram. Here we use it as a step-up converter. The circuit diagram in Figure 2 shows the necessary components. Voltage conversion is achieved by switching on the internal transistor until it is switched off by the comparator or the current-limiting circuit. The collector current flows through coil L1, which stores energy in the form of a magnetic field. When the internal transistor is switched off, the current continues flowing through L1 to the load via diode D1. However, the voltage across the coil reverses when this happens, so it is added to the input voltage. The resulting output voltage thus consists of the sum of the input voltage and the induced voltage across the coil.

USB Converter Circuit
The output voltage depends on the load current and the duty cycle of the internal transistor. Voltage divider R5/R6 feeds back a portion of the output voltage to the comparator in the IC in order to regulate the output voltage. C5 determines the clock frequency, which is approximately 55 kHz. Network R4, C2 and C3 provides loop compensation. The current-sense resistor for the current-limiting circuit is formed by three 1-Ω resistors in parallel (R1, R2 and R3), since SMD resistors with values less than 1 Ω are hard to find. The output voltage ripple is determined by the values and internal resistances of capacitors C11, C8, C7 and C6.
  USB Converter Circuit Diagram

The total effective resistance is reduced by using several capacitors, and this also keeps the construction height of the board low. L2, C1, C9 and C10 act as an input filter. Ensure that the DC resistance of coil L2 is no more than 0.5 Ω. Use a Type B PCB-mount USB connector for connection to the USB bus.  A terminal strip with a pitch of 5.08 mm can be used for the output voltage connector. Of course, you can also solder a cable directly to the board. Two additional holes are provided in the circuit board for this purpose. As we haven’t been able to invent a device that produces more energy than it consumes, you should bear in mind that the input current of the circuit is higher than the output current. As a general rule, you can assume that the input current is equal to the product of the output current and the output voltage divided by the input R5 and R6 for other output voltages:
6V: R5 = 47k, R6 = 9,1k
12V: R5 = 110k, R6 = 10k
15V: R5 = 130k, R6 = 9,1k
voltage and divided again by 0.8. Specifically, with an output current of 100 mA at 9 V, the input current on the USB bus is approximately 225 mA. Finally, Figure 3 shows a small PCB layout for the circuit. All of the components except the connector and the terminal strip are SMDs.
USB Converter pcb
Parts List:
(for UO = 9 V)
Resistors
R1,R2,R3 = 1Ω
R4 = 220kΩ
R5 = 82kΩ
R6 = 10kΩ
Capacitors
(SMD 1206)
C1 = 100nF
C2 = 2nF2
C3 = 22pF
C4 = 100nF
C5 = 1nF5
(tantalum SMD 7343)
C6 = 68μF 20V
C7 = 68μF 20V
C8 = 68μF 20V
C9 = 47μF 16V
C10 = 47μF 16V
C11 = 68μF 20V
Inductors
L1 = 820μH (SMD CD105)
L2 = 47μH (SMD 2220)
Semiconductors
D1 = SK34SMD (Schottky)
IC1 = LM3578AM (SMD SO8)
Miscellaneous
K1 = 2-way PCB terminal block, lead pitch 5mm
(optional)
K2 = USB-B connector


http://www.ecircuitslab.com/2011/07/usb-converter.html
readmore...

Sunday, March 24, 2013

USB Printer Share Switch

This simple device allows two computers to share a single USB printer or some other USB device, such as an external flash drive, memory card reader or scanner. A rotary switch selects the PC that you wish to use with the USB device, while two LEDs indicate the selected PC.

manual-2-way-usb-device-switch-schematic-circuit-diagramw

The most common way to share a USB printer between two PCs is to use one machine as a print server. However, that’s not always convenient because it means that the server PC must always be on if you want to print something.

Picture of the project:

USB-Printer-Share

That can be a real nuisance if you just want to quickly fire up the other machine and print something out. It also means that the two PCs must be networked together, either via a hub/router or directly via an ethernet crossover cable. Another way is to use a dedicated USB print server. However, as before, this must be connected to an ethernet network, along with the PCs. Such devices also need their own power supply, generally cost well over $100 and are overkill if you just want to share a single USB printer between two computers for occasional printing in a home set-up.

Parts layout:

Parts-layout-USB-Printer-Share-Switch

That’s where this simple device comes in. It’s basically a 2-way switch box that lets you manually switch your USB printer from one PC to the other, as required. The switching is performed using a rotary switch, while two LEDs on the front panel indicate which PC has been connected to the printer. This method has several advantages. First, you don’t need to network your two computers. Second, you can print from either machine with the other turned off. And third, the device doesn’t need a power supply.

Circuit diagram:

USB-Printer-Share-Switch-circuit-Diagramw

The circuit uses switch poles S1a-S1c to select either USB socket CON1 or CON2 and connect its pins through to CON3. The fourth pole (S1d) selects either LED1 or LED2, to indicate which PC has been selected.

Source: Silicon Chip14 April 2009

readmore...