This is why it wasn’t working! BTM-182 output voltage out of Spec!

Determined not to give up, I continued on. The next step I came up with, was to swap BTM-182 modules, since maybe there is something fishy with that one? Swapping them didn’t help. So I thought, maybe its a voltage level issue.

And it was.

Apparently the BTM-182 module outputs a high of 1.4V, whereas the ATMega328 expects at least 0.9*Vcc (2.97) when operating at 3.3V (I’m operating at 3.3V). Apparently it worked with Software Serial because the change was enough to trigger an interrupt. A quick solution will be to set the TX of the BTM-182 module as the base input of a BJT, when high, triggers a pullup on whatever I’m controlling. And I’ll verify that it works, before trying everything out.

So ultimately, this chip, for some reason, output 1.4V as the high instead of 2.9 as expected. Looking at the datasheet, it seems that it believes that it is operating at 1.8V, not 3.3V. Quite strange. Lesson: Fully understand your parts, before you try to start working with them, because things may be go smoothly until you hit an unexplained snag. I hope to not make this mistake again!

The problem of SW serial dropping things will be still present on the controller, so I may need to change the usage of my packets to be more of a ask-give relationship, rather than give, give, get (occasionally).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s