Wednesday, March 7, 2018

Electronic Device Assembly Business

Nowadays with the miniaturization of machines, small businessmen or engineers with brilliant ideas can easily compete with the giant players. Production machines used to be available only to people with huge funds has become cheaper and people that can afford to buy a car can easily invest their money in these machines to start an electronics assembly business from pcb fab to enclosure. And the best part is all these machines can easily fit on a small apartment.

The machines needed to start the business are the folliwing:

1. Design and Prototyping Equipments

  • Personal Computer
  • Mini Cnc(90mm x 120mm work area) for pcb prototyping
  • 3d Printer for the prototyping of enclosures
  • Laser Cutter for enclosure porotyping
  • Oscilloscope/Multimeter and other tools
  • CAD Software

2. Production Machines

  • Pick and Place Machine
  • Cnc Router-300*400
  • Reflow Oven
  • Pcb Stencil Printer
  • Mini Plastic Injection Machine
  • Laser Cutter- 300*400

All the above mentioned machines could only cost about the same price as a brand  new Toyota Vios or less than 1Million pesos.

The business is ideal for contract manufacturing or would cater to the market where inventors require to produce less than 100 units for experimenting how their product will be accepted by their target market. This market segment is where I belong because I have very limited budget. Based on my experience, the creation of the plastic mould itself is already unaffordable because it would cost around Php100,000(this is made in China because somebody has told me that the mould used in mineral water bottle caps was worth Php 375000 done locally) already and the manufacturer only accept a minimum of 1000 units. Plastic moulds can already be 3d printed because there are filaments that only melts at 210 degrees celcious while thermo plastics(the material used in plastic injection) easily melts at 130 degrees.

The equipments are also ideal and must haves for every school and/or  Univerisities because these machines are also being used by the industry so it is good for students to have hands on experience and if they have access to this equipments they will be encourage to be creative and who knows they could produce new products that could become like Samsung or Apple someday. The sales of both companies is enough to make the Phillippines become a very rich country.

Monday, February 19, 2018

Create a powerful Bluetooth based Network of Beacons

Beacons are not just for increasing sales or giving out more interactive physical environment to enhance user's experience. Beacons can be a powerful tool to detect patterns before a major catastrophe can happen resulting in the protection of properties and life.

A network of sensors for monitoring temperature and humidity, detect if an object has moved when should not have moved, an employee forgot to close the window or door, an employee stayed too long at the pantry or know how many customers checked a certain product are just a few of the useful data that can be collected with the networked beacons.  

The above figure shows all the necessary beacon types one will need to implement a networked beacons. 

Here are the actual images of the sensors and the gateway:

The Kit:(This is a great package to test a lot of use case scenarios. Available at olx.)

The Kit includes the following beacons(excluding the Apps Factory Beacon):


Size: 90 x 60 x 4 mm
Ibeacon Only
Disposable(Battery can not be replaced)
This is an ideal substitute to rfid badges

Size: 72 x 72 x 18mm
Ibeacon + EddyStone
External ON/OFF switch
Battery can be replaced


Size: 42.5 x 23.5 x 5.3mm
Ambient Light Sensor
Battery can be replaced


Size: 150 x 150 x 36mm
Bluetooth to Wifi Gateway
MicroUSB Power Input(5V1A)

Size: 72 x 45 x 22mm
Ibeacon Only
200m Range
Battery can be replaced

Size: 50 x 50 x 15mm
Ibeacon + EddyStone + Accelerometer
External On/Off Switch
Battery can be replaced


Size: 70.6 x 38 x 17.8mm
Ibeacon Only + EddyStone + Temperature + Humidity Sensor
Battery can be replaced

Apps Factory Beacon with Buzzer:

Wednesday, February 14, 2018

IT Company and Manpower Agency

An IT Company develops its own products and sells them to end users. They own the copyrights and their products are original.

A Manpower Agency recruits individuals and deploy them to their so called "client". These manpower agencies always dominate job sites and facebook groups for programmers.

There is a big question why manpower agencies name their companies as IT Companies to disguise themselves as IT Companies. A big question is why do they do this? This tactics originates from the USA and usually funded by the Chinese with Indians as their partners where ponzi schemes abounds.

I was lured into this because I was really in need of money and these scammers offers job with no interviews but offers no security but I was in it for the quick cash and I am not ignorant that these people are actually scammers they will say they are an IT Company which I dont believe or shoyld I say never believed at all. These are usually females walking all over the metro they easily fill in any available space like when you're eating at a mall and there is a vacant seat, 99% of the time, it will be filled up by a female recruiting or selling anything under the sun or when you ride an fx or jeepney, 99% of the passengers is always females. I am not a female hater I have just observed that their numbers is way too much to take. It is just too abnormal and vommiting. My mom does not go out much nor my relatives nor our neighbors. Is living in a small space makes them go out and hunt for something all the time? Is there someone that tells them they should always stay on the street? I dont see them buying, they just walk all over  and keep on riding public transport. I just wonder what they feed on.

