Seeeduino Cortex M0 using USB Host mode with a barcode scanner (120mA requirement) and 12V power to the barrel jack.
I have got it working reading it as a USB HID device with external power to the scanner. However I can find no way to enable power OUT of the type C port to power the scanner from the USB port. The genuine Arduino Zero schematic seems to require a pin set as output LOW (PIN_USB_HOST_ENABLE) but this does not work on Seeeduino.
How can I do this, USB Host mode without power from the USB port is not very useful at all. The Seeeduino schematic is very vague as to the power flow for the USB.
Identify the USB controller chip on the Seeeduino Cortex M0. Check the datasheet or technical documentation of the USB controller to determine if it supports power output in USB Host mode. Look for any specific pins or settings related to power output.
There is no seperate USB chip it is part of the SAMD21 chip. Even on the USB Host sheild power to USB socket does not come from the USB chips but is board circuitry via solder blob pads. The MKR WiFi 1010 and WeMos D1 always output power on the USB socket whenever they are powered up by external power (I have these boards). The Arduino Zero says it needs PIN_USB_HOST_ENABLE set low to output power on USB (I cant confirm this I dont have a board) but the Seeeduino Cortex does not say, and the schematic is vague. However what point is a USB Host port if there is no power, cant plug a Memory stick in with an OTG cable it would have no power.
I have the barcode scanner working fine as USB HID but it would be more useful solution if I did not have to power it seperately to the Cortex board, and more economic than a genuine Arduino Zero or MKR, and I have not got the scanner working on the D1 yet.
Looking at the scematic and board layout together, is it possible Q16 is meant to enable power to the USB socket when there is an external power signal. I have external power to the barrel connector but no output on the USB connector. I think I am going to have get a meter and magnifier on this board (my eyes are not good for SMD these days)
Can anybody from Seeed comment on this issue, they are about as have been active on other threads since I originally posted.
Is there a circuit design fault, as pulling the gate of Q16 to ground enables power on the USB port, seems like the external power detect is not working to switch Q16 on, but why?
We are very sorry for our oversight!
The type C port of the Seeeduino Cortex M0 is used as a power input, not as a power output, and the type C port can be used as a serial port.
If the device connected to the Seeeduino Cortex M0 is powered by 5v or 3.3v, please connect the device directly to the 5v or 3.3v on the board.
I think what you are saying is, you messed up on the external power detect circuit (such that it does not work) and now are claiming its not meant to provide power to the USB port.
This part of the circuit clearly was meant to detect external power then switch on the MOSFET to output the 5V to the USB5V on the port so it can be used as a USB host. If I pull the gate of Q16 low as Q2 is clearly meant to do (but does not) then power is provided to the USB port as it should.
The USB host functionality works (for our barcode scanner), just there is no power to the USB device that is plugged in. Aslo how would it power a USB memory stick plugged in via OTG, which is a reasonable thing to do. I know I can get a USB OTG splitter but that should not be necessary for anything within the current range of a OTG USB port.
This board looked ideal for our project but we will have to bodge every board we use to make the USB power work. Waiting for the Arduino UNO Rev4 to appear, as I am hoping they might do the job, but will probably be significantly more expensive.