CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > General Electronics Discussion


General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-27-2006, 06:43 AM
 
Join Date: Nov 2005
Location: Latvia
Posts: 72
Episs is on a distinguished road
building FPGA motion controller

Are there anyone who knows something about FPGAs and are building some CNC motion controller + driver (all in one) ??
I am asking becose I am traying to build that kind of system by myself whith Alteras Cyclone II EP2C8F208C7 and curently I am in PCB making stage ( I am making base universal PCB module on which I could add other modules with hardware in future for experiments and code development.
And what do you think about Alteras new Cyclone II dev.kit for 150$ maby I should buy this kit for code debugging and error checking in code, becose FPGA bord which I am making will be 2 layer and I will solder it my self so if code will not work in real life then it would be esear detect erors using cyclones II dev.kit .
Here is my last PCB drawing I made it is not completed yet. There are mising power suply, osc. config. (EPCS4) and JTAG pins not conected!
Click image for larger version

Name:	PCB ep2c8 pusgatavs 8 labākais.JPG
Views:	492
Size:	171.0 KB
ID:	24712
Reply With Quote

  #2   Ban this user!
Old 10-27-2006, 03:02 PM
 
Join Date: Jul 2006
Location: USA
Posts: 21
xyz100 is on a distinguished road

Normally FPGAs are debugged with software simulators, not in real hardware.

The flow is:
1. Write the code in VHDL or Verilog;
2. Write testbench in VHDL or Verilog;
3. Simulate/test/debug the code. There are some free simulators (Ikarus for verilog).
4. Synthesize and place and route the code for target FPGA. You would have to pay for these tools (most likely)
5. Load the compiled file in the FPGA's configurator (you need a configurator to load FPGA).

Overall, I think the development will require significant initial investment.
Reply With Quote

  #3   Ban this user!
Old 10-27-2006, 05:01 PM
 
Join Date: Nov 2005
Location: Latvia
Posts: 72
Episs is on a distinguished road

Now I am just serching all information which is availible on the net.
Which IP processor to chose for motion controller there are several options like Alteras Nios II, Latticemicro32(is for free), or one of opencores.org free availible processors for example there was AVR atmega 103 compatible core. Previosly I used ATmega128 and already wrought lot of code in ASM traying to make motion controller on atmega128 but I didn't make becose of low peripheral count so I switched to FPGAs. so I need to chose one processor Core.
I will wright in VHDL.
Reply With Quote

  #4   Ban this user!
Old 10-27-2006, 08:43 PM
 
Join Date: Jul 2005
Location: USA
Age: 42
Posts: 442
pastera is on a distinguished road

Where will you put all the memory you will need to hold the G-code?
FPGA's are extremely expensive when compared to a general purpose processor (8051). If a microcontroller can do it, and it can, then it would be cheaper to place the bulk of the processing in the uC and use one or two CPLDs for the high speed logic that the processor can't handle.

Aaron
Reply With Quote

  #5   Ban this user!
Old 10-29-2006, 09:02 AM
 
Join Date: Nov 2005
Location: Latvia
Posts: 72
Episs is on a distinguished road

I will use parallel flash memory 32Mb (16bit) atmel AT49BV322
I think 32Mb would be enough for G-code and procesor code storage.
About processors then they are not so cheep as compared to FPGAs for example Atmega128 is about 16$, we can take more powerfull AT91SAM7xx ARM7 core about 11-12$ and all they have is Flash memory that my FPGA don't have and Fpga costs are: EP2C8F208C7 20.3$ in digikey +configuration Flash (there are lot of options we can use EPCS4 (16$) or some simple MCU like Atmega48 1.5$+SPI cheep Flash 3$=4.5$) so totaly working FPGA in cheapest configuration will cost about 25$ and it is just 2X more than single MCU but in FPGA we can put 3 Mcu cores (like Nios II) + logic so we get higher price/perfomance ratio. Actualy there is one cheep FPGA motion controller it is MesA FPGA anything IO card but I need sutch electronic which I could modify by my needs and with more logic capacity.
And FPGA is more flexible and If wouldn't like Nios II core then I can downlode any other core and reconfigure fpga so I can evaluate diferent free IP-cores and choose the best for my design. This reconfiguration feature is what I need.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-29-2006, 08:49 PM
 
Join Date: Jul 2005
Location: USA
Age: 42
Posts: 442
pastera is on a distinguished road

Your development costs for an FPGA solution will be much higher if you choose to place the microprocessor in the FPGA. Unless you are planning on building many thousands of unit, you wouldn't recoup the non-recoverables.

If you are doing this as a learning project, you will add a lot to your resume if you even get to 50% completion.

Aaron
Reply With Quote

  #7   Ban this user!
Old 10-30-2006, 01:50 AM
 
Join Date: Nov 2005
Location: Latvia
Posts: 72
Episs is on a distinguished road

It is as Lerning project DIY, where I plan to make some useful electronic which I could use for my CNC needs + experiments.
Reply With Quote

  #8   Ban this user!
Old 11-20-2006, 05:47 AM
 
Join Date: Jul 2006
Location: USA
Posts: 21
xyz100 is on a distinguished road

FPGAs with built-in cores or IP cores do heve built-in RAM (so called RAM blocks). If I remember correctly they can be pre-loaded with code during configuration. Usually configuration data stored in serial EEPROMs (Electronically Erasable Permanent Read Only Memory). Sometimes Flash is used which might be more sutable for your design. However it will require external loader (small CPLD). The benefit - same Flash can hold both FPGA image and CPU executable.
Reply With Quote

  #9   Ban this user!
Old 11-21-2006, 06:53 PM
 
Join Date: Jul 2005
Location: UK
Age: 29
Posts: 441
daedalus is on a distinguished road

hi, i looked into doing something similar a while back. One place i suggest you look is opencores.org, as they have a fair bit of free IP, including soft core processors and networking / io IP available.

If i were you i would get a premade fpga dev kit, and start with that. IIRC the cheapest supplier i could find was a board called Raggedstone, its pci based, and the same company has several models to suit your budget / needs, basic one starts around the $100 mark. There are tutorials available for using the opencores pci IP with this card, but cant remember where i found them.
Reply With Quote

  #10   Ban this user!
Old 11-28-2006, 06:44 AM
 
Join Date: Jul 2006
Location: USA
Posts: 21
xyz100 is on a distinguished road

Originally Posted by daedalus View Post
hi, i looked into doing something similar a while back. One place i suggest you look is opencores.org, as they have a fair bit of free IP, including soft core processors and networking / io IP available.
IMHO code at www.opencores.org is extremely rought. It will take a lot of effort to make it work. Might as well write your own code.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-28-2006, 02:01 PM
 
Join Date: Jul 2005
Location: UK
Age: 29
Posts: 441
daedalus is on a distinguished road

xyz100: guess it depends on your time and ability, i was looking at doing a pci based board, and writing a pci master core is way out of my league
Reply With Quote

  #12   Ban this user!
Old 12-02-2006, 02:26 AM
 
Join Date: Nov 2005
Location: Latvia
Posts: 72
Episs is on a distinguished road

This week I made my first VHDL code for Quadrature encoder logic this code detects encoder rising edge and faling edge and sends one clock signal this logic totaly take 21 LE next I will put alteras megafunction up down Counter and timer and logic will be compleated + direction sens logic.
I checked this Onpen core Quadrature decoder and ather free availible decoders and all they do is counting up and down + direction but what i need is a time interval to establish encoder rotational speed so this was a hardest thing to do to make this rising and faling edge detektos like microcontrolles external interupt which detekts rising edge and make interupt signal ass soon as posible (my logic will work mutch faster then simple MCU I testes in waveform simulator 100Mhz clock signal and there was no problem so teoreticaly I could detect some 20-10Mhz encoder signal and mesure signal time.
About PCB then I know that there is one great boord like alteras Cyclone Dev.kit for 150$ but thing was that this bord came out too late when I already bought from digikey my FPGA ep2c8f208. And now i have this chip and there is no way back. maby in later i will buy this alteras bord becose it has Ep2C20 chip with more logic and aditonal features
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 09:12 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361