Help - set up WiFi to remote device

GH Crash

Member
I know verry little about electronics but I would like to learn about communicating to a remote hand-held device using you phone. What I need is to be pointed in the right direction. What do I need, component wise, on the hand-held device to receive the Bluetooth or WiFi signal from a phone app?

I've been playing around designing a PWM controller for supercapacitor powered aircraft. The controller just controls the speed of the motor and how long it runs. Right now both the speed and run time have to be set directly on the circuit. It would be nice if I could do that from my phone.

Thanks ahead of time for your help.

George
 
I would recommend using an ESP32 module (connect to a laptop with a USB cable to program it) and it can act as a router and as a controlled device. Example programs - "http server" can be set to "Station Mode", you can connect to it like picking a hotspot (it can be a completely independent network between your phone as the client using Safari or Chrome - and the ESP32 module.

You can send a "get" command (e.g. an IP address you pick for the ESP32 plus a number from 0-1023 to set the PWM duty cycle on the 3.3v ESP32 pin. There are instructsbles.com and other examples of turning an LED on/off but the same idea can be used to change the PWM of a pin on the ESP32.

Google http-server ESP32

It can be easily programmed with an Arduino IDE, load the ESP32 board specs and use the http-server as an example to get you started.
 
Thanks ZipZapOuch for the quick reply. I did a quick google search of the ESP32 but I came away with more questions than I answered.

So you are saying that you connect the ESP32 to the computer to program it. Right?
Does the ESP32 become part of the handheld remote device?

I'm not planning on using the phone app to set the duty cycle, the handheld's ATtiny85 handles that chore. The ATtiny also handles the motor run time function and there is a speed monitoring loop in the ATtiny programming that adjusts the duty cycle based on motor speed as it varies with source voltage. What I would like the app to send parameters (numbers) for setting initial speed an run time.
 
I'm saying that you can just replace the ATtiny with an ESP32 module and use most of your current program (almost without changes) in the ESP32 - then you can send parameters to the ESP32 with a web interface using your phone.

Or, you can send parameters to the ESP32 module and then use an I2c, SPI or UART or any other communication system you want to set up to inform the ATtiny of the new data.

Either option is possible - I would rather transfer the data directly to the ESP32 and eliminate the ATtiny.
 
Thanks Again. Now I have a starting place.

I may opt to keep the ATtiny. The circuit that goes into the plane has to be as small and light as possible. Also the circuit has to operate consistently with a varying (decreasing) supply voltage as low as 1.8 volts. But I will definitely look into replacing the Attiny with the ESP32.

Let me go study up for a while. And I'm sure I will have more questions.
 
Have a look at this:

plus some variant of one of these little buck-boost modules to power it:

Both very small and light, and the combination gives full unrestricted performance down to 1.8V

Edit - better buck-boost module (the 3.3V version):
 
Last edited:
Thanks Rjenkinsgb for your suggestions. Unfortunately they don't meet this project's definition of small and light. The present ATTiny based circuit is self sufficient (no buck-boost necessary) and fits on a 20mm by 20mm board and weighs in at 1.5 grams. I'm trying to figure out if there is a way to go smaller and lighter. the circuit has two trimming pots and they are a couple of the heaviest components on the board. I'm hoping that I can move them to a 'controller' board that communicates back to the ATtiny circuit.

I like the buck-boost module from aliexpress. It may work great for another project I have in mind.
 
Then you need to move to Bluetooth LE modules.
The easiest implementation of a Nordic chip is a module from Laird (now Ezurio). The BL652 is 1.6 to 3.3v and weighs less than 1gram.

You'll need a Bluetooth dongle to program it via Bluetooth and an understanding of a JavaScript-like "SmartBasic" language - tedious but not overwhelming. Range will be limited to about 30ft. Modules have ADC and PWM onboard.
 
Thanks everybody for the information you've given. It will take me a while to digest it all. Right now three of us are in the process of writing an article for an online magazine that describes the present ATtiny based device. Once that is done I will be back with more questions.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…