FT232L vs Tiny2313 minimal Cost USB interface

While it would lower your hardware component costs there would be a lot of software changes to make. Possibly new PC USB drivers would be required for all three supported PC platforms? A new bootloader would have to be written and of course whatever core and library changes the Arduino IDE would require. Probably a pretty ambitious project but in the end would be great to have additional AVR chips for the Arduino.

Good luck

Lefty

I think you'd only need different USB drivers. If the tiny2313 is only functioning as a USB to TTL converter, then everything else would just work as normal.

i think it's a good idea.

If you search internet for AVR309 or USBTiny you can already find drivers to interface ATtiny2313 running software USB implementation. Thay all are based on Igor Cesko IgorPlug documented in AVR309. (for example AVR ISP programmer at USBtiny-based AVR Programmer)

In the same AVR309 app note there is source code for roomier ATMega8 chip as the 2k flash on 2313 is too tiny to implement standard USB HID Communication Device Class for virtual COM port that would not require additional drivers.

Absolutely the closest implementation to what you are looking for is AVR-CDC for ATTiny45 and could be found here: AVR-CDC but 2313 version implements only limited subset of serial interface functions.

Vikas, I agree with you that it would be very tempting to get it working as USB-RS232C solution as ATTiny2313 is the cheapest AVR chip that has full-duplex UART (unlike half duplex USI implementation found in other ATTiny's) but it is, probably, technically next to impossible.

Did you consider other chips and / or modular design? If you are billed per PCB area significantly then you could actually save costs by breaking out any SMD parts onto a smaller boards and connecting them to a larger single layer base board.

I have bought FTDI breakout board from SparkFun and could use it with either Arduino Pro Mini or breadboarded ATMega 168 chip that I have.

There are some 20pin Microchip PIC parts that include a real USB peripheral. Not significantly cheaper than ft232l, but through-hole so you'd save on manufacturing costs.

You could see if any of the existing well-supported USB/Serial bridge chips (Prolific, TI, SI, FTDI, Cypress, etc) lend themselves to working with a single-sided PCB, mounted on the BOTTOM side of the board.

I'm worried that you underestimate the difficulties of finding and supporting non-windows operating systems in terms of USB Serial drivers. FTDI is relatively wonderful (linux, mac, everything!), but at my real job we were talking with a major semiconductor manufacturer about using their USB/Serial bridge chip, wanting to be sure it would work with Mac/Linux, and we were getting "You want it to work with something other than windows? Well, sure! I mean, well, um, we'll get back to you..."

Since a robot is unlikely to be powered via the USB port anyway, you could also consider going back to the serial-based interfaces. It seems that the magic of mass production means that USB/RS232 converters (http://www.dealextreme.com/details.dx/sku.24512) are not much more expensive than ftdi chips (and much cheaper than FTDI USB/TTL-Serial cables.)

Yes i did research all this before coming to this point. I also have Mega8 in the plans as it will just Cost about 20 cents more vs Tiny2313.I also have a Mega8 HID implementation with me. USB->Serial . The Serial > USB cables cost a little more than FT232L even when bought in quantities of 100's.

Also the thing is SMD increases PCB costs and The FT233L is itself expensive. Other wise its a very good solution. Also im planning to buy some Dip soldering machine to further lower costs , DIP soldering does not support SMD.

Our target is to Build a Affordable Robotics Platform for under USD 20 which would include everything. And the Serial Boards are to be made in around USD 4 - 6 and USB ones around USD 7 - 9. These costs include minimal profit.

We are trying to keep costs minimal, As in India for my target audience USD 20 is a big amount.

So for the USB board im searching for decent yet cheap alternatives for USB->Serial.

Here is a full usb implementation for avr's include atiny2313 with Linux, Mac OS X and Windows support

I have never used it, but seems nice.

I can understand the smd aspect, but an ftdi chip isnt that expensive?, with a atiny you need also other parts to make it work, zeners, diodes etc.
you can get a ft232rl for $2.50 (100)

Vikas, it would be interesting to see your existing board and/or cost of the parts that is available in India.

Also, what is your power consumption objectives? Do you plan to run it from USB or wall power all the time or you need to support battery operation as well?

In case if you don't care about power, then the cheapest option would be to implement USB COM port in the bootloader of the main chip itself. If it has 16k of flash or more it is technically feaseable, but will cost you a lot of Arduino compatibility as you would have to maintain your own bootloader and it would have to keep tight control of timing and interrupts. So that is, probably, not worth it. (I guess an Atmel microcontroller with built-in USB would be too expensive).

Another consideration is that FT232 can do both USB-to-TTL and be used as ISP programmer via bitbanging on its GPIOs.

To have similar functionality you will need to have two 2313s as it has barely enough space for either of those functions.

If you step up to a larger chip with 4k of flash you can implement both and select them externally by a jumper on one of its pins.

ATmega48 will cost slightly more than 2313 but will be easier to program.

ATtiny44A is cheaper than 2313 (1.22 vs 1.31 for 100 on Digikey) but it has only half-duplex UART on board.

If you are not afraid to do tricky AVR assembly programming, presumably, you could get 20MHz ATtiny44A and implement SoftSerial along side with USB CDC and, maybe, still have few bytes left for some other functionality.

If you are planning to put both chips on the same board then ATtiny44A could drive the crystal and feed the clock to ATmega chip and you could even free up XTAL2 pin to be and extra digital I/O pin.

The idea is to keep costs to minimum , while giving a decent USB to Serial connector. The The system will be powered from batteries as its for a robot and USB->Serial is just for loading code into the board.

For now Im planning a Mega8 based Serial to USB after local checkup 2313 vs Mega8 Difference is just 10 cents , so i think its better to go with it. And i also have a implementation which i had bought from someone which works fine -

http://robokits.co.in/shop/index.php?main_page=product_info&cPath=6_64&products_id=64

The cost shown is about 9 USD , but i think i can get the whole thing with cables done for under USD 2 ( Production Cost ).

Local Availability of IC's is also an issue in India as only Tin2313 is available for Tiny series. Mega8 is the most easily available.

As for OS incompatibility, Im only worried about Windows as 99% target audience use that.

It's good to hear that you can step up to ATMega8 processor for less than 5% cost increase, because 8k chip can be programmed to do so much more and you can add more value to your product.

If you would like to share more details about your project on this forum you might get a few suggestions and some you could find useful.

For instance, what is the main chip you are using for the board?

What are the other parts that contribute significantly to the cost (motor drivers, regulators, connectors, crystals, etc...)?

What are the PCB costs, i.e. setup fee, area fee, per hole drill costs, board cut costs (i.e. rectangular vs odd shapes)?

What are your general battery power objections?

How close do you want to stay compatible with Arduino (software only or pin layout as well)?

I bet many of us have seen some crazy to ingenious ways of cutting production cost and increasing product value at the same time.

Figuring out lowest production cost is a great challenge and fun for any engineer, and it sure is to me :slight_smile:

For example:

  1. If PCB area cost is cheap and it is cut for you, just lay copper traces for USB connection on the edge of the board with proper cutouts and you don't have to solder USB connector.

  2. If you choose ATMega8 chip to be your USB-to-TTL bridge and you are going to sell it in every robotic kit, then put it on the same board and avoid having second board and any connecting wires. Just run RX/TX/Reset lines via jumper connector or wires, so that if necessary, end users could solder in header and connect either side to something else.

  3. Once both chips are on the same board, they could share the crystal and it will free XTAL2 pin to be an extra I/O line on the main chip.

  4. In general once you commited yourself to having two microcontrollers on the board it opens up whole lot of possibilities. You just have to make PCB design open enough that they could be realized without too much hassle.

  5. ATmega8 chip could be have code to be ISP programmer as well, just make traces and holes for optional connectors.

  6. ATmega8 chip can do TV video out. Again if PCB area cost is cheap you could leave a small prototyping area for several resistors and diodes and it could be figured out later if this thing is doable or not.

  7. Presumably, at the later time special code could be developed for the ATmega8 USB-to-TTL chip that will on reset talk to Arduino IDE pretending it is a main chip's bootloader and then program the second chip over SPI. This frees up extra 2k of memory on the second chip. Is it usefull? I don't know, but posibility of being able to do something like that adds value to the platform.

  8. When USB-to-TTL is not used ATMega8 could serve as I/O extender to the main chip either via UART, I2C, or SPI bus. And with proper software mods even while doing USB-to-TTL. This adds value to the entire platform.

  9. What is your mechanical platform? Mine is Lego. Doing something as simple as drilling m3 holes that are both on 10mm and 8mm grid (for example 40mm apart) make it instantly Lego friendly. If your motor drivers could pull 0.6A at 9V you electrically compatible as well.

...

Aren't a lot of people already using Arduino's for robotics development?

Like the RBBB is only 10 bucks and the USB BUB board from modern devices is only 12 bucks - thats pretty close to your 20 target.

You'd probably get a decent volume discount if you purchased a few hundred units and modern are excellent with packaging and delivery.

Or you could tell your users to buy direct and then they'd have access to a reputable clone manufacturer who has considerable experience with everything Arduino.

Thanx for so many good suggestions, yes its fun to cut costs and give max price/performance thats what we engineers do :slight_smile: -

The board currently is based on Freeduino serial , it 100% arduino compatible. Its single sided for lowerd PCB costs.

some questions u asked -

Chip - Mega8 and Mega 168 ( Both are compatible so will be available ) . PCB is costing about 30-40 cents/board ( single sided ).

@technik3k - Some really nice Ideas , I also had some similar ones , about getting more functionality out of Mega8 than a simple convector , maybe at a later date though. I have finalized on Mega 8 for the convector for now.

@John_Ryan

Yes i know about them , but a decent robot platform starts around 70 USD which after shipping costs us about 110 - 120 USD ( quite expensive ).

The plan is to offer -
The Main Board
The Motor Shield ( L293D )
Custom Robot Base ( 2 DC motors and universal wheel )
Misc parts ( Mini BreadBoard, CDS, TSOP's , IR LED's etc for various different robots)
CD's

All for under 20 USD and with break even profit. The Idea is to Build a Affordable Robotics Platform ( ARP ) , which is affordable by students in India too easily . Or you can say the cheapest Robtoics Platfotm.

At that price you'd move a considerable volume of units, perhaps upwards of 10k over 12-18 months.

Once upon a time computers were too expensive for the average consumer, then how the world changed when they got smaller and less expensive.

The more affordable technology becomes the more innovation the world gets so good luck putting it together I hope you keep us updated with your progress.

At that price you'd move a considerable volume of units, perhaps upwards of 10k over 12-18 months.

I doubt it. Besides, the idea seems to be to make a board that is inexpensive to manufacture and purchase IN INDIA, and he hasn't indicated any willingness to take on the hassle of international sales.

Besides, it's next to impossible to move 10k units/y at "break even" profits. At that rate you'd have to start paying employees just to put the pieces in boxes.

One of the biggest common pieces of Advice at the "Kit provider" platform/talk at Maker Faire recently was
"Don't under-price your kits." To be successful/profitable you need something like a 40% markup AFTER you've paid for parts, manufacturing, and labor (INCLUDING YOURSELF) in order to support even one tier of distribution network. (The usual rough estimate is something like "end user price is five times parts cost, plus 40% for each additional layer of distribution.") Now, roboticsIndia looks like a sort of hobbyist collective, and if you're looking at a one-time group deal for PCBs and parts to split up at a meeting or something, that's different. But trying to sell kits or boards at "break even profits" in the long term is likely to yield little more than frustration after a while...

There's a lot of Indians in India and labor rates would be competitive enough to make a profit on 10k units "if" he can obtain the materials at a cost which still provides a decent margin on 20 bucks.

It's an admirable quest so I say good luck to him.

Hello

We might go for International sales , option will be there as its just an international courier and shipping/insurance is paid by user.

First target is to get the kit made , We are looking at decent percentage markup when done in proper quantities. Though i am not looking at 10 k like quantities but its still a profit making effort , without that u loose interest very soon.

I know its not easy, but then it would not be any fun. For a start component costs are cheaper in India and so are labour costs.For ex Mega8 costs 3.05 USD at 100 quantities @sparkfun , but it costs < 1 USD locally. Also RC components are really really cheap.

I think it can be done so am trying . But until the first ARP kit is made a lot remains to be done .

Regards

Here are a few more links and ideas:

If you put both ATmega8 and 168 in the sockets there is an upgrade path there: if users get ATmega328 it takes place of the main Arduino processor and ATmega168 gets bumped into co-processor place. This adds value to your kit.

SparkFun released a new ATtiny2313 based ISP programmer http://www.sparkfun.com/commerce/product_info.php?products_id=9231. No zenner diodes there only three resistors to interface USB.

Also, found today AVGA project at AVGA Homepage. It is VGA/PAL/NTSC graphics output library for a 20MHz AVR Mega MCU. It runs on ATmega168, and may have limited capabilities on ATmega8. The DAC is implemented via 12 resistors and no diodes.

As a kit provider you don't have to implement any of this. But you can make prototyping area, enough for any of the cool projects, throw in all necessary resistors, caps and diodes, and provide URLs, schematics, and source code for all those projects.

I bet you are doing it already, but if not you definitely should make some sort of tutorial on how to use your kit and a step-by-step guide how to make various cool projects with available parts. At a very small cost this adds tremendous value to the kit.

Good luck Vikas, and keep us posted about your progress!

Absolutely the closest implementation to what you are looking for is AVR-CDC for ATTiny45 and could be found here: AVR-CDC but 2313 version implements only limited subset of serial interface functions.

I visited that website and very interested with ATTiny USB to RS232.
But the output are only TX and RX.
Anyone know how to get other signal like RTS and DTS?
Because Arduino is using it to auto reset mcu before uploading.

Thanks.

http://www.roboticsindia.com/modules.php?name=Forums&file=viewtopic&t=4125

You can check this , it is what i had proposed and finally developed.

It will be available on sale soon ( about 9 USD ) ... making it the cheapest arduino online . You have to Add Some code to the driver for DTR , RTS and Leds to work.

Hi Vikas,

can you send to us the schematics and other sources for your custom freeduino?

Thanks and congratulations about your project!