Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences in 49 baud transmission from Arduino, Android, #65

Open
jywarren opened this issue Dec 27, 2016 · 5 comments
Open

Differences in 49 baud transmission from Arduino, Android, #65

jywarren opened this issue Dec 27, 2016 · 5 comments

Comments

@jywarren
Copy link
Member

I created a new example profile which is identical to the standard SoftModem profile, but with 49 baud, which is a factor of 44,100 -- 44.1kHz -- to see if I could get better transmission at lower speeds, and as an explanatory example slow enough for the human ear to hear the high/low switches.

https://github.com/publiclab/webjack/blob/master/examples/index.html#L113-L120

I then modified SoftModem.h to set the Arduino's transmission baud to 49 bits/second.

But playing each, I hear distinct differences between them -- do I need to adjust something else to get this to work? I wasn't able to send/receive on either a Mac laptop, Arduino (both with Chrome), or to transmit to either from an Arduino with these settings.

Here are recordings of each:

https://publiclab.org/system/images/photos/000/019/144/original/arduino-49.wav

https://publiclab.org/system/images/photos/000/019/145/original/android-chrome-49.wav

https://publiclab.org/system/images/photos/000/019/146/original/mac-chrome-49.wav

Some don't even sound to me like the same pitch. Any advice -- and any additional guidance on choosing baud rates? I'd like to add to the documentation for this. Thank you!

@rmeister
Copy link
Collaborator

rmeister commented Jan 7, 2017

49 Baud will not work, because the TCNT_BIT_PERIOD constant exceeds the range of an uint8_t and is therefore trunkated. As countermeasure we could try to change the prescaler, but then the error rates seem to get very high.

I've added some comments to this sheet that can be used to play around with the different parameters:
https://docs.google.com/spreadsheets/d/1eGkrUqYAaXadsdk2csurmt97gBlT8dznx2IJKigZT90/edit?usp=sharing

@jywarren
Copy link
Member Author

jywarren commented Jan 9, 2017 via email

@jywarren
Copy link
Member Author

jywarren commented Jan 9, 2017 via email

@rmeister
Copy link
Collaborator

Oh, excellent -- is there any way to export that so we can add it to the
repository?

Maybe as LibreOffice file?

Can you explain or link to more info on: relative error HIGH/relative error
LOW ?

SoftModem uses integer arithmetics and therefore loses precision in signal parameter calculation. I looked at the difference between generated and ideal bit length. It is important to keep the difference small, elsewise the decoder gets out of sync.

Also, did you enter 126, 315, 630, 1225 as examples of baud rates that
would work?

I added them as they are the proposed ones in SoftModem.

@jywarren
Copy link
Member Author

jywarren commented Jan 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants