Another microcontroller for me

Non-EMS Electronics related discussions and projects in here please.
User avatar
longracing
LQFP112 - Up with the play
Posts: 140
Joined: Wed Jul 16, 2008 9:21 am
Location: NSW, Australia

Another microcontroller for me

Post by longracing »

I ordered an Arduino mini the other day and it arrived this morning, Have already got LEDs flashing :)

I went with the Ard to get the hang of programming in C without have to spend extra money on the software yet (before finding out if I can program in C).

I was thinking of building an inertial "dyno" with it. Will be starting off with a small electric bench test rig to start with. Then if I am successful I might move on to a go-kart dyno then bigger is always possible.

The computer interface is going to be the hard part I think. Does anyone know of any other projects/software I could adapt?
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Another microcontroller for me

Post by Fred »

If by computer interface you mean serial protocol then you are welcome to pinch ours and cut it down to size. If that's not what you mean, please explain :-)

Also, what do you mean by spend money on software?

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Another microcontroller for me

Post by jharvey »

I'm curious how you program the Arduino. Do you use avrdude, or a different program to upload the hex file?

I believe that gcc has an AVR option, and they are very well supported. I also believe that a typical setup for programming AVR's is to use eclipse for the gui, gcc with the AVR plugin, for the compiler.

About the comms, have you found the serial section from here?

http://arduino.cc/en/Reference/HomePage

Also check this

http://www.arduino.cc/playground/Main/I ... thSoftware
User avatar
longracing
LQFP112 - Up with the play
Posts: 140
Joined: Wed Jul 16, 2008 9:21 am
Location: NSW, Australia

Re: Another microcontroller for me

Post by longracing »

I am using the Arduino-0015 software to program the MiniArd. It has GCC and AVRdude included in the bundle (free download) and I believe the code could be ported to an AVR quite easily. The main advantage of the Arduino is the bootloader. The board is basically an AVR with a crystal, decoupling cap, small Voltage reg. and pinouts for a bread board.

I am using it with the MiniUSB which uses an FTDI USB to serial chip.
The MiniUSB board has SMT leds for transmit and recieve
Image

I have been able to recieve serial data using code from the examples but what I will be after is software to turn that data into a graph or some other useful display to log "Runs".

Spend money on software, :lol2: silly me. If I plan on programming PIC'c in C at work they may have to purchase software but If I can't get away with using Assembley I might switch to the Atmel chips to use the GNU-GCC. :indiff:
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Another microcontroller for me

Post by jharvey »

You might have some problems with your LED's. I don't see resistors on the top of that mini board. If that's the case, and you use the LED's you may be limiting the current to the LED's by the resistance in the driving transistor of the MCU. That will typically burn up the transistor. You may want to double check if you have a resistor on that LED.

I believe PIC's also have a GCC module these days.
User avatar
longracing
LQFP112 - Up with the play
Posts: 140
Joined: Wed Jul 16, 2008 9:21 am
Location: NSW, Australia

Re: Another microcontroller for me

Post by longracing »

Thanks for the reminder, I checked the data on the Ard. and it does use a resistor on pin13 (the red LED is connect to this). This was shown in the 'blink' example and I then forgot to use resistors on the other pinouts. :oops:

I will keep an eye on the GCC for the PIC's. Microchip MPLABs comes with a Hi-tech C compiler but this only covers a limited number of chip part numbers. So far it I haven't found a C compiler that covers the chips I have been using.
MotoFab
1N4001 - Signed up
Posts: 307
Joined: Thu May 29, 2008 1:23 am
Location: Long Beach CA

Re: Another microcontroller for me

Post by MotoFab »

longracing wrote:I will keep an eye on the GCC for the PIC's. Microchip MPLABs comes with a Hi-tech C compiler but this only covers a limited number of chip part numbers. So far it I haven't found a C compiler that covers the chips I have been using.
You may already know about this. You can try out the 32bit Microchip parts. The unoptimized C Compiler for the 32bit PIC is free. It includes all the math and DSP libraries. From what I've read in their forums, the C code can be written so that there is little for the optimizer to optimize. They say it is similar to writing in C as if you were coding in assembly.
http://www.microchip.com/stellent/idcpl ... e=en532454

Microchip have a USB-powered $55 starter kit that plugs in and debugs in MPLAB. Has a built-in off-chip debugger. It also has a standard Type A USB connector to plug a flash drive into for data logging.
http://www.microchip.com/stellent/idcpl ... e=en535536

Another development board for $40 has about the same features as the Microchip development board. USB flash drive, bootloader etc.
Mfg: http://www.schmalzhaus.com/UBW32/
Dist: http://www.sparkfun.com/commerce/produc ... ts_id=8971

Image

No association, just putting it out there.

- Jim
User avatar
longracing
LQFP112 - Up with the play
Posts: 140
Joined: Wed Jul 16, 2008 9:21 am
Location: NSW, Australia

Re: Another microcontroller for me

Post by longracing »

I've been doing a few experiments using a 16x2 LCD dot matrix and a two-channel optical encoder.

So far I have made a simple tachometer display and a meter counter.
Image

That 32bit board from sparkfun looks great. Could do a lot with that much power and all the pin-outs :)
I'm also going to have a look around to see what other 32bit boards are out there.
And I have some blank copper plated P.C.B. that I want to try the toner-transfer method and SMT on...
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Another microcontroller for me

Post by sry_not4sale »

DUDE you read my mind!

Few guys at work are playing with Arduinos... I want to hook one up to an LCD and display basic data like temps / pressures.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Another microcontroller for me

Post by Fred »

sry_not4sale wrote:DUDE you read my mind!

Few guys at work are playing with Arduinos... I want to hook one up to an LCD and display basic data like temps / pressures.
You have something significantly better sitting on your desk gathering dust, make the guy that sent it to you happy and put it to some use! It will happily monitor stuff with the existing code, just add a gui app that works ;-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply