Results for
Hello Academia,
I've been trying to get information regarding these configuraitons in a 3 phase transformer. The first is a dual secondary consisting of a wye output and delta output. Both feed separate 3 phase bridges, which outputs are connected in parallel.
The second is a Wye output, which each leg feeds 3 more series windings, which are located on the adjacent core (phase shifted) on the same transformer, with only one 3 phase bridge for the output
I see there is a zigzag simulink but can't seem to get that loaded...
My question is, are these essentially identical in operation, or is the dual secondary what I should be using? (due to better harmonic rejection)
Thanks,
Bryan
Congratulations, @Karim for winning the 1st ever Editor's Pick badge awarded for MATLAB Answers, in recoginition of your awesome solution in How to find X and Y coordinates of maximum gap between curves?
This is a new badge we just introduced to recognize awesome answers people contribute and yours was picked for discovering a creative way to solve the problem, and made the solution clear, and reproducible. Thank you so much for setting a high standard for MATLAB Answers and for your ongoing contribution to the community.
MATLAB Central Team
You provided 9717 answers at the acceptance rate of 75.23% and received 3281 votes. Thank you for your contribution to the community!
MATLAB Central Team
Hi,
I am using some dragino sensors and for the testing period I have used TTN and Thingspeak. The TTN to thingspeak integration was straigthforward as there are plenty of guides out there. However, the sensor will be running in an environment where I can not install a gateway and I will have to rely on a private LoRaWAN network. I would still like to use thigspeak as my endpoint for the data, and the company has requested documentation to configure endpoint URL and authorization header. They have no other inputs they can configure.
I am a newbie in all of this and I was wondering if you can point me in rigth direction. Is there any documentation available on how to configure a lowrawan server to send the data to my thingspeak channels? For each of these channels I have a write channel feed link, which I am guessing would be the authorisation header? What should I use for the enpoint URL?
Many thanks.
Watch live as Brandon Armstrong and Cris LaPierre import, visualize, and compute statistics without writing code in MATLAB.
The first challenge when starting a new project is importing and exploring the data to determine what it contains. This is especially true if your files contain a mix of numeric, text, and categorical data.
MATLAB has many new tools to simplify this process. Using app-based workflows enable you to spend more time investigating and exploring your data and less time troubleshooting code. Importantly, the code required to repeat your analysis is auto-generated so you can apply the same steps to new files and have others reproduce your work.
What is going on in ThingSpeak recently? All my ESP's which use the ThingSpeak library have either stopped working or only are only posting data very sporadically. The error code is :"Problem updating channel. HTTP error code -301". I've gone back to the basic example in the ThingSpeak library (unsecured) and it doesn't work either - same error code -301. What has changed?
Greetings ThingSpeak team,
Regarding the ThingSpeak Free plan - Is it elligible for usage as a part of academic course free of cost?
I was considering using your platform to demonstrate a few IoT functionalities while teaching an IoT PostGrad course to about 20 students, who would create free accounts during the course. Usability would be restricted within the free plan limitations during class activities.
However, I am unsure if this is allowed under the ToS. Do I require a Matlab license in this case?
Thanks!
dear sir, We are using IOT builder system and trying to make project on thingspeak we are unable to find graph after run the program in Python after completing whole system and connection properly please resolve issue and aware about problem.
Hi everyone,
I want to know how much time my data takes from uploading it to a thingspeak channel until the channel receives the data. Therefore I am sending a unix timestamp as data to my thingspeak channel. When ThingSpeak receives the datapoint, it creates a timestamp itself called "created_at". But this "created_at" timestamp measures only seconds, while the unix timestamp, that is sent as data, measures milliseconds. Because of this, it can happen, that the unix timestamp in the data is bigger than the "created_at" timestamp from thingspeak, which makes no sense.
Does anybody know if there is a way that the "created_at" timestamp also measure milliseconds? Or if there is a better way to measure the latency between my system and ThingSpeak?
I have an ESP32 that has 5 values (solarW, batteryV, pumpW, pumpRPM and pumpLPM) that I'm writing to 5 fields on a Thingspeak channel.
if ((millis() - fifteenTstart) > 15000){
Serial.println("Updating Thingspeak....");
ThingSpeak.setField(1, solarW);
ThingSpeak.setField(2, batteryV);
ThingSpeak.setField(3, pumpW);
ThingSpeak.setField(4, pumpRPM);
ThingSpeak.setField(5, pumpLPM);
int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
if(x == 200){
Serial.println("Channel update successful.");
}
else{
Serial.println("Problem updating channel. HTTP error code " + String(x));
}
}
It works fine when there's a good connection to the internet and Thingspeak, but there's a 10 second or so delay when Thingspeak is unavailable (WiFi, internet or website non-connectivity).
I would like the code to recognise that there's no ThingSpeak connection musch faster (1 second or less woud be good, but I'll take two!).
Or, if it's possible to just send the data out without the code waiting for a confirmation back (I only need the data to go OUT from the ESP32 to Thingspeak, nothing needs to come back).
The reason for doing this is there's other code on the ESP32 that I need to get back to, having a 10 second delay in the middle of the code ain't good for the pump safety reaction code.
In MATLAB Answers, oftentimes we see good comments that provide solutions in a question thread. Those comments should really be answers. On the other hand, there are some answers that do not offer solutions. Those answers should actually be comments. The answer/comment issue makes it harder for readers of a question thread to quickly identify useful information. To tackle this issue, the community team just released the MOVE feature!
What can be moved?
Answers and comments can now be moved in 4 ways within the same question thread:
- Change an answer to a comment
- Change an answer with comments to a group of comments
- Change a comment to an answer
- Move a comment
Who can move answers and comments?
New privileges have been awarded to contributors with 2000 reputation points or more. Privileged contributors will see move icons added in the list of actions available for answers and comments.

