Question: I want to make the same signal like the following images using an Arduino Uno. But I can't find the baudrate of this signal.

I calculated baudrate the same way as Wikipedia. But when I used the baudrate I got framing error.

The duration of the start bit: 0.2223 ms

1/ ( 0.2233 / 1000) = 4478 bit/s

What did I do wrong?

[![Enter image description here](https://i.stack.imgur.com/i9GSz.png)](https://i.stack.imgur.com/i9GSz.png)

Update
======

The device has the following 4 pins.

* VIN: 12 V
* GND
* GND
* SIGNAL: 3.3 V

I don't have any documents like a datasheet or a manual. I think that it uses UART communication because there is only one signal pin.

I upload the logicdata file on my Dropbox account: [Here](https://www.dropbox.com/s/6lzz95954ve3rzm/12%20MHz%2C%2012%20M%20Samples%20%5B8%5D.logicdata?dl=0)!

Answer: 
Try 10500 baud. The data stream should be `0xAA 0x24 0x00 0x00 0x55`. My suggestion to determine the baud rate is to look for characteristic bytes. In your capture the long zero sequence is a good candidate (generally, the `0x00` and `0xFF` bytes look very characteristic on serial):
[![enter image description here](https://i.stack.imgur.com/QAxPt.png)](https://i.stack.imgur.com/QAxPt.png)
10 bits divided by the total length of the marked box gives you the baud rate.
Assuming this is asynchronous serial data, the bit time is probably equal to (and cannot be longer than) the narrowest pulse. According to my pixel counting this is ~64.4us, corresponding to 15.5k bits/s.

However, a standard UART frame consists of a Start bit (always low), 5-10 data/parity bits (high/low), and a Stop bit (always high). Therefore the maximum continuous low time cannot be longer than 11 bits. 

[![enter image description here](https://i.stack.imgur.com/k0SbR.png)](https://i.stack.imgur.com/k0SbR.png)

The longest low time in your signal is ~889us. Dividing that by 64.4us gives 13.8 bits. Therefore I conclude that this is not asynchronous serial data that can be read by the UART in your Arduino.

One possibility is that the signal is inverted ie. Start = high, Stop = low. Your capture is too short make a conclusive determination (it didn't quite work out for me, but I may have miscounted) so you could try inverting the signal. 

It might also help to know more about the device you are reading from. If the physical interface is similar to RS232 then there's a good chance it is asynchronous data, but if the device is wireless the signal may need to be in a self-clocking format.