Category Archives: Mobile Phone Dock

Mobile Phone Dock

In my first semester of 3rd year, we were given the task of creating our own micro-controller project embedded in a product produced on the rapid prototyping machine. This involved writing the full code to operate the controller, building a circuit board, drawing up a 3D model on solid works, and then having it produced as a tangible product.

My chosen product was a universal dock for mobile phones. The idea is for it to work the same as a house phones dock, so that when placed in it, if it rings, it rings through speakers throughout the whole house so you can hear it from which ever room you are in. This will also help the very common, time consuming problem of trying to find your mobile before leaving the house. The dock could be located by the front door so you know it will always be there coming in and going out of the house.

The components of the dock are as follows: An LDR (light dependent resistor), a Push to Make switch, Loudspeaker, 4 LED bulbs and a few resistors.
When the user places their phone on the dock, it presses the switch down, this activates the dock. Once active, the LDR begins picking up light readings, so when the phone begins to ring or receives a text, the screen lights up and is detected by the LDR. When this happens, the LED’s begin to flash and the loudspeakers throughout the house begin to play, alerting the user to their phones activity regardless of where they are in the house.

Advertisements

Components and Coding

The circuit board was designed on PCB which allowed us to customize the positioning of every component and place the connecting tracks where needed, this helped to keep the circuit very neat and made the process of wiring the components much simpler. Our circuit board is made up of, 4 LED’s with 470 Ohm resistors, a push-to-make switch and an LDR, both with 16 K Ohm resistors, a Mosfet and a loudspeaker.
The 3D model was produced using solid works and then sent on to the rapid prototyping machine. The model itself is the general shape of an Apple IPhone, only slightly larger to accommodate all phones including HTC’s which we found to have the largest screen sizes. The model was made solid, and then shelled out to save on material costs. The walls throughout are all 2 mm thick which was found to be thin enough to keep the cost down, but still thick enough that it had good durability. Each component has its own space in the model to be embedded in, so that they, and the wires, are kept hidden away. There is a small curved section cut out of the wall on one side where the phone sits, this allows the user to easily pick their phone out of the dock. Every corner/edge of the model was filleted to make sure that any chance of scratching the screen or covers of the phone was avoided.

The Coding for the project is as follows:

#include
#device ICD=TRUE
#fuses HS,NOLVP,NOWDT,PUT
#use delay (clock=20000000)
#define WHITE_LED1 PIN_C0
#define WHITE_LED2 PIN_C2
#define WHITE_LED3 PIN_C4
#define WHITE_LED4 PIN_C1
#define PUSH_BUTTON PIN_C3
#define LOUDSPEAKER PIN_C5
//#define LDR PIN_A1
void main()
{
int reading;
while(true)
{
//program waits at this line until the button is pressed
while(input(PIN_C3));
Setup_adc_ports (RA0_RA1_RA3_Analog);
Setup_adc (ADC_CLOCK_INTERNAL);
Set_adc_channel (1);
reading = read_adc();
if (reading< (50))
{
Output_LOW(LOUDSPEAKER);
Output_LOW(WHITE_LED1);
Output_LOW(WHITE_LED2);
Output_LOW(WHITE_LED3);
Output_LOW (WHITE_LED4);
Delay_ms(5);
Output_HIGH(LOUDSPEAKER);
Output_HIGH(WHITE_LED1);
Output_HIGH(WHITE_LED2);
Output_HIGH(WHITE_LED3);
Output_HIGH(WHITE_LED4);
Delay_ms(5);
Output_LOW(LOUDSPEAKER);
Output_LOW(WHITE_LED1);
Output_LOW(WHITE_LED2);
Output_LOW(WHITE_LED3);
Output_LOW(WHITE_LED4);
Delay_ms(5);
Output_HIGH(LOUDSPEAKER);
Output_HIGH(WHITE_LED1);
Output_HIGH(WHITE_LED2);
Output_HIGH(WHITE_LED3);
Output_HIGH(WHITE_LED4);
Delay_ms(5);
Output_LOW(LOUDSPEAKER);
Output_LOW(WHITE_LED1);
Output_LOW(WHITE_LED2);
Output_LOW(WHITE_LED3);
Output_LOW(WHITE_LED4);
}
}
}

%d bloggers like this: