top of page
Search

Week 3

  • Aquawesome
  • Jan 27, 2019
  • 2 min read

There isn't quite as much to show this week, mainly due to the fact that this week was spent looking at data sheets for our antenna design and writing firmware.


Firmware:

Speaking of firmware, we were able to connect to our pH and conductivity sensors using I2C after figuring out the protocol dictated by the EZO boards. They take ascii characters as commands also send out the data using ascii encoding. We are returned integer values representing ascii characters. This allows the sensor to do all conversions on board and then send us '.' or ','s if needed. We are still working on converting the ascii to a character array to send over bluetooth, but being able to communicate with the sensors is good progress. The temperature and humidity sensor has also arrived, but we have not yet had time to work on the code for that one yet. Here is a snippet of the code, using PSoC 4 API.


I2C Read/Write Functions:

These are the read and write functions for the conductivity sensor. Since both the pH sensor and the conductivity sensor use the the EZO board, the functions for both of these sensors is virtually identical. We request 6 bytes, 5 for the ASCII readouts and 1 for a response code. We ignore the response code and only store the ASCII values. These functions are likely to be cleaned up in the future, but it is a working proof of concept.

PCB Design:

Moving on to the PCB design, we have some good news! We have found a solution to our antenna woes. We found a version of the PSoC BLE chip that has an antenna included on it already. This saves us the time and resources that would have been spent developing a new antenna design as well as possibly reordered a 2nd and 3rd version of our PCB; something we don't have time to do. The part was decided upon and ordered at the end of the week, so expect to see some updates on the PCB design in week 4.


BLE Antenna Chip:


Underneath the shield is the BLE chip, very similiar to the one that we were going to use initially. As you can see, this component already has the antenna trace included. This board will be surface mounted onto our new board, as the bottom of this chip has SMD pads.


Relay Switch:

A little hiccup in the relay switch design; a latching switch was ordered instead of a non-latching, which means for the switch to be flipped back, a negative bias would need to be supplied. This would require implementing an H-Bridge, which would actually lower our power consumption. The trade-off however is that we would need more components for the relay switch, which means higher cost and longer development time. Because of this, we decided to order a new non-latching relay which should arrive in a few days.


Next Week:

By the end of week 4, we plan on having our PCB design completed and sent off for fab. In addition, we will further firmware development, hoping to finish writing working code for the temperature and humidity sensor as well as optimizing pre-existing code. Additionally, we plan to move forward with the bluetooth stack. We hope to be able to read our sensor data via bluetooth by the end of the week. Things are taking shape!

 
 
 

Recent Posts

See All

Comments


Blog: Blog2
bottom of page