Talk:Wishlist/Sensorbox

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Users:hns)
(AVR/PIC)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
= Processor discussion =
 
= Processor discussion =
== N.N. ==
+
----
 
** Please use the ARM processor (32bit address space) - it has no [http://en.wikipedia.org/wiki/Bank_switching Bank switching]; ARM has a big linear directly addressable memory. Can get flashed by this open source tool: [http://tech.groups.yahoo.com/group/lpc21isp/ lpc21isp], [http://groups.yahoo.com/group/lpc21isp/files/ yahoo download (after user registration)].
 
** Please use the ARM processor (32bit address space) - it has no [http://en.wikipedia.org/wiki/Bank_switching Bank switching]; ARM has a big linear directly addressable memory. Can get flashed by this open source tool: [http://tech.groups.yahoo.com/group/lpc21isp/ lpc21isp], [http://groups.yahoo.com/group/lpc21isp/files/ yahoo download (after user registration)].
*** Look e.g. on the cheap LPC214x (LPC2144-LPC2148 has 14 ADC multiplexed channels - two internal ADCs). Chip price: [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=568-1763-ND digikey.com: LPC2144 US$ 8.4], [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=568-1765-ND LPC2148 US$ 11.2]. The [http://en.wikipedia.org/wiki/ARM_architecture ARM architecture] is "old" (from 1983), wildly known, used, efficient(high mips/watt) and uses low power (different kind of deep sleep).
+
*** Look e.g. on the cheap [http://www.standardics.nxp.com/products/lpc2000/lpc214x/ LPC214x] quote: "...The LPC214x series is the only ARM7® microcontroller family with full USB 2.0 compliance and USB.org certification..." (LPC2144-LPC2148 has 14 ADC multiplexed channels - two internal ADCs). Chip price: [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=568-1763-ND digikey.com: LPC2144 US$ 8.4], [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=568-1765-ND LPC2148 US$ 11.2]. The [http://en.wikipedia.org/wiki/ARM_architecture ARM architecture] is "old" (from 1983), wildly known, used, efficient(high mips/watt) and uses low power (different kind of deep sleep).
 
***Test/development/production boards:
 
***Test/development/production boards:
 
****USB powered through USB-flash port, only mentions 2 ADC-ports: [http://www.embeddedartists.com/products/education/edu_2148.php embeddedartists.com: LPC2148 Education Board] (two USB ports - one for programming via a ftdi-chip(USB<->serial) - and one directly connected to LPC2148)
 
****USB powered through USB-flash port, only mentions 2 ADC-ports: [http://www.embeddedartists.com/products/education/edu_2148.php embeddedartists.com: LPC2148 Education Board] (two USB ports - one for programming via a ftdi-chip(USB<->serial) - and one directly connected to LPC2148)
Line 22: Line 22:
 
****[http://www.computer-solutions.co.uk/info/Embedded_tutorials/usb_tutorial.htm Embedded USB - a brief tutorial]
 
****[http://www.computer-solutions.co.uk/info/Embedded_tutorials/usb_tutorial.htm Embedded USB - a brief tutorial]
 
****[http://bas.woodpecker.gotdns.org/ALDS.php ALDS]
 
****[http://bas.woodpecker.gotdns.org/ALDS.php ALDS]
 +
 +
--[[User:Glenn|Glenn]] 14:25, 2 November 2008 (UTC)
  
 
== [[User:Hns]] ==
 
== [[User:Hns]] ==
This is what has been thought of: a simple processor that still suppports A/D converters and USB. A good candidate appears to be http://ww1.microchip.com/downloads/en/DeviceDoc/41124c.pdf Cost is approx. 5 USD.
+
This is what has been thought of: a simple processor that still suppports A/D converters and USB. A good candidate appears to be [http://ww1.microchip.com/downloads/en/DeviceDoc/41124c.pdf PIC16C765] Cost is approx. 5 USD.
  
 
Using an ARM processor just to convert some samples per second into USB appears to be overkill to me on first though. But the PIC is just one of the options to considered. A drawback appears that the ADC resolution is just 8 bit. This is quite coarse for some sensors. 12 bit would be better...
 
Using an ARM processor just to convert some samples per second into USB appears to be overkill to me on first though. But the PIC is just one of the options to considered. A drawback appears that the ADC resolution is just 8 bit. This is quite coarse for some sensors. 12 bit would be better...
Line 33: Line 35:
 
* low power
 
* low power
 
* readily available development tools
 
* readily available development tools
 +
 +
----
 +
 +
[http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010172 PIC16C765] is a bad development platform, because it can only be programmed once (OTP). It is also not possible to update to newer enhanced firmware versions for the same reason.
 +
 +
There is also:
 +
*[http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=PIC18F2550-I/SP-ND pic18f2550 US$ 8.2]
 +
*[http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=PIC18F4550-I/P-ND pic18f4550 US$ 8.5]
 +
But for almost the same or a little more, you get much more with ARM.
 +
 +
More:
 +
*PIC16C745: [http://www.iay.org.uk/blog/2003/07/my_very_first_u.html July 25, 2003 My Very First USB Peripheral] Quote: "...For example, I wanted to change the number of buttons and add a couple of LEDs. To do this, you need to build new HID report descriptors and there you run into problems with incomprehensible standards documentation and inconsistent operating systems implementations...One last item that fits in under "firmware" better than anywhere else is the issue of vendor IDs. Like PCI and other "plug and pray" bus systems, your device presents a vendor ID and a product ID so that the host operating system can locate appropriate drivers. Unlike those other systems, there is no "experimental" vendor ID or apparently any way to get a legitimate vendor ID other than paying the USB Implementers Forum a minimum of $1500 every couple of years...If you want a host application of your own talking to a collection of custom peripherals you've designed, though, things are much harder..."
 +
*[http://www.embedds.com/pic18f4550-usb-prototyping-board/ PIC18F4550 USB prototyping board]
 +
*[http://www.embedds.com/pic18f2550-development-board-with-usb-port/  PIC18F2550 development board with USB port]
 +
**[http://www.holger-klabunde.de/usb/18f2550.htm PIC18F2550 Experimentierboard] Quote: "...Es gibt bei Microchip mehrere Code-Beispiele wie man Programme für den PIC schreibt. Als HID (Human Interface Device), über eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] über einen virtuellen COM-Port. Man schreibt seine Programme so als würde man eine serielle Schnittstelle [=interface] ansprechen. Für CDC ist kein spezieller Treiber[=driver] erforderlich..."
 +
*[http://www.semifluid.com/?p=24 PIC18F2550 USB HID Oscilloscope] Quote: "...Using HID means that this oscilloscope does not require drivers (only the oscilloscope software)..."
 +
 +
--[[User:Glenn|Glenn]] 14:23, 2 November 2008 (UTC)
 +
 +
----
 +
 +
Universal (PIC, ARM) USB driver information:
 +
*[http://wiki.sikken.nl/index.php?title=LPCUSB#USB_virtual_COM_port USB virtual COM port]
 +
--[[User:Glenn|Glenn]] 15:45, 2 November 2008 (UTC)
 +
 +
Hello,
 +
 +
I have found this:
 +
 +
http://www.ianstedman.co.uk/Projects/PIC_USB_Interface/pic_usb_interface.html
 +
 +
Greetings
 +
 +
Rene
 +
 +
:Hi Rene - That is fine solution using a ftdi usb<->seriel chip. I use it myself. --[[User:Glenn|Glenn]] 17:41, 3 November 2008 (UTC)
 +
 +
== AVR/PIC ==
 +
 +
I recommend an AVR or PIC.
 +
Since they have no USB Interface, they are both very cheap and are easy to use.
 +
For programming an AVR all needed tools are in the most distros repositorys (gcc-avr, binutils-avr, avrlibc, avrdude).
 +
As USB interface, i recommend using an FTDI USB/Serial changer. They work very fine also with 1MBit Baud.
 +
 +
Every AVR has an integrated I²C, SPI and UART (Serial) Interface. You can connect 8 analog sensors, you have some Hardware Interrupts, Timers, PWM-Outputs,...
 +
 +
http://www.roboternetz.de/wissen/index.php/AVR <br>
 +
http://www.roboternetz.de/wissen/index.php/USB#USB_Interface-Bausteine_.28ICs.29
 +
 +
I'm currently working on an interface to control my robot with the freerunner. I'm using a simple gtk interface that sends some commands over a usb/serial cable to an Atmel ATMega32.
 +
 +
--[[User:Thomasgruebler|Thomasgruebler]] 10:12, 3 January 2009 (UTC)

Latest revision as of 11:12, 3 January 2009

[edit] Processor discussion


--Glenn 14:25, 2 November 2008 (UTC)

[edit] User:Hns

This is what has been thought of: a simple processor that still suppports A/D converters and USB. A good candidate appears to be PIC16C765 Cost is approx. 5 USD.

Using an ARM processor just to convert some samples per second into USB appears to be overkill to me on first though. But the PIC is just one of the options to considered. A drawback appears that the ADC resolution is just 8 bit. This is quite coarse for some sensors. 12 bit would be better...

So what we need:

  • single chip
  • supports USB and approx. 8 ADC channels without many external components
  • low power
  • readily available development tools

PIC16C765 is a bad development platform, because it can only be programmed once (OTP). It is also not possible to update to newer enhanced firmware versions for the same reason.

There is also:

But for almost the same or a little more, you get much more with ARM.

More:

  • PIC16C745: July 25, 2003 My Very First USB Peripheral Quote: "...For example, I wanted to change the number of buttons and add a couple of LEDs. To do this, you need to build new HID report descriptors and there you run into problems with incomprehensible standards documentation and inconsistent operating systems implementations...One last item that fits in under "firmware" better than anywhere else is the issue of vendor IDs. Like PCI and other "plug and pray" bus systems, your device presents a vendor ID and a product ID so that the host operating system can locate appropriate drivers. Unlike those other systems, there is no "experimental" vendor ID or apparently any way to get a legitimate vendor ID other than paying the USB Implementers Forum a minimum of $1500 every couple of years...If you want a host application of your own talking to a collection of custom peripherals you've designed, though, things are much harder..."
  • PIC18F4550 USB prototyping board
  • PIC18F2550 development board with USB port
    • PIC18F2550 Experimentierboard Quote: "...Es gibt bei Microchip mehrere Code-Beispiele wie man Programme für den PIC schreibt. Als HID (Human Interface Device), über eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] über einen virtuellen COM-Port. Man schreibt seine Programme so als würde man eine serielle Schnittstelle [=interface] ansprechen. Für CDC ist kein spezieller Treiber[=driver] erforderlich..."
  • PIC18F2550 USB HID Oscilloscope Quote: "...Using HID means that this oscilloscope does not require drivers (only the oscilloscope software)..."

--Glenn 14:23, 2 November 2008 (UTC)


Universal (PIC, ARM) USB driver information:

--Glenn 15:45, 2 November 2008 (UTC)

Hello,

I have found this:

http://www.ianstedman.co.uk/Projects/PIC_USB_Interface/pic_usb_interface.html

Greetings

Rene

Hi Rene - That is fine solution using a ftdi usb<->seriel chip. I use it myself. --Glenn 17:41, 3 November 2008 (UTC)

[edit] AVR/PIC

I recommend an AVR or PIC. Since they have no USB Interface, they are both very cheap and are easy to use. For programming an AVR all needed tools are in the most distros repositorys (gcc-avr, binutils-avr, avrlibc, avrdude). As USB interface, i recommend using an FTDI USB/Serial changer. They work very fine also with 1MBit Baud.

Every AVR has an integrated I²C, SPI and UART (Serial) Interface. You can connect 8 analog sensors, you have some Hardware Interrupts, Timers, PWM-Outputs,...

http://www.roboternetz.de/wissen/index.php/AVR
http://www.roboternetz.de/wissen/index.php/USB#USB_Interface-Bausteine_.28ICs.29

I'm currently working on an interface to control my robot with the freerunner. I'm using a simple gtk interface that sends some commands over a usb/serial cable to an Atmel ATMega32.

--Thomasgruebler 10:12, 3 January 2009 (UTC)

Personal tools

Processor discussion

N.N.

User:Hns

This is what has been thought of: a simple processor that still suppports A/D converters and USB. A good candidate appears to be http://ww1.microchip.com/downloads/en/DeviceDoc/41124c.pdf Cost is approx. 5 USD.

Using an ARM processor just to convert some samples per second into USB appears to be overkill to me on first though. But the PIC is just one of the options to considered. A drawback appears that the ADC resolution is just 8 bit. This is quite coarse for some sensors. 12 bit would be better...

So what we need:

  • single chip
  • supports USB and approx. 8 ADC channels without many external components
  • low power
  • readily available development tools