These females are so proud of their jobs, I've read an article written by these females and they think of themselves as IT managers as she wrote, the client complained that she gave them a junior but they asked for a senior. I just could not imagine that they treat programming jobs as a commodity this female described in her article how she was able to pull out the junior and replaced him with a senior. It was a glorified scamming scheme and yet she's so proud of it.

I applied for a job at a certain tech company and not surprised that all recruiters again are females, but did not succeeded because it was not my primary skills and had not used it professionaly.

While on my way home, a female sat beside me and during our journey she put her sweaty arms on top of my legs which is very unusual. She also pretends looking at her cellphone but was somewhat wants to tell me something, this behavior is somewhat similar to those females in the office of the client of the agency that I am referring to in this post. (As I recall correctly when I am still working at the agency's client, there is not a day where their females keep looking at me as if I am a walking cash)I was waiting for her to say something but the vehicle stopped and a passenger got out so I immediately stayed away from this female and a manong sat between us. After a few minutes a sports car passed by and the female looked at me as if she wants me to buy her a sports car, that made me conclude that she was a well you know. She could have been tracking me and the "sitting beside me" incidence is not a coincidence. She could have been tracking me even when I am still at the office where I am applying. I heard that outsourcing from foreign clients usually involves in sex trade, but not all of course but with this incident, I am not surprised.

Even when I was on an airplane going to Thailand which was almost 10yrs ago, those Pinay looking ladies at the airplane exhibited similar behavior. They see single traveling male as a walking cash. This is why HIV is getting a big problem besause a lot of companies are very discreet, they should show their true colors to prevent hiv.

Monday, February 12, 2018

An Update to the Ibeacon Scanner App for Android

I have found a time to review the source code of the Ibeacon Scanner App and it would be easy to add the feature to include scanning Eddystone Beacons. To do this, the file needs to be modified to detect the 3 Eddystone frames(UID, TLM, URL).

Here is the portion of the file that needs to be modified:

public void onLeScan(final BluetoothDevice device, final int rssi, final byte[]                             scanRecord) {
           int startByte = 2;
           boolean patternFound = false;
           while (startByte <= 5) {
           if ( ((int) scanRecord[startByte + 2] & 0xff) == 0x02 && //Identifies an iBeacon
                //Identifies correct data length
                ((int) scanRecord[startByte + 3] & 0xff) == 0x15) {
                 patternFound = true;
        if (patternFound) {
            //Convert to hex String
           byte[] uuidBytes = new byte[16];
           System.arraycopy(scanRecord, startByte+4, uuidBytes, 0, 16);
          String hexString = bytesToHex(uuidBytes);

        //Here is your UUID
       String uuid = hexString.substring(0,8) + "-" +
                             hexString.substring(8,12) + "-" +
                             hexString.substring(12,16) + "-" +
                             hexString.substring(16,20) + "-" +
       mRSSI[mElems]= String.valueOf(rssi);
     //Here is your Major value
        int major = (scanRecord[startByte+20] & 0xff) * 0x100 +                                                                    (scanRecord[startByte+21] & 0xff);

     //Here is your Minor value
        int minor = (scanRecord[startByte+22] & 0xff) * 0x100 +                                                                     (scanRecord[startByte+23] & 0xff);
       runOnUiThread(new Runnable() {

The variable  patternFound was used to detect the ibeacon pattern and the scanRecord variable currently contains the data being processed and which is being examined whether it contains the ibeacon pattern. And from this, we can already insert the code to identify the current contents of scanRecord if it is an Eddystone pattern.

Thursday, December 28, 2017

Eddystone URL Encoding : A Beginner's Guide

For beginners who need to know how to convert url into UINT8_T, This can be a very helpful information:

To begin with, beginners need to know exactly what the URL frame contains and here is the details:

The first 9 bytes of the frame are just prefix. To check the content of the prefix value, see the picture below:

The 10th and 11th byte is constant having the value "AAFE". And starting on the 12th byte is the actual eddystone frame which is broken down into the following:

Frame Specification

Byte offsetFieldDescription
0Frame TypeValue = 0x10
1TX PowerCalibrated Tx power at 0 m
2URL SchemeEncoded Scheme Prefix
3+Encoded URLLength 1-17

The URL prefix have constant designated values:

URL Scheme Prefix

The URL Scheme Prefix byte defines the identifier scheme, an optional prefix and how the remainder of the URL is encoded.

The URL Expansion also have constant values:
14..320x0e..0x20Reserved for Future Use
127..2550x7F..0xFFReserved for Future Use

And the remaining strings in url are converted to hex ascii codes. The URL is 17 bytes including the expansion value.

Here is the raw data from nRF Connect App:

And here is the actual raw data:

To Interpret the data
Byte offsetFieldValue
0Frame Type0x10 
1TX Power0x04 
2URL Scheme0x00 = "http://www."
3+Encoded URL0x06D696E65777465636807
The last 2 digits "07" is the URL extension for ".com"
0x06D696E657774656368 when converted to string is "minewtech". I used the foloowing website for the conversion:

Combining the decoded data that we will get ""

Sunday, December 24, 2017

Google Nearby Troubleshooting Guide and the Minew Eddystones

This serves as a continuation of my post Google Nearby 101. As I have mentioned in my previous post, there are a bunch of cons that a developer should be aware of using Google Nearby. In summary, here are the cons:

  1. smartphone has to be connected to the internet
  2. the screen must be opened to receive the notification
  3. bluetooth and location services must also be turned on
  4. notification had no sound
  5. the notification disappears all by itself after 10 to 20 minutes(sometimes less than 2 minutes)
  6. once the notification is deleted, it will not reappear too soon because of google's standard notification backoff policy

One important information that I have not mentioned in my previous post although it is not con but it is very important is that the URL must be "https" other than this, the configuration will not work.

Knowing the cons can help in speeding up the development of Apps. Another important aspect to take note of is that the Nearby Service is not in the hands of developers and there are occasions when Google shuts down the service which may trick other developers which will make them think that Google NearBy is not stable. Based on my personal experience this is how I was able to determine that when my smartphone is not able to get the notification and the cause is that the Google Nearby Service is not running is as follows:

I used several apps to check if my eddystones are working like the following: 
  1.  Ibeacon Detector. This app when run in Android 6.0 shows the different frames coming from the eddystones by refreshing the screen each time it receives the new frame. If there is no new frame received, the screen does not refresh so I know when the eddystones is not working.
  2.  nRf Connect App. This app does the same thing as the Ibeacon Detector app but it identifies the frame type and shows each values it receives with proper labeling like the temperature, uuid, instance id, etc. so this is better the Ibeacon Detector App.
  3. BeaconSet+. This app shows all the frames it received and it does not refresh the screen. It will not be able to detect the eddystones if the datat it receives is incomplete.
 I use these 3 apps to confirm if the source of error is coming from the Google Nearby Service using the logic: "My eddystones are working but I am not able to receive the notification but I confirm that a few minutes ago, it was working fine."

The Hardware
For some other reasons, knowing better the Eddystone being used can also be very important. As a developer, your knowledge of how the eddystones work should be at leas above average or at least know more than the end-user. You should be very familiar how it operates and know when the battery is still fully charged.

The eddystones I am using(Minew I6 models) operates this way:

  1. Upon insertion of the battery, it goes to connectible mode for 1 minute. During this mode, it will not transmit the URL and TLM frames. 
  2. You can use the nRF Connect to configure the eddystones while in connectible mode.
  3. Google Nearby will not work during this 1 minute period.
  4. I determine if the battery charge is weak when I put 2 beacons in close range which will make them compete to get their signals be received by other devices, and the ones that loose is the one with weak battery charge. Although the measured battery charge level shown in nRF Connect can also be accurate.
For now, all of this information is based on my personal experiences which I am so willing to share.

Wednesday, December 20, 2017

Locating a Point Using 3 Beacons

Beacons can be used to track the movement of object on a given space like in our example, is perhaps a Fashion Store with a regular  rectangular shape. Assuming the object is a smartphone with a beacon app installed and has stable internet connection to transmit data back to the shop owner's back end app. These data will be the rssi(received signal strength) of each beacons received every 1 second.

The back end app by default, knows exactly the position of the three beacons.

So with these sets of data available, the location of the smartphone can be traced every second using trilateration algorithm which is a process of finding the location of the point using the geometry of circles, spheres and triangle. More information about trilateration is in wikipedia.

Using the rssi transmitted by the smartphone, and since we know the distance of each beacon from each other(d and e), we have a lot of data to use in determining the exact location of the point. We will also assume that all points of interest in the scenario lie on the same plane. The formula for computing distance in meters from  rssi is as follows:

RSSI = -20 * log10(distance in meters) + RssiAtOneMeter
distance in meters = pow(10, (RssiAtOneMeter - ReceivedRSSI) / 20)

source: Evaluation of the Reliability of RSSI for Indoor Localization

In the above picture, we can easily determine the value of x and y by Trigonometry's Pythagorian Theorem:

Using the eaquation: