PDA

View Full Version : programming axon with a-d converter



robot maker
07-21-2008, 10:54 PM
i also seem to like atmega128 ,since it is fairly fast and does have a free toolchain
books i have bought to learn c programming is visual c++ for dummies,also absolute begineers guide to c by greg perry, and peter wright beginiing visual basic
for programming with pic i bought programming pic microcontroller with picbasic by chuck hellebuyck
i am beginner like you Alex,mostly all i do is designing circuits and just got into programming about 8 months ago
also i have adruino,witch is the same as wiring board and use the same software,basic stampis another
basic stamp is where i am learning first,irobot create uses also ATMEGA processor
so thats another reason i got protoboard for ATMEGA128
from ADRENALYNN posts she is really good at programming and a great avatar too


quote=Adrenalynn;13124]Well, today's microcontrollers basically ARE yesterday's PCs... So really, once you learn your basic C, you're set to start digging into the particulars of your chosen microcontroller. I'm a huge fan of the AVR chips. They have a microcontroller for every occassion, from the miniscule widdle ATTINY's on up through the ATMEGA128 and beyond. The tool chain is free and standard (GCC under WinAVR), and if you get a good programmer (I like the STK500) the DVD comes with full documentation, spec-sheets, app-notes, etc.

This is the reason I argue that today's microcontrollers may be the absolute best way to learn C programming. They don't overkill it as today's modern libraries and environments do. It's just good clean ANSI C programming. Compile, Link, Load the chip, and hit the reset. Boom. It runs or it doesn't. Immediate feedback with the advantage of being able to talk to the world outside of your computer.

The Arduino is arguably better for this, but it's expensive to be dropping it on a project and adding another one to your collection every few days. The smaller ATTINYs cost pennies. I buy the ATTINY45's and 2313's by the tube full. They require almost no glue hardware for smaller projects. You can do real work with a couple resistors, whatever sensors, LEDs, etc you have laying around, and a marginally clean power source.

The STK500 can be used as a learning board too, with 8 switches and 8 LEDs, and comes with a reprogrammable ATMEGA 8515 pre-installed.[/quote]

instead of the adruino board,use the wiring board both have the same processor,same software ,and has usb,and so many many examples on the website
i like so much better then basic stamp,but i still use basic stamp for a fast testing of my sensors and servos,just very bad for speed and other inputs ,like pwm
here is a link for wiring board ,cost for board was $59 http://wiring.org.co/,but most likely you can use adruino board since software is the same,for the examples and info seems to be better also its under learning on top of page



Awesome wireframewolf! That C guide is definitely going to help me! Straight and to the point, just the way that I like to learn:D I don't have any directly C related questions yet, but I'm sure eventually I will.

