Well in my previous entry about my current project for school I was discussing our currently futile attempt to use an AT&T Sim card to send texts so we decided to go with T-Mobile instead. Getting the card from ebay turned out great. I just had to type in the codes online and everything was good to go. I am pretty happy with how easy that was. Unfortunately, I was not happy with how it still didn't connect.
Before I can really expound on that I need to first tell you a story.
When we first designed the circuit we were going to build, we decided to regulate our voltage with a zener diode and resistor. At first the current draw on the zener was too much and we blew it out. So we were like, lets put them in parrallel. LOL.
You can't do that because one of them will decide that it is the best and blowup. Then the next one will. and so forth... So we were able to get one big enough finally and a resistor that is rated for 4W because that is what was needed. It never occurred to me that this was a bad setup... even though the very consept of a 4W resistor should have been an indicator. But it worked: we have our 9 volt source for our motor, and 4.2 for our microcontroller. Awesome. Well flash forward to the present.
So now I am plugging in my newly activated TMobile Sim card and then connecting to the uart over bluetooth. As a side note i am really glad that we have this bluetooth module... we never would have been able to debug anything with out it... much better that compile and pray.
anyway after connecting to it over uart the cell module tells me to f-off. No service. No service. No service.
Well even if we aren't on a network we should get signal.
At+csq 99, 99
Bullshit there is no signal. My cellphone works... ya it will be roaming but...
#mwi 1,1,0
Wait... what does that mean, cell module?
Well that above message randomly showed up. A lot. Turns out that means "message wait indicator". It is supposed to keep track of messages that are pending to send and recieve. It is also supposed to show up at boot after the first AT... not randomly and intermittently. Oh and a lot of the time when typing in at commands it will cut out, inexplicably. No idea why. We made sure that the band was set correctly. But the connect commands still didn't work. Not to mention that cops returned nothing. It was all pretty annoying.
At about this point my friend is like, ima look at your vcc on the oscilloscope. Turns out our 4.2 volt line kept dropping out to about 3 every now and then. Suddenly all the information started to come together. When we sent the boot sequence at the beginning I didn't know why but we were needing to hold the line low, or it would turn off randomly... because power sagged. And while it was held on it couldn't connect because power kept sagging. And our commands were cut off because while typing, the device resets, because of power sag.... so to test this theory we floated the whole power circuit and connected vcc to a power supply and suddenly EVERYTHING WORKED. Ya. I still haven't tried with the at&t card since fixing everything else... for all I know that might actually work fine now.
I'll have another post later tomorrow prolly about getting our microcontroller to correctly send texts, Cuz that also sucked.
Anyway... power regulators are good. And if you see this kind of crap check power it may not be what it should be... :p
Edits:minor grammar fixes and unautocorrects. (it was sent from my kindle fire, which is also why my i's are cap'd, i wouldn't capitalize them myself.)
No comments:
Post a Comment