Go Down

Topic: CnC Person needs Arduino code Person (Read 3529 times) previous topic - next topic

wildbill


jumps4

No, I just thought I would give you some good news.
my life on the other hand is owned by Microsoft
I connected the PC to internet to download a PLC program for Acorn and behind the scenes Windows 10 updated.
now my Acorn directory is read only and I have not been able to remove the attribute
I can go into Acorn and redo all the settings and it works until I restart, then it reverts back to prior setup
this is crazy.
I'll find the fix but I guess Microsoft thought I need a project while waiting for parts.
Steve


wildbill

Looking at the remaining todos, The FRAM chip would be a good next step. Also, what do you want to do about reset of the tool positions. Is it necessary, or will you just overwrite existing calibration as you change tools?

 I could add the test for ensuring that the encoder count is 8000 when the Z pulse triggers, but we know it'll be always wrong until your other parts arrive

jumps4

I will get a Fram ordered.
I would like to just overwrite if I change a tool.
If this computer does not straighten up fast I'm changing computers.
 

A side result of this project is your building code others may be able to use to test their encoder setup.
Except for fixing Windows 10 I guess we are in wait mode for now.
Steve

jumps4

#154
Oct 18, 2019, 03:21 pm Last Edit: Oct 18, 2019, 03:25 pm by jumps4
I ordered this Fram
256k Fram

then after ordering they showed this one
Adafruit SPI Non-Volatile FRAM Breakout - 64Kbit / 8KByte

If you prefer the faster one let me know and I'll order it also.
Steve

Adafruit video
SdsFruit Fram video

jumps4


wildbill

It's plenty fast enough for our purposes. Lt's stick with the one you ordered.

jumps4

#157
Oct 18, 2019, 03:43 pm Last Edit: Oct 18, 2019, 03:52 pm by jumps4
I ordered 2 of the 256 just to be safe

will I have enough I/O with this to start setting all of this up on one board with a nano instead of the uno.

I'm going to place the stepper power supply, pulse generator, timers, and controller in it's own enclosure away from everything else.
 the nano will only connect to the Acorn, encoder and power.

jumps4

#158
Oct 18, 2019, 06:08 pm Last Edit: Oct 18, 2019, 06:14 pm by jumps4
I think I Fixed Windows, or at least have it working ( it's windows, no fix in site)
I ran a test on the encoder after removing everything out of the area but Acorn, Arduino and the encoder. computer was powering encoder and arduino
I spun the turret with a cordless drill faster than the stepper motor ever does and my readings were from 7999 to 8003
spinning normal turret speed was 7999 every time and that's perfect 8000=0
the encoder is fine the electrical disturbances are the problem
hurry up Amazon
Steve

EDIT
WildBill this test was run with the second version of pulse counter code you wrote

wildbill

That's encouraging news. Here is a variant of the main program that checks that pulse count is 8000 when it sees a Z pulse. Based on what you observe, maybe the test should be for 7999. Easy enough to change.

It also has the FRAM code. It compiles clean, but of course I can't test it.

wildbill

will I have enough I/O with this to start setting all of this up on one board with a nano instead of the uno.

I'm going to place the stepper power supply, pulse generator, timers, and controller in it's own enclosure away from everything else.
 the nano will only connect to the Acorn, encoder and power.
There seem to be a number of nano variants now, but IIRC, a plain old nano is just an Uno in a different form factor and will have sufficient pins with a number to spare.

jumps4

I can't test it yet either
need debouncing parts
are the 2 3 4 pins looking for a 5v positive or negative input?


the test code I used last is now running on a Nano fine

wildbill

Two and three are the A and B pulses respectively. They trigger on change, so we get the maximum number of signals per rotation. i.e. going from zero to 5V is one, going back is another.

Pin four is the Z pulse and I look for it to go from 0 to 5. Don't care when it drops back again.

jumps4

#163
Oct 18, 2019, 07:31 pm Last Edit: Oct 18, 2019, 07:35 pm by jumps4
Arduino 8 9 10 11 output pins are not working the same

when i connect all inputs are active

EDIT:
I'll go back to uno I don't want to open a new batch of issues.
I'm putting the nano to the side for now

jumps4

#164
Oct 18, 2019, 08:07 pm Last Edit: Oct 18, 2019, 09:02 pm by jumps4
ok back to uno board
and windows problems returned

Go Up