Schematics for Expansion dock and Onion
Are schematics available for the expansion dock and for the Onion? I'm trying to connect a relay module to several of the GPIO pins, and behavior is not what I expect. On power-up or reboot, GPIO pins 0, 1, and 6 appear to act as if they are at logic level 0, while GPIO pin 7 looks like a logic level 1. I don't have a schematic for the relay module, but I can probably reverse engineer the thing, and then measure actual voltage levels to see what's going on. Nevertheless, schematics would help tremendously. As an electrical engineer, a schematic is indispensable for designing interface circuitry (instead of just plugging parts into a breadboard and hoping that I'm not overloading a port pin, violating fan-out/fan-in specs, and generally not doing things that can brick my devices.
If you are talking about the Onion Relay module that is controlled by i2c bus. From my own experiments it appears as device 0x27 and to turn on and off the relays you need to change the value of register 0x09 to one of 4 values.
- 0 - relay A off relay B off
- 1 - relay A on relay B off
- 2 - relay A off relay B on
- 3 - relay A on relay B on.
If you are controlling a relay using the GPIO pins you need to go through some sort of transistor to be able to source enough current a relay needs. A circuit something like this is then needed.
Referring to the circuit you proposed: if I don't know the I/V curves of the GPIO pins over variations in temperature and Vdd, I can't select appropriate values for relay coil resistance, transistor properties, and base resistor value. Just plugging in "typical" values may give a circuit that seems to work on the bench, but does nothing to ensure operation of the circuit over all extremes of power supply voltage, operating temperature in the end application, and even contact derating for the relay (if the coil is not necessarily fully energized).
We've been pushing our hardware team for the schematics, but due to the Lunar New Year, almost all of China has been on vacation for the past couple of weeks.
However, we are very committed to open sourcing our designs, so we've been working hard to locally verify the schematics for the Expansion Dock.
The Onion Hardware repo can be found on GitHub: https://github.com/OnionIoT/Onion-Hardware
For now, only the Expansion Dock schematics are available, we will be working on adding more in the coming weeks.
@Jeff-Verive we're looking into this information as well but the going has been slow. Documentation for the AR9331 in terms of electrical characteristics is not as detailed as we would like.
For what it's worth, the best documentation I have found on the AR9331 can be found at: https://www.atheros-drivers.com/qualcomm-atheros-download-datasheets-nr-110-with-code-1657.html or https://www.openhacks.com/uploadsproductos/ar9331_datasheet.pdf
Just noticed there is a new Wiki page (https://wiki.onion.io/Hardware-Specifications/Electrical-Characteristics) that has basic electrical specs for the GPIO pins and a link to the PDF file for the AR9331 as above.
Note in particular that the AR9331 PDF document contains additional information relating to electrical specs in section 7 on page 305
Thanks to the Omega people for this - much appreciated :-)