Pages: [1]   Go Down
Author Topic: Help with MAX232 Shield  (Read 3467 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm new to Arduino and need assistance please.

I have ATmega328 Board, I purchased in eBay an Arduino MAX232 Serial TTL To 232 Shield.

Could be seen in that link.

http://cgi.ebay.com/Arduino-MAX232-Serial-TTL-232-Shiled-/280536761004?pt=LH_DefaultDomain_0&hash=item41514b42acIt is $13 & free shipping



Is anyone can give me an idea how to connect this shield to my Arduino,  I need the Arduino to be able to read data that comes into the Max232 at 9600,n,8,1 please help me with the wiring to the corre3ct pins, and a sample code.

I would appreciate your help,  

Thanks
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3225
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The link is very nice and pretty... but fails to show a schematic so we can point the connections to you. smiley-sad

There is code available there... all you really need is the schematic.

Remember this. The RX from the Max232 goes into the TX on arduino and vice-versa. The rest should be as simple as plug and play.
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, actually I don't think that a diagram is necessary, it looks simple, the board has 4 outputs RX TX VCC GND so I figured that I need to connect the TX to RX and RX to TX, then VCC to 5V of arduino and GND to the GND of arduino, so far it looks standard as any other communication device.

But because I'm still very new to arduino I still need a help to get the code needed to read the input that comes into the max232 and to be able to store it as a variable, could anyone refer me or send me a sample of a code that reads the RX at 9600,N,6,1  

Thanks

Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What kind of arduino do you have as I don't understand why you need the max232 shield.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the ATmega328 that have a USB port but doesn't have a RS232 port, I need to get a signal from an electronic scale that has a standard RS232 output, so I taught that the way to get the signal is to connect the scale with a cable to a RS232 device such as Max232 that works with Arduino, but maybe I'm wrong, maybe there is a way to wire the RS232 cable directly to Arduino without an external device, if you know please tell me.


Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so I taught that the way to get the signal is to connect the scale with a cable to a RS232 device such as Max232 that works with Arduino, but maybe I'm wrong, maybe there is a way to wire the RS232 cable directly to Arduino without an external device, if you know please tell me.

You were taught correctly and that module would seem to work just fine. If you want a mating connector for that module you could buy from here:  http://www.seeedstudio.com/depot/electronic-brick-fully-buckled-4-wire-cable-5-pcs-pack-p-486.html?cPath=178_179&zenid=9f6118c193cee9f8b7337d4df91a2eca and cut off the unused end, solder wire pins to insert into your arduino. But if you don't want to buy a package of five, it looks to be not too hard to solder wires directly onto the back of that connector. There are just four connections required, ground, +5vdc, signal out tx would wire to a arduino input pin and signal in rec would wire to a arduino output pin. You would probably want to utilize a software serial library to be able to use any free I/O pins you want to and not to interfere with the USB serial pins using pins 0 and 1. The following library is highly recommended and used by many: http://arduiniana.org/libraries/newsoftserial/

Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I followed your advice, and I soldered the wires directly onto the back of that connector, and plugged the wires to arduino, RX TX 5V and GND, it works now, the arduino gets the signal and I can read it on my PC trough the serial monitor.

Anything that comes to the MAX232 is displayed on the serial monitor even when no special program is loaded on arduino, that's probably because the pins 0 and 1 are rlated to the USB port, so the first step is done successfully.

Now I should try the library that you suggested, and use another pins for the IO, let see how I will succeed with that, I will ask for additional help if I'll need.

I meantime thanks to all of you.
Logged

Pages: [1]   Go Up
Jump to: