Controlling PGA2310 with ESP8266 via Browser and Android

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi, I have started a project with an ESP8266 to control a PGA2310 with the browser and via a native Android app.
I have designed a few small modules and the initial results are positive. I can control the PGA via the browser. Next I would like to program an app for Android.
The project serves more of my own education, but it is a lot of fun. I am not a programmer, so I ask for gentleness when someone looks into the code.

If interested, I can publish the updates here. A few pictures show the results.

Best regards
Olaf
 

Attachments

  • all_components_01.jpg
    all_components_01.jpg
    413.2 KB · Views: 444
  • D1_mini.jpg
    D1_mini.jpg
    260.5 KB · Views: 433
  • PGA2320.jpg
    PGA2320.jpg
    294.7 KB · Views: 424
  • relay.jpg
    relay.jpg
    327.5 KB · Views: 417
  • Browser.JPG
    Browser.JPG
    29.1 KB · Views: 413
  • android_sim_01.JPG
    android_sim_01.JPG
    44.8 KB · Views: 219
Hi, the first step is a program for the ESP8266. I have used the D1 mini or the D1 and programmed with the Arduino platform. After installing the ESP8266 components, this goes quite well.

The sketch follows the example from here:
https://blog.thesen.eu/stabiler-http-1-1-wlan-webserver-mit-dem-esp8266-microcontroller/

I uploaded the sketch as attachment.
To have only one way for the control data, I want to control the web server via the App as a webclient. This can do Android pretty easy. I had on the way already controlled a LED Strip, so I have to implement the same for the PGA.

The picture shows the PCB for the ESP8266. I use 2 level converters to get from 3V3 to 5V. The ESP itself provides the 3V3.

For the tests it does not need a PGA, the ESP is completely enough alone. The you can play with the Serial and the browser.

For the tests one does not need a PGA, the ESP is completely enough alone.
The serial monitor is required to find the IP address of the ESP. But you can also look in the WLAN router.

I will send later some more pictures.
 

Attachments

  • PGA2310_Server_03.zip
    2.2 KB · Views: 65
  • D1_lay.JPG
    D1_lay.JPG
    359.3 KB · Views: 211
Progress

I've made some progress. The Android app can control the ESP. At the moment only a few basics are implemented, but the access via the webclient works. Maybe I can get an intermediate result at the weekend and maybe I even understand one day, what I have programmed :)

Best regards
Olaf
 

Attachments

  • AllSoftware.JPG
    AllSoftware.JPG
    183.3 KB · Views: 166
Progress

Hi, the next step is a simple case. Software testing with loose wiring is no fun, so I want to wire everything first :)
I have even found a nice oak board for the front plate.The cover I will make from aluminum perforated plate. Hopefully this does not affect the wireless sensitivity.
The next steps will follow soon.

regards Olaf
 

Attachments

  • ESP8266VolumeControl.jpg
    ESP8266VolumeControl.jpg
    347.8 KB · Views: 174
  • ESP8266VolumeControlFront.jpg
    ESP8266VolumeControlFront.jpg
    221.3 KB · Views: 144
  • ESP8266VolumeControlBack.jpg
    ESP8266VolumeControlBack.jpg
    254 KB · Views: 115
  • ESP8266VolumeControlComponents1.jpg
    ESP8266VolumeControlComponents1.jpg
    315.7 KB · Views: 167
Next step

Hi, here everything works now.
I recommend the following procedure:

First use only one ESP8266 without PGA23xx
Install the arduino sketch without errors
Call the ESP with the command "yourIPforESP" /? Type = HTML with the browser
Then you should see the interface in the browser
Then copy the android project into the folder for the android studio projects
Start android studio
Select "open android project" and select the new project folder
Follow the instructions of android studio to simulate and test the app

The first steps without experience with android studio are not funny. It takes a lot of patience and often google to bring everything together. Unfortunately, I'm just a beginner. I find it much easier to program an app than to understand all the settings in android studio.

regards Olaf
 

Attachments

  • functions.txt
    772 bytes · Views: 72
  • OnTablet.jpg
    OnTablet.jpg
    198.1 KB · Views: 285
  • First_Test_in_case_01.jpg
    First_Test_in_case_01.jpg
    348.5 KB · Views: 289
  • AppInSim.JPG
    AppInSim.JPG
    47.5 KB · Views: 295
  • arduino.zip
    2.5 KB · Views: 75
Could not upload the project-zip-file. Security token was missing :confused: No plan, what it could be.

So I will upload only the main folder of the project. If you have ever done a project with android studio, you will find here all the important files.
 

Attachments

  • main.zip
    88.3 KB · Views: 58
Hi, I will upload patches and updates from time to time and a better project file. There are still many functions missing:

- Store start values for each channel
- free selection of names for each channel
- Balance
- Reread the current values from the ESP back into the app
- ...

The circuit boards are also not yet as I would like. The main functions could be summarized in one PCB.

Many possibilities for a new version :)

Regards Olaf
 
Progress

Hi, I have made some changes, but so far only for the browser.
In the settings you can now save the names of the channels (text on buttons) and the starting value of the volume per channel. In addition, the channel to be selected after switching on. All settings are stored in the EEPROM and are read out at startup and can be changed on an HTML page.
Before I post the code, I have to make a bit of cosmetics :)

greetings
Olaf
 

Attachments

  • iPhone.jpg
    iPhone.jpg
    115.1 KB · Views: 100
  • SettingsSite.JPG
    SettingsSite.JPG
    42.3 KB · Views: 106
  • MainSite.JPG
    MainSite.JPG
    45.7 KB · Views: 130
  • Back.jpg
    Back.jpg
    221.6 KB · Views: 232
  • Front.jpg
    Front.jpg
    239.2 KB · Views: 227
New Software for browser

Hi, here is the next version for the browser. Added settings and some information for better usability.
This version should be enough for the browser. In the future I will continue with an update of the Android app for the same functionality.

regards Olaf
 

Attachments

  • main.JPG
    main.JPG
    38.2 KB · Views: 109
  • settings.JPG
    settings.JPG
    42.7 KB · Views: 102
  • PGA2310_Server_V__090120170805.zip
    4.4 KB · Views: 44
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.