Shop OBEX P1 Docs P2 Docs Learn Events
Yet another controller board - Page 2 — Parallax Forums

Yet another controller board

2»

Comments

  • MicksterMickster Posts: 2,920

    That's not what I'm reading. Programs lost due to dead battery or firmware password protected or convoluted logic that no-one can decipher or can't locate the programming software and later versions aren't compatible. Programming license problems.

    I don't know what the number is today but in 1990, if the Mini Van line went down at General Motors, they were talking a million bucks/hour. They kept reminding me because I used a PC clone motherboard from Taiwan for the CNC :D
    Big war with GM engineers so I grabbed one of their office PCs, transferred the controller cards to this desktop machine that was perched on a chair, loaded the software and the machine ran.
    I requested that they demonstrate similar with one of their PLCs, you know, those things that you aren't allowed to keep in stock.

    This is where the BS stops

  • evanhevanh Posts: 17,215
    edited 2026-04-26 23:26

    Yeah, people as asses if they want to be. A password on a PLC defeats the purpose of a PLC, IMHO, but obviously that's what some idiots will do. People stick fragile dongles on PCs too. And of course no access to source code either. These days likely requires full time Internet access for the software to regularly "phone home." They can't help but look for the money stream through a lock-in of some sort.

    My current boss has a reliable consumable lock-in already but he still can't stop thinking about the software as a means to control the customers anyway.

  • ManAtWorkManAtWork Posts: 2,355
    edited 2026-04-27 08:25

    I don't want to argue about what type of signal interface or control method is best. Everybody has his own preferences and that depend on customers requirements, budget and also historical reasons. Fortunatelly, the Propeller is very flexible and we can implement any of them like we choose.

    Theoretically, EtherCAT would be "best" and could cover all of them (torque mode, velocity mode with external feedback and direct position control). But I've abandonned that because it was too complex for me. I simply couldn't get it work in half a year. Maybe, now that AI is getting better at coding I'd start a new try sometime in the near future... But for now I stick to what's available at reasonable cost and is easiest to implement for me.

    BTW, I do have plans for implementing closed loop control. The second RJ45 socket in the picture of post #11 was originally meant for a single encoder input to implement thread cutting on a lathe without a servo drive on the main spinlde but only a VFD with induction motor. But I've already designed a PCB that can be connected to this input and serves as an "encoder expander". It can take the signals from up to six encoders or glass scales, count the pulses and send the position counter values over a serial protocol to the main controller. I can simply re-program the 3 smart pins that handle the ABZ signals of the single encoder input, there.

  • MicksterMickster Posts: 2,920

    @ManAtWork said:
    I don't want to argue about what type of signal interface or control method is best. Everybody has his own preferences and that depend on customers requirements, budget and also historical reasons. Fortunatelly, the Propeller is very flexible and we can implement any of them like we choose.

    Theoretically, EtherCAT would be "best" and could cover all of them (torque mode, velocity mode with external feedback and direct position control). But I've abandonned that because it was too complex for me. I simply couldn't get it work in half a year. Maybe, now that AI is getting better at coding I'd start a new try sometime in the near future... But for now I stick to what's available at reasonable cost and is easiest to implement for me.

    BTW, I do have plans for implementing closed loop control. The second RJ45 socket in the picture of post #11 was originally meant for a single encoder input to implement thread cutting on a lathe without a servo drive on the main spinlde but only a VFD with induction motor. But I've already designed a PCB that can be connected to this input and serves as an "encoder expander". It can take the signals from up to six encoders or glass scales, count the pulses and send the position counter values over a serial protocol to the main controller. I can simply re-program the 3 smart pins that handle the ABZ signals of the single encoder input, there.

    Just letting you know that at least a couple of us are paying attention to your developments. We have too few motion guys here :+1:

    I am excited about these low cost VFDs. The ones that I am using are switchable between VFD/FOC.
    Fitted one to a Bridgeport knee mill.... beautiful. The motor is smooth and the variable speed means we never need to change pulleys.

    For what these things cost, toss the star/delta contactors and replace them with these VFDs. So many hydraulic machines are left running full time and their duty cycle can be 10%. Constant start/stop is a PITA but what if they could gently spin-up and spin-down in between and therefore only run when needed for actual work. Opportunities abound. :)

  • @Mickster said:
    Just letting you know that at least a couple of us are paying attention to your developments. We have too few motion guys here :+1:

    Yes thanks, I appreciate that.

    I'm also glad I'm not the only one lamenting about common industry practices. I just had another big "oh no"-moment.

    I wondered why the servo drives I currently use (Lichuan A5) don't store the gain parameters. After a power cycle they were always reset to the default values. I thought it was my fault and I had to set some "EEPROM write enable" bit or unlock some safety feature with a password. But the manual didn't mention anything like this. Finally I found out that the drives have some sort of autotuning and this can't be disabled at all. So the drives overwrite any value the user sets after some time, at least after re-booting.

    Aaaarrrggg! :s This renders the servos totally useless for CNC applications (at least for the random user who expects to set the parameters only once at the front panel). Unlike in automation where moving a single axis to its destination is enough, CNC machining requires multiple axes to be in perfect synchronisation. This prohibits autotuning because non of the autotuning drives are aware of each other. Each one tries to adjust only its own gain values. But if they differ from drive to drive this means that also the delay times and the following errors differ. So interpolated trajectories become distorted. At least the P gain of the position loop should match between all axes.

    I know, one fix would be to use the drives in torque or speed mode only and do the position control in the central motion controller. Another possibility would be to just re-transmit all the parameters every time after power-up, again. This may seem cumbersome but only takes ~100ms so nobody should ever notice as long as it works reliably. This also has the advantage that it doesn't matter at all if the drive is replaced. Maintenance personel could replace any drive with a new, blank one and without having to perform any initialisation procedure.

  • MicksterMickster Posts: 2,920

    Lichuan drives/motors....Perfect. They are on my shortlist.

    I remember you using Sanyo Denki.

    How do they compare, quality wise?
    I have all the Lichuan documents and they look darned good.
    I enquired about brand labelling and can you believe that they will do it with no MOQ

    The routine update, I would regard more of a feature than a fault. Rapid replacement is everything.

    Another idea: These old machine tools are so nice with their big beefy castings. I have a bunch of beautiful BIG Bridgeports that are in need of a brain transplant.
    I see that the Chinese have Fanuc (and others) compatible CNCs BUT they don't close the loop. Only pulse/dir.

    How about we bring the pulse/dir (as a position command) to the P2 and close the loops, outputting 10V to the existing drives?
    These machines can't justify new drives/motors/wiring. It's always a problem with the obsolete CNC. HUGE potential B)

  • MicksterMickster Posts: 2,920

    Following error control: I have had moderate success with adaptive gain control but messing with the PID can result in loop stability issues. My best friend is feedforward.

    I have read so many publications on this issue that I am convinced that some of the authors have never been near a motor.

    And don't get me started on loop sample times. Reality is that slower can be better. Anyway, that is a different discussion. :)

  • Around the year 2005+/- I made a living on retrofitting old machines with new controllers and if possible keeping the old motors. Man, that job was hard! Every machine was different. So there were a lot of unexpected things happening and I had to improvise every day. Those days servo drives, especially with high power >1kW were really expensive so it made sense to keep the motors.

    But now, I would never do that again. You have to replace all cables anyway because the 20 year old insulation became cracked. So you have a lot of effort just to keep the old motors and then a year later the customer calls you up because one of the drive quit and there are no affordable spare parts available any longer. So you have to replace the servos one after another which is much more expensive than replacing them all together in the first place.

    Yes, I could replace the upper PCB of the controller keeping the main board with the P2 and do analogue +/- 10V commands instead of step/dir. But I'll only consider doing this if there's a large enough number of machines that are all nearly the same so I don't have to redesign schematics, cables and so on for every machine.

  • @Mickster said:
    I remember you using Sanyo Denki.
    How do they compare, quality wise?

    The main difference are the encoders. Sanyo Denki motors have true optical encoders while the Lichuan have magnetic encoders. The cheap version (17 bits) have a single pole pair magnet rotor like a compass. So they have quite a lot of noise and are sensible to external fields. If you hold a strong rare-earth magnet near the rear cap of the motor the position drifts several degrees.

    The 23 bit version of course don't have 23 bit precision, that's a marketing trick. But the advantage is that they have a multi pole-pair rotor and therefore are much less sensitive to external fields. The so-called "absolute" version has a battery attached to the encoder cable to provide backup power during power-off. So the multi-turn information is retained. What they call the "incremental" version is still absolute but only provides single-turn angle information.

    Sanyo Denki motors have multi-turn absolute encoders without battery. They use a patented Wiegand Wire sensor to count revolutions. This works without (external) power. So you don't need to replace batteries every 3-5 years.

    So the quality of the Sanyo drives is better. But it's only worth the money if you really need it. Sanyo drives are ~$800 per axis (750W) compared to $140 for Lichuan.

  • What I really like about the Lichuan drives is that they have affordable and easy to solder connectors. I absolutely hate the 3M 50 pin MDR connector of the Sanyo Denki drives. They are expensive, pain to solder and a right angle PCB-insert version to make adaptors is really hard to get. Lichuan uses standard 44 pin HD SUBD connectors for the command signals and 6 pin fire-wire for the encoder.

  • MicksterMickster Posts: 2,920

    I am looking at the A5 & A6 series drives. I want the incremental (2500 line) encoder option (optical). The drive's CN1 provides a "simulated" encoder output.

    Every machine was different

    :D And the ones that you are familiar with....someone modified and didn't document.

    This is why I like a BASIC interpreter on the front-end and let the Prop take care of the time-critical stuff.

    So you have to replace the servos one after another which is much more expensive than replacing them all together in the first place.

    True but in many cases, this cost-spreading works well for the customer. Demonstrate that the equipment can once again be productive and not destined for the scrap yard and they are willing to run with it.
    The front-end receives constant physical abuse; it dies and the machine manufacturer doesn't support it anymore....a $200,000 piece of equipment is dead because of a HMI.

    This is a retrofit I did in 2015, it's a standard Samsung Android tablet that is totally abused, never even wiped down. Even with that dried-on gunk and metal chips on the screen, it responds like a brand new unit. If it dies, they simply download the app to a phone or another tablet, pair the Bluetooth and they are back-up and running.

    The younger machine, next to this, has a Siemens HMI that is unusable due to dead buttons and joystick (mouse). In this case, I WILL replace all nine drives/motors because I refuse to even look at Profibus but it will still be a drop-in-the-bucket compared to a new machine.

  • Very nice👍

Sign In or Register to comment.