logo elektroda
logo elektroda
X
logo elektroda

Connecting components to ESP32-WROOM-32: buttons, siren, i2c display

gbaranski 1053 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18501149
    gbaranski
    Level 2  
    Hi, I'm fairly new to electronics and microcontrollers, I've got the C++ programming down, it's just a matter of designing the circuit as I'm having some problems. I am using the ESP32-WROOM-32 module from Espressif, I would like to connect the following components to this board: 3x push buttons which will change the corresponding values in the code, 1x ON/OFF switch which will also change the values in the code, 5V siren and also i2c display. I have more or less designed this already, but I don't know if I have connected it to the right pins, the display is not connected yet. I have a lot of questions

    Should I add a resistor between the buttons?
    Should I use INPUT_PULLUP?
    Is the TIP31C transistor suitable?
    Where do I get the 5V for the siren, is there any 5V output on this module or would I need to pull it from a USB-TTL converter?

    I am attaching the schematic, it is not very good because I am doing this for the first time. I did the same thing before on an ESP8266 unfortunately the board broke. I am waiting for a new board for now.

    I use these buttons as push buttons, the version without backlighting
    https://www.aliexpress.com/item/32993978881.html?spm=a2g0s.9042311.0.0.646b5c0fcXSBQq

    This switch
    https://botland.com.pl/pl/przelaczniki-z-dzwi...pzh3BOGiqWFIcBXq5S2jDF0EniqjE7OMaAv81EALw_wcB

    Siren
    https://www.aliexpress.com/item/32911682524.html?spm=a2g0s.9042311.0.0.52304c4dcGXCx2

    Transistor
    https://www.tme.eu/pl/details/tip31c/tranzystory-npn-tht/stmicroelectronics/

    Documentation of the module
    https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf
  • ADVERTISEMENT
  • #2 18501328
    khoam
    Level 42  
    gbaranski wrote:
    Should I add some resistor between the buttons?
    .
    There is no need for this.

    gbaranski wrote:
    Should I use INPUT_PULLUP?
    .
    Rather yes, if by forcing the button to a low state you are signalling it to be pressed.

    gbaranski wrote:
    Where to get 5V for the siren, is there any 5V output on this module or would I have to pull it from a USB-TTL converter?
    .
    It must be an external 5V supply, the ESP module itself is powered from 3V3. There is no power supply circuit on the schematic, so it is difficult to say anything more.

    Also, there should be resistors connected to the EN, IO 0 and IO 2 pins. See the schematic of the factory ESP32 Core Board attached. There should also be schematics of this type in the EasyEDA collection.
ADVERTISEMENT