Does blynk cause some pulses to wemos d1 mini port D2?

Yes but I’m wondering if a temporary fix is to disable Blynk.run after sending the signal via the internet but before stepping the motor. It might not be possible to do this but without knowing precisely what the motor does it’s impossible to be sure.

Because I want to change the frequency at any time I do not believe that I can switch of blynk.run

You would be turning Blynk.run() back on once the step has completed. All very quickly but maybe not quick enough for your project.

Perhaps set an indefinite hearbeat Expected Data usage for Hardware connection 'heartbeat' to blynk server?

1 Like

@vshymanskyy
@Dmitriy
Dear Sirs, could you please give some advice?
What I know up to now is that there is an effect caused by blynk
I assume that the blynk heartbeat will modified the timer.setInterval
By that the timing of my ISR is disturbed and this causes the false pulses.

BUT
I do not find any work around to get a stable timing for my ISR

Relax…

The developers had already been notified (and where probably already aware of this topic), but it is a weekend and they are already very busy… And the answer may simply be something like “that’s the nature of the hardware timers”, as a simple Google search can find many issues making a smooth and non-blocking stepper driver out of an Arduino/ESP (and thats without running something complex like Blynk in the background).

And even if there is a “fix” it could take days/week/months, etc. as honestly, I don’t see super precision steppers as being very high on the overall IOT list of things to control… Have a CNC or 3D printer but want to control it from across the parking lot or the world… DON’T install Blynk on the main controlling MCU, rather find a way of interfacing with the controls…

Which leads to this suggestion… you might want to look at workarounds involving dedicated MCU controller(s) for your steppers. It is not uncommon to have multiple Arduinos all linked via serial, I2C, etc. to a master (one running Blynk in this case)… thus allowing for the need of dedicated processing power, I/O and speed.

2 Likes

Hi All

The following excellent video on ESP8266 and weird behaviour especially for GPIO2; might shed some light.

GOTO 19 mins into video where GPIO2 weird issues is discussed : https://www.youtube.com/watch?v=AMMOrwqSPwY

4 Likes

@Brummer are you sure your oscilloscope readings match to the default Blynk 10 second heartbeat?

I was just thinking from the video link provided by @mars that you might want to try switching from D0 (GPIO 16 special reset pin) to a regular pin like D1 / D2 (GPIO 5 /4).

Wasn’t the OP using D2 at the beginning (with scoped readings), before switching to D0? Or are you saying switch back to D2 and recheck the scope for any changes?

1 Like

@Gunner yes you are right I was just looking at one of the more recent sketches, so perhaps the reset pin D0 / GPIO 0 is not the specific issue. Nonetheless I would always try to use regular pins rather than the special pins.

@mars,
thank you very much for this interesting link.

@Costas,
I changed the port but got the same issue
and yes as far I can compare the debug output with my scope the effect is synchron to the heartbeat.
I assume that the heartbeat will have an effect to the timer routine so it stops for several msec and then there are some extra pulses…
For my opinion it is a bug.

@Gunner,
thank you for your advices, and yes you are right I´m now thinking about if it was a good idea to use the D1 mini together with blynk for my project.
BUT I love blynk and this great forum.
Also I like the D1 mini
I do not have so much programming experience and it is hard to figure out what is going on within the deepness of blynk
So I hope someone will find a fix for this Issue