• Bricked chip

    Sergey09/29/2016 at 16:28 0 comments

    So I'm not sure how but I managed to brick the atmega328p chip. Found an error in PCB - usbasp socket didn't have GND connected anywhere on the board. I guess the only reason it worked during programming is because I used power from usb2ftdi adapter from the same PC. But when I tried to play with being powered from phone battery and tried to program the chip at the same time - it went silent. I tried many things (like external oscilator), but nothing helped :(

    I decided to unsolder the chip, after 3 days of different unsoldering tricks this little bastard gave up. He broke 3 legs and probably his neck too, but I got him out :)

    Lesson learned: for testing/first board it's better to use a socket for a chip :)

  • Real use case test

    Sergey09/23/2016 at 15:29 0 comments

    Recently I was able to finally put everything together into a solid test.

    I've figured out a Macro for sending a photo via email. If you wonder in the code it looks like

    String PROG_sendphoto = "bbbbbbbb-mdddmmmdmm-dddmuuuumPPmPPP--mm";


    • "bbbbbbbbb" - 9 times button back (just to make sure we are starting from home screen)
    • "-mdddmmmdmm-" - going into menu (- button from home screen), (m - the other menu button, d - down) locating email client and specifing pre-defined email recipient
    • "dddmuuuumPPmPPP--" - attaching a photo from a camera, with P for pause to let a camera take and save a photo. (u - up key)

    I've coded the Atmega chip to execute this macro every 5 minutes (or so, 10000 cycles)

    Here is how it looks like in my webmail where cloud telemetry forwards incoming emails

    During this test I figured that phone battery could support roughly 30 hours of such activity (no surprise with sending something via 3G every 5 minutes), but I'm sure this could be extended when I remove a cell phone screen (I left it for debug and research purposes)

    Also I discovered that email application in my phone (SE z530i) cannot send any emails once sent items is full of 30 emails (very strange :(). So I've also scheduled every half an hour a "delete all sent emails" macro.

    Then I also realized that I need to know if phone is switched on or off, because sometimes I need to power-cycle it and it may not come back in a timely manner. Or I may decide that when battery is dieing the chip should turn phone off to save the energy and then switch it on regularly for short period of time (so, that I can find it via GSM carrier triangulation :))

  • Telemetry in the Cloud

    Sergey06/30/2016 at 11:52 0 comments

    OK, figured out the email part. Wasn't easy. I'm using Azure VM with dovecot as IMAP server and sendmail as smtp, without encryption - this is not secure, but I've prohibited any relaying and I'm using non-standard ports, and authentication. So, I think for my purpose of collecting telemetry solution is good - I run the VM when I need telemetry and stop it when I don't, Azure looks quite cheap even with external IP.

    Plus I'll be able to check mail server logs to know if device tried to initiate a contact - something is not possible with public email servers.

    Now I need to conenct something real, planning to add barometer, magnetometer, accelerometer and gyro (all via I2C conencted to the Atmega on the board), so that inertial coordinates of the device can be calculated. This is the first step - the next would be to calculate them on-board and send only coordinates, without GPS ;)

  • Old Phone OS issues

    Sergey06/16/2016 at 23:06 0 comments


    Now we have issues with the fact that we are trying to use an OLD phone :) certiificates for most encrypted places don't work. I either have to use non-secured places or install root certificate. Both ways are OK, but I guess non-secure place is more reliable - what if phone lost correct date and time settings - certificate could be still invalid althought everything is installed.

    So, for email I'll probably use Yandex for devices (smtp-devices.yandex.com) which is not secured and for HTTP forms I'll setup my own server.

  • Soldered Oshpark board tests

    Sergey06/16/2016 at 14:27 0 comments

    Hi There,

    So, board is done and soldered and attached to a phone. Sony-Ericsson Z530I in my case, you can find used one for as low as 5$. I've attached everything to a polystyrol plate, just for stiffness, plus added a hole for VGA camera to test it too.

    Here you can see SIM card inserted in the phone and cell phone battery connections soldered to wires. These wires then connected to a battery (read more about this at the end :))

    Here is a view of a cell phone connected to a soldered oshpark board. You can see all 11 MOSFETs (10 for manipulating buttons matrix and 1 for triggering power-on/off button).

    Here is a video of how it PERFECTLY! works :) as a tes I sent a text with Hackaday in russian to my phone, but camera manipulations, GPRS/Edge browser works, everything.

    And here is how it looks on the serial port as Atmega chip provides feedback about "pressing" buttons (array pos - position of requested key in a buttons array, then it tells you the corresponding input and output MOSFETs triggered, their local Input/Output number and their arduino PIN number)

    P.S. I spent so much time trying to understand why my phones are just switch off immediately after powering them with the SIM card attached. Purchased same models, tried different batteries, etc. To find that the problem is with length of wires from battery connector to the battery :) looks like only 10cm is OK without extra soldering in between. Here is how my floor looked while I was trying to find the solution

    Will publish files shortly.

  • PCB bug: Missed pullup for Reset Pin

    Sergey04/04/2016 at 15:02 0 comments

    Hi There,

    Soldered all components onto the Oshpark board (BTW, what a quality!)

    Looks like I missed a pullup resistor for enabling Atmega328 reset pin being triggered by Serial DTR. Will add it to Oshpark files.

    If you are seeing that your DIYArduino/Atmega is unresponsive via Serial although absolutely should work - check this pullup for PIn 1 on Atmega328, all pre-build Arduino boards should have it.

    Everything else is looking good. I'm currently testing the board.

  • Prototype

    Sergey03/23/2016 at 11:30 0 comments

    This is how it looks like in a working prototype mode.

    This is a board of SonyEricsson Z530i with attached wires to rows and columns in the keypad matrix

    You can read about keypad matrix more for example here

    In order to reduce amoutn of MOSFETs I need to manipulate this matrix, I've decided I can use a single wire for all "columns". Because phone keypad chip already knows which column it listens to right now and the rest are silent at this particular moment, so they cannot interfere. That why a schematic for my MOSFETs is the following (In - input column, On - Output row):

    Here are some picture of the back side fo the phone PCB (battery and charing wires are soldered)

    Here is the prototype PCB with wires from phone going in and some supporting circuits such as battery power metering

    Here is the other side of the PCB. Array of MOSFETs which are connected using resistors to the Atmega328PU pins. Atmega chip is bootloaded with firmware to use internal oscilator, so that I don't need to have a dedicated circuit for it.

    I'm going to share Egale files for the integrated PCB when I test that it's working correctly.

  • Oshpark boards arrived!

    Sergey03/14/2016 at 11:47 0 comments