Propeller <-> NXT Interface Board
Chad George
Posts: 138
I'm developing a board to use in the FTC (FIRST Tech Challenge) robot competition.
It's got some quirks that are specifically to make it FTC Legal, but I think it will have general appeal to NXT users (and even non-NXT users) as well.
My board uses a Propeller microcontroller and has
- 5 analog outputs and 6 digital I/O connected directly to a Hitechnic proto-board header
- 16 analog inputs
- 10 digital input / outputs
- onboard USB FTDI (for programming the Propeller directly)
- 2 (independent) NXT style I2C jacks (for connecting to existing LEGO NXT Sensors, or for future use when we can connect directly to the NXT)
- header for Nordic nRF24L01 wireless transceiver (www.sparkfun.com) (for standalone use with wireless joysticks)
- Li-Ion battery charging through USB port (for standalone use with a battery)
- extra 250mA 3.3V power supply dedicated just for external sensors with digital On/Off control (software reset sensors)
For non-FTC use:
leave off the Digital-to-Analog (this is really just to use the Hitechnic board for FTC rules) and get an external SPI bus with 2 CS.
Here's an example setup of what it can do:
Interface Theory of Operation:
Use 2 digital I/O between Hitechnic board and Propeller for handshaking
Use 4 digital I/O between Hitechnic board and Propeller to select 1 of 16 "pages" of Analog Inputs
Propeller sets the analog output for whatever "page" of data the NXT wants
The means you can have up to 5*16 = 80 channels of analog input into the NXT...Totally legal under this year's rules
If you need digital inputs too... then just use some analog set at 0 or 3.3.
If you need digital outputs too... (ie. "hey Propeller autonomous just started") then give up one or more pages of analog.
Next year hopefully we'll be able to drop the Hitechnic bottle neck and connect directly to an NXT sensor port, so we've got that covered too.
Some potential FTC legal uses:
There are 10 sets of connectors that include "3.3V Power, Digitial I/O, Analog IN, Gnd" these give you access to almost any kind of analog or digital sensor. For example to connect up to 10 Maxbotix ultrasonic sensors (www.maxbotix.com/). Or Panasonic I/R range sensors, or extra limit switches, or line following sensors, or potentiometers, or quadrature encoders (use 2 channels), or ...
There are 2 headers that contain "3.3V Power, 6 x Analog IN, GND" The 6 Analog are shared between the 2 headers so its easy to use some for one sensor and the rest for another.
For example connect up to this super powerful (and rather cheap) gryo/accelerometer board from Sparkfun: www.sparkfun.com/commerce/product_info.php?products_id=741 also mentioned here http://forums.parallax.com/showthread.php?p=696561
With this year's rules you'd still be able to connect to 2 standard NXT sensors as well.
Actually, you could connect up to 8 more hitechnic motor/servo controllers but that wouldn't be legal this year... Anybody got a use for controlling 48 hobby servos
And this is just 1 of my controllers. We can legally use 3 !!!! This truely removes all limits to what you can do on your robot. Personally, I'm not even remotely satisfied choosing which 3 sensors I'm going to connect up to the NXT. This is the ultimate sensor MUX.
The proposal:
I'm going to be having prototype boards made within a day or two. I'd be willing to get some extra bare boards if there was interest. I'd give you the BOM and you order parts (digikey, mouser, etc) and solder on the parts yourself.
If you want to buy a unit with parts on it then it'll be a month or two but I'm planning on making that available eventually too.
Let me know what you think of the idea and anybody who is interested. Of course I'll eventually have Propeller software for it too... [noparse]:)[/noparse]
Post Edited (Chad George) : 2/4/2009 4:48:21 PM GMT
It's got some quirks that are specifically to make it FTC Legal, but I think it will have general appeal to NXT users (and even non-NXT users) as well.
My board uses a Propeller microcontroller and has
- 5 analog outputs and 6 digital I/O connected directly to a Hitechnic proto-board header
- 16 analog inputs
- 10 digital input / outputs
- onboard USB FTDI (for programming the Propeller directly)
- 2 (independent) NXT style I2C jacks (for connecting to existing LEGO NXT Sensors, or for future use when we can connect directly to the NXT)
- header for Nordic nRF24L01 wireless transceiver (www.sparkfun.com) (for standalone use with wireless joysticks)
- Li-Ion battery charging through USB port (for standalone use with a battery)
- extra 250mA 3.3V power supply dedicated just for external sensors with digital On/Off control (software reset sensors)
For non-FTC use:
leave off the Digital-to-Analog (this is really just to use the Hitechnic board for FTC rules) and get an external SPI bus with 2 CS.
Here's an example setup of what it can do:
Interface Theory of Operation:
Use 2 digital I/O between Hitechnic board and Propeller for handshaking
Use 4 digital I/O between Hitechnic board and Propeller to select 1 of 16 "pages" of Analog Inputs
Propeller sets the analog output for whatever "page" of data the NXT wants
The means you can have up to 5*16 = 80 channels of analog input into the NXT...Totally legal under this year's rules
If you need digital inputs too... then just use some analog set at 0 or 3.3.
If you need digital outputs too... (ie. "hey Propeller autonomous just started") then give up one or more pages of analog.
Next year hopefully we'll be able to drop the Hitechnic bottle neck and connect directly to an NXT sensor port, so we've got that covered too.
Some potential FTC legal uses:
There are 10 sets of connectors that include "3.3V Power, Digitial I/O, Analog IN, Gnd" these give you access to almost any kind of analog or digital sensor. For example to connect up to 10 Maxbotix ultrasonic sensors (www.maxbotix.com/). Or Panasonic I/R range sensors, or extra limit switches, or line following sensors, or potentiometers, or quadrature encoders (use 2 channels), or ...
There are 2 headers that contain "3.3V Power, 6 x Analog IN, GND" The 6 Analog are shared between the 2 headers so its easy to use some for one sensor and the rest for another.
For example connect up to this super powerful (and rather cheap) gryo/accelerometer board from Sparkfun: www.sparkfun.com/commerce/product_info.php?products_id=741 also mentioned here http://forums.parallax.com/showthread.php?p=696561
With this year's rules you'd still be able to connect to 2 standard NXT sensors as well.
Actually, you could connect up to 8 more hitechnic motor/servo controllers but that wouldn't be legal this year... Anybody got a use for controlling 48 hobby servos
And this is just 1 of my controllers. We can legally use 3 !!!! This truely removes all limits to what you can do on your robot. Personally, I'm not even remotely satisfied choosing which 3 sensors I'm going to connect up to the NXT. This is the ultimate sensor MUX.
The proposal:
I'm going to be having prototype boards made within a day or two. I'd be willing to get some extra bare boards if there was interest. I'd give you the BOM and you order parts (digikey, mouser, etc) and solder on the parts yourself.
If you want to buy a unit with parts on it then it'll be a month or two but I'm planning on making that available eventually too.
Let me know what you think of the idea and anybody who is interested. Of course I'll eventually have Propeller software for it too... [noparse]:)[/noparse]
Post Edited (Chad George) : 2/4/2009 4:48:21 PM GMT
Comments
Thats a lot of Analog ins and outs. When I first started reading it I was like... this some sort of audio reproduction board. But no. Seems its for a robot.
Mind If I ask why there are so many analog? Am I missing the big picture?
Very nice work. Never heard of this competition.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps (SixBladeProp)
· Prop Tools under Development or Completed (Index)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz
I was trying to get 10 ultrasonic sensors (3 front, 3 back, 2 on each side)
and a 5DOF gyro/accelerometer on the same I/O board.
So that means more than 1 MCP3208 so 16 came out quite naturally. Also when everything was done I had exactly 10 spare digital I/O left so I pair those with 10 of the analog for connecting to up to 10 digital or analog sensors.
Actually with alot of analog sensors its useful to have at least 1 digital signal. Like a trigger on an proximity sensor.
The 6 analog outputs are really only because I am restricted to an analog interface by the game rules. Personally, I'd just connect to the NXT directly via I2C (which the board can already do easily)
If you're not in FTC and don't need analog out (which robots usually don't), I'd just leave them off and gain access to the CS signals for an external SPI bus.
If you're not into the NXT then normal RJ9 jacks would probably be more useful since the NXT jacks have a weird latch location.
If you're into Robotics and in the US then lookup FIRST. There are 3 levels of competition and almost certainly a team nearby that you can help mentor with.
Grasshopper,
I'm using Altium Designer. They've recently been doing massive improvements in 3D based workflow for design of PCB. Really cool stuff like importing STEP models for all your parts and being able to do layout in 3D (although no routing yet). Unfortunately the latest release now REQUIRES shader 3 capable hardware.
As I mentioned in a PM, we would be interested in evaluating a board once they are finished.
The FTC teams here in San Antonio wants to see if they can use if for next years competition.
By the way, the FIRST website can be found here, http://usfirst.org/
I'm mentoring FRC which is the class above FTC and our robot is still a work in progress,
http://i385.photobucket.com/albums/oo298/fsafstrom_2008/100_0186.jpg
However we are going to look into using a Propeller board for FRC next year, we just want to unload the main board and use a Propeller based board to read sensors and control other devices like servos/motors.
Unlike FTC we can pretty much hook up as much electronics we want as long as the individual parts don't exceed a specific value.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
Actually with FTC's a new "custom circuit" rule, we can hook up any sensor we want just like FRC.
And unlike the FRC rules there is no cost limit and no weight limit. Although of course there are practical limitations.
At first glance, the FTC rules seem more restrictive since you have to interface thru the analog inputs of the Hitechnic board, but I expect them to release these requirements next year (and they'll probably add back the cost requirement)
I've used the propeller chip in several FRC robots over the years. It works well, but I don't know if its really needed anymore with the new controller being so much more powerful. And once they let you reprogram the FPGA it'll be even harder to justify the added complexity of a second controller and the associated programming/debug setup.
I did it mostly because I hated rediculously slow the program-download-test cycle of the IFI controllers. And I offloaded nearly 100% control of the robot over to the Propeller, the IFI board was basically just asking the propeller for modified "joystick" packets [noparse]:)[/noparse]
Good luck.