LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
1 year 11 months ago #313809 by tommylight
Just a stab in the dark, but does the TX0108E have capacitors wired to power lines and close to the chip?
A 10 microFarad electrolytic and a 0.1 micro ceramic should do.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #313820 by digiex_chris
well, last night I got first movements to work on my iceshield derivative, and got the scale correct. Trying to get my head around the PID settings, I'm a bit lost since I'm normally a stepper guy working with more direct controllers that work similar to parallel port setups, 1 step = 1 step moved, no hunting position. this seems to be treating the fpga as it would treat a servo with encoder feedback. The position doesn't quite reach the commanded position, and it hunts a little, which I find odd for open-loop steppers with no encoder feedback.

Can anyone enlighten me on how to tune this? Is P too high? I have a feeling it maybe should be set to 1.0 instead of the default 250 so there is no gain.
Last edit: 1 year 11 months ago by digiex_chris.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #313822 by digiex_chris

Just a stab in the dark, but does the TX0108E have capacitors wired to power lines and close to the chip?
A 10 microFarad electrolytic and a 0.1 micro ceramic should do.
 
 
I'm not as familiar with the TX0108E , but another option is to switch the low side instead of the high side. Such as a simple transistor between the - of the driver and GND, if that's an option for your stepper driver. (See image).



I wonder if you're running into voltage drop on the TX0108E if you're switching the high side? I also wonder if the Tang Nano can't push enough current on the 5v rail for your application, maybe provide an external 5v source to VB? Perhaps monitor VB with the scope as well, see how stable that is?
 
Last edit: 1 year 11 months ago by digiex_chris.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #313823 by mBender

Just a stab in the dark, but does the TX0108E have capacitors wired to power lines and close to the chip?
A 10 microFarad electrolytic and a 0.1 micro ceramic should do.
 
 
I'm not as familiar with the TX0108E , but another option is to switch the low side instead of the high side. Such as a simple transistor between the - of the driver and GND, if that's an option for your stepper driver. (See image).

I wonder if you're running into voltage drop on the TX0108E if you're switching the high side? I also wonder if the Tang Nano can't push enough current on the 5v rail for your application, maybe provide an external 5v source to VB? Perhaps monitor VB with the scope as well, see how stable that is?

 
I thought about the Transistor solution as well. I have actually some transistors laying around, but the fact that the new level shifter should arrive any minute has me stopped that. At least for the moment. 

The power supply from the Tang is stable. I had that suspicion too and tested it with my oscilloscope. 5V is clean and no power drop.

What I have found out is that the bidirectional level shifter have some weird logic to figure out which side is driving and it seems they create often problems. I even tried to put the output side with a pull up / pull down. No difference.

I think something like a 74ACT245 where you can external control the direction might be better for this application.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #313825 by meister

well, last night I got first movements to work on my iceshield derivative, and got the scale correct. Trying to get my head around the PID settings, I'm a bit lost since I'm normally a stepper guy working with more direct controllers that work similar to parallel port setups, 1 step = 1 step moved, no hunting position. this seems to be treating the fpga as it would treat a servo with encoder feedback. The position doesn't quite reach the commanded position, and it hunts a little, which I find odd for open-loop steppers with no encoder feedback.

Can anyone enlighten me on how to tune this? Is P too high? I have a feeling it maybe should be set to 1.0 instead of the default 250 so there is no gain.
 
the pid-loop is necessary with external hardware, as only velocity information can be sent in this way.

The deviations are actually only rounding errors, which should be no different with mesa hardware.

Remora does it the same way, only with a little trick, there the PID controller is hidden in the driver and linuxcnc does not show the calculated values but those that were sent.

In the beginning I also had the PID controller in the driver (linuxcnc-component), because it was only a copy of the remora driver, but that is actually just optics.

so far, the position has always been accurate to the step...

tuning is also not necessary if you use stepper
 
The following user(s) said Thank You: digiex_chris

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #313826 by meister

Just a stab in the dark, but does the TX0108E have capacitors wired to power lines and close to the chip?
A 10 microFarad electrolytic and a 0.1 micro ceramic should do.
 
 
I'm not as familiar with the TX0108E , but another option is to switch the low side instead of the high side. Such as a simple transistor between the - of the driver and GND, if that's an option for your stepper driver. (See image).

I wonder if you're running into voltage drop on the TX0108E if you're switching the high side? I also wonder if the Tang Nano can't push enough current on the 5v rail for your application, maybe provide an external 5v source to VB? Perhaps monitor VB with the scope as well, see how stable that is?

 

I thought about the Transistor solution as well. I have actually some transistors laying around, but the fact that the new level shifter should arrive any minute has me stopped that. At least for the moment. 

The power supply from the Tang is stable. I had that suspicion too and tested it with my oscilloscope. 5V is clean and no power drop.

What I have found out is that the bidirectional level shifter have some weird logic to figure out which side is driving and it seems they create often problems. I even tried to put the output side with a pull up / pull down. No difference.

I think something like a 74ACT245 where you can external control the direction might be better for this application.
 

On the Tangbob board I use the TXS0108EPW with pull up/down resistors on the input side.

However, to switch optocouplers in the output stages, for example, you still need a driver like the ones installed on the BOB boards (uln2308), the level shifters are not designed for this

Please Log in or Create an account to join the conversation.

Time to create page: 0.141 seconds
Powered by Kunena Forum