After an answer or comment is moved, an indication of the move will be displayed with the content.
As always, please let us know your thoughts by leaving a reply below.
Never, I don't typically share code
46%
Never, even when my code is shared
14%
Occasionally
15%
Sometimes
8%
More often than not
5%
Always or almost always
12%
8896 votes
please help to to solve this problem..

Hi, I just buy a Pico W board that can be easy programming in Thonny IDE using Micropython library. But I find difficult to use thingspeak without compatible library and some examples. Please take this Raspberry board in consideration, it is cheap and it is more reliable. Thank you!
Hello,
I am designing a battery model and its control to undergo cyclic charge and discharge.
The battery model is created by using a simscape electrical battery block (Table-based).
The control is modeled using Stateflow. The statflow chart takes SOC values as inputs and provide current values as outputs. By default, the battery will be at rest and no current is drawn at that state (I=0A). And then based on the SOC % of the battery, it goes to charge (3A current) or discharge (-3A current) state. I have defined the controls as follows.
- If the battery has SOC >= 50%, it has to discharge. If the battery has SOC < 50%, it has to charge.
- While discharging, if the battery reaches 0% SOC, it goes to rest.
- While charging, if the battery reaches 100% SOC, it goes to rest.
I have defined initial SOC as 50%.
When I run the simulation, the battery started to discharge as per the condition provided in the stateflow chart.
I = -3
But the battery has not come to rest state after reaching 0% S0C.
I am getting a warning that,
At time 1944.017100, one or more assertions are triggered. State of charge must be greater than or equal to zero. The assertion comes from: Block path: Example_cell_model/Battery (Table-Based)1Assert location: o (location information is protected)
I don't understand why the battery has not came back to rest state.
Do anyone has any idea for the cause of this problem and how to resolve it?




Thanks in advance.
Hi everyone. Any possibility in using MQTT with Talkback. I would like to subscribe to the Talkback with MQTT on the ESP8266 and then send data based on the Talkback. Subscribing to MQTT would make it easier as to poll it via REST Http.Thanks
The ThingSpeak certificate was updated recently. If you are using secure communication for your devices, you may need to update the certificate or certificate fingerprint on your devices.
Hi everyone,
This is the second time in few years ThingHTTP changes the way it returns data; any way to roll that back or control it? Back in 2020 it statted padding the GET request with CRs and LFs (last time I forgot what changed but it was similar - just padding the GET return with characters).
Now it's adding "0" zero after the GET payload and then 2 CRs and LFs at the end after that zero;
Is there any way to control how ThingHTTP returns the payload back? It's messing up my parsing firmware :)

