ESP8266 Uses LiFi To Get On WiFi

Connecting your shiny new ESP8266 to WiFi can be as simple or as complicated as you please. Most people decide to manually add it. Some people find clever ways to make the bloody thing connect itself. [Eduardo Zola] transfers his WiFi password using the flashing light of a smartphone screen.

A simple photo-resistor and a bit of tinkering allows him to easily send credentials — or any data really — to his ESP8266, through the power of LiFi. Short for Light Fidelity, LiFi transmits data using light with on and off states representing digital values. It can use visible light, or reach into either the ultraviolet or infra-red radiation if need be. For the nitty-gritty details on the subject, check out our primer on LiFi.

 A flashing LCD screen and a photo-resistor barely make the cut for a one-way LiFi system, but [Eduardo Zola] makes it work. The approach is to build a resitor divider and watch an input pin on the ESP for changes.

The trick is to keep ambient light out of the mix. The test sensor shown here places the LDR in a black cap, but [Eduardo] 3D-Printed a slick little enclosure for his reverse flashlight so it fits flush with the phone screen. One click and about half a minute of a flashing screen later, and the Wi-Fi credentials are transferred. This circuit could really be added onto any project, for short data transfers. With a bit more work on the sensor circuit, speed could be improved with the limiting factor being the timing on the phone screen itself.

Since the ESP8266 has its own WiFi connection, it’s likely you’ll use that for data transfer once the LiFi gets it onto the network. But any situation where you don’t have a full user input or a network connection could benefit from this. Pull out that old scrolling LED matrix project and add this as a way to push new messages to the device!

27 thoughts on “ESP8266 Uses LiFi To Get On WiFi

    1. The Quirky Pivot Power Genius smart power strip also used this method. I believe that it is based on an Electric Imp. It was a b***h to get it working with my Android phone; I had to borrow an iPhone to get it to work.

      1. I worked support for them. A nightmare.

        The Porkfolio had a translucent (not transparent, translucent) window over the E-Imp sensor. Guess how well it worked.

        The Eggminder was a wifi device you put in your metal, grounded refrigerator. Guess how well it worked.

    2. Yeah, exactly. When somebody uses photoresistors for optical pulse detection you know they didn’t do the research and/or come from the Arduino crowd where nobody cares and uses ready-made modules. LDR’s can be *really* slow, like sub 1 kHz or worse.

    3. True though I think you’re limited to 60 to 120hz update on the LCD anyway unless you bypass the android screen driver.
      You probably could get higher data rates with audio though it would require a little more hardware on the 8266.

  1. Why not use an LED as the photosensor? Is the esp8266 no sensitive enough, is it too complex? Almost all gadgets have an LED as an output signal already – make it dual purpose. That would be an elegant solution.

  2. I have a default esp8266 scheme that I use on most projects. It’ll initially boot as an encrypted AP and host a simple form for putting in the credentials for a nearby WiFi network. After that is submitted, the esp8266 reboots and uses the saved credentials. It’ll use that for connectivity until it’s rebooted while a certain pin is held high, in which case, it’ll do the initialization routine again.

  3. Where’d the LiFi mention come from? The original project doesn’t claim it is LiFi. As mentioned by others, the Electric Imp and Timex watch use a similar system and they’re definitely not LiFi. Just because it uses pulsed light for communication doesn’t mean it is anything to do with LiFi ><

  4. I can see it already has a blue and an orange led, that can be used as phototransistors with some modifications, when not outputting light. As these are not only faster but wavelength sensitive, I’m having a theory that the message could also be 2 bit color coded further doubling the transmission speed.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.