PCB Design

To connect the DM6350, the Transducers, and the microcontroller, a custom PCB was designed. The microcontroller used to process the data was an Arduino Duemilanove, and the physical connection was made using compatible pin headers to avoid wires. The schematics and layout were made using the software EAGLE. The schematic on the figure 13 shows only the essential components and connections to use the DM6350, for the actual PCB layout more details needed to be included. The 1.8V power supply for the chip was generated by feeding a regulator with the 3.3V supplied by the Arduino. To convert the 0V to 1.8V logic transition at the DM6350 end to 0V to 5V at the input of the Arduino, a common source with a resistive load to 5V was used.


Side
Fig. 12 - Ultrasonic Distance Sensor built with the DM6350

application
Fig. 13 - Schematic of the distance sensor circuit of the DM6350

The Arduino code, PCB layout files, and autoCAD files of the enclosure are available to download below.


		// include the library code:
		#include 

		// initialize the library with the numbers of the interface pins
		LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);

		void setup() {
		  // set up the LCD's number of columns and rows: 
		  lcd.begin(8,2);
		  Serial.begin(9600);

		}

		void loop() {
		  // set the cursor to (0,0):
		  lcd.setCursor(0, 0);
		  lcd.clear();
		  lcd.print("Columbia");
		  lcd.setCursor(1, 1);
		  lcd.print("-CISL-");
		  delay(1500);

		  lcd.setCursor(0, 0);
		  lcd.clear();
		  lcd.print("DM6350");
		  lcd.setCursor(0, 1);
		  lcd.print("v1");
		  delay(1500); 
		  lcd.setCursor(0, 0);
		  lcd.clear();
		  lcd.print("Distance:");

		  //Output pin to Tx Transducer
		  pinMode(13, OUTPUT);
		  //Input pin from the Rx Transducer
		  pinMode(12, INPUT);

		 while(1)
		  {
		   delay(50);
		   int i = 0; 
		   int duration;
		   float distance;
		   int startTime, endTime;

		   duration  = 0;
		   startTime = micros();

		  //Generate the output signal for the TX
		   for(i=0; i<8; i++)
		   {
				digitalWrite(13,HIGH);
				delayMicroseconds(9);
				digitalWrite(13,LOW);
				delayMicroseconds(9);
		   } 

		  //This set de dead time (minimal distance)
		  delayMicroseconds(1500);


		   while((digitalRead(12) == 1) && (duration < 30000))
		   {
			endTime = micros();  
			duration = endTime - startTime;
		   }

			// For the interface with the PC use this:
			//  Serial.print(duration);
			//  Serial.print(" \n");

		   distance = float(duration);
		   distance = distance/148;  

		   lcd.setCursor(0, 1);
		   lcd.print("    ");
		   lcd.setCursor(0, 1);
		   lcd.print(distance);
		   lcd.setCursor(4, 1);
		   lcd.print("inch");

		  } 

		}
		

Download Arduino Duemilanove Source Code


Download DM6350 Datasheet


Download EAGLE PCB layout


Download autoCAD box layout


Back to top