Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By synfinatic
#64208
Barnabybear wrote:Hi, the problem with the ESP for this application is that even with WiFi disabled it will still nip off and do stuff. If the adjustments you make to the shafts are manual, you could consider adding steppers to the shafts and driving them through buttons attached to the ESP. This way any 'breaks' the ESP takes from its program/sketch would be reflected in the movement of the steppers. If the movement is controlled by third party device it's going to be abit more tricky.


Adding motors to move my telescope really isn't easy or cost effective for a variety of reasons (weight of the components, design of the altitude axis, etc). Good to know about the WiFi still doing things even if I'm not using it.

Paul555 wrote:Sorry, but you are wrong here. If you need an interrupt on both edges (falling and rising) you do not need TWO inputs to realize this. You just reconfigure (reattach in this case) the interrupt in the ISR to wait an opposite edge when you detect one.

I still do not get why you need two interrupts per encoder. There are several encoder types, but let's say simple general encoder has two channels A and B and the edges on these channels allow to determine rotation direction. Clockwise - A channel leads and B channel follows; anticlockwise - B channel leads and A channel follows. Suppose A channel is on interrupt; when it fires, you read B channel and have full info about the situation - if B is low, it is rotated clockwise and vise versa.


Hmmm. I get what you're saying. I suppose in certain cases that would work better. I'll have to try that. I think that's very similar to what Paul Stoffregen's Encoder library does.

Paul555 wrote:This chis does not supports interrupt priorities so if several events occur at the same time - of course some could be lost. There is only one flag (in the dedicated register) for every interrupt, so you can serve the last interrupt on the particular pin, despite the fact that several events occurred during your busy (e.g. serving other interrupt) time.

I would suggest to keep this cpu for communications only and for your main program go for arm - e.g. stm32F4xx family. These chips are superior in every way.


That seems like a bit overkill. :) Also, not the easiest to hand solder and I really don't feel like learning another dev chain right now. Right now my backup plan is a pair of ATTiny87's talking to the ESP via SPI. Or the easy way, a pair of LSI LFLS7366R-S's. A little spendy though (~$6/ea).
User avatar
By Paul555
#64572 That seems like a bit overkill. :) Also, not the easiest to hand solder and I really don't feel like learning another dev chain right now. Right now my backup plan is a pair of ATTiny87's talking to the ESP via SPI. Or the easy way, a pair of LSI LFLS7366R-S's. A little spendy though (~6/ea).[/quote]

You do not have to solder it by hand, but buy a module (like Discovery). Ok, stm32F4xx may be over kill :), but you easily can take a stm32F1xx which is arm (cortex M3) and can be programmed using arduino ide.

See this:
https://www.itead.cc/iteadmaple.html

You do not have to learn a lot ant the price is $6
User avatar
By schufti
#64589 you could also try to canibalise an old mechanical PC-mouse.
It accumulates the moves and sends them in packets, but I don't know how reliable and repeatable these numbers are. At least the communication should cope with real time requirement.