2

I have an ESP8266 ESP-01 WiFi module. I have a project where I need to use the following and send their data to a firebase database.

2x Force Sensitive Resistors(Sensor)

1x GPS module

My question is what GPS module can I use to send GPS location thru the ESP8266 Wifi module. My ESP-01 has only 2 GPIO. What should I do so I can use 2 FSR and GPS module at the same time send all 3 data to firebase realtime database.

Thanks

2 Answers 2

2

I would go for an i2c A/D converter, example ADS1015 (4 analog input, 12 bit) and connect that to the ESP-01.

Ref.:

https://en.wikipedia.org/wiki/I%C2%B2C

https://www.youtube.com/watch?v=6IAkYpmA1DQ&t=32s

10
  • Hello thank you for response. I searched this device and does this work like a 'GPIO' extension? Since ESP-01 only have 2 if I use this it will have 4 inputs? What is the connection when I use it on ESP-01? esp8266learning.com/wp-content/uploads/2016/09/…
    – Duckbenok
    Commented Sep 1, 2017 at 19:16
  • It has 4 GPIO, acrobotic.com/media/wysiwyg/products/… . And yes ADS1015 uses a i2c communication, en.wikipedia.org/wiki/I%C2%B2C, an universal serial buss where you can connect several devices to.
    – MatsK
    Commented Sep 1, 2017 at 19:22
  • If I will use a different esp version NodeMCU V3 ESP8266 ESP-12E will it give me more GPIO slots? I checked them and found out that the ADS1015 price is closer to a new esp. What do you think? I just need enough slots for 2 FRS and 1 GPS module. Thanks
    – Duckbenok
    Commented Sep 2, 2017 at 14:51
  • 1
    I apologize. I guess I got too dependent on your replies and haven't done my part but thank you for still replying even though im kinda annoying. I have decided to use an Arduino UNO r3 which have 5 ADC slots and gonna use the Esp8266 esp-01 to send the data to firebase. Thank you for helping.
    – Duckbenok
    Commented Sep 3, 2017 at 19:21
  • 1
    @Snoopy You are welcome and if you need any help in the future you are welcome, and the choice you have made is a good one. And one thing that also drive one to answer is to get credit for it :-) its the arrows to the left of the discussion.
    – MatsK
    Commented Sep 3, 2017 at 19:25
1

You really need something external to both provide the analog inputs for the force sensors and the serial communication for the GPS module.

The simplest "something" is another microcontroller. Ideally one with two UART ports.

You can then:

  • Communicate between the microcontroller and the GPS with one UART
  • Sample the FSRs with the microcontroller
  • Format and send the data to the ESP-01 through the other UART

Using SoftwareSerial you chould just about do it with an Arduino Uno (though you'd have to disconnect whatever was on the hardware UART every time you wanted to program it), but ideally something with more UARTs would be better, such as a Mega2560.

A halfway house between the two would be a board based around the ATMega32U2 which uses a direct USB connection for programming leaving the hardware UART free to be used permanently. However you'd still need to use SoftwareSerial to emulate the second UART (maybe best for the GPS since it's then only used for receiving).

9
  • Why not just write the sensor-handling code on the ESP8266, using an external ADC to work around the single-ADC on the ESP8266? The ESP is quite capable. Commented Sep 1, 2017 at 17:38
  • @josecanuc The chip is capable, but the ESP-01 is seriously lacking in IO pins. It has the UART pins and two GPIOs that are used to select the boot mode, so you have to be very careful with them. Best to stick to UART only.
    – Majenko
    Commented Sep 1, 2017 at 17:52
  • @Majenko Thanks for the response I am still new to embedded systems and somehow i cannot understand some of it but I have an USB to TTL UART and Arduino UNO to use. My code is currently programmed in the wifi module using the GPIO2 as the sensor #1. i do not know where to plug the sensor#2 and gps module. If I plug them at the arduino or UART how will they send data since the code is inside the wifi module. I am confused Sorry im beginner
    – Duckbenok
    Commented Sep 1, 2017 at 19:08
  • @Majenko If I will use an NodeMCU V3 ESP8266 ESP-12E instead will it be enough to run all 2sensors and 1 gps module?
    – Duckbenok
    Commented Sep 2, 2017 at 14:52
  • Unless it has an added external ADC chip you still only get 1 ADC channel. However it is possible to add an external ADC chip to it for more channels. The GPS should be able to attach directly.
    – Majenko
    Commented Sep 2, 2017 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.