Topics

Can´t Connect to Onstep STM32

sonny.waxmo@...
 

I have tried to flash and connect to the STM32 version of Onstep, but without success.
This is the status.
I bought the kits from Dave, everything arrived quick and nice so I putted everything together.
The Smart hancontroller was flashed with arduino IDE 1.8.5 and came to live when I connect it to the ST-4 port. But it can´t connect to Onstep.
The WeMos D1 mini WIFI I can flash with the blink example and the LEDstart to blink. When I try to flash  Onstep iIfi-Bluethooth addon and power up the Onstep PCB the LED blink once and it Shows up like a network ESP_1013F.
I can Flash the STM32 with blink example and also change the blink speed and reflash it.
When I use the code generator and the Excel to make the Config_STM32 it seems to work and the Flasing with Arduino 1.8.5 report "upload ready".
When I try to cennect the Sky planetarium to the Onstep PCB USB a get a error message "Access violation at address 0073C160 in module 'sky.exe. Write of address 000000704.

Please help me, the sky is getting darker now.

Regards
Sonny

Khalid Baheyeldin
 

On Sat, Aug 24, 2019 at 11:35 AM, <sonny.waxmo@...> wrote:
The Smart hancontroller was flashed with arduino IDE 1.8.5 and came to live when I connect it to the ST-4 port.
Does it display only the logo screen, or proceed to coordinate screen?

When I use the code generator and the Excel to make the Config_STM32 it seems to work and the Flasing with Arduino 1.8.5 report "upload ready".
Let us ignore WiFi for the time being, and verify that USB is working as it should first.

Using the Serial Monitor in the Arduino IDE, try the commands that are under the Extended LX200 section on this page

https://onstep.groups.io/g/main/wiki/8-Advanced-Topics

See what responses you got, if any, and whether the mount slews or not.

sonny.waxmo@...
 

Hi thanks for your quick response.
I tried to upload the blink exampel and then reloaded the OnstepBeta STM software again for safety.

I don´t have the handcontroller at the moment but as I remeber it the flashscreen apears and later "connecting" and after a minute or so "Connection failed".

After the reflashing and restarting I tried serialmonitor with sending ":SCMM/DD/YY# " as 08:24:/19# and also  :08:24:/19# but no reply.
The small LED on the CP2102 serial to TTL respod with a short blink when I press "SEND" in the serial monitor.

Regards
Sonny

Khalid Baheyeldin
 

Some commands return no reply.
As per this reference

http://www.stellarjourney.com/index.php?r=site/software_telescope

Did you execute all the commands in the link I sent you?

Also, is the tracking LED off when you flash, then it turns on?
If you send :Te# from the serial monitor, does it start flashing?

Dave Schwartz
 

If you can get a standard blink sketch to upload and run on the STM32, that means the STM32 and USB module are OK. There are several reasons why the SHC connection might fail but the fact that your WiFi module gives that ESP_ SSID instead of ONSTEP means that the WeMos is running it's software properly but cannot connect to the STM32 and thus means that OnStep is not running on the controller.

The most likely reason the STM32 would run the blink sketch but not OnStep would be a faulty DS3231 module. OnStep on the STM32 has to be able to access the EEPROM on the DS3231 module or it will freeze during initialization.

In the Files area of the groups.io OnStep group there are a few utilities Khalid has contributed to diagnose this problem. Please build and upload the i2c scanner sketch. After uploading, open the serial monitor and you should see output that repeats every 5 seconds and shows the i2c addresses that are responding. There should be two of them (I don't know the values right now on my phone but it has been discussed recently so a search should find them). Let us know if you have the two correct values. Someone has reported an oddball module the has the EEPROM submodule at a different address than the standard and there is a way to deal with that through a simple parameter change.


On August 24, 2019 9:07:31 AM EDT, sonny.waxmo@... wrote:

I have tried to flash and connect to the STM32 version of Onstep, but without success.
This is the status.
I bought the kits from Dave, everything arrived quick and nice so I putted everything together.
The Smart hancontroller was flashed with arduino IDE 1.8.5 and came to live when I connect it to the ST-4 port. But it can´t connect to Onstep.
The WeMos D1 mini WIFI I can flash with the blink example and the LEDstart to blink. When I try to flash  Onstep iIfi-Bluethooth addon and power up the Onstep PCB the LED blink once and it Shows up like a network ESP_1013F.
I can Flash the STM32 with blink example and also change the blink speed and reflash it.
When I use the code generator and the Excel to make the Config_STM32 it seems to work and the Flasing with Arduino 1.8.5 report "upload ready".
When I try to cennect the Sky planetarium to the Onstep PCB USB a get a error message "Access violation at address 0073C160 in module 'sky.exe. Write of address 000000704.

Please help me, the sky is getting darker now.

Regards
Sonny


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

sonny.waxmo@...
 

Hi again, I have just tried the i2c scanner, here are my results.

Scanning…
I2C device found at address 0x57 !
I2C device found at address 0x68 !
done

repeated every 5 seconds.

I also reloaded onstep beta  with a new config file generated by the online configuration generarator.

But still no communication with stm32 Onstep.
Not for USB or Smart hand controller

Any idéa how to move on?

Regards
Sonny

sonny.waxmo@...
 

Sorry I forgot, no serial communication with serial monitor.
No LED bllighting, I only use the onboard LED PC13.
No Buzzer making any noice.

Regards
Sonny

Dave Schwartz
 

Those are the correct values and proves both that your STM32 is running, your USB connection through the CP2102 works (which was already proven by the fact that you can upload and see the scanner output) and the DS3231 module devices are responding at the correct addresses.

You could try running the 'eeprom-wipe' sketch on the off-chance that the EEPROM contains some bad values. That will further prove that the EEPROM is working and ensure its contents are clean. As with the scanner, immediately after the sketch uploads, open the Arduino IDE's serial monitor because the sketch waits only 10 seconds before it runs and it only runs once so if you wait longer than 10 seconds you will miss its output.

Are you sure that you are putting the flash/run switch back into 'run' before you turn the power back on to run OnStep? The Arduino uploader jumps to the sketch immediately after the upload so that it runs the first time even in flash mode but if the switch is left there, it the STM32 firmware will do nothing but wait for an upload after power-on if the switch was not changed. You could prove that it is in run-mode by uploading the i2c-scanner sketch again, cycling the power and seeing (using the Arduino serial monitor) that it runs the scanner after power-on.

When OnStep starts, the user LED should be active, either solid if you have AUTOSTART_TRACKING_OFF or flashing at about 2 per second if you have AUTOSTART_TRACKING_ON. If the STM32 is still in flash-mode, the user LED will not light.

When OnStep is running, the SHC should connect easily as long as 1) your ST4PULLUP resistor array was installed in the correct orientation, 2) the ST4 interface is set to ST4_PULLUP and 3) the hand control type is set to ST4_HAND_CONTROL_ON.

Although the fact that the USB and SHC connection failures indicate OnStep is not running correctly yet, make sure you have built the WiFi-Bluetooth sketch with the default Config.h file... the STM32 PCB does not require any changes, especially to the SWAP mode.

On 2019-08-25 8:15 a.m., sonny.waxmo@... wrote:
Hi again, I have just tried the i2c scanner, here are my results.

Scanning…
I2C device found at address 0x57 !
I2C device found at address 0x68 !
done repeated every 5 seconds.

I also reloaded onstep beta  with a new config file generated by the online configuration generarator.

But still no communication with stm32 Onstep.
Not for USB or Smart hand controller

Any idéa how to move on?

Regards
Sonny

Dave Schwartz
 

You have to have communication with the Arduino IDE serial monitor... otherwise, how did you see the i2c-scanner output?

I discussed the user LED in the previous reply.

