1

As part of a larger project, I would like to be able to control a set of 8-10 PWM signals remotely, from a smartphone at a distance of 10 meters or more. I will probably convert the PWM signals to analog voltages, and reduce their voltage swings to more like 0-1v, using a resistor divider and RC filter; they will drive high impedance loads in the remainder of the project. I’d write an app for the smartphone allowing user control over the duty-cycle of each PWM signal (and thus the analog signal levels).

It seems to me that the way to go is Arduino, interfaced to the phone with Bluetooth. I'd need one of the higher end Arduinos to get enough PWM signals (the basic ones like Uno only have 6 PWM outputs). Software-generated PWMs are probably not high-frequency enough, as I’d like the filtered analog signals to be as ripple-free as possible. There seem to be several ways to interface Bluetooth to Arduino, such as the HC-05.

If people here concur with this approach, I shall move this question to the Arduino forum.

`

7
  • 2
    Do you need a PWM output or just the analog value? Might be easier to get a DAC with 8 or more outputs than to fool around generating 8 PWM signals then filtering and scaling them to get what you need.
    – JRE
    Aug 26, 2017 at 20:43
  • 1
    From phone to Arduino via bluetooth, then drive something like the AD5669. That has 8 channels, and you can connect a couple of them to the Arduino.
    – JRE
    Aug 26, 2017 at 21:05
  • Interesting idea. I think though that there's no reason to introduce another piece of hardware. Since each signal will be driving a small subcircuit anyhow, adding a couple resistors (and a cap, though I'd probably want that anyhow) isn't really much of a burden. Aug 27, 2017 at 4:41
  • might consider "splurging" for an ESP32, which has wifi and btle support.
    – dandavis
    Aug 27, 2017 at 22:06
  • Looks to me like ESP32 is the ticket. Gives me Bluetooth, with optional wifi. Gives me 16 outputs, at high frequencies (to facilitate filtering to analog). A nice development board for $20 ... sparkfun.com/products/13907 Aug 28, 2017 at 4:15

1 Answer 1

1

HC-05 is rated to about 9m so it wouldn't necessarily meet your requirement. The ESP8266 (example of one implementation called the Node MCU) can output PWM on any of the 0-16 pins. It can easily implement a web server which would let you control your outputs via 8026.11 (wifi). It also means you don't need to build anything for the phone/ tablet/ PC just use a web browser. The duty cycle could be set through the web server on the ESP. The ESPs are around the same price as an Arduino.

I've used the HC-05 with an arduino. It works very well, though not very far. For the Android side I used app inventor which is extremely easily to use for bluetooth.

7
  • Using wifi instead of Bluetooth had occurred to me and maybe that'd be better. I'm a little confused though: the part# you cite looks like it's just a wifi adapter for Arduino. But you seem to be saying it's an alternative to Arduino and can provide the PWM outputs by itself. Aug 27, 2017 at 4:58
  • 1
    It does look like that at first glance but is in fact an complete MCU, no Audrino required. It can be programmed using the Arduino IDE and you can use the GPIO pins.
    – Squats
    Aug 27, 2017 at 5:00
  • I can live with 9 meters. This thing is more likely to be controlled by a phone (than a computer), through a GUI probably not much more complicated than 8-10 sliders (one for the duty-cycle of each PWM output). Maybe the question I should be asking is whether that'd be easier to implement in Android or in HTML. I'm not really familiar with doing either. Aug 27, 2017 at 5:32
  • If it's < 9m and you want to choose between HTML and android for the phone side; then check out app inventor. If you go with the HC-05, then the Android side can be done entirely in app inventor which is very easy to use - no coding, just blocks.
    – Squats
    Aug 27, 2017 at 6:20
  • If you're going to go with the esp32 you can't use the Arduino development environment for the Bluetooth functions and other functions are not yet implemented.
    – Squats
    Aug 28, 2017 at 10:21

Your Answer

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

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