This is the first version of the mbed program for the Smart Car Seat developed by the Smart Car Seat Team of GaTech Design Expo Spring 2017.

Dependencies:   Adafruit_FONA FSR SDFileSystem mbed

Fork of Smart_Car_Seat_v1 by Jea Du Kim

Team Members

Bryan Bates – OBD/Bluetooth System
Robert Dunkin – Physical Wiring/Power
Jgenisius Harris – Cooling System
Jea Du Kim – Sensor System
Emily Pitts – Smartphone Application
Tyler Woei-A-Sack – GSM Communications

Advisor

Dr. Mick West

Overview

Car Seat Pic Car Seat Diagram

The purpose of this project was to design a child’s safety car seat with Internet of Things capabilities and a cooling system that activates in the case of an emergency. It is comprised of a network of sensors, a wireless notification system, and a cooling system.

How Does It Work

The Smart Car Seat is initially set up using a smartphone application where the user inputs their phone number. The number is saved to an SD card and is read by the GSM module when it sends the text messages. If the infrared thermometers read a critical temperature and the force sensitive resistors detect someone, the cooling system will turn on and a text message will be sent to the phone number on file.

Smart Car Seat Program

Import programSmart_Car_Seat_v1

This is the first version of the mbed program for the Smart Car Seat developed by the Smart Car Seat Team of GaTech Design Expo Spring 2017.

Components

/media/uploads/jd0205/overall_carseat_schematic.jpg

This project involves the usage of the mbed LPC1768.

400

Force Sensitive Resistors

250

This project uses 4 Square FSR Interlink 406, two placed on the seat and two placed on the back rest to detect if someone is sitting on the seat.

mbedFSRVoltage Divider
p20FSR Bottom Left10K
p19FSR Upper Left10K
p18FSR Upper Right10K
p17FSR Bottom Right10K

/media/uploads/jd0205/fsrschematic3.jpg

As they are still resistors, the orientation of the pins do not matter, as long as one end goes into VCC and the other leads to a voltage divider and an AnalogIn like shown in the diagram. With a 10K Ohm voltage divider, a raw analog value of 0.5 for each FSR should be enough to distiguish an object of the size of a small child on the sensor.

Any additional information can be found at the Force Sensitive Resistors page.

Import library

Public Member Functions

FSR (PinName Pin, float resistance)
Create an FSR object.
float readRaw ()
Read the raw data.
float readFSRResistance ()
Read the resistance of the FSR .
float readWeight ()
Read the weight in N.

MLX90614 IR Thermometers

250

This project uses two MLX90614 IR Thermometer placed on the back of the headrest to measure the temperature of the child sitting on the seat and the ambient temperature.

mbedFSRPullupsPulldowns
gndVSS - gnd
VoutVDD - 3.3V0.1uF (to VSS)
p27SCL - I2C Clock10K
p28SDA - I2C Data10K

250

At around room temperature, the Thermometers should read approximately 22 C. When reading the temperature from the palm, the sensors should read approximately between 30 and 35 C.

With the MLX90614 and I2C, you can run up to 127 thermometers through the same SCL and SDA connection as long as they have different 7-bit addresses. The default I2C address for the MLX90614 is 0x5A, but it can be changed with this program.

Import programMLX90614 IR_Temp_Sensor (change address)

I have spent so much time looking into how to change the address of a MLX90614 sensor for use of multiple sensors, so I think it might be helpful to somebody.

Any additional information can be found at the MLX90614 I2C IR Thermometer page.

SD Card File System

250

This project uses the basic SD Card reader that works with the mbed to store all the contact information for the system.

mbedMicroSD Breakout
p8 (DigitalOut)CS
p5 (SPI MOSI)DI
VoutVCC
p7 (SPI SCLK)SCK
GNDGND
p6 (SPI MISO)DO
ncCD

Careful

VCC is the 3.3V from Vout. Using the 5V will damage the SD card.

Information

The project uses a simple .txt file to store a 10-digit phone number. Before operations, check if the file is named correctly and in the correct directory based on your code.

Any additional information can be found at the SD Card File System page.

Import librarySDFileSystem

SDFileSystem

GSM Module

250

This project used the FONA 808 MiniGSM provided from Adafruit to send messages to the contact information stored in the SD Card.

mbedAdafruit FONA
ncBat
GNDGND
ncSPKR+
ncSPKR-
p12Rst
ncPS
GNDKey
p11RI
p14 (Serial RX)TX
p13 (Serial TX)RX
ncNS
Vout (3.3V)Vio

Warning!

Adafruit Fona 800/808 will only work when there's an external battery connected with at least 3.4V. When the battery is at a low level, the MicroUSB charger should be plugged in with the battery. Be careful with low rated batteries as the USB will charge at 4.2V.

Both the 800 and the 808 uses the same protocols, so any additional documentations, information, and project libraries can be found at the Adafruit FONA 800 Project page.

Import library

Data Structures

class EventListener
Listener for FONA events. More...

Public Member Functions

Adafruit_FONA (PinName tx, PinName rx, PinName rst, PinName ringIndicator)
Create instance of the Adafruit_FONA .
bool begin (int baudrate)
Built-in Test to see if FONA is connected.
void setEventListener ( EventListener *eventListener)
Set the event listener for incoming calls.
int readable (void)
Check if FONA has anything in its output buffer.
bool getADCVoltage (uint16_t *v)
Get ADC voltage from external pin.
bool getBattPercent (uint16_t *p)
Get battery percentage level.
bool getBattVoltage (uint16_t *v)
Get battery voltage level.
bool unlockSIM (char *pin)
Unlock SIM if needed.
uint8_t getSIMCCID (char *ccid)
Get the SIM chip card interface device (CCID)
uint8_t getNetworkStatus (void)
Get the Network Status of FONA.
uint8_t getRSSI (void)
Get the RSSI of the network signal.
uint8_t getIMEI (char *imei)
Get the International Mobile Station Equipment Identity (IMEI)
bool setAudio (uint8_t a)
Set the Audio Output interface.
bool setVolume (uint8_t i)
Set the Audio Volume.
uint8_t getVolume (void)
Get the Audio Volume.
bool tuneFMradio (uint16_t station)
Tune the FM radio.
bool FMradio (bool onoff, uint8_t a=FONA_HEADSETAUDIO)
FM radio set output.
bool setFMVolume (uint8_t i)
Set the FM Radio Volume.
int8_t getFMVolume ()
Get the FM Volume.
int8_t getFMSignalLevel (uint16_t station)
Get the FM signal strength.
bool setSMSInterrupt (uint8_t i)
Set the SMS Interrupt.
uint8_t getSMSInterrupt (void)
Get SMS Interrupt Setting.
int8_t getNumSMS (void)
Set the SMS Interrupt.
bool readSMS (uint8_t i, char *smsbuff, uint16_t max, uint16_t *readsize)
Read SMS.
bool sendSMS (char *smsaddr, char *smsmsg)
Send SMS.
bool deleteSMS (uint8_t i)
Delete SMS.
bool getSMSSender (uint8_t i, char *sender, int senderlen)
Send SMS.
bool enableNetworkTimeSync (bool onoff)
Enable FONA to sync time with the cellular network.
bool enableNTPTimeSync (bool onoff, const char *ntpserver=0)
Enable FONA to sync time with the time server.
bool getTime (char *buff, uint16_t maxlen)
Retrieve the current time from the enabled server.
bool setPWM (uint16_t period, uint8_t duty=50)
Control the buzzer capability of the PWM out on the FONA.
bool callPhone (char *phonenum)
Call a phone.
bool hangUp (void)
Hang up a phone call.
bool pickUp (void)
Answer a phone call.
bool callerIdNotification (bool enable)
Enable/disable caller ID.
bool incomingCallNumber (char *phonenum)
Retrieve the incoming call number.

Bluetooth Module

250

This project uses the HC-05 Bluetooth Module to connect with an Android app to update or change contact information stored in the SD Card.

mbedBluetooth
p9 (TX)RX
p10 (RX)TX
GNDGND
VoutVCC

The Bluetooth module simple acts as a wireless Serial connection, so there is no need for additional Libraries other than the Serial.

Any additional information about Serial connections can be found at the Serial page.

Import librarymbed

No documentation found.

Cooling System

250 250

The Cooling System involves the use of a MOSFET Relay and a combination of 5V Fans, Peltier Plates, and Heatsinks to provide cold air when commanded to.

mbedMOSFET RelayCooling System
gndJP2-2 - gnd
5VJP2-1 - RAW
p16JP2-3 - Control
JP1-1Device (Neg)
JP1-2Device (Pos)

Any additional information about Relays can be found here.

SDFileSystem.lib

Committer:
jd0205
Date:
2017-05-03
Revision:
1:a33e55fecf16
Parent:
0:5a4b2c91de63

File content as of revision 1:a33e55fecf16:

http://mbed.org/users/mbed_official/code/SDFileSystem/#8db0d3b02cec