Hi,
I have been using ThingSpeak upload on several CO2 detectors based on ESP32 Arduino board, for six mounth.
Some are using direct API HTTPS requests to write values on ThingSpeak channels. Those are still working (through a proxy)
Others with similar programmetion but using ThingSpeak secure Communication Library for Arduino, have stopped uploading values since 19/07/2022 around 16h.
Was there any non publiched modification on the library at this time ?
Did any body notice something similar ?
I have not investigateg the error yet...
Thanks for feed back,
TC
Hi Everyone,
I'm a novice when it comes to programming and i'm trying to figure out why my weather data is not loading into my channel. I've had the code working previously before thingspeak went from MQTT to MQTT3. I'm having issues around the publish.single().
import subprocess
import paho.mqtt.publish as publish
import psutil
import string
import json
from statistics import median
from pms5003 import PMS5003
#weather_iot
import requests
import time
from datetime import datetime
from csv import writer
import math
import paho.mqtt.publish as publish
#Thingspeak channel and MQQT protocol
mqtt_client_ID = "detail removed"
mqtt_username = "detail removed"
mqtt_password = "detail removed"
channelID = "detail removed"
apiKey = "detail removed"
topic = "channels/" + channelID + "/publish/"
mqttHost = "mqtt3.thingspeak.com"
tTransport = "websockets"
useSSLWebsockets = False
tTLS = None
tPort = 80
def csv():
List=[now, Temperature1, IAQ1, Pressure1, Humidity1, PM1_0, PM2_5, PM10]
with open('Weather.csv', 'a') as f_object:
writer_object = writer(f_object)
writer_object.writerow(List)
f_object.close()
return
#PM sensor configuration
pms5003 = PMS5003(
device='/dev/ttyAMA0',
baudrate=9600,
pin_enable=22,
pin_reset=27
)
#Open C File
proc = subprocess.Popen(['./bsec_bme680'], stdout=subprocess.PIPE)
listIAQ_Accuracy = [ ]
listPressure = [ ]
listGas = [ ]
listTemperature = [ ]
listIAQ = [ ]
listHumidity = [ ]
listStatus = [ ]
for line in iter(proc.stdout.readline, ''):
lineJSON = json.loads(line.decode("utf-8")) # process line-by-line
lineDict = dict(lineJSON)
listIAQ_Accuracy.append(int(lineDict['IAQ_Accuracy']))
listPressure.append(float(lineDict['Pressure']))
listGas.append(int(lineDict['Gas']))
listTemperature.append(float(lineDict['Temperature']))
listIAQ.append(float(lineDict['IAQ']))
listHumidity.append(float(lineDict['Humidity']))
listStatus.append(int(lineDict['Status']))
if len(listIAQ_Accuracy) == 20:
#generate the median for each value
IAQ_Accuracy = median(listIAQ_Accuracy)
Pressure = median(listPressure)
Gas = median(listGas)
Temperature = median(listTemperature)
IAQ = median(listIAQ)
Humidity = median(listHumidity)
Status = median(listStatus)
#clear lists
listIAQ_Accuracy.clear()
listPressure.clear()
listGas.clear()
listTemperature.clear()
listIAQ.clear()
listHumidity.clear()
listStatus.clear()
#Temperature Offset
Temperature = Temperature + 2
IAQ1 = round(IAQ,1)
Temperature1 = round(Temperature, 1)
Humidity1 = round(Humidity, 1)
Pressure1 = round(Pressure, 1)
data = pms5003.read()
if Humidity1 < 80:
CF = 1
else:
CF = (Humidity1/100)*1.3
PM1_0 = format(data.pm_ug_per_m3(1.0))
PM2_5 = format(data.pm_ug_per_m3(2.5))
PM10 = format(data.pm_ug_per_m3(10))
PM1_0 = round(int(PM1_0) / CF,)
PM2_5 = round((int(PM2_5)/CF/25) * 100,)
PM10 = round((int(PM10)/CF/50) * 100,)
now = datetime.now()
tPayload = "field1=" + str(Temperature1)+ "&field2=" + str(IAQ1)+ "&field3=" + str(Pressure1)+ "&field4=" + str(Humidity1)+ "&field5=" + str(PM1_0)+ "&field6=" + str(PM2_5)+ "&field7=" + str(PM10)
try:
print ("[INFO] Data prepared to be uploaded")
publish.single(topic, payload=tPayload, hostname=mqttHost, transport=tTransport, port=tPort, tls=tTLS, client_id=mqtt_client_ID, auth={'username':mqtt_username,'password':mqtt_password})
print ("[INFO] Data sent for 7 fields: ", Temperature1, IAQ1, Pressure1, Humidity1, PM1_0, PM2_5, PM10)
except (KeyboardInterrupt):
break
except:
print ("[INFO] Failure in sending data")
csv()