Summary of the invention
The purpose of this utility model be solve the WiFi router that exists in the prior art must and the Internet access device bind together, volume is big, carry inconvenience, can only be fixed on and handle official business or the defective in family place, provide a kind of with the WiFi router make a similar USB flash disk, the band USB interface, and can directly insert the equipment of the Internet (Internet) access device of band OTG USB interface, connect the miniaturization WiFi router of the Internet by the Internet (Internet) access device.
Before beginning to describe concrete summary of the invention, define two notions earlier:
The WiFi router---general reference is led the way by function, the equipment that computer, printer, game machine, e-book and other electronic equipments by WiFi chip and WiFi network interface card carries out wireless connections.
The Internet (Internet) access device---comprise that all can insert the equipment of the Internet (Internet), as the e-book of 2.5G/3G/4G network interface card, fixed CDMA WLL, band wireless access function, game machine, PDA etc., and the equipment of wire accessing interconnected network (Internet) such as ADSL, optical fiber, Cable modem.
The utility model is achieved in that a kind of miniaturization WiFi router, comprise router main equipment, outside slave unit, described outside slave unit is the internet access facility that has USB interface, it is characterized in that: radio frequency chip, memory, power management chip that described router main equipment comprises the WiFi master chip, links to each other respectively with the WiFi master chip, described WiFi master chip is provided with the USB interface that is used to connect internet access facility, and the power supply of described WiFi master chip is from the power supply circuits of internet access facility.
Described memory is a Nand Flash memory.
The USB interface of described internet access facility is a USB OTG interface.
The power supply circuits of described internet access facility mainly are made of following assembly:
As shown in Figure 3; the power supply circuits of internet access facility are mainly by voltage comparator U1; Schottky diode D1, D2, D3; N raceway groove triode Q3, Q4; metal-oxide-semiconductor field effect transistor Q1, Q2, esd protection device VD1 and resistance R 1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11 form.Pin VBAT links to each other with ground by precision resister R3, R4, and pin VBUS links to each other with ground by precision resister R1, R2.Pin VBAT is by after the resistance R 3, R4 dividing potential drop, draws with the pin 1 voltage input anode of voltage comparator U1 from resistance R 4 to link to each other; Pin VBUS is by after the resistance R 1, R2 dividing potential drop, draws with the pin 3 voltages input negative terminal of voltage comparator U1 from resistance R 2 to link to each other; The pin 5 of voltage comparator U1 links to each other with pin VBAT, the pin 2 of voltage comparator U1 links to each other with ground, the pin 4 of voltage comparator U1 links to each other with Schottky diode D1 negative pole, and Schottky diode D1 positive pole links to each other respectively with N raceway groove triode Q3 base stage with pull-up resistor R8; N raceway groove triode Q3 collector electrode links to each other respectively with Schottky diode D3 with the grid of pull-up resistor R9, metal-oxide-semiconductor field effect transistor Q1, Q2; The source electrode of metal-oxide-semiconductor field effect transistor Q2 links to each other with pin VBAT, and Q2 links to each other with the drain electrode of Q1, and the source electrode of Q1 links to each other with pin VBUS.Pull down resistor R11 and esd protection device VD1 are connected in parallel between pin VBUS and the ground simultaneously.Pin VUSB_EN links to each other with ground by pull down resistor R7, links to each other with the negative pole of Schottky diode D2 simultaneously, and the positive pole of Schottky diode D2 links to each other with the positive pole of Schottky diode D1.The pin 4 of voltage comparator U1 links to each other with the base resistance R10 of N raceway groove triode Q4, and the collector electrode of N raceway groove triode Q4 is connected with pin VBAT by pull-up resistor R5, is connected with pin VBUS_INT simultaneously.
Carry out signal by the AT instruction between described router main equipment and the internet access facility and be connected communication.
USB interface on the described WiFi master chip is provided with main equipment port D+, the main equipment port D-that is used to transmit data, is connected with pull down resistor respectively on described main equipment port D+ and the main equipment port D-; The USB interface of described internet access facility is provided with slave unit port D+, slave unit port D-, is connected with pull-up resistor on described slave unit port D+ or the slave unit port D-.
Be provided with radio circuit in the described WiFi master chip, described radio circuit links to each other with radio frequency chip, the signal amplifier that be provided with antenna, radiating circuit in the described radio frequency chip, links to each other with radiating circuit, described signal amplifier links to each other with antenna by a single-pole single-throw switch (SPST); Be provided with receiving circuit in the described antenna, described receiving circuit is connected with another single-pole single-throw switch (SPST), low noise amplifier successively, and described low noise amplifier links to each other with described radio circuit.
Workflow of the present utility model is as follows:
1) the router main equipment is inserted internet access facility, internet access facility is given the power supply of router main equipment by USB interface, behind the router main equipment electrification reset, enumerates the equipment of USB mouth again, up to connecting with internet access facility.
2) connect after, the router main equipment can send the AT order from the trend internet access facility, request msg connects, internet access facility can ask to be connected to the Internet.The router main equipment is connected with the equipment of band WiFi network interface card by WiFi simultaneously.
The beneficial effects of the utility model are: 1) insert flexibly, the utility model WiFi router can be connected with internet access facility any band OTG USB mouth and the AT command set standard of support.Traditional WiFi router all is directly router and internet access facility to be welded together, and can't switch internet access facility flexibly.2) internet access facility communication standard is not had fixing demand, the user can freely select to insert CDMA, WCDMA, EVDO, LTE equipment, ADSL, optical fiber, any equipment that possesses the access internet ability such as wired cat.3) volume is little, is easy to carry, and does not also take up room.
Embodiment
Below in conjunction with accompanying drawing the utility model is further explained, and the operation principle of each part is made further division.
According to Fig. 1, the utility model comprises router main equipment, outside slave unit, described outside slave unit is the internet access facility that has the OTG USB interface, radio frequency chip, memory, power management chip that described router main equipment comprises the WiFi master chip, links to each other respectively with the WiFi master chip, described WiFi master chip is provided with the USB interface that is used to connect internet access facility, the power supply of described WiFi master chip is from the power supply circuits of internet access facility, and by power management chip power supply circuits managed control.
1, the router main equipment USB power on
According to Fig. 2, Fig. 3, because the not charged source of WiFi router main equipment itself, need power by external internet access facility, when WiFi router main equipment inserts internet access facility, internet access facility gives the router main equipment for the 5V power supply by the VCC PIN pin of its USB mouth, router main equipment meeting electrification reset, do system initialization, after initialization finishes, the equipment of its USB interface of router main equipment meeting active detecting, router main equipment and internet access facility all are USB OTG, can be as main equipment, but because in the utility model, the initiator of incident is the router main equipment, and internet access facility is a slave unit, the dialing of passive reception WiFi router main equipment, instructions such as data transmission, so the router main equipment can be initialized as the USB main equipment, internet access facility is a slave unit.After finishing the shaking hands of above-mentioned master and slave equipment, the router main equipment can enumerate corresponding USB port with internet access facility.
As Fig. 2, the usb circuit of router main equipment is very simple, has only 4 PIN pin, the Vbus power supply, and GND ground connection, main equipment port D+, main equipment port D-are used to transmit data.
As Fig. 3; the power supply circuits of internet access facility are mainly by voltage comparator U1; Schottky diode D1, D2, D3; N raceway groove triode Q3, Q4; metal-oxide-semiconductor field effect transistor Q1, Q2, esd protection device VD1 and resistance R 1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11 form.Pin VBAT links to each other with ground by precision resister R3, R4, and pin VBUS links to each other with ground by precision resister R1, R2.Pin VBAT is by after the resistance R 3, R4 dividing potential drop, draws with the pin 1 voltage input anode of voltage comparator U1 from resistance R 4 to link to each other; Pin VBUS is by after the resistance R 1, R2 dividing potential drop, draws with the pin 3 voltages input negative terminal of voltage comparator U1 from resistance R 2 to link to each other; The pin 5 of voltage comparator U1 links to each other with pin VBAT, the pin 2 of voltage comparator U1 links to each other with ground, the pin 4 of voltage comparator U1 links to each other with Schottky diode D1 negative pole, and Schottky diode D1 positive pole links to each other respectively with N raceway groove triode Q3 base stage with pull-up resistor R8; N raceway groove triode Q3 collector electrode links to each other respectively with Schottky diode D3 with the grid of pull-up resistor R9, metal-oxide-semiconductor field effect transistor Q1, Q2; The source electrode of metal-oxide-semiconductor field effect transistor Q2 links to each other with pin VBAT, and Q2 links to each other with the drain electrode of Q1, and the source electrode of Q1 links to each other with pin VBUS.Pull down resistor R11 and esd protection device VD1 are connected in parallel between pin VBUS and the ground simultaneously.Pin VUSB_EN links to each other with ground by pull down resistor R7, links to each other with the negative pole of Schottky diode D2 simultaneously, and the positive pole of Schottky diode D2 links to each other with the positive pole of Schottky diode D1.The pin 4 of voltage comparator U1 links to each other with the base resistance R10 of N raceway groove triode Q4, and the collector electrode of N raceway groove triode Q4 is connected with pin VBAT by pull-up resistor R5, is connected with pin VBUS_INT simultaneously.
The power supply circuits operation principle of internet access facility is as follows:
The external the Internet access device is given the power supply of WiFi router main equipment by the operating voltage (can be cell voltage, also can be charger voltage) of internet access facility inside by power supply circuits after the WiFi function is opened at the interface.
After the WiFi function is opened at the interface of internet access facility, VUSB_EN pin in the internet access facility power supply circuits can provide high level signal, Schottky diode D2 ends, and makes the base voltage of N raceway groove triode Q3 reach more than the 0.6V, makes N raceway groove triode Q3 conducting.The G utmost point of metal-oxide-semiconductor field effect transistor Q1, Q2 is pulled down to 0V owing to N raceway groove triode Q3 conducting meeting, Q1, Q2 conducting, and the voltage of VBUS pin output is exactly the voltage of VBAT pin.
After the WiFi function is closed at the interface, the VUSB_EN pin of equipment can provide low level signal, Schottky diode D2 conducting makes the base voltage of N raceway groove triode Q3 have only about 0.3V, N raceway groove triode Q3 ends, the G utmost point of metal-oxide-semiconductor field effect transistor Q1, Q2 can be drawn high by pin VBAT, and metal-oxide-semiconductor field effect transistor Q1, Q2 also end.The path of pin VBUS and pin VBAT is disconnected, and pin VBUS is external output voltage just.
These power supply circuits have also comprised USB line insertion PC and have caused PC to burn out the defencive function of external the Internet equipment.
If the USB line inserts PC, PC end pin VBUS can provide the operating voltage of 5V, voltage comparator U1 in these power supply circuits can compare according to the input voltage of voltage comparator power supply input negative terminal VIN-and voltage comparator power supply input anode VIN+ at this moment, at the high-low level of VOUT (voltage comparator voltage comparative result) end output track to track.If VIN+>VIN-, the VOUT pin can be exported high level, and magnitude of voltage is identical with the VCC input; If VIN+<VIN-, VOUT meeting output low level, magnitude of voltage is 0.After USB inserts PC, VIN->VIN+, VOUT holds output low level, Schottky diode D1 conducting makes the base voltage of N raceway groove triode Q3 have only about 0.3V, N raceway groove triode Q3 ends, the G utmost point of metal-oxide-semiconductor field effect transistor Q1, Q2 can be drawn high by pin VBAT, and metal-oxide-semiconductor field effect transistor Q1, Q2 also end.The path of pin VBUS and pin VBAT is disconnected, and pin VBUS just can not influence pin VBAT, thereby has protected external the Internet equipment.Pin VBUS_SI is a low level simultaneously, causes N raceway groove triode Q4 to end, and pin VBUS_INT is drawn high, and notice external the Internet equipment has USB device to insert.
These power supply circuits have also comprised under non-open state (pin VBAT input voltage is 0), and the USB line inserts PC and causes PC to burn out the defencive function of external the Internet equipment.If the USB line inserts PC, PC end pin VBUS can provide the operating voltage of 5V, and this moment, voltage comparator U1 can not work owing to there is not pin VBAT, and comparison circuit can not output low level make metal-oxide-semiconductor field effect transistor Q1, Q2 end.But pin VBUS draws high the G utmost point of metal-oxide-semiconductor field effect transistor Q1, Q2 by resistance R 6, Schottky diode D3, guarantee that metal-oxide-semiconductor field effect transistor Q1, Q2 end, the path of pin VBUS and pin VBAT is disconnected, and pin VBUS just can not influence pin VBAT, and pin VBAT voltage is always 0V.
2, the port testing process of WIFI router main equipment
It is as follows that USB inserts the flow process that detects: the USB interface of router main equipment is as the USB main equipment, and the USB interface of internet access facility is as the USB slave unit.On the main equipment port D+ of each downstream port of USB main equipment and the main equipment port D-, connect a pull down resistor respectively to ground.Like this, when the port of hub is unsettled, just moved to low level by these two pull down resistors.And, on slave unit port D+ or slave unit port D-, connect pull-up resistor at USB slave unit end.For full speed and high-speed equipment, pull-up resistor is to be connected on the slave unit port D+; Low-speed device then is that pull-up resistor is connected on the slave unit port D-.Like this, when equipment was inserted into hub, by the pull down resistor dividing potential drop of slave unit pull-up resistor and main equipment, the result had just drawn high one in the differential data line.After hub detected this state, it just reported to the USB master controller, has so just detected the insertion of equipment.The USB high-speed equipment was identified as at full speed equipment before this, then by main equipment and slave unit affirmation between the two, switched to fast mode again.Under fast mode, be the current delivery pattern, at this moment the pull-up resistor on the slave unit port D+ is disconnected.
But WiFi router main equipment that is to say it is slave unit power supply earlier owing to be passive power supply, powers behind the main equipment, thus be to finish enumerating of USB according to traditional testing process, so need to adopt following mode to enumerate:
1) internet access facility is given the power supply of WiFi router main equipment;
2) WiFi router main equipment module initialization;
3) internet access facility is drawn high the slave unit port D+ level of USB interface by revising the USB driver, the action that simulation external USB equipment inserts;
4) WiFi router main equipment has differential signal to come detecting USB interface, and thinking has external USB equipment to insert, and can start the USB testing process;
5) WiFi router main equipment and external the Internet access device carry out the negotiation and the affirmation of full speed/fast mode of master-slave equipment;
6) the USB hand shaking finishes.
3, the communication between router main equipment and the internet access facility
As Fig. 4, USB interface is exactly a connection device unique between router main equipment and the internet access facility.
The initialization of router main equipment is finished, and after finding the USB interface of internet access facility, WiFi router main equipment can detect the state of internet access facility earlier, and the router main equipment sends to all instructions of internet access facility all to be undertaken by the form of AT order.By sending the signal strength signal intensity that AT instructs checkout equipment, if internet access facility has been registered to network normally, wireless terminal can return effective signal strength signal intensity to WiFi router main equipment so earlier.Return under the state that to serve at internet access facility, WiFi router main equipment is set up data by the dialing instruction request and is connected, request is set up data and is connected, internet access facility is after the dialing request of receiving WiFi router main equipment, can set up data service to the Internet request, set up successfully Deng data service, this time, the electronic equipments such as computer of band WiFi network interface card just can visit the Internet by WiFi router main equipment.
Hardware connection mode between router main equipment and the internet access facility is as follows:
The USB interface supply pin VOC of the WiFi master chip of router main equipment and the USB interface supply pin of internet access facility link together, give the power supply of router main equipment by internet device by its USB interface power supply, the pin D+ of the USB interface of router main equipment and the pin D+ of D-and internet access facility, D-links together, the grounding leg of two equipment is received together the ground of shared internet access facility simultaneously.
4, the router main equipment is to the control of radio frequency chip
As Fig. 5, be provided with radio circuit in the WiFi master chip, described radio circuit links to each other with radio frequency chip, the signal amplifier that be provided with antenna, radiating circuit in the described radio frequency chip, links to each other with radiating circuit, and described signal amplifier links to each other with antenna by a single-pole single-throw switch (SPST); Be provided with radio-frequency (RF) receiving circuit in the described antenna, described receiving circuit is connected with another single-pole single-throw switch (SPST), low noise amplifier successively, and described low noise amplifier links to each other with described radio circuit.
The radio frequency scheme of WiFi master chip supports the multichannel road to send, and the multichannel road receives, and the structure that this multichannel sends and receives helps improving the transmitting-receiving speed of system, and can reduce noise jamming.The external signal amplifier of each transtation mission circuit is received antenna through single-pole single-throw switch (SPST) (SPDT switch), and when the WiFi chip was in idle pulley, single-pole single-throw switch (SPST) cut out, and the synchronous signal amplifier also is to be in closed condition.Need open PA and single-pole single-throw switch (SPST) by its switch control pin in aerial emission data at the WiFi chip, radiofrequency signal is amplified through PA, by transmission antennas transmit to air network.Radio-frequency (RF) receiving circuit also is earlier through a single-pole single-throw switch (SPST) (SPDT switch), connect a low noise amplifier (LNA) again, the main effect of low noise amplifier is to amplify the small-signal that antenna is received from air interface, reduce noise jamming, demodulate required information data for system, the gain that improves low noise amplifier is highly beneficial to the noise factor that reduces complete machine, behind the signal process low noise amplifier (LNA), be input to the internal radio frequency circuit of WiFi chip, be demodulated to digital signal.
5, the power management of router main equipment
Because router main equipment of the present utility model is charged pool not, so power management is simple relatively, unique outside input power supply is exactly the VCC pin of USB interface, and the internet access facility of ground and outside is shared.
6, the processing of parallel data
If the outside internet device that inserts is a 2.5G/3G/4G equipment, data connect to set up finish after, data port is in the transmission data mode always, WiFi router main equipment can also continue to send AT instruction or debugging message to internet access facility by the AT mouth.If as equipment such as ADSL, wired MODEM, there is not the demand of parallel processing.