These are chat archives for esp8266/Arduino

5th
Jan 2016
Markus
@Links2004
Jan 05 2016 00:08
@brutzler the ESP needs up to 250mA
Martin Ayotte
@martinayotte
Jan 05 2016 00:11
@Links2004 , I think @brutzler is using the onboard LDO of his Voltage Level Shifter only for the module itself, I presume he still have some other regulator for ESP.
brutzler
@brutzler
Jan 05 2016 00:21
kicad.jpg
Yep
Martin Ayotte
@martinayotte
Jan 05 2016 00:23
@brutzler , BTW, I hope you also added some 47uF capacitor or even higher on the 3.3V side, ESP is hungry ;-)
brutzler
@brutzler
Jan 05 2016 00:25
sure?
Martin Ayotte
@martinayotte
Jan 05 2016 00:31
Yes, the 0.1uf are good for filtering noise, but ESP is producing some spike current consumption which need to be provided from some kind of power reservoir, a huige capacitor fill that need. On all of my module, I've added a 100uF. If you design SMT board, like @skorokithakis , I've suggested some ceramics such as http://www.ebay.ca/itm/50pcs-1206-CAPACITOR-47UF-476M-10V-20-SMT-SMD-CHIP-CAP-/221440283127
brutzler
@brutzler
Jan 05 2016 00:35
kicad.jpg
I use this module :-)
Think no need for more C
Martin Ayotte
@martinayotte
Jan 05 2016 00:38
I'm still convince that you should add some, but it is your choice, you can end-up having some spurious resets.
brutzler
@brutzler
Jan 05 2016 00:40
Just looking what Cs are on the PCB. the little one I suggest are 100n, but the two bigger I only can guess.
But I share your idea.
Looks like they are 10µ. Found some 47µ/6,3V. Looks like a new home for one of them :-)
Martin Ayotte
@martinayotte
Jan 05 2016 00:56
:-) anyway, having footprint on your PCB for those will always be good, even if you discover that they are not needed. Not having them will make you frustrated if you have to redo PCB.
not another ESP with AT firmware board I hope
Aditya Tannu
@AdySan
Jan 05 2016 01:32
I think http://noduino.org/ look like a better alternative for starters
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:05
hey guys, what drill should one use if they want a large (2mm) via?
i'm not quite clear on what the drill is :/
Harrison Mclean
@h4rm0n1c
Jan 05 2016 02:07
On Eagle I used 0.08661417 and got something just over 2mm
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:08
is that for the via diameter or the drill diameter?
i've specified 2mm as the via diameter, i'm just not sure what to use for drill
Harrison Mclean
@h4rm0n1c
Jan 05 2016 02:08
that's what I
used as the drill, as in, that'll give you a 2mm hole
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:09
hmm, if you want lots of current to go through the via, do you need to make the hole big, or the plated part around the hole?
i'm not exactly sure how vias are made
Harrison Mclean
@h4rm0n1c
Jan 05 2016 02:12
think of it as a cylinder going through the board, the larger the diameter, the more surface area the "walls" have, that gives you more conductor, and more current capacity.
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:12
oh, aha
so it's surface area
how is it made? is the hole drilled and then plated? or do they put a ring in the hole?
Harrison Mclean
@h4rm0n1c
Jan 05 2016 02:13
these days, I think it's a electrochemical plating process
some people do the ring thing for home production.
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:14
ah, right, then it's the size of the hole itself, to maximize surface area
Harrison Mclean
@h4rm0n1c
Jan 05 2016 02:14
yeah
Stavros Korokithakis
@skorokithakis
Jan 05 2016 02:14
because with the ring it would be the size of the "donut" around
i see, thanks
so i'll use 2/1.6 to get a big hole
Martin Ayotte
@martinayotte
Jan 05 2016 03:12
@skorokithakis , do you remember when I suggest you to make the power vias larger few days ago ? yes, that was the reason : small vias have less surface, therefore higher resistance. Our discussion was for ESP power, but I presume now it is for your LED strips, samething apply ...
Stavros Korokithakis
@skorokithakis
Jan 05 2016 03:16
@martinayotte yep, that's why i'm making these ones large, but i was wondering whether the drill dia should be as large as possible or as small as possible
so whether i need the hole to be large or the "ring" around the hole
Stavros Korokithakis
@skorokithakis
Jan 05 2016 03:22
Martin Ayotte
@martinayotte
Jan 05 2016 03:36
;-)
Harrison Mclean
@h4rm0n1c
Jan 05 2016 04:24
the ring around the hole helps the via bind to either side, in case you were wondering.
Martin Ayotte
@martinayotte
Jan 05 2016 04:44
Yes, that true ! if drill remove most the pad, since the pad has not much surface, it's resistance is much higher ... Big hole + Big pad !
Matt Kocaj
@cottsak
Jan 05 2016 07:36
can anyone help me out with the includes i might need?
but i don't know how to get access to that base64::encode() function
Mario Mikočević
@mozgy
Jan 05 2016 08:19
@cottsak #include <base64.h> works for me
Matt Kocaj
@cottsak
Jan 05 2016 08:20
thanks mate. i think what i really want to be using is HTTPClient
since it has http.setAuthorization("user", "password");
@mozgy do you happen to know if HTTPClient supports HTTPS ?
Matt Kocaj
@cottsak
Jan 05 2016 08:27
yeh thanks mate
FWeinb
@FWeinb
Jan 05 2016 11:50
@Links2004 #include <Hash.sh> can't be found in platformio for your WebSocket lib.
Markus
@Links2004
Jan 05 2016 11:51
@FWeinb Hash.h is in the Hash lib which is part of the core, have you included the Hash.h in your sketch?
https://github.com/esp8266/Arduino/tree/master/libraries/Hash/src
FWeinb
@FWeinb
Jan 05 2016 11:52
Thanks. That worked. I thought that platformio will resolve it.
FWeinb
@FWeinb
Jan 05 2016 12:28
Oh. sscanf isn't working for ESP8266?
Chris Elsworth
@celsworth
Jan 05 2016 12:58
I don't see it defined anywhere in the sdk, so I guess not.
no matching symbol in a compiled binary either
could just dump your own copy in though, looks like there's plenty of ones to copy on google
FWeinb
@FWeinb
Jan 05 2016 13:01
Yeah. Will do that. Thanks for verifying.
brutzler
@brutzler
Jan 05 2016 14:11
can I power a NodeMCU V1.0 directly with 3,3V. Or do I have to put 5,0V on Vin?
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:14
i'd guess you can, but it depends how it's wired
looks like the programmer wouldn't work, but i guess you wouldn't need it
Chris Elsworth
@celsworth
Jan 05 2016 14:21
I love it when PCBs arrive in the post :D
rev2 of my first board just turned up, some refinements and fixes for the first rev I made ;)
pretty quick too! ordered 18th December from seeedstudio
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:21
whaaat
really?
Chris Elsworth
@celsworth
Jan 05 2016 14:22
yeah :)
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:22
how long do things normally take to ship from china?
Chris Elsworth
@celsworth
Jan 05 2016 14:22
2 - 6 weeks
really does vary a lot
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:22
hmm
mine are one month, give or take two days
not much variance :smile:
how's the quality?
brutzler
@brutzler
Jan 05 2016 14:22
Think both is possible:
On VIN there is (schematic) VDDUSB then a diode (less 0,7V) then VDD5V to the LDO/IN. With POWEN the LDO gets working.
If i power with 3,3V on on of the pins (VDD3V3), then the LDO has no Enable. And connecting the USB-cable, LDO starts working.
Only if the power wiring of V0.9 is the same as V1.0.
Anybody seen a detailed schematic of 1.0?
Chris Elsworth
@celsworth
Jan 05 2016 14:22
better than the last ones :)
the last ones, the silk was a bit dodgy in some places, this time its perfect
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:23
ah, great
@brutzler they don't really have versions, it's different manufacturers
there are seven alternatives or something
Chris Elsworth
@celsworth
Jan 05 2016 14:24
IMG_1617 (1).jpg
I know the date says 16th but I always design and then sit on it for a day or two in case I think of anything ;)
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:26
haha, i do the same
and i always think of something :smile:
looks great
Chris Elsworth
@celsworth
Jan 05 2016 14:26
thats 0.3mm traces for power, 0.1 for data, I think
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:27
looks like a 0.5mm trace to me :P
Chris Elsworth
@celsworth
Jan 05 2016 14:27
hm, now I'd better check :)
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:27
(i'm an expert now)
Chris Elsworth
@celsworth
Jan 05 2016 14:28
ok, 0.032mm
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:28
damn!
i realized yesterday i didn't break out the 3.3V output from the VCC for my breakout board :(
such a sad day
Chris Elsworth
@celsworth
Jan 05 2016 14:28
already sent to manufacturing?
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:28
yeah, a week ago
although it's hard to break out one pin, i wouldn't have anything to pair it with
i could duplicate ground on the other side, i guess
brutzler
@brutzler
Jan 05 2016 14:29
Does anybody know how to open SchDoc-Files?
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:29
@brutzler not me, i'm afraid
Mario Mikočević
@mozgy
Jan 05 2016 14:35
nice work @celsworth
Chris Elsworth
@celsworth
Jan 05 2016 14:35
thanks :)
Mario Mikočević
@mozgy
Jan 05 2016 14:35
one advice if I may
Chris Elsworth
@celsworth
Jan 05 2016 14:35
sure
Mario Mikočević
@mozgy
Jan 05 2016 14:36
draw outlines with round corners and put it in layer 20
Chris Elsworth
@celsworth
Jan 05 2016 14:36
round corners?
Mario Mikočević
@mozgy
Jan 05 2016 14:37
yep, pcb is a LOT nicer to work with then
Chris Elsworth
@celsworth
Jan 05 2016 14:37
oh the actual pcb edge being rounded?
Mario Mikočević
@mozgy
Jan 05 2016 14:37
yes
Chris Elsworth
@celsworth
Jan 05 2016 14:38
ok, will try that next time :)
so far I just kept the outline that was there by default (resized it)
don't think I know how to do rounded corners but I'll have a play
Mario Mikočević
@mozgy
Jan 05 2016 14:38
you can draw poly or whatever in layer 20
Chris Elsworth
@celsworth
Jan 05 2016 14:39
ah "draw an arc" :)
Mario Mikočević
@mozgy
Jan 05 2016 14:39
or even a big hole in pcb too
or daisy pattern :D
Chris Elsworth
@celsworth
Jan 05 2016 14:41
big hole in pcb? what for?
Mario Mikočević
@mozgy
Jan 05 2016 14:41
it's unbelievable how nicer is to work with pcb with rounded corners
Chris Elsworth
@celsworth
Jan 05 2016 14:41
yeah I had noticed taht a few sparkfun boards did that
but it didn't really register why ;)
Mario Mikočević
@mozgy
Jan 05 2016 14:41
for whatever you need it
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:46
wait, why is it better?
Chris Elsworth
@celsworth
Jan 05 2016 14:47
the immediate benefit I'm seeing is you don't stab yourself with the corners :D
they are remarkably sharp
Stavros Korokithakis
@skorokithakis
Jan 05 2016 14:47
oh hmm
interesting
i'll do that too, thanks
Chris Elsworth
@celsworth
Jan 05 2016 14:48
and I'm also wondering if it gives you a bit more flexibility with cases.. a lot of cases have those screws in the corner
just got a W5100 breakout board to try and use with an 8266.. needs 5V in though, but that just goes directly to an AMS1117 so I guess I can just bypass that.. run the entire thing on 3.3v
Martin Ayotte
@martinayotte
Jan 05 2016 14:51
@brutzler , although I've never try it, there is an Altium SchDoc on-line converter here : https://schematics.io/
import this into layer 20
Chris Elsworth
@celsworth
Jan 05 2016 14:54
hm, can eagle open that
Mario Mikočević
@mozgy
Jan 05 2016 14:54
definately :)
Chris Elsworth
@celsworth
Jan 05 2016 14:54
ok, trying to see how to import :)
got it
oh nice :D
thanks :)
Mario Mikočević
@mozgy
Jan 05 2016 14:56
just remember that it is for layer 20
Chris Elsworth
@celsworth
Jan 05 2016 14:56
yep
brutzler
@brutzler
Jan 05 2016 14:57
@martinayotte ..thx, but found a pdf in the depths of www
Mario Mikočević
@mozgy
Jan 05 2016 14:57
aaaaaand, remember to pick metric instead of imperial
Chris Elsworth
@celsworth
Jan 05 2016 14:58
I've been wondering about that.. do you always work in metric for everything on a pcb?
some components seem easier in imperial.. like 0.1" headers for instance
Mario Mikočević
@mozgy
Jan 05 2016 14:58
well I made that dxf in metric
pcb has interesting shape
FWeinb
@FWeinb
Jan 05 2016 15:04
@Links2004 Thanks for your work on the WebSocket Lib! It is fast as hell. Transferring an array of 1024 uint8_t and drawing it to an OLED is taking less then 500ms.
Stavros Korokithakis
@skorokithakis
Jan 05 2016 15:04
@celsworth i design using imperial when i want it to fit on a breadboard
but i place the headers in imperial and the rest in metric
Chris Elsworth
@celsworth
Jan 05 2016 15:08
I guess with a 0.01mm grid you can work with DIP packages and so on fairly easily
2.54mm aren't they
don't know what SOIC is offhand
Stavros Korokithakis
@skorokithakis
Jan 05 2016 15:17
yeah, you can, i just prefer setting it to 0.1 inch or whatever and moving the header 8 pins over
and switching to metric
it means things don't line up properly, though
Steve Nelson
@zenmanenergy
Jan 05 2016 20:18

I haven’t seen this problem in a while, but I just flashed a new esp01 and when I called:

WiFi.mode(WIFI_AP_STA);
WiFi.softAP(deviceName.c_str(),devicePassword.c_str());

it’s not changing the access point name. On my mac it displays “AI-THINKER-F4505E”

i can connect to it just fine, but the value I have set in the string deviceName is not displayed.
Markus
@Links2004
Jan 05 2016 20:27
@zenmanenergy how long is your password ( it needs min 8 )?
Mario Mikočević
@mozgy
Jan 05 2016 20:37
anyone have an example how to send picture from ESP8266WebServer ?
Steve Nelson
@zenmanenergy
Jan 05 2016 20:37
that’s it. thanks @Links2004
Aditya Tannu
@AdySan
Jan 05 2016 20:41
@mozgy picture stored on the SPIFFS?
Mario Mikočević
@mozgy
Jan 05 2016 20:43
@AdySan that works, I'm missing something when I do the steps inline
Aditya Tannu
@AdySan
Jan 05 2016 20:44
oh, so something in memory, I guess from your ArduCam
Mario Mikočević
@mozgy
Jan 05 2016 20:44
yep
Aditya Tannu
@AdySan
Jan 05 2016 20:44
didnt they have an example online for ESP, you checked that right?
oh so they send it over a websocket
Mario Mikočević
@mozgy
Jan 05 2016 20:46
@AdySan websocket also works ..
just missing something when I create picture completely inline ..
Me No Dev
@me-no-dev
Jan 05 2016 20:48
inline?
like point to /shot.jpg an see the image?
Mario Mikočević
@mozgy
Jan 05 2016 20:48
@me-no-dev exactly
Me No Dev
@me-no-dev
Jan 05 2016 20:49
have you set proper content-type and length?
Mario Mikočević
@mozgy
Jan 05 2016 20:49
thats the thing, at the start of the picture I do not know the length
Me No Dev
@me-no-dev
Jan 05 2016 20:50
well.. :(
still doable but the server will hang while waiting to disconnect
what do you know about the picture?
Mario Mikočević
@mozgy
Jan 05 2016 20:51
jpeg
but per docs CONTENT_LENGTH_UNKNOWN should work
apparently I'm atm too dumb to construct it whole
Me No Dev
@me-no-dev
Jan 05 2016 20:52
what does the browser get when you try now?
you should see the picture regardless of content lengtht as long as it's not set to 0
Mario Mikočević
@mozgy
Jan 05 2016 20:53
no -> cannot be displayed because it contains errors ..
tcpdump shows no data even sent
Me No Dev
@me-no-dev
Jan 05 2016 20:54
is there a content length in the response from the server?
Mario Mikočević
@mozgy
Jan 05 2016 20:55
@me-no-dev I am constructing server response :)
Me No Dev
@me-no-dev
Jan 05 2016 20:55
what if the server added the header on the way out?
either the browser is closing the cnnection because you sent "Content-Length: 0"
Mario Mikočević
@mozgy
Jan 05 2016 20:56
I didnt
Me No Dev
@me-no-dev
Jan 05 2016 20:56
you should see some data then
broken even, but some
Mario Mikočević
@mozgy
Jan 05 2016 20:57
ok, pseudo code ->
httpServer.sendHeader( "Connection", "close" );
httpServer.send( 200, "image/jpeg", "" );
httpServer.client().write( jpegData );
httpServer.client().stop();
what is missing ? "\r\n" ?
wrong order ?
Me No Dev
@me-no-dev
Jan 05 2016 20:58
let me look at the server source
what version of the SDK are you running?
esp8266/Arduino#1362
this seems to be related to what you ask
you are actually sending ContentLength 0
Mario Mikočević
@mozgy
Jan 05 2016 21:01
1.6.7 w/ latest git
Me No Dev
@me-no-dev
Jan 05 2016 21:01
so the browser is closing the connection
this is not merged yet
void ESP8266WebServer::send(int code, const char* content_type, const String& content) {
    String header;
    _prepareHeader(header, code, content_type, content.length());
    sendContent(header);

    sendContent(content);
}
oh wait
it's not
nevermind
then again... it is
Mario Mikočević
@mozgy
Jan 05 2016 21:02
lost you :)
Me No Dev
@me-no-dev
Jan 05 2016 21:02
if (_contentLength != CONTENT_LENGTH_UNKNOWN && _contentLength != CONTENT_LENGTH_NOT_SET) {
        sendHeader("Content-Length", String(_contentLength));
    }
    else if (contentLength > 0){
        sendHeader("Content-Length", String(contentLength));
    }
