Finally it woks! #ascom


Mike Ding
 

I began to design this onstep controller about 3 weeks ago. I have no idea about arduino before that so you can imagine how many problems I will have.

With the great guys on this group I solved the problems on EEPROM, WIFI, RTC and some about coding. Finally it works!

There're 2 LV8729 stepper drivers for RA and one A 4982 for focuser. All the motors are running excellent

One DS3231 for RTC and a 8266 module for WIFI. The board can be connect with The SkyX via both USB and WIFE without any problem. Slew rate can be up to 128x

I'm really so happy with it. It's really a great project, thanks Khalid!

below are the photos of board and motors:


Khalid Baheyeldin
 

Congratulations on your build.

Some questions:
- Which board are you using?
- One motor is large, and two are small. Which ones are for what axis? Or are they just test motors?


Mike Ding
 

Hi Khalid,
Thanks for your great project!

The board was designed by myself. All the chips are onboard, the RTC battery was installed on the back.

The motors are just for function testing. I have an old Takahashi NJP, the controller will be used to control it. 

Two 42mm stepper motors will be used for the Takahashi, not show in the photo.

A 28mm will be use as focuser, the right one you can see in the photo.

Mike






At 2021-03-17 23:53:49, "Khalid Baheyeldin" <kbahey@...> wrote:

Congratulations on your build.

Some questions:
- Which board are you using?
- One motor is large, and two are small. Which ones are for what axis? Or are they just test motors?


 


Mike Ding
 

Here's a close view of the board, the size is only 104mm x 68mm.

There're some mistakes, The first is the footprint of the wifi module was mirrored. I have to mount it upside down with short copper wires. The second is that the EEPROM was missing. That's why I can't start the board at first. An AT24C32 was wired to the I2C as you can see in the photo. But all mistakes were solved, really happy with it!

Mike


adraasch
 

Mike,

Congratulations, bringing up a board for the first time is always a challenge.

Even with the tools we have at our disposal now (I can remember laying out PCB traces with tape for use as a photomask) something seems to always go wrong.

With the variety of boards available, some that offer a pretty small footprint, could you share what led you to spin up your own board design?

I understand if it is like a person being asked why they climb mountains, 'Because I can"...

But if you have other reasons, can you share them?

Thanks,

Arlen

On Wed, Mar 17, 2021, 9:43 PM Mike Ding <zhuzibaike@...> wrote:
Here's a close view of the board, the size is only 104mm x 68mm.

There're some mistakes, The first is the footprint of the wifi module was mirrored. I have to mount it upside down with short copper wires. The second is that the EEPROM was missing. That's why I can't start the board at first. An AT24C32 was wired to the I2C as you can see in the photo. But all mistakes were solved, really happy with it!

Mike


Mike Ding
 

Hi Arlen,

Thanks for your reply. As I mentioned before I have an old Takahashi NJP mount with very good mechanical but poor electronic. There's no computer port on the NJP. I want to control it with the laptop, that's why I build the board.

Of course "I can" is one of the reason:-)  I have been work on electronics for more than 20 years. This is really not a complicate project comparing to those automation systems I'm dealing with.

Of course I'm vary happy to share it, attached is the shcematic, Maybe there're still with some minus mistakes although the 2 I mentioned in the last post were solved. I haven't test it yet because the current board works fine now. 

Plse feel free to ask if there's any problem in building it!

Mike


adraasch
 

Mike,

I too, have over 20 years working with electronics design, actually over 40..  While these are not 10 layer boards with controlled impedance traces and buried vias, Murphy's law always seems to enter into the design.

I have considered a custom board construction project myself, and may do so once I get a solid, working mount up and fully operational.  Why?

Minimizing configuration jumpers and interconnections on the CPU board for reliability is the first thing to come to mind.  As temperature and humidity are rarely stable where these things are used, they are tortured by their environment. They get back at us by failing just when we least want a failure!  8-)

A myriad of .1" jumpers that configure 3D printer boards allow great flexibility, but few people print in as harsh of locations as we set up in frequently.  (I have observed at -30F, as well as at or near +100F)  The cold weather is really tough on electronics, cable insulation really gets tested for flexibility.  But it also leads to condensation forming on interconnections which leads to oxidation which leads to loss of hair as you pull it out!

Note that the .1" jumper issue can be worked around once one has a fully configured system that is not going to change without changing to a different board layout.  Simply solder those interconnects that need to be connected.

Conformal coating the board is also something to consider.

Anyhow, once again congratulations!  Good luck putting the finishing touches to your system and enjoy that excellent telescope mount!

Arlen

.



On Wed, Mar 17, 2021 at 11:15 PM Mike Ding <zhuzibaike@...> wrote:
Hi Arlen,

Thanks for your reply. As I mentioned before I have an old Takahashi NJP mount with very good mechanical but poor electronic. There's no computer port on the NJP. I want to control it with the laptop, that's why I build the board.

Of course "I can" is one of the reason:-)  I have been work on electronics for more than 20 years. This is really not a complicate project comparing to those automation systems I'm dealing with.

Of course I'm vary happy to share it, attached is the shcematic, Maybe there're still with some minus mistakes although the 2 I mentioned in the last post were solved. I haven't test it yet because the current board works fine now. 

Plse feel free to ask if there's any problem in building it!

Mike


Mike Ding
 

Hi Arlen

Yes you are right that the reliablity of the plug-in moduls is rarely stable. Actually telescope control must have higher reliablity than consumer electronics, because, you know how cold it is when we shot the sky in winter..

According to my experience, designing with function blocks is just looks simple, but it actually has more troubles if you don't know every detail of the design. 


Other reasons, maybe my project should be professional as a engineer's work, or small enough to be fit in some box by hand.

But the No.1 reason, I'm sure is to build such a custom board cost much less for me*_^. Most components can be found in the company. I don't want to buy those modules:-). 

Mike

在 2021-03-18 16:43:56,"adraasch" <araasch@...> 写道:

Mike,

I too, have over 20 years working with electronics design, actually over 40..  While these are not 10 layer boards with controlled impedance traces and buried vias, Murphy's law always seems to enter into the design.

I have considered a custom board construction project myself, and may do so once I get a solid, working mount up and fully operational.  Why?

Minimizing configuration jumpers and interconnections on the CPU board for reliability is the first thing to come to mind.  As temperature and humidity are rarely stable where these things are used, they are tortured by their environment. They get back at us by failing just when we least want a failure!  8-)

A myriad of .1" jumpers that configure 3D printer boards allow great flexibility, but few people print in as harsh of locations as we set up in frequently.  (I have observed at -30F, as well as at or near +100F)  The cold weather is really tough on electronics, cable insulation really gets tested for flexibility.  But it also leads to condensation forming on interconnections which leads to oxidation which leads to loss of hair as you pull it out!

Note that the .1" jumper issue can be worked around once one has a fully configured system that is not going to change without changing to a different board layout.  Simply solder those interconnects that need to be connected.

Conformal coating the board is also something to consider.

Anyhow, once again congratulations!  Good luck putting the finishing touches to your system and enjoy that excellent telescope mount!

Arlen

.



On Wed, Mar 17, 2021 at 11:15 PM Mike Ding <zhuzibaike@...> wrote:
Hi Arlen,

Thanks for your reply. As I mentioned before I have an old Takahashi NJP mount with very good mechanical but poor electronic. There's no computer port on the NJP. I want to control it with the laptop, that's why I build the board.

Of course "I can" is one of the reason:-)  I have been work on electronics for more than 20 years. This is really not a complicate project comparing to those automation systems I'm dealing with.

Of course I'm vary happy to share it, attached is the shcematic, Maybe there're still with some minus mistakes although the 2 I mentioned in the last post were solved. I haven't test it yet because the current board works fine now. 

Plse feel free to ask if there's any problem in building it!

Mike



 


Khalid Baheyeldin
 

Mike,

Thanks for sharing details on your PCB.
It is a good project for sure.

However some comments to take in mind:
- The STM32F103 will not be supported in OnStep 5.x, and OnStepX. Instead, the STM32F303CC should be used.
- Even better if you support the STM32F446VE, which is used in the FYSETC S6. It is faster and has more flash and RAM.
- The LV8729 are great, but have current limitations for some motors. Maybe using the TMC5160 is better, since they cover all cases?


Howard Dutton
 

On Thu, Mar 18, 2021 at 12:05 PM, Khalid Baheyeldin wrote:
However some comments to take in mind:
- The STM32F103 will not be supported in OnStep 5.x, and OnStepX. Instead, the STM32F303CC should be used.
I'm still thinking OnStepX will be ok on the F103.  The reason the master doesn't fit is mostly because there are two align classes, one for AltAzm and one for Equatorial mounts.  X has these merged into a single class.  It also has just one class for controlling the motion of all axes where OnStep had several routines spread around.  On the other hand there is overhead of having a task scheduler and a command channel processing encapsulated in classes.


Khalid Baheyeldin
 

On Thu, Mar 18, 2021 at 03:27 PM, Howard Dutton wrote:
I'm still thinking OnStepX will be ok on the F103.
That is great if it can be done.
But if it constrains you in any way, just ditch the F103, and users can get an F303CC
once they become available for a little money, and OnStep/OnStepX would not be
constrained in the future.


Howard Dutton
 
Edited

It is no small thing to design something like this (especially for someone without experience) and I'm glad to hear other options are becoming available.

