Pixl.js with Wifi (ESP8266 ESP01s) - SOLVED #3211
Replies: 59 comments
-
Posted at 2019-12-02 by Robin Sun 2019.12.01 Hi @damianmontero, quite an interesting upgrade. Has the code block at https://nodeconfeubadge.org/ been attempted, and what is the WebIDE output? (which console.log() statements are viewable?) Please post. What version of Espruino is flashed?
While soldering may take a bit of a knack to get the hang of, I do notice that there are three pins where solder doesn't appear to flow on to the circuit board pads. Round blobs usually indicate that the pin did not get sufficient heat in order for the solder to flow. Is the solder rosin core? What dia solder? What wattage is the iron. A narrow enough tip? It appears to me that the solder doesn't have internal rosin/flux to properly allow the solder to flow, or sufficient (max one second contact though) heat. (not shiny) The first fifteen seconds of this video (not mine) does show proper technique and how solder should flow. Embarrassing as it may seem, pics of the tools, iron tip and solder may provide some clues. Don't fuss, we've all had to start somewhere, and I still remember my first attempts fifty years ago working on my Electronics merit badge. ;-) While we aren't at the re-solder point just yet, it is an area to consider. I'd run some code first to validate if comm has been established with the 8266 first/easiest. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by @allObjects documentation mentions something about a mirroring error when making the PCB... from the changed soldering on the bottom of ESP8266 ESP-01 it looks like that you took care of that mirroring mistake - did you? No offense, but the soldering points look a bit messed... It is difficult to take headers of because heating all the pins at the same time is quite a challenge. Therefore, I usually pray the plastic of the header off of the pins and then take off pin by pin. Risking a damaged PCB header isn't worth saving the header. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by Robin
As I read that pp., the mirroring was taken care of as the 8266 isn't covering the front of the display as explained by G in the video. (otherwise the 8266 header pins would be pointing downward) I believe Damian is in EST, so probably wont get a response until tomorrow. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by @gfwilliams Hi @damianmontero, Sorry, but it looks like you may have fallen foul of out of date documentation on the net that I don't have control of :( http://www.espruino.com/Pixl.js+Multicolour#esp8266-wiring says:
Basically it was a mistake on the original board design, which I then fixed. I'll update the video and put a big note on the store page. What I'd suggest is that you sacrifice the ESP8266 module and cut the pins in half, which should then make it easier to get them out of the badge without damaging it - and then it should be way easier to insert a new ESP8266 as you can just poke it straight into the holes without messing with the pins. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by DamianMontero Hey @gfwilliams as @robin the mirroring was taken care of. Robin you're right: the soldering is a botch job. But It looks alright to me. I can go over it again so they look more like the connections to the Pixl.js (which I hope you agree are fine) but could this really be the issue. QUESTION: I put my multi meter and connect to what should be the ESP8266 Ground and Vcc and when the Pixl.js is on I measure 0.5 volts. AM I USING MY MULTIMETER RIGHT? Is the pixl.js maybe not sending the right voltage? @gfwilliams THAT was kind of the question I had for you. Should it be working. Not the mirror thing. I ordered a ESP8266 and Badge specifically because of that video because I saw a million possibility in this beauty of a board. I'm trying to figure out. Did I kill the Pixl.js (it seems to be working perfectly. Those are the questions I'm looking to answer. also of course the "What did I do wrong?" one |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by @gfwilliams
No - the ESP8266 is the wrong way around (as described above). I don't believe you would have killed the Pixl but you may have damaged the ESP8266, so for the $3 or so one costs, I'd recommend removing it and adding a new one (the correct way around - so no need to move the pins) and then it'll look nicer too. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by DamianMontero Please excuse me @gordon. But you can see the back of the esp8266 if it was the "wrong way around" you'd see the chips (see image below) I'll be glad to order 10 of these Until I get it right. But I wanted to have it ready for the big convention down here in south USA cause this is the best badge in the world! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by @gfwilliams
Yes, the issue is that on the Nodeconf EU 2018 badge I made a mistake, and you had to do that nasty hack with the ESP8266 that you saw in the video - pulling the pins out and turning it around. In later badges that I made I fixed that mistake so you could just push the ESP8266 in without messing with the pins (as in the image below). It's documented in http://www.espruino.com/Pixl.js+Multicolour#esp8266-wiring but obviously the video was already made so I can't change that, nor can I change the Nodeconf documentationAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by DamianMontero DAMN! DAMN DAMN! I guess my problem is fixed and my Pixl.js badge hopefully will survive the new surgery |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-03 by Robin Mon 2019.12.02
We'll I'll be . . . never did it occur to me, that a board revision had taken place! (re #5 #9) @damianmontero we should all learn from this. Undertaking projects from other sites may have a bit of risk of success, and as Gordon points out, we then have no control over the documentation written by others. It's unfortunate that the revisions hadn't changed on the Espruino web site yet, but with the current Bangle.js Kickstater in full motion probably delayed the updates timely. > 'when the Pixl.js is on I measure 0.5 volts. AM I USING MY MULTIMETER RIGHT?' Does this now need more explanation? As the chip wasn't wired to VCC correctly (not your direct doing/intention) unpredictable results, the 0.5V was likely residual voltage over several internal parallel transistor/diode junctions and close to the 0.7V we might expect. (can add more if needed) > 'and my Pixl.js badge hopefully will survive the new surgery' Are you in need of tips/suggestions for part extraction in order to alleviate the least amount of possible damage to the traces on the Pixl? (not sure of level of de-soldering expertise) With regard to the future Pixl, had it been considered to solder in a female socket, or female header strips, such that the 8266 could be just pressed in? Taking a quick glance, attempting to take into account the previous layout pins configuration along with being upside down, It is quite possible that both chips/boards survived. Just depends on how much time/effort as an offset to cost to make them 'behave into functionality' again. Concentrate on not applying too much heat to the copper traces on the Pixl, as Gordon points out is the most precious board to protect at this point. Pins and time to de-solder are inexpensive at this point and are part of the *(?fun? of learning)* experience on the road to expertise. If done delicately, you may find the 8266 survived. Wouldn't that be a hoot! Be patient. Take your time. Should you desire tips, I could compile a list. . . . |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-03 by DamianMontero I'm not worried about the 8266 but because the LCD ribbon is so close and it's two rows I'm going to have a hard time desodering. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-04 by Robin Tue 2019.12.03
I've not played with the Nodeconf badge, but I do notice in the image above, the ribbon cable is close indeed. Is there enough room to place a thin letter opener, a steel rule or maybe some folded tin foil or cereal box top to act as a heat barrier? > 'Just wished I had not made this kind of mistake.' You are not the fault here, so you didn't make a mistake. As I see it, you followed the instructions to the letter, as defined for that author's project at that time. Commend yourself. Who would have thought a conference badge with limited production run, would have had a revision change. I read that article and would have performed the same ritual and be typing out the same forum entry here. My openning #11 comment shows my surprise also. Doubt that I would have even checked the artwork for the trace layout, if that even exists. While it is an unfortunate circumstance, no words can substitute for the frustration I'm sure you are facing. Would it be more appropriate to state that 'Just wished this sequence of events hadn't happened to me?' or 'Just wished I wasn't in this unfortunate learning experience?' |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-04 by DamianMontero The patient survived the surgery. Of course I cut the ESP8266 out with a cutter and then did a lot of desoldering work to remove the pins. Luckily the NodeConference badge survived and thanks to amazon a new ESP01S is attached to the back. and it worked on the first try. @gfwilliams I'm using the "ESP8266WiFi_0v25" module as the documentation suggets. I don't think the Wifi module worked (but I don't remember if I tried or if it was with last very which had it plugged in wrong anyways) the "ESP8266WiFi_0v25" module doesn't seem to be happy hitting an HTTPS endpoint which I believe the EspruinoWifi can just fine. Is it the Module I'm using? I'll publish my code here and on github the second we sold the HTTPS part because to get HTTP I simply go through a personal host that I'm not confortable sharing with the world and having 30,000 of you hit it all at once. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-04 by @gfwilliams Nice! Looks like it survived pretty well! I'm afraid HTTPS isn't going to work though. On Espruino WiFi it's done on the microcontroller itself (not the ESP8266), but that has 128kB of RAM. The Pixl just doesn't have enough RAM free for the requires buffers for TLS :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-04 by DamianMontero I was just asking to make sure I wasn't missing anything. The NodeBadge is a Espruino you should keep in your line up. It is by far my favorite Espruino board. It's VERY "new developer" friendly and easy to carry around without looking like you have a bomb strapped to your body. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-12 by @gfwilliams
Is there not a red light on the ESP8266? It might be that the 3.3v rail for the ESP8266 got damaged. You could try wiring it in manually - maybe the easiest is to go across to the 3.3v on the DBG header. Also, great news about the dev camp - hope it goes well! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-12 by DamianMontero Mine has blue lights. ok. so you think I should botch a wire from the top 3.3v and ground down to the esp8266's 3.3v and ground. I was thinking that of that and was trying to hold wires (but I only have two hands so I don't think I got it working. As for the dev camp. It's in Feb and I'll make sure to post videos and photos on youtube and here for anyone interested. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-13 by Robin Thr 2019.12.12 I have been secretly hoping someone that has performed this upgrade would have piped in by now.
If the iron was only in contact a second or two, I highly doubt it. As there is at least the blink of an LED, then the board seems to want to run. Damian, how long in seconds is this duration. To the others, what are the chances the 8266 hardware watchdog is resetting? For clarification, when the lot goes dead, as Gordon requested, does the Pixl attempt to reboot, or are we completely dead at that point? (I think the answer is YES as zero volts was measured with no additional comment - meaning no reboot) Damian do you have access to a regulated (bench supply) power supply? . . . . or, . . . do you have access to discreet parts such as voltage regulators and caps? Do you know anyone nearby or have access to students at an Electronics Tech school that have substantial troubleshooting skills? It could be that we are dealing with two issues. My biggest worry is the article that @allObjects posted in #26 with the 8266 requiring over the 250ma limit, even with caps, if only for the 40msec interval. Before doing the following, I'd get confirmation from others first I've not played with either but, if these were my boards, I'd try running off a bench supply to rule out battery/connector issues. Then if continuing, sacrifice a copper run adjacent to the power pin on the 8266 or pull/desolder the power pin to isolate power. Leave the grounds in place. Then run the 8266 off a separate supply so as not to affect the Pixl. The 8266 would then draw as much current as necessary without worrying about the Pixl. One final thought would be to post some super close up shots of the header to see if any of us are able to observe something out of the ordinary. We only have the underside in #14 post but that appears good, so the assumption is the flip side is okay too. Worst case - both boards are dead - not likely as it was indicated it worked for one evening Salvage case - cut out the 8266 and have a working NodeConf badge - chalk it up to an unresolved education Hopeful case - continue until the culprit is revealed I'll continue to hang in there until no other options reveal themselves or time/cost starts to bleed us both. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-14 by Robin Fri 2019.12.13 Well, this has been buggin' me all day. Until Damian responds. . . . Making an assumption that the power on cycle until shut down is around two seconds, it would not be possible to attempt the suggestion I outlined in #42 post. 'without any code running reset(1); save();' In this particular situation, the Pixl is never alive long enough to attach to and replace the existing code that was previously saved. As the parts are still attached as when they first ran a week ago, the board pair ran for a full day, Before any further hardware mods are made, it is time to look at the EXACT COMPLETE SORUCE that was last uploaded, unedited (exception - overwrite p/w with 'x''s). As a suggestion I made a while back indicated that the init mechanism wasn't properly being called before the save, it is quite possible that the 8266 never gets the proper start up code or is stuck in a setInterval() that never exits. Should WiFi be turned on continuously, (more than 50msec) the regulator will never keep up. Proving this however will mean having to separate the 8266 from the Pixl, either by cutting the trace or removing the board. Then after the Pixl boots, use reset and save to start with a cleared memory. Then apply a solder dob across the cut trace to re-apply power to the 8266. Reboot and see if both stay active with absolutely no code running. The simplest next step is to first revisit the code. (and as it is Friday the 13th) @damianmontero, please post the entire file. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-15 by DamianMontero AHHHHHH!!!! OF COURSE UNTIL THE NEXT Day (actually until the next Save() but I don't think that's a factor) It's dead now I've bought 3 more ESP-01s (the ESP8266 modules for this) and I'll buy another badge and solder in some headers instead. I don't want to damage the Pixljs again. @gfwilliams is there pins equal to all the required ones in the footer for me to cut the existing ESP module and try on another pins at the top? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-15 by DamianMontero @robin. the code is the exact same from the example: http://www.espruino.com/Pixl.js+Multicolour#esp8266-wiring and doesn't change from working to not working. NOTICE that the lights SEEM to be on. and I have a feeling that when I get home I'll measure that drop that you DON'T see in the youtube now. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-15 by Robin Sun 2019.12.15 Thanks for taking the time to shoot the vids @damianmontero. That will assist others. I don't have those boards, but I believe the issue is that there isn't any start up code available once the save() command is issued. That, or as I hinted to in posts #42,#48,#49 that a race condition exists between the Pixl and 8266 initializing at different intervals. Maybe a Pixl data line is in the wrong state or delayed too long, or something of the sort. As it appears editing the code has been successful, in order to 'save()' again, if that state can be gotten into again, I'd try the following: Here is a snippet I use. Would be interesting to see if after a save and restart, if both boards remain active. Will have to wrap the Place this as the very last section. example
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-15 by @allObjects @damianmontero, are you sure that the pins of the ESP8266 are held at required state on start up? ...that could explain that it worked while measuring... Check description which pins have to be held high or low so that ESP8266 does get into runtime mode. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-16 by DamianMontero @robin. I've tried something similar in that I put the intial call on a timeout of 5 seconds and it didn't help. plus I'm just wondering why it'll sometimes work (after a couple of days of not working) but only in debug mode. again. it's no consitant. It's not a save or a reboot or code that changes it. It's just waiting. @allObjects I think you're talking about the same thing that robin is talking about. Having the system wait a while and then call the request. I have the system poll the price ever 5 minutes. I tried that every 2 minutes and waited (the 2 minutes) and the second call failed just line the first on the initial bootup. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-16 by Robin
The E.on('init' runs after all the code is uploaded.
Effectively yes, but with what ever values would work with the boards you have. Without calls to your code being inside an init function, the demo code you are woking from is attempting to setup the WiFi module at the same time that code is being uploaded through the WebIDE. After save() and no WebIDE, nothing is properly initialized as the init() function fires. That said, the following trio are more likely the culprit:
Yes, we are also!!
Am I to take this to mean when running within the WebIDE?
From that reply, I have to make the assumption that the polling process is actually more code that was added to the 'exact code' that was implied in post #51? Which means as @allObjects suggested a week ago, that something in the http request section is locking up? Looking for that post reference. . . .
Could it be that the WebIDE Chrome Window (browser) is actually assisting in keeping the connection alive. Then after a few days of off time, all http (or WiFi) stuff is effectively re-init'd?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-16 by @allObjects no offense, but Espruino is never about waiting... no wait what ever configured will be right. In Espruino things are event driven, and at worst timer-event driven to poll / check (for) something. Depending your power situation and the given 5 minutes, it could well be that during the inactivity you completely disconnect from WiFi after completing the poll activity (get price), and a bit less than 5 minutes later you start all over with 1st powering the WiFi (module), then connect to the module, then connect to WiFi, and then make the request. To make sure and support retries of poll activity is successful, you start a smart - learning - timeout that triggers a retry before 5 minutes. This timeout is cleared as soon as the poll activity completes. The smartness would try to adjust - in an range of absolute min-max range to the sweet spot or range where you get 90% success rate. You also begin to built a FIFO w/ statistic data to mark the time (1st to 296 (12*24) 5-min-events per day with 0..255 two-second units of completion time... - that costs you only about 600 bytes. You can even show a graph of successes - dot or no dot (or even time (w/ shorter or longer vertical line of one to n dots). Over time you may then notice about the average connect/execute time at times of the day. I'm sure there is variations. To start from scratch with building up connectivity and tearing it down after completion, you save the code in disconnected, nothing active state, not even with a timeout running. All your activities are in (nested) functions that you call with the top-level function in onInit() with an interval... or better - timeout. The timeout time is calculated from the current time and the next 5 minute time point of the day. You do that to allow dynamics that come with retries,... and are needed for building statistics ( where you know when the last success was and how long it took. In other words there is also as 5 minute interval set to update the statistics. This update is independent of the rhythm of the poll activity. The statistics taking on 5 minute interval just pushes / places the last time of day with completion time into the FIFO / ring buffer since last taking the statistics. While you develop, you monitor with the IDE connected over BLE. Take a look at @jumjum's testing feature (enable it in Espruino Web IDE settings). It can draw you - in your IDE - multi line graphs and even write logs to file. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-16 by @gfwilliams Just to add you're fine to use either of the 2 headers. Both have 3.3v and GND, and you can configure the UART on whatever pins you want. Potentially you don't even have to unsolder the existing Module and could just try another on the other pins as well. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-17 by DamianMontero @gfwilliams I'll try that tonight. just got the headers to solder in. QUESTION: is the pins in the bottom also repeated anywhere else in the board. I then can bodge some wires to see if it's a hardware issue. I keep insisting it's hardware because it changes even when the code doesn't. I've ordered another pixl badge and I'll also try this same code with the EspruinoWifi and the LCD board I made the driver for previously. But it's a different library. but we'll prove I guess that the code isn't an issue. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-17 by @gfwilliams
Unfortunately not (apart from on the MDBT42 module itself) - however on nRF52 basically any pin can be made to do anything, so part from losing some IO you won't have lost any functionality. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-17 by DamianMontero Thank you Gordon; That means I'll put the headers then put another module and pins to do the work to figure out the issue. I'm guessing it's me having killed the pads on the pixl.js bottom pins and for the next one I WILL put in headers so I can put in any module and throw out any bad ones. This is one of the best IoT products ever and I just LOVE to have this on my neck! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-02 by DamianMontero
Hey @gfwilliams
EDIT: My problem was fixed by Gordon on the post below:
I just followed your AMAZING instruction to add wifi to the amazing Pixl.js (in badge from from your store)
Store link: https://shop.espruino.com/pixljs-multicolour?search=badge
Video here: https://www.youtube.com/watch?v=txZr2GhuoaI
(see soldering below) and I followed the wifi section in the badge page:
https://nodeconfeubadge.org/
Checking sure my Wifi name and password is correctly but I"m getting an error of:
'''
Uncaught no 'ready' after AT+RST
'''
The device works perfectly just like before (as far as the screen and all lights) but I have no wifi.
Could I have killed the ESP8266 or is there something else I'm missing?
Beta Was this translation helpful? Give feedback.
All reactions