output voltage digital I/O

Hi,
My arduino Mega board is setting 3 >3,3 V on the output pin when I'm writing a HIGH to the outputs. Is it possible to modify this to 5 Volt.

Do you have

pinMode (pinX, OUTPUT);

in void setup? Missing that is often the culprit.

PinMode is defined in void setup()

int rel1 = 38; //living 1
int rel2 = 39; //living 2
int rel3 = 40; //keuken 1
int rel4 = 41;
....
void setup()
{
...
pinMode(rel1, OUTPUT);
pinMode(rel2, OUTPUT);
pinMode(rel3, OUTPUT);
pinMode(rel4, OUTPUT);
...

What voltage is your mega board running at? Is it a custom made board? Is it a genuine Arduino? If so, what model?

Or, is there anything connected to the output pin that might be "dragging down" the voltage? With no load on the output and a 5V power supply, you should be very close to 5V.

"Rel" as in "relay"?

I have 2 boards. Both gives te same result.
3 to 3,3 V with no load.
First board is a original arduino Mega 2560 and the second is a ARduino Mega ADK

James C4S
"rel"
Yes , my outputs are named 'rel x'. Could this be a problem ?

Majenko :
Voltage of the board. Where can I see this ?
I use a 9V power supply. On the board I have connection with 5V an one with 3.3 V. So I think the board is running at 5 V

Do you have the R3 mega? It will have a pin labelled IOREF if you do. If so, what is the voltage on that pin?

guidoc:
"rel"
Yes , my outputs are named 'rel x'. Could this be a problem ?

If you are connecting relays to the outputs and seeing less than 5V, then the relays are drawing enough current to damage the I/O pins.

guidoc:
I have 2 boards. Both gives te same result.
3 to 3,3 V with no load.

The pins may have been overloaded and damaged.

Majenko,

The mega board has only a AREF pin, no IOref.
The ADK-board has AREF and IOREF. I will check the voltage on that pin.

Fungus,
The output can not be overloaded. One board is never connected with the relay shield.
The relay shield has opto couplers. Max current is 5 mA.
I use this shield :
http://www.aliexpress.com/item/New-16-Channel-12V-Relay-Module-Interface-Board-For-Arduino-PIC-ARM-DSP-PLC/668259106.html

guidoc:
Majenko,

The mega board has only a AREF pin, no IOref.

Try the "5V" pin.

problem solved after I disconnected the 5V comming from the arduino, on the connector of the relay board.