Friday, May 11, 2012

AVC: Serial to I2C Bridge

I finished designing, etching and silkscreening a new board last night and started populating it. It's a slight redesign of a board I did before last year's AVC. What's it for? Not telling yet. :)


I can say this. It's an Arduino clone that will speak serial on one set of pins via NewSoftSerial and I2C on the standard set of pins. It has an FTDI header for programming via bootloader.


The design implements some suggestions on reset and decoupling circuitry from teslafan @ Robotic Core based on an Atmel application note (doc2521.pdf).

Serial I2C Bridge board and schematics are here
The board will interface a Top Secret serial-only device to the mbed via I2C. Which seems like a waste of an AVR, except the little processor will also be doing some data processing and filtering. I already have code written for the board on which this is based.

Why not use the super-powerful mbed for this processing? Maybe in a later revision I will but I burned out one of my mbed's UARTs and have no more to spare. I don't want to spend $60 on another one at the moment. 

The serial device is 5V and the mbed is 3.3V so I attempted to do some logic level shifting but I was in a hurry and I botched it. I have a uni-directional level shift in place on the SDA line which is supposed to be bidirectional. Rats. Fortunately I have a simple fix; throw a current-limiting resistor in place of the diode and remove the pull-up resistor.

Eagle files; look for "Serial I2C Bridge"

2 comments:

  1. Hmm... why use SoftwareSerial when the 328 has hardware serial?

    ReplyDelete
  2. Great question. The hardware serial is tied to FTDI port. One might then ask, why not just use the same port for device and programming?

    Because this way I can monitor status while the thing is running.

    The code I wrote for the original version lets me monitor status while the board and device and downstream I2C master are all talking.

    I can also bridge the FTDI to the device to configure it.

    These features were way too neato and convenient to give up. :)

    ReplyDelete