MikroKopter - Forum » Eigene Projekte » Wi232 V2 mit IR Sensor

Wi232 V2 mit IR Sensor

Neues Thema Antwort

Seite: 1

Autor Neuer Beitrag
Mitglied
Registriert seit: Apr 2015
Beiträge: 3
Tag zusammen,

ich versuche das RX/TX Signal von meinem IR Sensor über das MK Wi232 V2 Set an meinen PC zu übertragen, bisher allerdings ohne Erfolg.

Weiß jemand ob man überhaupt die Wi232 so zweckentfremden kann oder funktionieren die Module nur in Kombi mit dem MikroKopter Tool?

Zur Veranschaulichung, Schaltplan meines Sensors auf Seite 12:
http://www.sgxsensortech.com/content/uploads/2014/08/Infrared-IR-EK2.pdf

Bei meiner Einheit funktioneren die Ports 17 (RX) & 18 (TX) leider nicht, was aber kein Problem ist, da ich das Signal bei P38 (RX) & P39 (TX) abgeknüpft und mittels Oszilloskop überprüft habe.

Da ich aber die Signale nicht direkt über den 10pol Anschluss vom Wi232 Modul übertragen kriege, ist meine Überlegung ob ich nicht einfach den USB Ausgang von meinem Sensor benutze und mittels Adapter an den 10pol Stecker vom Wi232 stecke (falls die beiden Stecker überhaupt Kompatibel sein sollten).

Kennt vielleicht jemand eine USB Sender/USB Empfänger Lösung welche ich direkt an mein Sensorboard anschließen könnte?

Jemand sonst noch eine Idee wie ich das Signal vom Sensor über Wi232 übertragen könnte? Jegliche Hilfe willkommen. Danke.
Mitglied
Registriert seit: Jun 2013
Beiträge: 1262
Ort: Luxembourg
Very interesting device. I have also been thinking about gas sensor applications.

I presume you want to put the gas sensor on the micro-copter.

fmvdt meinte
ich versuche das RX/TX Signal von meinem IR Sensor über das MK Wi232 V2 Set an meinen PC zu übertragen, bisher allerdings ohne Erfolg.

Weiß jemand ob man überhaupt die Wi232 so zweckentfremden kann oder funktionieren die Module nur in Kombi mit dem MikroKopter Tool?

The Wi232 data radio is transparent you can send any byte values through it. Note that it is a 5 V logic device.

You could alternative use a 3DR data radio, this one uses 3.3 V logic levels.

fmvdt meinte
Zur Veranschaulichung, Schaltplan meines Sensors auf Seite 12:
http://www.sgxsensortech.com/content/uploads/2014/08/Infrared-IR-EK2.pdf

Bei meiner Einheit funktioneren die Ports 17 (RX) & 18 (TX) leider nicht, was aber kein Problem ist, da ich das Signal bei P38 (RX) & P39 (TX) abgeknüpft und mittels Oszilloskop überprüft habe.

Da ich aber die Signale nicht direkt über den 10pol Anschluss vom Wi232 Modul übertragen kriege, ist meine Überlegung ob ich nicht einfach den USB Ausgang von meinem Sensor benutze und mittels Adapter an den 10pol Stecker vom Wi232 stecke (falls die beiden Stecker überhaupt Kompatibel sein sollten).

Kennt vielleicht jemand eine USB Sender/USB Empfänger Lösung welche ich direkt an mein Sensorboard anschließen könnte?

I have skimmed the gas sensor doc. It is intended to be controlled from the USB device interface. The USB device interface is connected USB serial converter Silicon Labs CP2102, and serial outputs are the one you detect on P38 and P39. Note CP2102 is 3.3 V logic.

AFAIK you would have to cut the tracks at P38 and P39 from CP2102 if you want to control gas sensor directly from serial port. You could then connect this to a WI232 data radio through level converters (3.3 <-> 5 V). However I would not recommend to cut the tracks, too easy to destroy your gas sensor board.

From CP2102 the serial wires goes directly (TXD0 and RXD0) to the Texas micro-controller MSP430.

Port 17 and 18 on the expansion-port PL2 is a different serial port (TXD1 and RXD1) on the MSP430. These only works if the MSP430 has a program that makes use of them. That appear not to be the case. Are you able to program the MSP430? Can you ask SGX if they have an updated software that can communicate over this port rather than only USB? And again careful about voltage levels.

Another way to to communicate with gas sensor is to use an embedded system like Beagle Bone (Black or Green model) or Raspberry Pi. Beagle Bone has an USB host and (several) serial interface (3.3 V) on the bus connectors. The serial port on bus you connect to data radio, the USB host to the gas sensor. You would write a program on the Beagle Bone that open a USB serial port and a serial port on the bus. The program would relay data between the two ports.


Unrelated to your problem, can the gas sensor detect gas from a distance? Gas sensor should be placed outside of propeller wash to not cause air turbulence to the measurement.

Feel free to reply auf Deutsch.
« Bearbeitet von Foersom am 14.08.2015 08:43. »
Mitglied
Registriert seit: Apr 2015
Beiträge: 3
Hello Foersom,

you are correct in (almost) everything you have described. Thank you for pointing out the 3DR radio, I will take a closer look at it.

We realised that PL2 wasn't activated, to which SGX responded, that they can provide the C source files so that customers can update the firmware themselves. But since our IR-EK2 board recently broke (short-circuited probably, can't figure out exact problem), we ordered a new one and asked SGX to update the firmware with PL2 enabled. Awaiting a response now on whether they will do it or not.

We actually cut the tracks for P38 and P39, used a level converter and still couldn't establish a connection over a serial com. port. P38 and P39 transfer data via UART, so UART to UART communication should be possible over RS-232. We have another serial port which we will test out once the new board arrives. Maybe there was something wrong with our other port.

The program that SGX provides reads data over a serial connection, as long as the port settings are correctly adjusted.

We were also thinking of using an ARM computer, Arduino, to establish wireless communication. If time permits, we will go down this path. Otherwise someone else would have to look into this and see whether they can build a board specifically for our sensor, with corresponding program logging all data on a PC.

The gas sensor we are using is a double gas sensor, for CO2 and CH4. It works with non-dispersive infrared radiation (http://www.sgxsensortech.com/content/uploads/2014/07/A1A-767046-IR15TT-R-Datasheet-V3.pdf). It cannot take measurements from a distance and due to the evaluation board's size it is attached to the underside of the quadcopter. This will of course affect measurements and they cannot be taken by their absolute value, but you can still get a relative idea of how an areas' air quality is. Especially collecting data in places that are hard to reach with conventional methods.

There was some research done on how the airflow of a quadcopter affects measurement data: http://www.mdpi.com/1424-8220/15/2/3334

I will write another entry once we figure out how to make the board communicate (with or without Wi232).
Mitglied
Registriert seit: Jun 2013
Beiträge: 1262
Ort: Luxembourg
fmvdt meinte
you are correct in (almost) everything you have described.

Almost? What did I get wrong? ;)

fmvdt meinte
We realised that PL2 wasn't activated, to which SGX responded, that they can provide the C source files so that customers can update the firmware themselves. But since our IR-EK2 board recently broke (short-circuited probably, can't figure out exact problem), we ordered a new one and asked SGX to update the firmware with PL2 enabled. Awaiting a response now on whether they will do it or not.

It would be best if the board could just receive commands through either the USB serial or the PL2 serial. Alternatively they should have made a jumper bridge you could take off and connect your own serial 3.3 V interface in stead of the CP2102.

fmvdt meinte
We actually cut the tracks for P38 and P39, used a level converter and still couldn't establish a connection over a serial com. port. P38 and P39 transfer data via UART, so UART to UART communication should be possible over RS-232. We have another serial port which we will test out once the new board arrives. Maybe there was something wrong with our other port.

That is not good that the board broke that way. However check these 4 points:
1. In serial communication there is sometimes a confusion between what is Tx and Rx. Sometimes you use cross connection (Port-A Tx to Port-B Rx, which makes sense to me), but other times you connect Port-A Tx to Port-B Tx.
2. Did you remember to connect GND from your serial port to SGX GND?
3. RS-232 to UART? RS232 has reversed levels as TTL serial. What is RS232 -10V is TTL +5V; RS232 +10V is TTL 0V. If you just scale with resistors you would have to put it through a NOT gate (e.g. 7404 chip) to have correct levels. Better use a converter chip like Max232.
4. What is the UART speed? 9600 BPS or something else? Did you set it right?

fmvdt meinte
We were also thinking of using an ARM computer, Arduino, to establish wireless communication. If time permits, we will go down this path. Otherwise someone else would have to look into this and see whether they can build a board specifically for our sensor, with corresponding program logging all data on a PC.

We can talk about that later, if you still have a problem.

fmvdt meinte
It cannot take measurements from a distance and due to the evaluation board's size it is attached to the underside of the quadcopter. This will of course affect measurements and they cannot be taken by their absolute value, but you can still get a relative idea of how an areas' air quality is. Especially collecting data in places that are hard to reach with conventional methods.

5-10 m below my octo-copter there is strong wind movement. Probably best placement would be 50-100 cm ahead of front rigger, with batteries placed to counter balance at the back rigger.

fmvdt meinte
I will write another entry once we figure out how to make the board communicate (with or without Wi232).

Please do.
« Bearbeitet von Foersom am 14.08.2015 19:53. »
Mitglied
Registriert seit: Mar 2008
Beiträge: 1083
Ort: Apolda
Foersom meinte
Almost? What did I get wrong? ;)


The Wi232-modules are native 3.3V-devices incl. 3.3V logic-levels. Since the High-level is quite similar in 5V and 3.3V logic, the Wi232-modules have only a little protection (resistor + zener-diode) to tolerate 5V-signals. ;)


fmvdt meinte
Weiß jemand ob man überhaupt die Wi232 so zweckentfremden kann oder funktionieren die Module nur in Kombi mit dem MikroKopter Tool?


Das sollte funktionieren.


fmvdt meinte
Da ich aber die Signale nicht direkt über den 10pol Anschluss vom Wi232 Modul übertragen kriege...


- Rx/Tx über Kreuz verbunden?
- die Datenrate beider(!) Wi232 auf 9600Bd eingestellt?? (Wichtig!) Der MK nutzt eine Datenrate von 57600Bd, Euer Board 9600Bd.


fmvdt meinte
We actually cut the tracks for P38 and P39


Richtig, die Signale sollten nicht gleichzeitig mit CP2102 und Wi232 verbunden sein. Die Ausgänge von Wi232 und USB-Wandler können ja unterschiedliche Pegel haben und somit das Signal beeinträchtigen.


Jürgen
« Bearbeitet von Heidi02 am 15.08.2015 10:07. »
Mitglied
Registriert seit: Jun 2013
Beiträge: 1262
Ort: Luxembourg
Heidi02 meinte
The Wi232-modules are native 3.3V-devices incl. 3.3V logic-levels. Since the High-level is quite similar in 5V and 3.3V logic, the Wi232-modules have only a little protection (resistor + zener-diode) to tolerate 5V-signals. ;)

You are right, thanks for the details.

Neues Thema Antwort

Seite: 1

MikroKopter - Forum » Eigene Projekte » Wi232 V2 mit IR Sensor