Category Archives: oscilloscoped

433 MHz receiver and NewSoftSerial

If you’re having problem with NewSoftSerial versus SoftwareSerial when using 434 MHz (433.92MHz) – receiver, it’s because the receiver cannot pull down the RX pin on your arduino. The library changes the input pin to be pull-up when non-inversion is used.

Change the library in following manner:


void NewSoftSerial::setRX(uint8_t rx)
pinMode(rx, INPUT);
if (!_inverse_logic)
digitalWrite(rx, HIGH); // pullup for normal logic!
_receivePin = rx;
_receiveBitMask = digitalPinToBitMask(rx);
uint8_t port = digitalPinToPort(rx);
_receivePortRegister = portInputRegister(port);

More info :

MIDI signal

MIDI signal in oscilloscope. Inverted serial 31200 bits per second. Captured from USB->MIDI adapter (SWIS). First bit time is about 32us (31.2us = microsecond ). Voltage difference was 3.92V.

A great page describing MIDI: which describes MIDI like:

“MIDI is a serial communications protocol, operating at 31,250 bits per second. Each byte has 8 bits, plus a start bit and a stop bit. It operates at 5 volts DC. The standard MIDI connector is a 5-pin DIN connector, and usually all connectors on the device are female, and both ends of a MIDI cable are male.”

From here :

  • MIDI is an asynchronous serial interface.
  • The baud rate is 31.25 Kbaud (+/- 1%).
  • There is 1 start bit, 8 data bits, and 1 stop bit (ie, 10 bits total), for a period of 320 microseconds per serial byte.
  • The MIDI circuit is current loop, 5 mA.
  • Logic 0 is current ON.
  • To avoid grounding loops and subsequent data errors, the input is opto-isolated. It requires less than 5 mA to turn on. The Sharp PC-900 and HP 6N138 optoisolators are satisfactory devices. Rise and fall time for the optoisolator should be less than 2 microseconds.
  • The standard connector used for MIDI is a 5 pin DIN.
  • Separate jacks (and cable runs) are used for input and output, clearly marked on a given device (ie, the MIDI IN and OUT are two separate DIN female panel mount jacks).
  • 50 feet is the recommended maximum cable length.
  • Cables are shielded twisted pair, with the shield connecting pin 2 at both ends.
  • The pair is pins 4 and 5. Pins 1 and 3 are not used, and should be left unconnected.