Is a parport fast enough?

More
01 Aug 2024 05:01 - 01 Aug 2024 05:05 #306584 by JamesHoward

The Litehm2 project is for the Spartan 6 FPGA so only the RV901T is suitable.

The Litexcnc project is for the Lattice based boards.

There's also Ollie's Linuxcnc rio project, and just maybe if you ask him nicely he may be able to work his magic for your DAC. Don't know if he supports analogue servos, but might be worth hittng him up.

Thanks man! This is useful to me, I have lots of Spartan 6 FPGA's areound here!
Last edit: 01 Aug 2024 05:05 by JamesHoward.

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

More
01 Aug 2024 05:58 #306585 by cornholio
Replied by cornholio on topic Is a parport fast enough?
You were told how it was, the code was rubbish. If you didn't write the code no need to get upset.
The formats were wrong, simple as. Maybe if you tried to do something with it you would have found this out yourself.
Did you even read the code, attempt to work out what it was doing ?

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

More
01 Aug 2024 06:12 - 01 Aug 2024 06:21 #306586 by JamesHoward

You were told how it was, the code was rubbish. If you didn't write the code no need to get upset.
The formats were wrong, simple as. Maybe if you tried to do something with it you would have found this out yourself.
Did you even read the code, attempt to work out what it was doing ?
 


 I have no issue with you burning ChatGPT's code! I am right beside you on that one, I knew it wasn't quite right. Yes I did read it over. Same response. It was only the lack of response to the actual question. Now, I hope we are all over it and can carry on! :D 

Does any of you know which is the better way for me to achieve a +-10 v signal with an FPGA board?
I know there are many ways to do it:

I could use the DAC. How do I program that in HAL? It seems complicated... Reading the data sheet you have to select differrnt modes to load data into the first buffer and them have it xfer that to the second buffer(the actual output). and you have to choose which (of 4) DAC you are usng. Blah Blah... lol

I could use 8 pins from the FPGA board and a resistor network to create my own DAC. How does this get programmed in HAL? Seems less complicated but uses more pins. (I probably have enough)

I could use PWM, a low pass filter, and a unity gain Op-amp with an offset. Does this actually work? I havent tried it in the real world. Is it accurate? How does it get set up in HAL?

I am sure there are others

What are your thoughts??
 

"Don't get mad, get even!"
Last edit: 01 Aug 2024 06:21 by JamesHoward.

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

More
01 Aug 2024 07:06 - 01 Aug 2024 07:06 #306589 by meister
Replied by meister on topic Is a parport fast enough?
i think most hardware using PWM to generate analog output, there are also an hal-component in LinuxCNC for PWMgen:
linuxcnc.org/docs/html/man/man9/pwmgen.9.html
so you can use the parport directly. no need to write code
Last edit: 01 Aug 2024 07:06 by meister.

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

More
01 Aug 2024 07:07 #306590 by cornholio
Replied by cornholio on topic Is a parport fast enough?
Would 8 bits be enough resolution ?

Do your drives have a step & direction input ? That's also an option.

The easiest & most reliable solution (may end up cheaper at the end of the day) is a Mesa 7i77, has 6 analogue +-10v outputs, 6 inputs for encoders, 16 GP outputs & 32 GP inputs. Tho you would have to pair it with a 7i92T. Might be a couple hundred USD but you'll get a proven, reliable and well sorted setup. Something to think of considering your 10HP servomotors (10Hp was right ?).

I designed a couple of add cards that work in conjunction with a cheapish aliexpress FPGA board.
I've run 7c81 mesa firmware connecting via an SPI interface with a RPi4, 7i90 firmware using an EPP interface, a modified 7i90 firmware that is more specific to the setup, tho this needs some mods to mesaflash and the linuxcnc drivers. These are designed to work with Mesa DB25 daughter cards. Will also interface to standard Parallel Port breakout boards.
It's also possible to use a RV901T with modified firmware to run as a Smart Serial card, my poor old card has copped a bit of damage whilst soldering & desoldering bits on and off. Or with the correct adapter it also works with mesa smart serial cards, tested with a 7i73 card.

The same hardware will run Ollies linuxcnc rio firmware, either direct SPI or using a UDP to SPI bridge. There's a basic config in the riocore branch for this board. I have a couple of mates that are going this route.

Quick link to what I've been working on.
forum.linuxcnc.org/show-your-stuff/51142...pga-card-9d60#289226

Could have gone physically smaller with the boards, but wanted to keep as much as possible thru hole as it's easier to assemble and can get parts locally.

As much as I'd like ethernet, that means a move away from 2 layer boards and a lot of other issues that would bring it close to the 7i92T price point.

At the time of working on this project the 7i90 wasn't available and even know postage Down Under almost doubles the price. Pre covid things weren't so bad so the mill uses a few mesa cards. This project is for the FrankenMyford.

I know this is really long winded.....
When repurposing the colorlight boards theres as few things to take into account, outputs aren't an issue as they buffer are already at 5v. The issue arises with inputs. After having looked at a few options I came to the conclusion none are easier, and none are going to get you away from desoldering & resoldering. Some will let you have free reign on what pins are inputs\outputs other options will have pins fixed as inputs or outputs.
Whilst they do seem to be a cheaper option, there are extra costs, even more so if you are the one developing the hardware, if you can find suitable hardware that someone else has had a go out it may be come out a bit cheaper.

This setup isn't too bad, there is a etherent module some one designed for it. The i5 bundle is the cheaper version. A plus for this is that i\o is pretty much free form, tho you still have ot consider the whole 3.3v to 5v translation.
www.aliexpress.com/item/1005002997753428.html

If I was in your position (working and not having an effed up back, this is a guess), I'd more than likely go down the Mesa route, even taking into account what the postage would cost Down Under. The big pluses, as I said before, it's proven, it's reliable, large knowledge base, and direct support from Mesa via PCW. Actually without his generous help I would never had been able to get as far with my project running Mesa firmware.

I'm not trying to discourage you from "rolling your own" but just trying to pass on some of the stuff I've picked up on the way.

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

More
01 Aug 2024 09:22 - 01 Aug 2024 09:56 #306595 by JamesHoward
Hey this is great! thanks for you reply! I do have an Rpi4 and the color light already... I think using them together with PWM and an offset op-amp might be the way i go... It is hardware that i already own and i have time to burn... lol sorta....  And on second thought maybe 12 bits. haha but PWM is probably better. A 7i97 (which is what i think i would need) runs $400+ delivered to my door.... I dont have that much to put into this at the moment.... Does anyone have a used one? 
Last edit: 01 Aug 2024 09:56 by JamesHoward.

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

More
01 Aug 2024 13:45 - 01 Aug 2024 13:46 #306617 by tommylight
I am with you on the "i have hardware" so use that, see how it works for you.
I was in that position and the amount of stuff i learned is astonishing so when i got my first Mesa boards (5i25+7i77+7i74+7i70+7i71+7i71) took me half a day to have everything wired and working, on a 5 ton machine.
You can always order Mesa gradually, get the 7i96S as it is very versatile and has expansions for everything, or get the 7i92TM even cheaper, then add 7i83 for analog and 7i85 for encoder feedback, add 7i84 for 16 outputs and 32 inputs, 7i85S for step/dir, etc, etc there is a huge number of combinations and expansions options.
As for used ones, i got a 7i96 back during the pandemics, in total cost me 330 Euro here, the next day i got an offer to sell it for 1000 Euro, i did not sell it despite not needing it right then.
Luckily that time is over.
Last edit: 01 Aug 2024 13:46 by tommylight. Reason: Typo

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

More
01 Aug 2024 20:50 #306674 by User_paulvdh_42

I know Chats algo's arent perfect.. Its like a highschooler still.

 

I guess it's more like a hallucinating 8 year old who read too many twitter and youtube comments and thinks he knows everything about the world. And of course, don't listen to the people who wrote these algorithms, because they do anything in their power to pump up the hype.

And sure, these bots can be valuable in some niche area's such as sorting through huge amounts of data which would be impossible for humans, but for many things they're not better than mostly random guesses at the moment.

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

More
02 Aug 2024 17:06 - 02 Aug 2024 17:18 #306763 by JamesHoward

I know Chats algo's arent perfect.. Its like a highschooler still.

 
I guess it's more like a hallucinating 8 year old who read too many twitter and youtube comments and thinks he knows everything about the world. And of course, don't listen to the people who wrote these algorithms, because they do anything in their power to pump up the hype.

And sure, these bots can be valuable in some niche area's such as sorting through huge amounts of data which would be impossible for humans, but for many things they're not better than mostly random guesses at the moment.
 

I will actually have to respectfully disagree to this one. "High"schooler I think would be pretty relevant. I have never seen and 8 year old whip up a 1000 word arduino sketch in under 5 minutes. That is one thing that I do use GPT for. It is actually pretty decent at C code... I have lots of microcontroller running of its code. And its also better at finding things on the net than, I hate to say it, Google...... Im sorry oh great oracle, please dont smite me for saying it.....
Last edit: 02 Aug 2024 17:18 by JamesHoward.

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

More
04 Aug 2024 19:56 #306943 by JamesHoward
Here's a quick update. I have picked up a new JTAG/SPI/UART/I2C Flash programmer! I have wanted one for so long.... I have flashed the ColorLight 5A-75E with the LiteX-CNC firmware and my custom config file sucessfully! I have built a schematic in KiCAD that should work for my machine. I have all of the parts that I need. All that is left is to 1: Sleep on the schematic a couple days (let it brew), then I can double check it. 2: Build my PCB file. 3: Etch me some boards and Assemble!

I am including my schematic in pdf form for you to see. Please be gentle! But I will gladly take some thoughts on it!
Attachments:

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

Time to create page: 0.095 seconds
Powered by Kunena Forum