Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Using Arduino UNO to control Denon AVR-2808
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using Arduino UNO to control Denon AVR-2808

by perjarle on Thu Oct 20, 2011 11:34 am

Hello
I'm a newbie when it comes to electronics, but have many years experience with programming.

I recently bought an Arduino UNO to play with.
The project I want to do is making the Arduino control my Denon AVR-2808 surround receiver which has a RS232C interface.

I found a pdf describing the protocol on the internet:
http://www.manualowl.com/m/Denon/AVR-2808CI/Manual/170188
pdf is also attached

My main problem is to make the proper RS232C connection. The document says:

RS-232C Connector type: DB-9pin female type, slave straight connection (DCE type) ( 1pin : GND , 2pin : TxD , 3pin : RxD , 5pin : Common(GND) , 4,6,7,8,9pin : NC )

Communication format:
Synchronous system : Tone step synchronization
Communication system : A half duplex Communication speed : 9600bps
Character length : 8 bits
Parity control : None
Start bit : 1 bit
Stop bit : 1 bit
Communication procedure : Non procedural
Communication data length : 135 bytes (maximum)

If I can get some help setting up the connection I will be thankful

Best regards
Per-Jarle
perjarle
 
Posts: 3
Joined: Thu Oct 20, 2011 11:16 am

Re: Using Arduino UNO to control Denon AVR-2808

by cstratton on Fri Oct 21, 2011 1:50 am

Electrically it sounds like you will need a level translator to go between the logic level serial of the Arduino and the standard RS232 levels of the device you want to control (the signals are also inverted in the process of level translation). Usually something based on the MAX232 or one of its many descendents is used, since that can generte the +/-12v using onboard charge pumps instead of needing external power supplies as the old 1488/1489 did. Actually, if you could find an older-generation arduino with the 9-pin connector on it instead of USB and just change out the chip for a recent atmega328, you'd have a more integrated solution than using your uno + a level translator.

Generally, for software projects where the hardware component is something standard like serial, it's often wise to first write the code on a PC (but as if it were an embedded system with limited libraries) and get it talking to the device under control. Then when you have the basic idea of how it needs to work, you can port it to the arduino. If you write portable code and periodically compile for the arduino during your PC-based experiments, you'll become aware if you start coding in a direction the little chip can't support.

cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: Using Arduino UNO to control Denon AVR-2808

by perjarle on Fri Oct 21, 2011 2:45 am

Hi, and thank you for the reply
Since I have no pc with RS232 port I will need to go through the Arduino.

I basically have the code ready in my mind, but only need help setting up the electronic part.
If I get the Arduino working, I may have someone help me build a simpler card using the Atmega chip from the Arduino.

Are you able to help me with the MAX232 solution, and how I can set it up with the Arduino?
The optimal solution would be a RS232 shield that is connected to rx/tx ports on the Arduino.

Best regards
Per-Jarle
perjarle
 
Posts: 3
Joined: Thu Oct 20, 2011 11:16 am

Re: Using Arduino UNO to control Denon AVR-2808

by cstratton on Fri Oct 21, 2011 12:14 pm

Your simplest option is probably to buy an RS232 level shifter kit/board. I'm not seeing one here on the adafruit site (apologies if there is one I missed) but sparkfun has several to chose from. If you want to buy a bare chip and wire it up with the caps yourself, they publish schematics.

I still think the cleanest implementation would be to to find or re-create an older arduino board that has the 9-pin connector and level shifters built in instead of the USB interface of recent boards, and upgrade it to an atmega328.

You can get a USB-serial converter to let your PC talk directly to the receiver or to the RS232 arduino for about $12 many places.

Finally, in the "not officially recommended category" if you want to play with it today, you could look at hack solutions to accommodate the dual needs of level translation and logical inversion between a bare microcontroller such as on the arduino and the RS232 standard. You may at low baud rates be able to receive RS232 using a resistive voltage divider feeding into an ordinary 74whatever04 inverter. On the transmit side you just go through the inverter and hope that the device you are talking to can register logic level voltages - many can, though it's not guaranteed to work.

cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Please be positive and constructive with your questions and comments.