Control H4 ZOOM RECORDER with rs 232 and arduino

Hello all !
I try to do this tutorial:
http://www.apm-motionpictures.de/en/h4ncontrol
It allows arduino to control zoom recorder ! pretty useful...

I try this arduino code with no results:
The arduino serial window print weird characters like "ÿ"... weird...I have the feeling the h4 doesn't response at all...

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX
uint8_t my_serial_bytes[3] = {0x82, 0x00}; 

void setup()
{
  Serial.begin(57600);
  mySerial.begin(2400);
  mySerial.write((byte)0x00);  //first byte of registration sequence
}

void loop()
{

  Serial.println("0x00 SENDS");
  Serial.write((byte)mySerial.read()); //H4 is supposed to send '0x80'... but nothing occurs...
  delay(10000);
  Serial.println("0xA1 ENVOYE"); //part of registration sequence still...
  mySerial.write((byte)0xA1);
  delay(10000);
  Serial.write(my_serial_bytes, sizeof(my_serial_bytes)); //send PLAY command to H4N... but still nothing occurs...
  Serial.println("PLAY");
  delay(30000);
}

any help would be appreciated :slight_smile:
thanks

The arduino serial window print weird characters like "ÿ"

That is usually a sign of the baud rates of the program and the Serial monitor not matching. What baud rate have you got the monitor set to ?

the arduino serial monitor is set to 57600...
the h4n serial port is set to 2400 !
I try to change the rate of serial monitor with no success... :frowning:

Try a "Hello World" print from the simplest possible sketch. Does that work ?

well it's as if the serialport from h4n doesn't respond..

Forget the h4n for now. Make sure the output to the Serial monitor is working first then you can use it for debugging.

How is the h4n connected to the Arduino ?

"The protocoll is RS232 at 3.3V with 2400bps 8n1" from the site...
this maybe my issue...

thanks for your response UKHeliBob !
pin 10 is connected to RX of h4n
pin 11 is connected to TX of h4n
gnd of arduino is connected to ground of the h4n

gundorf:
"The protocoll is RS232 at 3.3V with 2400bps 8n1" from the site...
this maybe my issue...

It is almost certainly the issue with the h4n as the Arduino does not output RS232 level signals for which you need a converter. However, it does not explain why you get strange characters on the Serial monitor.

I thought arduino could deleivered 3.3volts for rs232...

RS232 is +/-3V to +/-25V.
3.3V powered Arduino can put out ~0-3.3V. You need the negative part, that's what an RS232 chip develops for you.

ok thanks CrossRoads !
it's weird because the man from h4n tuto doens't seem to use any external shield...here's the schematic:

ok do you think, this could help me ?
http://www.ebay.fr/itm/Mini-RS232-to-TTL-Converter-Module-Board-Adapter-MAX3232CSE-120kbps-3-5V-A364-/231105871471
thanks

Maybe I'm wrong, but I am trying to do the same on the H2n and the projects that I have seen don't use any converter so maybe I'm thinking that a converter must be on the remote itself, or maybe is not an RS232?

Bit late here :o but if anyone has stumbled upon this and is still struggling...

The remote signalling is NOT RS232, it is plain 3.3V TTL so you can just hook up an Arduino (as long as it's 3.3V logic based!) or a USB to serial converter and your away.

Here are some links to more information - GitHub issue.

Yes, a lot of time is passed but in the end I've discovered that was a simple serial connection and I was able to reverse engineer the messages generated by my H2n remote and to use them on the recorder like the guy did on the links that you've posted