Author Topic: Axon + Blackfin over SPI  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Axon + Blackfin over SPI
« on: August 12, 2010, 07:33:10 PM »
Hello,

I was wondering if anyone has got the the Blackfin Camera to work over SPI with the Axon MCU? I know that it is easier to get to work over UART but I don't have any more free UARTs on the board :(

If anyone has some code I could use or advice that would be great.

Thanks
Awally88

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,136
  • Helpful? 109
Re: Axon + Blackfin over SPI
« Reply #1 on: August 12, 2010, 08:02:09 PM »
The other solution would be to use a software UART for one of your other devices - especially if it has low amounts of traffic and you can live with a low baud rate
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Re: Axon + Blackfin over SPI
« Reply #2 on: August 12, 2010, 08:24:39 PM »
Yeah I was thinking about this too, but it seems to be a bit 'hacky'.

Just saw uartsw in WebbotLib, do you know the maximum speed it works at nicely?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon + Blackfin over SPI
« Reply #3 on: August 13, 2010, 07:15:55 AM »
awally88, I shipped your Axon out this morning. ;D

What devices do you plan to have over UART? Some devices only use a Tx or Rx, and transmit fairly slowly, so will work well with a software UART. For example, GPS.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,136
  • Helpful? 109
Re: Axon + Blackfin over SPI
« Reply #4 on: August 13, 2010, 08:25:59 AM »
I've certainly used the software uart on an 8MHz ATMega168 to receive the data from a GPS at 4800 baud. I've also transmitted debug info at 9600 baud.

The 'good' thing  with GPS messages is that they contain a checksum and so if the software uart has mangled some bits then at least the msg gets discarded rather than giving wrong readings. Also a GPS only tends to xmit a message around every second - so the throughput is quite low.

Equally if you are using a UART to just transmit info messages to a console then its normally not very critical.

As for the max baud rate: it will depend on the speed of the processor and also on what other interrupts are going on in your code. ie if the cpu is also controlling lots of servos by generating the pulses in software, and you got hires encoders generating 1000s of interrupts per second etc etc then something will have to give. So you may need to experiment a bit.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Re: Axon + Blackfin over SPI
« Reply #5 on: August 14, 2010, 07:34:37 AM »
@Admin

I am controlling a GPS, a Magnometer, Transciever and Blackfin Camera over UART, Gyro and battery board over I2C and a couple of magnotorqers (basically electromagnets used for controlling a satellite's rotation) via a H-Bridge.

I already own an Axon for myself but I'm slightly 'modifying' it to suit the project, so I'm getting the Uni to replace mine :)

@Webbot
I won't be having interrupts too frequently so that shouldn't be an issue, I'll just make sure I resend data which doesn't look right. I have a magnetometer which isn't as mission critical as the GPS so I'll probably just use that since it will only have a pretty slow refresh rate. I'll let you know how all of my testing goes.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon + Blackfin over SPI
« Reply #6 on: August 14, 2010, 08:16:00 AM »
Interesting devices . . . you have me curious about what the heck your robot is designed to do! :P

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Re: Axon + Blackfin over SPI
« Reply #7 on: August 14, 2010, 08:30:17 AM »
Haha, its for a small satellite known as a CubeSat http://en.wikipedia.org/wiki/CubeSat

Hopefully I can get the first Axon into space. All we need is to write a better control system , buy a better camera and get another $50k+ it's probably all good to go :)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon + Blackfin over SPI
« Reply #8 on: August 14, 2010, 09:19:45 AM »
If you need help spec'ing out individual components on the Axon for temperature tolerances, let me know.

Or if you run a vacuum/freezer test on it, let me know the results!

I have a vacuum chamber I can test with, too. So if you guys cover my cost of a possibly to-be-damaged Axon, I'll run it for you :P
(and if it survives, I'll mail it to you)

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Re: Axon + Blackfin over SPI
« Reply #9 on: August 14, 2010, 10:19:45 PM »
The only component I'm really worried about the temperature for is the crystal. If you had a spare crystal sitting around you could test that would be amazing. I know that the crystals change their speed with temp, I just haven't been able to find out how much yet since the vacuum chamber at Uni is being fixed at the moment, so I might need to replace/heat or compensate for that.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon + Blackfin over SPI
« Reply #10 on: August 15, 2010, 06:45:57 AM »
The Axon crystal datasheet:
http://www.mouser.com/Search/ProductDetail.aspx?R=ECS-160-20-5PX-TRvirtualkey59070000virtualkey520-CSM1600-20-X

Operating Temperature Range:   - 10 C to + 70 C


Another concern I have is the large electrolytic capacitor exploding when put in a vacuum . . .


FYI, the Axon II crystal has a temp range of -10C to + 60C

Offline awally88Topic starter

  • Robot Overlord
  • ****
  • Posts: 212
  • Helpful? 0
Re: Axon + Blackfin over SPI
« Reply #11 on: August 15, 2010, 08:15:02 PM »
I was thinking I'd pull the capacity off and either replace it with something smaller or remove it all together as well as the regulator. We have a regulated 5V input from an EPS (Electrical Power System) board which is pretty good. There shouldn't be too much of an issue with the power spiking as there aren't any high powered devices that would be having peaks like servos.

Its going to be a very bare bones Axon when I'm finished with it I think, No pins, no cap, no regulator!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon + Blackfin over SPI
« Reply #12 on: August 15, 2010, 08:19:32 PM »
Just make sure you change the clock fuses before removing the crystal! :P

If you have any specific questions that'll help you mod it, just shoot em this way. There are plenty crystals (and other components) out there that'll work with better temperature tolerances for you. I didn't care much about temperature when designing the Axon as most people don't use their Axon in space or in volcanoes :P

 


Get Your Ad Here