Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with Ardruino platform

Status
Not open for further replies.

fastline

Member
I am looking to start programming MCs. I have a large gap to fill in my understanding so anything that will make the transition easier would be nice. However, I do plan to use chips in some simple retail products so costs "could" come into question. I just want to make sure I go the right direction.

I am looking at the Ardruino platform. Specifically the Uno but I understand that to be more of a plug and play, hobby type board. However, I see no reason I could not desolder the chip, add a ZIF socket, and use that board to program. Another however, I learned that the Ardruino uses a bootloader which may or may not be ideal. I also learned that the bootloader defines the fuses and cannot be edited. I believe the chip they use has an 8mhz internal clock but they define it to use an external clock. I understand that the ext clock is really only needed for tight timing control which I don't need right now. Cheap and easy is what I need right now.

Comparing price, I doubt I will lose sleep over the extra 2 bucks per chip but I have to wonder if it is worth it as a rookie? Seems well supported out there. Can anyone confirm if I am on the right track and/or recommend any other platforms to play with?

I know my brother is actively working with the PICkit and 16F690 chips. However, he has more experience than me and I think the faster I get stuff to start working right, the more I can understand it.
 
The Arduino is just a AVR with a bootloader programmed into it. You'll need to pre-program new ATmega328P chips (Arduino UNO) before you can use them. That little 6pin header is for programming.

The PICkit2 or 3 are programmers & debuggers. No bootloader needed. If you want really easy try Swordfish BASIC and an 18F PIC.
 
Last edited:
I guess what I am asking is, by using the Ardruino platform, does it simplify programming with their software? Is there some advantage to using it? Is it possibly the fact that their bootloader takes care of the fuses and such right out of the gate so you can just enter code and role?

Also, it was my understanding I might need another proto board to add their bootloader to a new chip, is that not the case? If I add a ZIF socket on the board, can I just install a new chip on the board and load up the bootloader? All the tutorials I have seen show a separate proto board for this like the chip that is on the Uno must stay there or a chip maybe has to have the bootloader before being installed on the UNO?
 
I dont play with the arduino, however its an excellent platform from some of the projects I've seen, it might be a good way to start as there is a lot of support and others using it, however if you want to make boards for consumer products that are cost sensitive then your probably gonna need to use a straight micro and write your own code either in assembly or asm.
2 common ones are pic micro and avr's, I prefer pics, but thats only because I was introduced to them by someone who shared his knowledge with me.
Do a bit of research on google.
I've never looked into it but if you want to use the arduino in commercial products then there may be certain rights, permissions and royalty payments you need to be aware of.
 
Last edited:
Just to be clear, I was not going to use the entire UNO board in anything, only use it as a programmer for the chips. Am I right in the understanding that the Arduino uses a certain proprietary language for programming? Obviously all compiled back to standard code but I am just not familiar. I work with CNC machines so I understand about the programming side and the ultimate final code files. However, ours are not binary being input to a machine. We see the numbers on a machine and the control converts them just before executing them.
 
The UNO and all Arduino type setups are USB or serial to the TX, RX & Reset pins on an AVR chip. (DTR) Reset starts the bootloader program and the unit self flashes the programming space. Think of it as training wheels.

It's popular because it's very easy to use and the Arduino IDE software is cross platform.

If you're going to mass produce then stick with an AVR ICSP or PIC ICD. Neither require a bootloader and offer a much wider choice of programming software ASM, C, BASIC... and possibly debug mode.
 
Fastline, I maintaian cnc machines, I'm not a gm code expert but I know enough to get by.
What you wantin to build?
 
Dr Pepper, thanks for the reply. This is really nothing CNC related but I guess I bring it up because I know them so my experiences come from there. I am hoping with our common ground, you can help me with one seemingly simple, now considered complex design...

I need to rotate a circular device and index it at predetermined angles, hold for a few seconds, and move to the next. The problem comes in where I need some level of feedback or confidence that the positions are met before my other operations take place. In another thread, I was originally targeting a simple stepper motor. The problem is, as you know, no feedback. Now, I am guessing there are some smart ways through current OL detection, etc but there will still need to be a homing routine and still a level of unknown.

I started looking around and finding DC servo motors pretty cheap. Simply apply a voltage until the proper encoder position is detected, drop power to motor, etc. I am betting I am under estimating encoder A/D. I am most familiar with analog output optical encoders. Obviously do not need 2000-4000 lines for this! My positions are about every 24* with a repeatability of .5*, motor speed not to exceed 30rpm. That might be a pulse train of 500hz back to a controller

I am really hoping to use only a couple channels of an encoder and do everything from the Arduino chip. Anything more just seems like WAY overkill for this project. I am already having a hard time floating. I know from the CNC world that encoder feedback usuallyrequires a separate card that does nothing but process encoder data and send positional commands to the control. I am hoping to avoid that unless I am taking the hard road by doing that.

I am certainly open to other ideas like going back to a stepper. I just need some level of confidence that if the rotating device gets bound up or loses power, my other functions do not further damage things. Sort of like how my Haas did not know the spindle drive died and took off trying to make parts with a dead spindle.... NEET! A spindle drive board cannot send an alarm switch to the control if it is dead...BAD design...
 
Last edited:
You can use the uno as a programmer an just copy your code over to a blank ATmega328 chip
 
What about adding the Adruino bootloader to blank chips? Seems a lot easier than trying to chase down chips with that already installed..

To do this work, would I just create a proto board with a ZIF socket and leave the factory MC on the Uno or would it be easier to just remove the factory MC from the Uno and add a ZIF socket on the Uno board?
 
You can clone the chip it's easy as pie

Have a read over here https://arduino.cc/forum/index.php?topic=105749.0

You can place a blank chip on a bread board and burn the code to it It's easy use the progmmer
https://arduino.cc/en/Tutorial/ArduinoISP

Read both links

You can burn the bootlader on blank chips and use a USB to serial adaper to lload code you use the UNO to program the code is loaded to it to make it work as a programmer you cant remove the chip and place a blank on it.

The blank has no bootloader but the UNO progarmed to be used as a programmer can burn your code or bootlloader and then use the USB to serial adapter they sell these cheap there even a kit that has chip with bootloader on it just grab a usb dongle and load your code.
 
Last edited:
Honestly, it sounds like you're looking for an MCU platform with little to no learning curve. You're not gonna find it. No matter how you do it, there is always going to be a learning curve.
 
Status
Not open for further replies.

Latest threads

Back
Top