Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Karl38 on October 05, 2009, 08:12:26 PM

Title: Multiple Axon in one robot?
Post by: Karl38 on October 05, 2009, 08:12:26 PM
I'm just wondering if two or more Axon microcontrollers can be wired to gether to make a super Axon Microcontroller to have more I/O ports more UART ports and more memory.
Title: Re: Multiple Axon in one robot?
Post by: madsci1016 on October 05, 2009, 08:27:53 PM
It's possible, but you would have to write a lot of custom code. If i where to do it, i would use a Uart on each to connect them together and send data back and forth.

If you are just looking for more IO, you can get PWM boards and ADC boards that will give you more IO and only use a Uart on your Axon.
Title: Re: Multiple Axon in one robot?
Post by: galannthegreat on October 05, 2009, 10:05:45 PM
You can actually do it quite easily(although there is a lot of coding involved), it's called TWI(Two-Wire Interface, or I2(squared)C as it's also known. Take a look at this member written tutorial. Also look at the ATMEGA640's datasheet on it. Hope that helps you.  :)

http://www.societyofrobots.com/member_tutorials/node/35 (http://www.societyofrobots.com/member_tutorials/node/35)
Title: Re: Multiple Axon in one robot?
Post by: galannthegreat on October 05, 2009, 11:19:33 PM
Actually, now that I've done a bit more reading, I don't think it's possible(not that I know of). Take a look at SPI(Serial Peripheral Interface).
Title: Re: Multiple Axon in one robot?
Post by: madsci1016 on October 06, 2009, 05:45:28 AM
Actually, now that I've done a bit more reading, I don't think it's possible(not that I know of). Take a look at SPI(Serial Peripheral Interface).

The Axon can be configured as a device instead of a master, so you can have two of them on the interface.
Title: Re: Multiple Axon in one robot?
Post by: Soeren on October 06, 2009, 04:40:10 PM
Hi,

An I/O-expander would be the sensible choice here, if it's just more I/O you're after.

If you want what's called distributed computing, you can use any other controller for sub modules. I usually go with one (small) controller to handle all steering, one (or two) for the sensors and so on. A master controller then just have to act as a conductor (of the orchestral kind) and can send orders to actuators like "turn left by 15°" and the steering does it's job without burdening the master. When the position (here 15°) is reached, it sends an "OK, I've reached the position of 15° now", which is read from the master at a convenient time and answered with a "OK, I hear you".

This makes it very easy to shift modules around and your main program can be simple (just like each module) and hey, controllers are cheap, especially the small PICs I use.
Title: Re: Multiple Axon in one robot?
Post by: Admin on October 06, 2009, 09:16:00 PM
Although I'm having trouble imaging a robot with more I/O requirements than a single Axon can handle, I can say its *extremely* easy to link many together without much code.

Since the Axon has 4 UARTs, connect them with a UART and just use rprintf to send data/commands. And use the GetByte() command to receive data:
http://www.societyofrobots.com/axon/axon_function_list.shtml#uart (http://www.societyofrobots.com/axon/axon_function_list.shtml#uart)

For example, here I linked two Axons together wirelessly using UART, and then my laptop with another UART:
IR Transceiver Demo (http://www.youtube.com/watch?v=IBpHslpP6DQ#)