TXT Controller and I2C speed

Alles rund um COMPUTING inkl. Microcontroller & Co.
Everything about COMPUTING incl. Microcontrollers
Forumsregeln
Bitte beachte die Forumsregeln!

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 12 Jul 2018, 17:36

Today I designed the interface to test my I2C modules on the Fischertechnik TXT Controller. For this I made a simple interface box with Fischertechnik parts to fix the print. The PCB is a simple single side version for mounting and testing the I2C modules. Diagram, layout and installation plan are ready. The layout film is drying, in order to be able to etch early tomorrow. After that, the tests follow.
A few images in advance:
Bild
HD: https://www.flickr.com/photos/fotoopa_hs/28495078057

Bild
HD: https://www.flickr.com/photos/fotoopa_hs/43363747141

Bild
Hd: https://www.flickr.com/photos/fotoopa_hs/28495077607

There was a fourth module, the FRAM, but there is an address issue with the TXT controller ( same internal address range $50-$57) so it could not be connected to it directly on the TXT Controller, however via external hardware it should work anyway. A number of examples for the software I have already found through this forum, so the testing should go pretty well. I will keep you informed of the results (within a few days).

Frans.
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 13 Jul 2018, 20:31

The PCB has just been etched and the components have been soldered. Everything fits neatly in the Fischertechnik housing. A 10-pin cable is connected directly to the TXT controller. The sensor modules are also soldered and mounted. The power supply voltage has been tested. All modules are supplied with the necessary 3V3 voltage. The real tests with the Robo TXT software will follow tomorrow.
A photo of the interface mounted in the box:
Bild
HD version: https://www.flickr.com/photos/fotoopa_hs/41579529110

Frans.
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 14 Jul 2018, 13:13

Test of the color sensor I2C module TCS34725 connected to the Fischertechnik TXT Controller. With the test program of Dirk Fox I was able to start very quickly. Everything works very well, now I can start a new project to sort colored pearls. The box contains 2300 pieces in 11 different colors. Ideal for designing a sorting robot.
A few images of the test set-up:
Bild
HD version: https://www.flickr.com/photos/fotoopa_hs/43400174591

Bild
HD version: https://www.flickr.com/photos/fotoopa_hs/28530961997

Bild
HD version: https://www.flickr.com/photos/fotoopa_hs/29530035618

Frans.
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 16 Jul 2018, 20:43

The TCS34725 color I2C chip supports auto increment address mode. You can read all 4 color data registers at once without interruption. You only need 352 usec, otherwise this is 20 msec.
To achieve this, you only need to leave the devices open as shown on the flow:

Bild

Frans
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 18 Jul 2018, 19:18

Test of the TXT Controller for making short pulses. This is not going very well at all. The specified pulse widths and times are incorrect. The Robo software always uses a PWM cycle with a minimum time of 4.78 msec. You can specify a pulse width with a resolution of 512 units. But he doesn't do it that accurately. The minimum value should be 3, even better 4 units. Otherwise, you will not get any pulses at all, or you will get them very irregularly. You need to increase more than 1 unit to sometimes measure an increase. At 4 units the measured pulse time is 353 usec. At 16/512 this is only 406 usec.

Same story for the delay timer. It is not correct either. The requested 10 msec is about 15 msec or more and is not even stable. For short output times, the TXT Controller is not suitable at all! I normally use FPGA hardware and there you have times up to 10 nsec. I wasn't familiar with such bad times as those of the TXT Controller.

The analog signal is also very bad, especially the falling edge. You also have to place a fairly large load on the output, here this is 220 ohms. Without load on the output, you cannot obtain PWM pulses. The measuring signals contain a voltage divider to have a maximum voltage of 4V. The trigger value is set to 2V or 50% of the range.

Results:

Bild

Bild

Pictures on my Flickr page:
https://www.flickr.com/photos/fotoopa_hs/41683300190
https://www.flickr.com/photos/fotoopa_hs/42586599185

If you want to synchronize on an I2C command it doesn't work either, the timings are not reliable at all. I would have liked to have made a short pulse just before an I2C command and then removed the pulse again but that's not possible. My intention was to turn on a LED for a short time as an exposure.

Frans.
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Re: TXT Controller and I2C speed

Beitragvon fotoopa » 22 Jul 2018, 09:14

Speed test fast input C1C of the TXT Controller. The aim is to determine the maximum pulse cycle that the controller can process. The documentation states that this type of input would work up to 1 Khz. I made a pulse generator with a 9V block wave and a 50% duty cycle. A small program counts the pulses that come in. The Fast C1C input only counts on the rising edge. The result goes up nicely to 100, this is 100Hz, or 10 msec (5msec on, 5msec off). Now comes the surprise. If you increase the frequency, the speed indication will remain at 100. This increase can be made up to 3 msec which should give a speed of 333. But the speed indication remains at 100. Increase your speed even further, pulses smaller than 3 msec that makes the speed display unstable to drop out a little further. Normally you should be able to work pulses up to 1Khz but I can't do that. Either I do something wrong or the TXT Controller can't handle this speed. I performed the tests both online and offline. The results were the same.
I see only reliable reading pulses up to 100 Hz.

Here is a picture of the measurements:
Bild

Bigger version: https://www.flickr.com/photos/fotoopa_hs/43514954642

Frans.
fotoopa
 
Beiträge: 67
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Alter: 75

Vorherige

Zurück zu Robo Pro / Computing / Software

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste