SHC CONNECTION WARNING WITH WeMos R32 with CNC V3 Shield #wemos #esp32


Matteo Mantovani
 

Hello everybody,
I have some problem using SHC keypad with a WeMos R32 with CNC V3 Shield.

I followed the instructions at the following link:
https://baheyeldin.com/astronomy/onstep-esp32-smart-hand-controller-shc.html

For the PCB I used Roman Hujer's modified PCB version which has normal axial resistros.

When I turn on the display it shows "Estabilishing Connection" but after a few seconds appears "Connection Warning!"

what's the problem?
Do I need to set something inside Config.h?

If I use the SHC as a BHC through the "Diagnostics Sketch" code created by Dave Schwartz:
https://onstep.groups.io/g/main/files/Documents%20and%20Guides/OnStep%20ESP32S%20SHC%20Assembly%20Instructions.pdf
everything works!

Sorry for the question but I honestly don't understand how work the communication between wemos and the SHC ?

Should I set something in the Config.h file of the SmartHandController.ino code?

thank you so much

Matteo


Chad Gray
 

I have had this with the coiled up cords between SHC and OnStep.  Try a simple straight 6 pin RJ cord or a shorter one.


On Fri, Aug 13, 2021 at 12:01 PM <matteo.mantovani74@...> wrote:
Hello everybody,
I have some problem using SHC keypad with a WeMos R32 with CNC V3 Shield.

I followed the instructions at the following link:
https://baheyeldin.com/astronomy/onstep-esp32-smart-hand-controller-shc.html

For the PCB I used Roman Hujer's modified PCB version which has normal axial resistros.

When I turn on the display it shows "Estabilishing Connection" but after a few seconds appears "Connection Warning!"

what's the problem?
Do I need to set something inside Config.h?

If I use the SHC as a BHC through the "Diagnostics Sketch" code created by Dave Schwartz:
https://onstep.groups.io/g/main/files/Documents%20and%20Guides/OnStep%20ESP32S%20SHC%20Assembly%20Instructions.pdf
everything works!

Sorry for the question but I honestly don't understand how work the communication between wemos and the SHC ?

Should I set something in the Config.h file of the SmartHandController.ino code?

thank you so much

Matteo


Matteo Mantovani
 

Hi Chad,
Thank you.

I am using a new short RJ12 cable 1 meter longer.

Also I try to change the value for
ST4_INTERFACE from ON to ON_PULLUP but nothing change !
Remain Connection Warning !

Matteo


Matteo Mantovani
 

I have this setting inside Config.h file of the SmartHandController.ino code:



Is Ok ?
Should I set the ST4_INTERFACE value to ON? 

SerialST4 is correct or I need to set to Serial3 ?

Thank you

Matteo




Chad Gray
 

I used OnPullup

image.png


On Fri, Aug 13, 2021 at 12:40 PM <matteo.mantovani74@...> wrote:
I have this setting inside Config.h file of the SmartHandController.ino code:



Is Ok ?
Should I set the ST4_INTERFACE value to ON? 

SerialST4 is correct or I need to set to Serial3 ?

Thank you

Matteo




Ken Hunter
 

If using the V1.03 SHC PCB, you will notice that it is rather picky about which cables it will work with,
usually you will have to use a short, straight cable to get reliable connections. I have posted a message
about a revised SHC in the past week or so. Check that  one out.


Matteo Mantovani
 

Hi Ken,
thank you for your answer.

I look your message and I have a question regarding your issue.

1) Actually I have a 1mt straight cables and give me a connection problem.
Can you recommend a shorter cable that I can buy

2) How can I see the file KB7H_SHC_V1.1 that you have uploaded ?
    I tryed using easyeda site without success!


Ken Hunter
 

Hello Matteo, I do not know of any shorter cables than 1 Meter that you can purchase
on the Internet. Are you sure that the cables that you have problems with are data
cables? (Pin 1 to Pin 1 etc) Usually the V1.03 SHC will have good connections by the
time you get down to 1 Meter lengths but I have made a 1 foot cable for testing as
well as many other lengths to test my new board design.

Send me your shipping address (KB7H at my Gee-male) and I will send you an
evaluation SHC for you to test and compare to the V1.03 that you have if you will make
an unbiased report on your test results. I will be machining a few cases this week so
I can get one in the mail in a few days to you.

I have not made the EasyEDA files public yet... I want to get a few SHC's out in the field
with some test results first from users that are familiar with the connection problems.
You can be my first Guinea pig LOL...

If you have a preference for button colors I will set up to your desired color scheme also.
Use the following for the button colors...

N#
E#
S#
W#
OK#
F#
 f#

Colors: (Uses the RTMA color scheme)
N/A = Not Available, waiting delivery

Brown    = 1 (N/A)
Red        = 2
Orange   = 3 (N/A)
Yellow    = 4 (N/A)
Green    = 5
Blue       = 6
Violet     = 7 (N/A)
Gray      = 8 (N/A)
White     = 9
Black     = 0

Ken


Mike Ahner
 

On Sat, Aug 14, 2021 at 11:41 AM, <matteo.mantovani74@...> wrote:
1) Actually I have a 1mt straight cables and give me a connection problem.
Can you recommend a shorter cable that I can buy

Hi Matteo, if you're in the US, then Monoprice has short patch cables, less 1 meter: Monoprice Cat6 Ethernet Patch Cable - Snagless RJ45, Stranded, 550MHz, UTP, Pure Bare Copper Wire, 24AWG, 0.5ft, Blue - Monoprice.com
I've used these in our datacenter at work. Even though they are very cheap, I've never had problems with them, running between switches.

If not, here is an Amazon source: Amazon.com: CableCreation 1 Foot (5-PACK) Short CAT 5e Ethernet Patch Cable, RJ45 Computer Network Cord, Cat5/Cat5e/Cat6 Patch Cord Lan Cable UTP 24AWG+100% Copper Wire for PC, Mac, Laptop,PS5, PS4,Xbox,0.3m,Blue : Electronics

Use Google to search for, "Cat-5/6 short patch cables". It seems like you have other problems than cable length. The coiled cables are usually voice cables and therefore have high resistance/impedance, but Cat-5 should not have this issue. I wonder, do you have physical pullup resistors on the CNC shields or the Wemos? We've seen many users have problems without the pullups on the board. Pullup resistors have to be as close to the microprocessor as possible and the internal pullups on the Wemos are probably pretty weak and insufficient. Because most of this hardware operates at 3.3v, it doesn't take much noise/voltage/float changing to affect the input pins on the mpu.

Maybe try adding the pullups.
-MIke


Matteo Mantovani
 

Hi Ken,
thank you for the answers.

Are you sure that the cables that you have problems with are data
cables? (Pin 1 to Pin 1 etc)...

Mmmmm, I buyed this cable:
https://www.amazon.it/gp/product/B00E4JKHYW/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
I check the pin and Pin1 to Pin1, Pin2 to Pin2, ect...
I am not able to understand the goodness of the cable but I don't think it is a cable with a good degree of shielding.

The next step I'll try to do is connect directly with a short wires the SHC to controller.💪🤷‍♂️

I send my address data to your personal email and thank you for this possibility. 😊

Matteo


Matteo Mantovani
 

I Mike,
Actually I'm using a RJ12 cable and if I want to use a RJ45 cable, as you have suggest, I need to put a new RJ45 connector or use a RJ45 cable with a RJ12 connector. It is not simple!

Regarding the pullup resistors, I have insert 2.2k resistors:


But I don't use a network resistor. I make this :



Than I have cheched the voltage for every pins finding these values:


Could be that the voltage at every pins is too low ?
Do you think that 12v is too low ?

Also this is PCB that I have ordered to easyeda :





This is a Roman Hujer's modified PCB which has normal axial resistros.

Best regards

Matteo


Chad Gray
 

Yes i do not use the voltage from the CNC.  It is too low.

I use a step down to bring my 12volts down to 5 volts.


On Sun, Aug 15, 2021 at 8:41 AM <matteo.mantovani74@...> wrote:
I Mike,
Actually I'm using a RJ12 cable and if I want to use a RJ45 cable, as you have suggest, I need to put a new RJ45 connector or use a RJ45 cable with a RJ12 connector. It is not simple!

Regarding the pullup resistors, I have insert 2.2k resistors:


But I don't use a network resistor. I make this :



Than I have cheched the voltage for every pins finding these values:


Could be that the voltage at every pins is too low ?
Do you think that 12v is too low ?

Also this is PCB that I have ordered to easyeda :





This is a Roman Hujer's modified PCB which has normal axial resistros.

Best regards

Matteo


Mike Ahner
 

On Sun, Aug 15, 2021 at 07:41 AM, <matteo.mantovani74@...> wrote:
Actually I'm using a RJ12 cable and if I want to use a RJ45 cable, as you have suggest, I need to put a new RJ45 connector or use a RJ45 cable with a RJ12 connector. It is not simple!
I understand and I think the 1 meter cable will work for you once you fix the voltages. If you want to make your own Cat-5 cable with RJ12 connectors, you can buy a simple crimping tool and a few RJ12 connectors. Just take a normal Cat-5 cable and cut off the RJ45/s then crimp 5 wires into the RJ12. I would keep RA+-/Dec+- on twisted pairs and put power/ground a pair. You can also use breakout boards to do similar.

Regarding the pullup resistors, I have insert 2.2k resistors:
But I don't use a network resistor. I make this :

This will work just fine, it's the same thing only using discreate (separate) components. I didn't know for sure if you had used one.

Than I have cheched the voltage for every pins finding these values:

Could be that the voltage at every pins is too low ?
Not every pin, only the 5v pin is too low, it needs to be at least 4.75vdc normally to work. This is your problem, there doesn't seem to be enough current to drive the SHC so the voltage is sagging. It will not work with enough power, not matter how short your cables. Chad gives good advice to use a separate 5 vdc source and that should fix the problem, even with your RJ12 cables.
Do you think that 12v is too low ?
No, 12 vdc is fine, it's the built-in 5vdc regulator that is the problem. Add a 5v source as Chad suggests and things should work well, at least with a 1 meter cable and possible 3 meter, depending on the quality of the cable itself.
This is a Roman Hujer's modified PCB which has normal axial resistros.
Roman's design is good and will work for you. You're almost there, Matteo! You've narrowed down the problem and it's fixable.
Good luck!
-Mike


Ken Hunter
 

Matteo...
Where did you reference the Ground connection on your meter when you measured the 5V pin?
If you use the SHC Ground as the reference point you will see that there is a voltage difference
at the SHC Ground when referenced to the Controller Ground. Make sure that all of  your voltage
measurements are taken with the CNC V3 ground (on the 12V connector) to get a good idea of
the problems. I have been researching this for nearly a year and did suspect that the voltages
(when they actually arrive at the SHC) were the cause of the problem but have since changed my
thinking about that. I am seeing the distortion and interference between the conductors as the
major player in the bad connections.

My point is:
What good is a portable Hand Controller that is tied down to a 1 foot cable? Careful shielding for 
the ESP32 by adding ground planes and placing the ESP IC very close to the ground plane
has enabled me to get reliable connections with the crappy coiled cords as well as straight
cables (using crappy wire) up to 10 meters in length. I have not made any cables longer than
that but have every confidence that the connection will be reliable except for (maybe) a situation
involving strong interference. I am putting together an evaluation SHC for you to test and report
what you find out. It will be in the mail this week.


Ken Hunter
 

The 5V and 3.3V on the CNC V3 board is supplied directly from the Wemos regulators.
The CNC V3 12V is the VMOT Motor Supply voltage and does not affect the 5V or 3.3V.
The VMOT can be much lower or higher than 12 volts and the SHC should work just the same.

Here are the cables I ordered for my MaxESP3 and CNC V3's I have built. 
https://www.amazon.com/URBEST-Packs-Telephone-Meters-Modular/dp/B0896WTDLZ/ref=sr_1_4?crid=28442E0ETJM20&dchild=1&keywords=coiled+6p6c+cable&qid=1629050349&sprefix=coiled+6p6c+cable%2Caps%2C293&sr=8-4
I ordered 30 of these (15 packs) and only a few of these gave OK! connections between the OnStep and the V1.03 SHC.

This started my search for WHY they do not work. I found voltage drops in the RJ connectors and thought that was the problem but
directly connecting the SHC power to the OnStep eliminated that as the problem. Checking with the O'Scope on the signal lines
shows coupling between, and distortion on the signal lines with longer cables giving the most problems as expected.  I tried bypassing,
filtering etc with each attempt just increasing the problems.

This V1.03 connection problem is well known and documented in the messages long before I ever heard of OnSteps and is
probably the main reason there are so many SHC designs being made. I have made my own design primarily to have an
affordable and simple, off-the-shelf case for the SHC that does not require a 3D printer setup. Along the way I moved the ESP32
to the backside of the board closer to the Ground plane, added some inter-board shielding of the signal lines, added the Utility
LED and connections for the 2.43 inch OLED Display (including the Reset line) and deleted the unused ST4 connector.

The neatest feature of my design is that the coiled cords mentioned earlier as well as all others I have tried give consistantly
reliable connections between the OnStep and SHC. I did not design my SHC around the non-connection problem but the best
practices included in my design has proven very effective so far.


Matteo Mantovani
 

Hi Ken,
I have measured the voltage for 5v and 3.3v considering the L- on 12V power connector (= GND) on CNC V3:


If I try to measure the voltage from GND CNC V3 to all pins located on SHC I found:

PIN1 = 3.68v
PIN2 = 0v
PIN3,4,5,6 = 2.63v

This means there is a small voltage drop from Onstep to SHC.


Matteo Mantovani
 


Very Interresing !

Did you try to make a new cable using RJ45 cable and RJ12 connectors as suggest from Mike Ahner ? 

But now if using your design all cables now is working I think you have found a Holy Grail of SHC! 🤣

I think you have found a very good stable solution combined with a more efficient implementation.

But I have a question:
Why you have removed the
ST4 connector (I suppose the one on the right side)?

If you want to use a remote guiding system you need to connect directly to onstep without SHC?
Sorry for my question, but I thinking that secondary RJ12 connector was used to use a remote guiding system together with the SHC. It's correct?



Mike Ahner
 

On Sun, Aug 15, 2021 at 05:35 PM, <matteo.mantovani74@...> wrote:
Sorry for my question, but I thinking that secondary RJ12 connector was used to use a remote guiding system together with the SHC. It's correct?
Hi Matteo,

Yes, that connector can be used to connect a ST4 guider directly while still having the SHC connected. However, not many people use it that way, you can get much better guiding by connecting your computer directly to OnStep's USB port and still leave the SHC connected. If you have a guide camera with a ST4 output, that's one possible reason to use it.

However, other than space, that connector goes directly into the SHC's ESP32 and has no connections with the RJ12 port used by the hand controller to connect to OnStep. So that is not going to effect the SHC's signal at all. Keeping it or removing it, doesn't matter.

-Mike


Matteo Mantovani
 

Hi Mike,
It's all clear.

Thanks for the clarification.👍

It is probably more convenient to use a remote control attached by USB to the onstep and leave the SHC free with no other cables attached.

Matteo


Ken Hunter
 

Yes, to answer  your question about making other cables for the SHC. Straight from 1 foot to 30 feet. coiled 3,6,9 feet.
Individual wires to shielded pairs (using HDMI cables). I tried individual bypass caps to slow down the leading edges
of the signals with some success, Ferrite core filters on cables and individual lines. Harder and softer pullup resistors,
Pulldown resistors. The best results for the SHC were the individual shielded signal wires pulled from the HDMI cables
but there were some fails to connect even then. I have had ONE fail to connect on the SHC I am sending you and I
believe that was a failure on my part to fully engage the RJ connector. Hasn't failed connecting since that one. I am
making up the drilling template tonight for the case button holes. Tomorrow I'll make a template for the OLED window
and then start machining your case. I'd like to have a CNC machining setup but at 74 years old I think I'd likely not
get a good return on that investment. Maybe I'll win the Publisher's Clearing House Million dollars or the Lotto... Then
I'd be buying a LOT of new TOYS !  LOL

The ST4 connector is added expense and has not been ordered on any of the SHC's sold lately by Dave. As Mike said
it's much more convienent to let the  Astro Camera program do the guiding if required. It's automatically tied into the 
system but beyond me to explain how it works.