Don't forget the MaxSTM3.6I exists too (STM32F411CE, 512KB flash, 100Mhz, hardware floating point):

A little tricky to order (when parts are in stock, and having to rotate the MCU due to their auto generated pick n' place file error.)  But building one of these only takes about 20-30 minutes since the through-hole components are so few (and nearly all are available from EasyEDA/LCSC.)  The problem with doing away with all modularity is that if something gets burned or fails you have a major hassle and/or are throwing it away and pulling out a new one.  With this one you can replace the stepper drivers and ESP8266.  Fortunately if you invest the ~$85 (if I recall) you get 5x of these you will have a few on hand if something goes south...

I've been testing these for a while now without issue:
https://easyeda.com/hdutton/maxstm3-6_cp_p


Howard Dutton
 

On Thu, Mar 18, 2021 at 12:39 PM, Khalid Baheyeldin wrote:
But if it constrains you in any way
Not at all, just a side-effect of better code.


Howard Dutton
 

I'm keeping things more modular too... the alignment module (Goto Assist aka GTA) can be disabled in X.  So it can get smaller still if need be.


Mike Ding
 

Khalid

Thanks for reply.

Actually I soldered STM32F303 on the PCB although the part No is 103. You know they are pin to pin compatiable. 5.x works great on the board.

STM32F303+LV8729 is enough for my project now. The only problem is that the power of motor is a little low for fast slew for NJP. Maybe will think about other configurations in the future, but for now it's OK.

TMC5160 is really great, it can be used in even kW level..But it needs external mosfets. Another choice you can think about is L6470 from ST. It's also a smart controller, peak driving current can be up to 7A. I'm sure it's almost enough for all amateur grade mounts.

Mike


At 2021-03-19 03:05:55, "Khalid Baheyeldin" <kbahey@...> wrote:

Mike,

Thanks for sharing details on your PCB.
It is a good project for sure.

However some comments to take in mind:
- The STM32F103 will not be supported in OnStep 5.x, and OnStepX. Instead, the STM32F303CC should be used.
- Even better if you support the STM32F446VE, which is used in the FYSETC S6. It is faster and has more flash and RAM.
- The LV8729 are great, but have current limitations for some motors. Maybe using the TMC5160 is better, since they cover all cases?


 


Mike Ding
 

What are the differences between Onstep and OnstepX?  Sorry I'm really new in Onstep, many things to learn


Khalid Baheyeldin
 

On Thu, Mar 18, 2021 at 07:34 PM, Mike Ding wrote:
Actually I soldered STM32F303 on the PCB although the part No is 103. You know they are pin to pin compatiable. 5.x works great on the board.
 
STM32F303+LV8729 is enough for my project now. The only problem is that the power of motor is a little low for fast slew for NJP. Maybe will think about other configurations in the future, but for now it's OK.
 
TMC5160 is really great, it can be used in even kW level..But it needs external mosfets. Another choice you can think about is L6470 from ST. It's also a smart controller, peak driving current can be up to 7A. I'm sure it's almost enough for all amateur grade mounts.
I was thinking that an all in one pre-fabricated surface mount board would be a good addition to the list of boards, just because it is all ready made, and only needs to be flashed. Nothing else to buy, nothing else to make mistakes on (e.g. TMC2130 DIY vs. SPI), nothing to insert the opposite orientation frying the board, ...etc,

If you, or someone, decide to design the board and have it manufactured and sell it, then it has to be the STM32446VE, wired for SPI, and TMC5160, so as to cover all possible combos.


Khalid Baheyeldin
 

On Thu, Mar 18, 2021 at 07:39 PM, Mike Ding wrote:
What are the differences between Onstep and OnstepX? 
It is a rewrite of OnStep, which will have the same features, but much refactored modular code.

See Howard's update in the other thread titled "OnStepX".


Drew 🔭📷🚴‍♂️
 

TMC5160 is really great, it can be used in even kW level..But it needs external mosfets.

I think you must be confusing it with the raw chip. Here is the module we are talking about: https://www.biqu.equipment/products/bigtreetech-tmc5160-v1-0-driver-spi-mode-silent-high-precision-stepstick-stepper-motor-driver-with-heatsink-for-skr-v1-3-gen-v1-4-reprap?variant=20225467711586


Howard Dutton
 

On Thu, Mar 18, 2021 at 04:34 PM, Mike Ding wrote:
The only problem is that the power of motor is a little low for fast slew for NJP
Lower current into the ~40% of motor rating range if not already there.  Try several settings above and below that, experiment.
Use a higher voltage, within the design limits.
Use a lower inductance motor (i.e. a higher current rated, which is where the TMC5160 comes in handy since the LV8729 is only good to 1.5A.)
Less overall reduction within the limits of reaching the tracking resolution you need (a stepper motor with fewer steps has a similar effect if that is an option.)