So, as far as boards and programming in C go, do you think the Arduino is a good start? How exactly do you program the Arduino in C? I knew there was a way to program it in C (outside of it's own proprietary language), but I haven't had the time to look into it yet:(

Adrenalynn
07-21-2008, 11:08 PM
Arduino is much less expensive (with a few fewer inputs)

http://www.trossenrobotics.com/arduino-diecimila-usb-io-board.aspx

robot maker
07-22-2008, 12:45 PM
that was the best reason i bought the wiring board it has alot more I/O
39 I/O,8 PWM 8 ANALOG ,and i think a memory chip,boards look the same size and built near the same


Arduino is much less expensive (with a few fewer inputs)

http://www.trossenrobotics.com/arduino-diecimila-usb-io-board.aspx

here is a link to compare both boards as i did
http://wiring.org.co/hardware/compare.html
always a good idea is to get the best value for a good price

Adrenalynn
07-22-2008, 02:39 PM
I saw that. Alas it appeard to me that they had a pin counting problem on the Arduino, so I didn't look any further. It invalidated the entire table for me...

Always a good idea to check the bias on non-independant comparisons.

robot maker
07-24-2008, 04:31 PM
looks like you are right they missing 4 pwm controls ,there are 6,but all the rest is correct ,i get both boards,but wiring still has alot more pins 26 pins compare to all the pins on atmega128 plus alot more memory,so need to see if a robot project you are building needs more pins or memory or less pins ,to me more pins are better, dont care about the cost of the item
i bought 2 boards one for a create robot project and one for a UROV where i need to control 8 pwm thrusters

Adrenalynn
07-24-2008, 09:52 PM
If you don't care about the cost of pins, there are MUCH better choices out there. The ATMEGA 640 in John's Axon, for example.

robot maker
07-25-2008, 08:51 PM
Adrenalynn ,do you have a link always looking for better boards for my robot projects


If you don't care about the cost of pins, there are MUCH better choices out there. The ATMEGA 640 in John's Axon, for example.

Adrenalynn
07-25-2008, 11:33 PM
http://www.societyofrobots.com/axon/

John's great, and his board is really nice. Good filtering, very good layout

" With the Axon, you will no longer need to worry about not having enough I/O as it has 55+ for you to use - up to 16 ports for analog sensors, and up to 18 for interrupts. You will never be wanting of UART (http://www.societyofrobots.com/microcontroller_uart.shtml), as there are 3 directly available, with a 4th used for a USB connection directly to your PC. No additional programmer needed due to a built in programmer (bootloader). Lastly, extensive source code and tutorials have been developed to make it easy enough for a beginner. "

55 I/O Total
Up to 16 ADC
Up to 29 Servos
I2C, SPI
3 UART
Serial to USB Converter (4th UART)
Up to 18 interrupts
Up to 9 PWM Channels
64KB Flash, 4KB EEPROM, 8KB SRAM
16 MIPS throughput at 16 MHz
6 Timers
Comes already programmed with a bootloader, so no programmer required
built in power bus
all software is free
100% open source


Trossen should be stocking it shortly too.

[you're welcome, John...;)]

robot maker
07-26-2008, 02:57 PM
looks good for my beer-bot arm project,since i need near 4 pwm,14 servos and 10 or more adc,may need 20 adc,besides 10 pressure,thinking of using temp sensor ,but I2C bus to temp or adc to I2C bus


also what do you think about the arm7 cortex-m3 processor ,its very fast



http://www.societyofrobots.com/axon/

John's great, and his board is really nice. Good filtering, very good layout

" With the Axon, you will no longer need to worry about not having enough I/O as it has 55+ for you to use - up to 16 ports for analog sensors, and up to 18 for interrupts. You will never be wanting of UART (http://www.societyofrobots.com/microcontroller_uart.shtml), as there are 3 directly available, with a 4th used for a USB connection directly to your PC. No additional programmer needed due to a built in programmer (bootloader). Lastly, extensive source code and tutorials have been developed to make it easy enough for a beginner. "

55 I/O Total
Up to 16 ADC
Up to 29 Servos
I2C, SPI
3 UART
Serial to USB Converter (4th UART)
Up to 18 interrupts
Up to 9 PWM Channels
64KB Flash, 4KB EEPROM, 8KB SRAM
16 MIPS throughput at 16 MHz
6 Timers
Comes already programmed with a bootloader, so no programmer required
built in power bus
all software is free
100% open source


Trossen should be stocking it shortly too.

[you're welcome, John...;)]

looks like a good easy board,but i found out that wont work for my beer-bot hand design ,mostly because no roborealm plug in,and i have a good board for the servos yost servocenter 3.1
like much better then sc-32 by lynxmotion
on the sensors (adc board) i have a couple of ways ,one is use `I2C and use 20 adc chips witch is the hardest or get a microcontroller with 20 a d inputs
axon board maybe be a good latter on for another project,but i also see it 8 bit device ,its not to much of a problem but i like 16 bits and a faster microprocessor
that where cortex-m3 come in and free software too


http://www.societyofrobots.com/axon/

John's great, and his board is really nice. Good filtering, very good layout

" With the Axon, you will no longer need to worry about not having enough I/O as it has 55+ for you to use - up to 16 ports for analog sensors, and up to 18 for interrupts. You will never be wanting of UART (http://www.societyofrobots.com/microcontroller_uart.shtml), as there are 3 directly available, with a 4th used for a USB connection directly to your PC. No additional programmer needed due to a built in programmer (bootloader). Lastly, extensive source code and tutorials have been developed to make it easy enough for a beginner. "

55 I/O Total
Up to 16 ADC
Up to 29 Servos
I2C, SPI
3 UART
Serial to USB Converter (4th UART)
Up to 18 interrupts
Up to 9 PWM Channels
64KB Flash, 4KB EEPROM, 8KB SRAM
16 MIPS throughput at 16 MHz
6 Timers
Comes already programmed with a bootloader, so no programmer required
built in power bus
all software is free
100% open source


Trossen should be stocking it shortly too.

[you're welcome, John...;)]

one i saw that i like and there is low cost protoboard for cortex-m3 is stm32f103zc 21 channels of 12 bit adc and 112 I/O 's at 72 mhz and 32 bit processor
http://www.st.com/mcu/devicedocs-STM32F103ZC.html
sparkfun has one for $40 with a few less I/O protoboard complete with chip and usb already to use
http://www.sparkfun.com/commerce/product_info.php?products_id=8559 51 I/O 'S but same speed and 32 bits

robot maker
07-30-2008, 10:40 AM
Adrenalynn or any one else
have any one worked on arm 32 bit cortex-m3 or any idea for another microcontroller for my beer-bot design
i need 10 adc inputs per hand ,5 fsr's and 5 thermistors per hand
only one i saw so far is STM32F103ZX with 21 adc channels and 2 dacs running at 72 mhz
software i have is free Eclipse and is the software easy to use
or does anybody have better idea

also noticed looking at ATMEGA,ARM,PIC i see only PIC and ARM processors have a good protoboard for the most a-d inputs,on ATMEGA they have processors with more a-d inputs but no protoboards most are over 100 pins,ATMEGA has up to 8 a-d inputs,and building robots you need more a-d for sensors,fsr ,thermistors,battery monitors,so you need to add I2C A-D converter
i see ATMEGA might be easy to learn and free software,ARM easy to learn ? but has free software
i did find one small dema board that would work with hand design STM32F103FB 16 A-D 32 BIT CHIP 72 MHZ,STM32F103ZX no demo board 144 pins ,and STM32F103FB protoboard is about $40.95 at sparkfun,part # dev-08559
in my design need maybe 10 A-D for finger sensors on each hand,so i would get 2 and have 5 on each hand left over for maybe other sensors,so far thats the best chip for my design

AXON looks good but alot slower and 8bit 16 mhz processor,dont know if that will make a difference will need 2 $260 total
with STM32F103 PROTOBOARD only $82 total,32 bits at 72mhz
i am thinking on a hand sensors you should need a fast processor ?
any comments on this ADRENALYNN
here are some features of the board


MCU: STM32F103RBT6 ARM 32 bit CORTEX M3 with 128K Bytes Program Flash, 20K Bytes RAM, USB, CAN, x2 I2C, x2 ADC 12 bit, x3 UART, x2 SPI, x3 TIMERS, up to 72Mhz operation
standard JTAG connector with ARM 2x10 pin layout for programming/debugging with ARM-JTAG
USB connector
User button
Reset button
Status LED
Power LED
On board voltage regulator 3.3V with up to 800mA current
Single power supply: takes power from USB port or extension connector pin
8 MHz crystal oscillator
32.768 kHz crystal for RTC
Extension headers for all uC ports
PCB: FR-4, 1.5 mm (0.062"), soldermask, silkscreen component print
i notices on features they didnt add 16 a-d inputs and has headers for all ports


http://www.societyofrobots.com/axon/

John's great, and his board is really nice. Good filtering, very good layout

" With the Axon, you will no longer need to worry about not having enough I/O as it has 55+ for you to use - up to 16 ports for analog sensors, and up to 18 for interrupts. You will never be wanting of UART (http://www.societyofrobots.com/microcontroller_uart.shtml), as there are 3 directly available, with a 4th used for a USB connection directly to your PC. No additional programmer needed due to a built in programmer (bootloader). Lastly, extensive source code and tutorials have been developed to make it easy enough for a beginner. "

55 I/O Total
Up to 16 ADC
Up to 29 Servos
I2C, SPI
3 UART
Serial to USB Converter (4th UART)
Up to 18 interrupts
Up to 9 PWM Channels
64KB Flash, 4KB EEPROM, 8KB SRAM
16 MIPS throughput at 16 MHz
6 Timers
Comes already programmed with a bootloader, so no programmer required
built in power bus
all software is free
100% open source


Trossen should be stocking it shortly too.

[you're welcome, John...;)]

societyofrobots
07-30-2008, 12:56 PM
but i found out that wont work for my beer-bot hand design ,mostly because no roborealm plug in
I started last week writing a program to convert the Axon into a servo controller. It turned out to be harder than I thought, so it might take me awhile to finish the beta (1 month?). After thats done, adding RoboRealm functionality would be ultra simple.


21 channels of 12 bit adc and 112 I/O 's at 72 mhz and 32 bit processor
STM32F103FB 16 A-D 32 BIT CHIP 72
Got links? Can't seem to find these anywhere . . .


ATMEGA has up to 8 a-d inputs
Up to 16 to my knowledge, perhaps more.


i am thinking on a hand sensors you should need a fast processor ?
What do you plan to calculate? If you don't plan to use floating point math, trig, exponents, or image manipulation, you will be fine with less than 1Mhz.

robot maker
07-30-2008, 01:26 PM
I started last week writing a program to convert the Axon into a servo controller. It turned out to be harder than I thought, so it might take me awhile to finish the beta (1 month?). After thats done, adding RoboRealm functionality would be ultra simple.


Got links? Can't seem to find these anywhere . . .

http://www.st.com/stonline/products/literature/ds/14611.pdf on the stm32f103 series 16 at 12bits a-d
on the stm32f103z series its 21 at 12 bits a-d both are on this the pdf file



yes made a small mistake meant upto 16 a-d on a protoboard
your design look great but for hand project like you said need a faster processor
adding roborealm is a super good plus



Up to 16 to my knowledge, perhaps more.


What do you plan to calculate? If you don't plan to use floating point math, trig, exponents, or image manipulation, you will be fine with less than 1Mhz.
dont know yet still getting data

robot maker
07-30-2008, 01:43 PM
on trig might need it for temp sensors
i guess it might be easy to add another I2C 5 CHANNEL a-d
but i wounder if 10 bits is good for temperature and fsr

also on adding roborealm for servo,s will still be able to use a-d inputs and will roborealm have access to it ,if not it not a big problem
my design needs 16 servo's and at least 20 a-d ,using processor board or adding another I2C a-d converter,i am making 2 hands so 1 board for both hands,sound really good
so your board might look like good choice is roborealm is added wont need another controller like servo center or ssc-32 if can do all that


I started last week writing a program to convert the Axon into a servo controller. It turned out to be harder than I thought, so it might take me awhile to finish the beta (1 month?). After thats done, adding RoboRealm functionality would be ultra simple.


Got links? Can't seem to find these anywhere . . .


Up to 16 to my knowledge, perhaps more.


What do you plan to calculate? If you don't plan to use floating point math, trig, exponents, or image manipulation, you will be fine with less than 1Mhz.

societyofrobots
07-30-2008, 11:18 PM
also on adding roborealm for servo,s will still be able to use a-d inputs and will roborealm have access to it
The Axon can communicate directly through USB, so if you send a serial command from RoboRealm, the Axon can intercept it if programmed to. The Axon can also send serial data (such as from the ADC) to RoboRealm.

robot maker
07-31-2008, 12:26 AM
great will need to order the board soon


adrenalynn
is 10 bit a-d good for fsr and thermistors or will i need 12 bits maybe thermistors might need it and since i need to I2C a-d converter can get a 10 channel 12 bit adc
any thoughts on this


The Axon can communicate directly through USB, so if you send a serial command from RoboRealm, the Axon can intercept it if programmed to. The Axon can also send serial data (such as from the ADC) to RoboRealm.

Adrenalynn
07-31-2008, 02:26 AM
How much precision can your termistor give you, and how much do you need?

If we figure it's 0-5v, you're getting 1024 values with no heroic effort. 5/1024 = ~.0049v per step.

Taking a "perfect" sensor for a moment, that measures 0-100c, you could also look at it as less than a tenth of a degree of error - but that real world sensor probably doesn't work quite so linearly. Regardless, it's probably adequate for most hobby applications.

I tend to gravitate towards 10bit resolution in most applications because I just don't need the extra data. I tend to run away screaming from 8 bit (256 steps) because it just doesn't give me enough resolution. :)

robot maker
07-31-2008, 02:25 PM
thats what i thought to
at my work we deal with very high precision,thanks for comfirming it
before i buy the axion board that looks good mostly it has roborealm interface,will buy a low cost avr protoboard to learn,i have lot of protoboards or demo boards,also that board might be a good add on to irobot create instead of the command module using atmega128,so will get 2 when i am ready for it,i have so many projects going on,anyway adrenalynn thats for a good link for atmega640 processor

robot maker
07-31-2008, 03:04 PM
also on adding a ADC only one i found that is close to what i need and will need 2 of them on bus is LTC1093 10BITS 6 channel,i need 10 channels
Adrenalynn have any others that will work for hand project

Adrenalynn
07-31-2008, 03:23 PM
RM - please start a new thread and I'll split all this out into it. We've gone far afield of C Programming now. :) Thank you!

robot maker
07-31-2008, 04:07 PM
question i have is that i am thinking of getting LTC1093 AD converter for the atmega640 AXON board and looking for codes to help and can 2 of them work on spi line,i have used I2C before but not SPI interface
i am thinking only need sck,mosi,miso and 2 I/O ports for chip select
ship has both 2 wire with chip select and 3 wire with chip select
i need 10bit 11 or better ADC or 2 10bit 6 channels like LTC1093
any codes or info will be great help

robot maker
07-31-2008, 04:09 PM
ok i placed another post in programming

robot maker
07-31-2008, 04:52 PM
found some info only need sclk,miso,mosi and for chip select ss pins in a master slave setup,and master is axon,next problem anyone has any avr excample codes that will work with my LTC1093 or any SPI a-d conveter device