Jump to content

fr.bernardo

Members
  • Posts

    3
  • Joined

  • Last visited

fr.bernardo's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hi @attila, I got the code and sensor working with the following code, returning status bits, raw value and pressure data from 1 sensor. I now want to move towards applying the sensors to its final place and for that i want to learn 2 things: As the code is prepared it returns the pressure everytime I click on 'Execute'. I want to be able to press something and it starts recording to a .txt or .csv file for a given amount of time (30s for example). I want to connect up to 5 sensors at the same time and write information from all into the file mentioned above. From what i understand i can do this by sharing the the GND, Vsupply, MISO and CLK pins, and have a different Slave Select for each sensor, activating 1 at a time. Can I do this in the 'Protocol Tab' under the 'SPI/Custom' tabs or do i have to use the 'Script' Tab or even some other software? If i can make this in the Waveforms software, where can i find an example of something similar working ? Thanks in advance!
  2. Hi @attila, Thanks for your help. i was able to write this script ith the help of chatGPT : This doenst have errors, but the results being returned are not correct so I know it isn't really doing what i want it to be doing, but i can't really figure out what i need to code here. Can anyone help me find some tutorials/guides for writing scripts in the waveforms environment? I don't really know how to convert the information coming from the sensor into useful information and how to write it to a file (.csv or .txt. or whatever really).
  3. Hello all, I come from a mechanical engineering background, and I'm currently doing a PhD on fluid structure interaction. For this reason i have an experimental sloshing tank in which i want to read the pressure on the tank walls. Therefore i have bought a pressure sensor (Honeywell HSCDLNN100MDSA5). Relevant links below: https://pt.mouser.com/ProductDetail/Honeywell/HSCDLNN100MDSA5?qs=Yk42LiOZU8S6l8LKiyP%2FCw%3D%3D https://pt.mouser.com/datasheet/2/187/HWSC_S_A0012826924_1-3073319.pdf https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/ja/products/sensors/pressure-sensors/common/documents/sps-siot-spi-comms-digital-ouptu-pressure-sensors-tn-008202-3-en-ciid-45843.pdf I have never done anything with digital sensors but i thought it shouldn't be very hard. Also i have at my disposal a brand new Digilent Analog Discovery 2. Now i cant for the life of me understand how i can read pressure values using the waveforms software, i have read tutorials and guides, and i think i understand the basic principals of SPI interface, but i dont know how to actually read and create files with pressure over time. I have it connected as such (table is the pins of the sensor, it is the SPI variant): Sensor -- AD2 pin1 -- GND pin2 -- V+ (set at 5v on the supplies tab of waveforms) pin3 -- digital i/o 0 pin4 -- digital i/o 1 pin5 -- digital i/o 2 And in the waveforms protocol section, i think i have it correctly set up as seen below, with DQ1 reading from DIO0, and DQ0 is irrelevant as this sensor doenst have any MOSI connection. As can be seen in the figure, when i click 'execute' it reads information from the sensor, which i think is a good sign, but i dont know where to go from here. Can anyone indicate where i can learn to code a script to implement in the 'sensor' tab? the examples there dont really help much and ChatGPT hasnt been much of a help either.
×
×
  • Create New...