I have a bunch of arduino nano's, bunch of nodemcu v1.0, bunch of ESP01s and a few tb6560. All great components except I can't find the combination that will fit together for my project.
I am creating a curtain opener using 3A motors and hence the tb6560. I can get it to work with 5V arduino nano with no problems, except that I need wifi to control it from my phone. The nodemcu is a great device that I love using with my other projects, but it is 3V3. I tried using the ESP01 to add wireless functionality to my nano, but I have lots of issues compiling the code. I searched for the error that I am getting and all I found is people being discouraged from using the ESP01. I was going to use it with AT commands (which I used to do before the nodemcu), but the code will become very messy especially when I try to use it as a server.
What should I do? I'd really like to use what I have rather than having to buy new components. Can I get the nodemcu to work with tb6560? Would a voltage level converter work?
To me not finding any articles about this combination is kind of an indication that it may not work, after all all those components are popular.
I also thought of combining both boards, but I feel it's a waste because both are very powerful boards on their own with a lot of GPIOs between them.
I see that there are many different TB6560 boards.
And that most of them use opto isolation isolation on the input.
Opto current for 5volt logic is set by a fixed (330 ohm) resistor on the board I looked at,
and the datasheet shows a table how to add different resistor values for 12volt logic and 24volt logic.
The added resistor for 24volt logic calculates to a LED current of ~7.5mA.
Opto LED current with the standard onboard CL resistor, and driven by 3.3volt logic, calculates to ~6.3mA.
Not much difference.
I would try to drive the module from 3.3volt logic (the NodeMCU directly).
Post a link to the board you have to make sure.
Please see below. I love that board. It drives the motor with no heat at all.
The opto diagram in the attached .pdf looks exactly like others I've seen.
Thanks. I figured it out. The problem was when switching between Arduinos and nodemcu I always forget to put a D in front of the pin and I keep going for days trying to figure out why the voltage doesn't change when I set the output to high. Anyway, all good now. Thanks for your help.
I'd like to do some conditional compilation, but not sure how to find the code for nodemcu. So far nano and nodemcu are my favorite boards. I need something like what is below.
The sketch below produces inaccurate results.