The buzzer is only used at the beginning and end of a GoTo and in a few places during handbox commands (but without your handbox connecting yet you wouldn't be getting there).

On 2019-08-25 8:19 a.m., sonny.waxmo@... wrote:
Sorry I forgot, no serial communication with serial monitor.
No LED bllighting, I only use the onboard LED PC13.
No Buzzer making any noice.

Regards
Sonny

sonny.waxmo@...
 

Thank, you for all your support Dave!
But sorry no success.
I did run the "eeprom-wipe" the serial monitor gave somthing like the following information. 

Erasing eeprom.
a lot of ...............
and erasing success complete.

Then I re uploaded Onstep beta.

The PC13 LED is compleatly dead at all time.

I dubble checked the Flash-Run switch, it is in run position.

I checed the Voltage on every pin for the ST-4 handcontroller connection , it is 2,3V on all tabs.

Do you have any more trix?

Regards
Sonny

Khalid Baheyeldin
 

On Sun, Aug 25, 2019 at 12:23 PM, <sonny.waxmo@...> wrote:

The PC13 LED is compleatly dead at all time.
That is very strange.
This means that the OnStep firmware crashed and is not running.
The only time I saw this is when the EEPROM on the DS3231 chip
was bad.

But in your case, you said that the two test sketches confirm it is
responding and writing normally.

Can you try the current alpha? I don't think it will make a difference
but just want to compare to what I use.

Another thing is: how did you generate your config file? Did you
use the OCG?

sonny.waxmo@...
 

To make things even more strange........

I had a brand new STM32 laying so I put it in and uploaded Onstep Beta.

And guess what the LED PC13 started to Flash  and the handcontroller reported Connection OK and started to show some data!!!

I put the switsh in Run position and restarted everything, and it is also dead as a stone no LED, hand controller connection failed.

When I put the switsh in flashposition and try to upload again arduino IDE report 100% upload OK restartring running - But the new STM32 Onstep is still dead.......

Please I going crazy...
Any Idea??

Regards Sonny

Khalid Baheyeldin
 

On Sun, Aug 25, 2019 at 01:47 PM, <sonny.waxmo@...> wrote:
I had a brand new STM32 laying so I put it in and uploaded Onstep Beta.

And guess what the LED PC13 started to Flash  and the handcontroller reported Connection OK and started to show some data!!!

I put the switsh in Run position and restarted everything, and it is also dead as a stone no LED, hand controller connection failed.

When I put the switsh in flashposition and try to upload again arduino IDE report 100% upload OK restartring running - But the new STM32 Onstep is still dead.......
Let us stay with the STM32 that was flashing. Ignore the other one for now.

From your tests, it may be that the Flash-Run switch, or its wiring is bad.
So when you put it in Run, it is not really wired correctly, and therefore the program in flash never gets loaded or run.

Disconnect the wires from the pins on top of the STM32 board, and use the jumper switches.
Put them in flash mode (per the Wiki page for the STM32), and flash OnStep.
Disconnect power, move the jumper back to the normal position, and power on.

Now see if the LED is on or flashing.

If that works, then the wires from the Flash-Run or the switch itself are bad.

Once you finish troubleshooting the STM32 that works, you can move on to the other one.

sonny.waxmo@...
 

I have tried the jumpers in this positions.

With the cable connector for the RUN-FLASH switch remowed

Both jumpers close to the micro USB port.

When Im programing I move the Jumper closeest to the edge one step away from the micro USB. The jumper closest to the Reset button stays in place.

I connect the power and USB-CP2101 but to upload with Arduino IDE I have to puch RESET on the STM32 bluepill.

Result in Arduino IDE is as Follows...

Sketch uses 14588 bytes (11%) of program storage space. Maximum is 131072 bytes.
Global variables use 2568 bytes (12%) of dynamic memory, leaving 17912 bytes for local variables. Maximum is 20480 bytes.
stm32flash 0.4
 
http://stm32flash.googlecode.com/
 
Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
 
Wrote address 0x08000100 (1.75%) 
Wrote address 0x08000200 (3.51%) 
Wrote address 0x08000300 (5.26%) 
Wrote address 0x08000400 (7.02%) 
Wrote address 0x08000500 (8.77%) 
Wrote address 0x08000600 (10.53%) 
Wrote address 0x08000700 (12.28%) 
Wrote address 0x08000800 (14.04%) 
Wrote address 0x08000900 (15.79%) 
Wrote address 0x08000a00 (17.55%) 
Wrote address 0x08000b00 (19.30%) 
Wrote address 0x08000c00 (21.06%) 
Wrote address 0x08000d00 (22.81%) 
Wrote address 0x08000e00 (24.57%) 
Wrote address 0x08000f00 (26.32%) 
Wrote address 0x08001000 (28.08%) 
Wrote address 0x08001100 (29.83%) 
Wrote address 0x08001200 (31.59%) 
Wrote address 0x08001300 (33.34%) 
Wrote address 0x08001400 (35.10%) 
Wrote address 0x08001500 (36.85%) 
Wrote address 0x08001600 (38.61%) 
Wrote address 0x08001700 (40.36%) 
Wrote address 0x08001800 (42.12%) 
Wrote address 0x08001900 (43.87%) 
Wrote address 0x08001a00 (45.63%) 
Wrote address 0x08001b00 (47.38%) 
Wrote address 0x08001c00 (49.14%) 
Wrote address 0x08001d00 (50.89%) 
Wrote address 0x08001e00 (52.65%) 
Wrote address 0x08001f00 (54.40%) 
Wrote address 0x08002000 (56.16%) 
Wrote address 0x08002100 (57.91%) 
Wrote address 0x08002200 (59.67%) 
Wrote address 0x08002300 (61.42%) 
Wrote address 0x08002400 (63.18%) 
Wrote address 0x08002500 (64.93%) 
Wrote address 0x08002600 (66.68%) 
Wrote address 0x08002700 (68.44%) 
Wrote address 0x08002800 (70.19%) 
Wrote address 0x08002900 (71.95%) 
Wrote address 0x08002a00 (73.70%) 
Wrote address 0x08002b00 (75.46%) 
Wrote address 0x08002c00 (77.21%) 
Wrote address 0x08002d00 (78.97%) 
Wrote address 0x08002e00 (80.72%) 
Wrote address 0x08002f00 (82.48%) 
Wrote address 0x08003000 (84.23%) 
Wrote address 0x08003100 (85.99%) 
Wrote address 0x08003200 (87.74%) 
Wrote address 0x08003300 (89.50%) 
Wrote address 0x08003400 (91.25%) 
Wrote address 0x08003500 (93.01%) 
Wrote address 0x08003600 (94.76%) 
Wrote address 0x08003700 (96.52%) 
Wrote address 0x08003800 (98.27%) 
Wrote address 0x080038fc (100.00%) Done.
 
Starting execution at address 0x08000000... done.

But still no signs of life or LED exept the first time withe the new STM32, after restart it´s also dead......

PLEASE, my whife say I´m doing somtething wrong!!!

Regards
Sonny

Khalid Baheyeldin
 

On Sun, Aug 25, 2019 at 02:37 PM, <sonny.waxmo@...> wrote:
But still no signs of life or LED exept the first time withe the new STM32, after restart it´s also dead......
The steps you did are correct.

Maybe there is a power issue, or a short in the PCB?

Did you check the temperature of the STM32, or any components on it?
If you have an IR thermometer, check to see if anything is above 45C or so.

To check for a short, e.g. soldering bridge, disconnect power and do continuity
testing on all pins of the STM32 while it is in the PCB, with the adjacent pins.

Another thing is power output from the LM2596 module: is it 5V?

sonny.waxmo@...
 

The LM2596 give 5.06V with no motors attached, only 3pcs of DRV8825.
I have checked all the 3.3 and 5V connections on the other modules.

If have dubblechecked the PCB but I can´t see anything bad, I have seen a lot of Chinese borads a lot worse.

I have checked the Run-Flash switch and there are full connection in both positions.

I have updated the Arduino IDE to 1.8.9 and reloaded Onstep.

Kalid, you said I should test the Alpha bransh. But where do I find it?

Regards
Sonny

Khalid Baheyeldin
 

Sorry. I meant the 'master' branch, which used to be called Alpha.

It is here

https://github.com/hjd1964/OnStep/archive/master.zip

I don't think it will make a difference.

For the PCB, STM32, I meant check the soldering that you did
when attaching the pins to the component, and when soldering
the female headers and male pins to the PCB. Sometimes, there
is a small solder bridge by mistake.

What about temperatures? Anything uncomfortable to touch?

Kevin Dorsey-Tyler
 

If I understand the progress so far, you can successfully do all of these with the STM32, RTC and serial USART (CP2102) in place on the board, and using the USART board to flash the STM32.
   - flash and run a blink sketch with the STM32 in place on the board
   - flash and run the I2C finder sketch and identify the two I2C addresses on the RTC board, for the RTC chip and the EEPROM
   - flash and run the sketch to erase the EEPROM chip

   - You can also compile and flash a copy of the beta version of OnStep, but it is not running. 

   - The wifi board is powering up but is not receiving start-up information from OnStep 

All of these suggest that the STM32 is powered OK and able to run, and that the problem is not in the circuitry around the STM32 controller, RTC board or USART board.  Something is preventing the ONStep sketch from running.

Here are a few suggestions:

  - Have you tried removing all of the stepper driver boards, and trying to run the OnStep sketch?  If one is inserted wrongly, or if one is faulty it may be pulling a STM32 pin that OnStep is using as an output hard to ground or to the +ve line.

  - Will the board boot up without the driver boards and without the wi-fi board inserted, and without the SHC connected? 

  - Have you tried running a clean copy of the OnStep sketch, with the basic config file for the STM32 enabled with no other edits (i.e. just edit the ConfigSTM32.h line that says #define STM32Blue_OFF to #define STM32Blue_ON, leaving everything else alone) ?

  Kevin.  

On Sunday, August 25, 2019, 01:11:28 PM PDT, Khalid Baheyeldin <kbahey@...> wrote:


Sorry. I meant the 'master' branch, which used to be called Alpha.

It is here

https://github.com/hjd1964/OnStep/archive/master.zip

I don't think it will make a difference.

For the PCB, STM32, I meant check the soldering that you did
when attaching the pins to the component, and when soldering
the female headers and male pins to the PCB. Sometimes, there
is a small solder bridge by mistake.

What about temperatures? Anything uncomfortable to touch?

Frans Lowiessen
 

Hi All,

I have the same problem of not connecting
It has worked properly with earlier version of the apha branch
And it stopped working when I upgraded the Onstep and the SHC( do not recall which version)
I tought I did something wrong with programming the SHC but apperently i am not the only one
The onstep controller works fine with a tablet or phone connected as far as i tested

Hope you find the root cause ans solution

Frans

sonny.waxmo@...
 

Thanks for all your support, I have worked today so I´m going to try some more solutions later.

I have already unplugged all units exept the STM32, RTC DS3231 ansd CP2102.

I havn´t tried to use the original STM32 configfile, I´ll do it later today.

The most curios thing was that the new STM32 I shifted to worked fine with smart handcontroller and all, until I rebooted the Onstep unit.
After that it was daed as the STM32 I used before it.

There can be some errors made when i Upload the onstep master that make it unbootble.

Regards
Sonny