You are not logged in.

#26 2016-07-20 05:21:18

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

Second though,

It could be possible through DMA, as we do not need to control length of pulses and just need to count pulses.

Offline

#27 2016-07-20 12:02:53

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Shahin wrote:

If GPIO is going to be main interface, unfortunately OS based software could not keep up with counting job very well. In high speed movements 0.015mm resolution will be lots of pulses per second.

Even if we could get number of clicks through board itself, without any direction or other info. It will be enough to achieve high accuracy.

Well, number of clicks is 100% already done with my current code.

Offline

#28 2016-07-20 13:26:04

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Actually, my current code and board would cost less than $40 all in for the sensor and board and strip.

At the moment, the board accepts a list of commands:
     - ZERO: homes or zeros the position of the sensor (I recommend doing this at the "top" or starting point of your build, so that the count is accurate, but it's there so you can decide)
     - POS: responds with the current position of the axis expressed either as a number of clicks or a float equal to the mm distance traveled
     - SEEK: this will move the axis in one full step increment until it reaches the requested position (Be aware, this is currently in clicks not mm, I need to fix that)
     - STEP: this simply moves the axis by one full step increment (useful for determining the step to click count of your axis)


All communication is over USB serial interface, and is just shockingly smooth and accurate (which I wasn't expecting because let's be honest, the code is shit.)

How would you like me to proceed so that the project can be better integrated with NanoDLP?

Offline

#29 2016-07-20 19:24:10

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

Will it be open sourced or is it similar to any established solution available? I would prefer add support for hardwares which wide range of people could use.

Offline

#30 2016-07-21 03:20:36

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Well, I'm offering to build and code it to your specifications. More than that, you provided NanoDLP to us, it wouldn't be very fitting for me to not reciprocate.

Honestly, I'm trying to make this a core feature of NanoDLP, because I really do think it'll make axis use and calibration easier and more reliable and repeatable for everyone (or at least everyone who chooses to use an encoder enabled axis).

So... you tell me what's best / easiest for NanoDLP

Offline

#31 2016-07-22 06:05:57

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

Current spec looks very good. I have to find a way to support it on both direct control and RAMPS method.
Are you going to wire it directly to nanodlp?

Offline

#32 2016-07-22 08:33:04

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Shahin wrote:

Current spec looks very good. I have to find a way to support it on both direct control and RAMPS method.
Are you going to wire it directly to nanodlp?

I hate to be a smartass, so if I'm coming off that way, I apologize in advance, but I'll wire it however you tell me to wire it. I'll work this weekend / next week on it, both as a standalone board as well as seeing what I can accomplish with the RPi's GPIO's alone and I guess we can go from there.

I'm a functional programmer, not a good one, by which I mean I'll get the job done and it'll work, but it may not be pretty or best practices. I'm more familiar with C / C++, but I have passing familiarity with Python, Java, Ruby, Perl, Bash, and whatever flavor of JS you want to write Node.JS apps in.

What's NanoDLP actually written in so maybe I can start with that? Otherwise we'll probably end up having to port Python code.

Offline

#33 2016-07-22 15:59:53

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

nanodlp have written in go (golang) with some C and ASM.

I came up with following scenario.
We have USB (serial) encoder. (i2c will be more suitable I am not sure how hard will be implementation on your side)
The encoder needs to support two commands

POS - current click counter value
ZERO - reset counter

On nanodlp side we will have two new configurations.

Click size
i2c or serial address for encoder

For direct control:

Before each movement zero command will be sent.
After movement position will be requested and if needed another movement will be sent based on reported position

For RAMPS two new keywords will be supported which will be usable on gcode boxes.

[[EncPos]]; in mm
[[EncZero]]

Will it be enough?

Offline

#34 2016-07-23 02:14:30

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Shahin wrote:

nanodlp have written in go (golang) with some C and ASM.

I came up with following scenario.
We have USB (serial) encoder. (i2c will be more suitable I am not sure how hard will be implementation on your side)
The encoder needs to support two commands

POS - current click counter value
ZERO - reset counter

On nanodlp side we will have two new configurations.

Click size
i2c or serial address for encoder

For direct control:

Before each movement zero command will be sent.
After movement position will be requested and if needed another movement will be sent based on reported position

For RAMPS two new keywords will be supported which will be usable on gcode boxes.

[[EncPos]]; in mm
[[EncZero]]

Will it be enough?

Sold. I'll get it done as soon as I can!

Offline

#35 2016-08-19 05:50:24

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

I can make it ready until the end of next week. How is your progress on the hardware side?

Offline

#36 2016-08-22 15:33:27

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

Shahin wrote:

I can make it ready until the end of next week. How is your progress on the hardware side?

Stalled at the moment, I haven't had a chance to sit and work on it. I'll try to get it to the top of my list again here shortly. The real world has intruded a bit recently.

Offline

#37 2016-08-22 18:17:17

DLprinter
Member
Registered: 2016-07-16
Posts: 94
Website

Re: Encoder Support

backXslash
sorry man , but you spend time for nothing .
believe me as man who create the first 5-axis cnc for jewelry wax mill in  the world

Offline

#38 2016-08-22 18:24:57

DLprinter
Member
Registered: 2016-07-16
Posts: 94
Website

Re: Encoder Support

1112294.jpg
1112295.jpg
1112296.jpg
1112297.jpg
1112298.jpg
1112299.jpg
1112300.jpg
I know what I talk about

Last edited by DLprinter (2016-08-22 18:27:59)

Offline

#39 2016-08-22 20:33:38

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

We are working on software for CNC machines and such encoders could be very useful.

Offline

#40 2016-08-23 06:20:15

DLprinter
Member
Registered: 2016-07-16
Posts: 94
Website

Re: Encoder Support

for CNC yes it really useful , but for printer with one Z-axis , it is more than not necessary .
use micro-stepping and small lead in screw

Offline

#41 2016-08-23 06:28:29

DLprinter
Member
Registered: 2016-07-16
Posts: 94
Website

Re: Encoder Support

Shahin wrote:

We are working on software for CNC machines and such encoders could be very useful.


may I ask how many axis it will support ?
and is there possibility of simultaneously movement at least 4-axis , better if 5-axis ?
and what kind of surface toolpaths generator will support  nurbs or mesh ?

Offline

#42 2016-08-23 06:34:54

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

backXslash,

For response as number of clicks, I believe format such as n+n could be prove useful. 
Lets say we send command to platform already on vat floor to go down 10 pulses down, after 5 pulses vat floor push the motor back for 5 pulses.

DLprinter,

Even if it does not help increase accuracy on one axis. It still could prove handy for mechanical and electronic fault detection and floor detection.

Offline

#43 2016-08-23 06:46:09

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

DLprinter
Lets continue CNC discussion here.
http://www.nanodlp.com/forum/viewtopic.php?pid=1136

Offline

#44 2016-08-24 04:21:52

backXslash
Member
Registered: 2016-03-25
Posts: 143

Re: Encoder Support

DLprinter wrote:

backXslash
sorry man , but you spend time for nothing .
believe me as man who create the first 5-axis cnc for jewelry wax mill in  the world

Can't say my time was wasted, after all, it was my time to spend. Nice that you've got a wax mill I suppose though... good for you? The ... is with you people telling me that encoder support is a bad idea or a waste of time? The ... do you care? It's my time, I think it's a worthy pursuit, and even if you don't happen to use it with NanoDLP, it'll probably end up being a useful feature to someone at a later date.

Jesus christ you entitled ...

End rant, I suppose, and thank you Shahin for your patience and support.

Offline

#45 2016-08-24 06:03:54

Shahin
Administrator
Registered: 2016-02-17
Posts: 1,834

Re: Encoder Support

I guess lack of English skill and etc cause these misunderstandings.

Please, keep it cool and focus on the topic. I prefer not to remove or edit comments, help me keep it this way.

Offline

#46 2016-08-24 06:28:56

DLprinter
Member
Registered: 2016-07-16
Posts: 94
Website

Re: Encoder Support

I don't care your .... time .
just advice from my experience
but seems is not for you ,
you can do whatever you want even use direct drive with 5 horse power
good luck with that
amen !

Shahin
is it  better like this ? smile

Offline

Board footer

Powered by FluxBB