you endup in the first if
because 0 != -2 and 0 != -1
so the server sends Content-Length: 0
Mario Mikočević
@mozgy
Jan 05 2016 21:05
but then, I saw tcpdump data when httpServer.streamFile( file, contentType ); , no content length sent either
and picture is displayed fine
Me No Dev
@me-no-dev
Jan 05 2016 21:05
that should not be the case at all
Mario Mikočević
@mozgy
Jan 05 2016 21:05
so, I am doing something wrong
Me No Dev
@me-no-dev
Jan 05 2016 21:05
maybe you look at the wrong tcpdump packets?
Mario Mikočević
@mozgy
Jan 05 2016 21:10
where is httpServer.client() part constructed in source ?
Me No Dev
@me-no-dev
Jan 05 2016 21:10
that client is WiFiClient
Mario Mikočević
@mozgy
Jan 05 2016 21:12
anything special I need to do there ?
Steve Nelson
@zenmanenergy
Jan 05 2016 21:39
Are there docs available for the new “debug port” in v2.1.0?
Erik Moqvist
@eerimoq
Jan 05 2016 22:42
Has anyone used the Espressif RTOS SDK (https://github.com/espressif/ESP8266_RTOS_SDK)? I have a simple application that sets GPIO2 to high, and it works. But roughly every 8 seconds a reset occurs. The blink application in Arduino IDE works flawlessly, no reset at all. So the hardware is okay. It's something with the software. libhal was missing in the SDK on github, so I copied the one from the Arduino github repo. Might be incompabilities. Or is there some initialization that has to be done when the application starts?
Mario Mikočević
@mozgy
Jan 05 2016 22:56
@me-no-dev found the problem
httpServer.client().write( jpegData ); works albeit awfuly slow (1 byte TCP)
httpServer.client().write( streamBuffer, 1024 ); does not
Martin Ayotte
@martinayotte
Jan 05 2016 22:58
@mozgy , so, back to SquareOne ?
Mario Mikočević
@mozgy
Jan 05 2016 22:58
not really, need to figure out that WiFiClient.write overloaded params
for PIC coder c++ is still full of misteries :)
Markus
@Links2004
Jan 05 2016 23:13
@zenmanenergy most info are here: #1350 will create some stuff for the docs this week