Board Hardware Overview - Mango-kid/maciot GitHub Wiki
Hardware Features
- ESP32 MicroController (80Mhz, 4Mb Flash)
- USB Programmable (CP2101)
- Light dependent resistor with bias for light sensing
- Battery input on VPP pin
- Battery voltage sense through ADC
- 4 User LEDs
- 3 User Switches
- 2 Buttons for reset and flashing
- Standard Arduino footprint
Schematic Details and Design Information
The next section of this wiki will explain the schematic design of the board. It is important to note that the green wires (nets) are electrical connections and any net with a name on it is connected to any other net with the same name.
Power
We will begin where the power comes into the board. In this case there are 3 potential voltages that can be applied to the board (3.3V, 5V and VPP). In this case we have to consider that 5V will always be connected to the USB if someone is programming. This circuit was designed to take either (4 - 10V) or 5V in and produce 3.3V using a linear regulator. This circuit prevents voltage from going from VPP into the USB
ESP32 Controller
This is the main controller. In this case we have not created any major electrical design we have only connected the ESP32 controller to the appropriate nets. The controller is connected to the power supply of 3.3V. The controller has the potential to draw 0.280 amps of current when operating.
USB to UART Bridge
The USB to UART bridge take a USB connection and converts it into a UART connection. This is an interface that the ESP32 controller can connect with as it does not have its own USB controller on board. This interface is used to program the MacIoT board as well as communicate with the board (ie. Serial.println("Hello");)
Switches
The three switches are connected to the ESP individually. If you look at these switches you will note that the circuit doesn't really do anything. However when the internal pullups are used on the pins connected to the switch the switch will pull it to ground and read a 0 or when released will read a 1.
Note that SW105 is also connected to SCL so it cannot be used if the I2C function is being used
LEDs
The LEDs are quite simple. The used a series resistor to limit the amount of current flowing to the LED (hence limiting the brightness). When an output on the ESP32 is set to HIGH the LED will light up.
Sensing
The MacIoT Board is equiped with 4 sensors (Hall-effect, Temperature, Light and Voltage). Two of those sensor are internal to the ESP chip but two of them are on the board. Both of these sensors produce a voltage proportional to the element they are sensing. By reading the ADC pins connected to these sensors and doing some simple math you can find your battery voltage and the luminosity of a room.
Hint: The part number for the light sensor is PDV-P8103