Author Topic: Looking for smaller Axon  (Read 548 times)

0 Members and 1 Guest are viewing this topic.

Offline LRPalmer3Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Looking for smaller Axon
« on: March 20, 2013, 06:28:29 PM »
I'm looking for a microcontroller with a 1.5 inch (squared) footprint that can interface 4-8 servo motors, and has at least 2 ADC channels.  The Axon is just about as small as I can find, but it is still too big.

I can buy a ATTiny chip and make my own board, but I'd rather start with something off the shelf.

Suggestions?

Offline Azraels

  • Full Member
  • ***
  • Posts: 57
  • Helpful? 1
If your first post is, "I want to build a super complex robot with object recognition, etc..but I have never done programming or electronics...etc." 
Your doing it wrong. Start Simple and Work Up.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,271
  • Helpful? 79
Re: Looking for smaller Axon
« Reply #2 on: March 21, 2013, 11:05:50 AM »
What kind of servo motors?

A ATTiny84 sounds like it fits the bill, if the "servo motors" are really analog hobby servos driven by PWM. It can run (at 8 MHz) with no external components except possibly a pull-up resistor for reset and a decoupling capacitor across VCC/GND. You can get an appropriate socket, and solder the components to that, and then put the chip in it -- board not needed!

Offline LRPalmer3Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Looking for smaller Axon
« Reply #3 on: March 22, 2013, 07:15:31 AM »
We'll see if the developer can actually produce those rfduino's.  I'm tempted to make that my first kickstarter donation.

I will look into the ATTiny84.  Yes, the servos are standard futaba-type stuff.  Will probably look into arduino's as well.  I might need to send data between boards, so some serial interface would be useful.

Offline Jon_Thompson

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 1
Re: Looking for smaller Axon
« Reply #4 on: March 22, 2013, 08:08:15 AM »
The ATTiny861 might also be worth considering before you make a final decision: http://www.atmel.com/devices/attiny861.aspx
You can still do a lot with a small brain.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,271
  • Helpful? 79
Re: Looking for smaller Axon
« Reply #5 on: March 22, 2013, 12:34:17 PM »
The 861 does not have enough I/O pins to drive 4-8 servos and read 2 ADCs. That's also why I suggested the Tiny84 instead of the Tiny85. (Also, needing an ADC disqualifies the really cheap ones.)

Offline Jon_Thompson

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 1
Re: Looking for smaller Axon
« Reply #6 on: March 22, 2013, 03:54:49 PM »
The 861 does not have enough I/O pins to drive 4-8 servos and read 2 ADCs. That's also why I suggested the Tiny84 instead of the Tiny85. (Also, needing an ADC disqualifies the really cheap ones.)
Not the ATTINY86, but the 861: 16 I/O pins, of which 11 take ADC. Just drive the servos on a timer interrupt.  ;D
You can still do a lot with a small brain.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,271
  • Helpful? 79
Re: Looking for smaller Axon
« Reply #7 on: March 23, 2013, 12:58:10 AM »
Gotcha. That looks like a slightly bigger chip, and otherwise almost identical in capabilities to the Tiny84, and should also work fine as you say.

Having extra pins is always nice; especially if you can leave those for the ICSP header so those don't have to do double duty -- making sure that re-programming the chip is possible, and doesn't drive your other circuit in some weird way, is important, too :-)

I've found that the best way to drive PWM for servos is to set the 16-bit timer to tick quickly (I use 2 ticks per microsecond,) and then calculate a "breakpoint" (in time) and "output value" (for the output register) based on the state of each of the pins. Do this by sorting the PWM duration of each pin from shortest to highest, and set the output register to 0xff minus the pins that should be low at that time.
Then:
- disable interrupts
- set the output register 0xff
- read the timer as a start value
- while the current timer minus start value < next-change-time, do nothing
- set the output register to the next-change-value, and increment the pointer to the next breakpoint
- if not yet at register value 0, go back to line 4
- enable interrupts

This will generate rock solid PWM with 0.5 microsecond resolution (much better than, say, the Arduino "Servo" library) for any number of output registers (you could drive more than one register in the loop.) The cost is disabling interrupts for up to 2 milliseconds every 30 milliseconds; if you need to poll some serial input port or something that can generate more data than can be buffered in that 2 millisecond time period, you're in trouble. That's why I like the USB hardware of the Atmegas; they buffer an entire packet :-)

Offline Jon_Thompson

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 1
Re: Looking for smaller Axon
« Reply #8 on: March 23, 2013, 06:39:40 AM »
The 861 is also great for times when you need to set lots of options on DIP switches. I use it a lot in custom props where the customer can decide how to set things up.
You can still do a lot with a small brain.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Looking for smaller Axon
« Reply #9 on: March 24, 2013, 03:09:57 PM »
I'm looking for a microcontroller with a 1.5 inch (squared) footprint that can interface 4-8 servo motors, and has at least 2 ADC channels.  The Axon is just about as small as I can find, but it is still too big.

This is the smallest I got:
http://www.societyofrobots.com/axon_mote/

It's 1.7 inch squared, but otherwise does all that you specified.


 


Get Your Ad Here