Newbie question whether tinyFPGA is right for me


#1

Hi there, I am a student and want to do a project where I let two PCs communicate via visible light communication. Each PC is connected to one microcontroller/tinyFPGA. In particular, my question is: Can the tinyFPGA communicate with the PC (send data or receive data from it) while transmitting with a LED or receiving with a photodiode? Can the USB port used for communicating with a PC while the FPGA excecutes code? Sorry for the simple question, I never worked with this kind of hardware.


#2

Hi there, and welcome! To provide more help with this it would be useful to know a little more.

  1. Are you studying electronics, CS or some other subject? (helps to know the level to pitch the answers :slight_smile:)
  2. Do you have a data transfer speed in mind? (If you expect a very high transfer rate then many more parts of the development become challenging.)
  3. Do you have a connection range in mind? Using visible light will leave you open to light interference which again adds to the challenge. (Unless it only needs to work in the dark! :slight_smile: )
  4. What functionality are you expecting from the microcontroller? It may not be necessary. (The KISS principle is always worth keeping in mind.)
  5. The USB port can be used for serial communication, but it not an insignificant task for a starting project, (especially if you are working to a deadline.) See USB Communication

Anyway here are a few things to consider.

Good luck though. (Any wisdom attached here is from long, hard-earned engineering experience, not deep specialist knowledge of the TinyFPGA ecosystem. :smile:)


#3

Thanks for your quick response!

  1. Im from Germany and a rough translation of my studying would be “telecommunication IT”. That means I have a good understanding in terms of visible light communication, but I never really worked with evaluation boards, etc.
  2. There is no need for a high transfer speed. The testbed I am designing is for future students to let them “play” with visible light communication and to let them change some parameters and see the effects of it.
  3. There is also no need for a high connection range. But a transmitting distance of max. 1 cm would be to less. Im thinking of a distance of 10 cm and upwards.
  4. Important is, that it can run a LED or a photodiode and send/receive data to/from the LED/Photodiode and send/receive that data from a PC simultaneously. Furthermore its important that i can configure as many as possible params, like modulation scheme, communication protocols, ect…
  5. I am working to a deadline, but I have plenty of time left.

I am glad for every advice, especially from hard-earned engineering experience. :smile:


#4

OK great. My background was in satellite communications so not too distant from your work. It sounds like a TinyFPGA BX at each end of the link will provide a good range of problems for future students to investigate.
a) I would suggest that having access to the analogue signals from the photodiode before it gets lost in the digital world may be useful, to see the effects of interference from other light sources.
b) Although it would be possible to pass the serial data signal straight to the LED for transmission, you could also look at other methods of encoding the timing (Manchester encoding) and byte boundaries (8b/10b and 64b/66b encoding) and decoding at the opposite end of course.
c) Your first steps could be to look at the USB serial solutions that are available. I believe this is a good starting point. https://github.com/davidthings/tinyfpga_bx_usbserial
d) But also consider not using the PC/USB to generate and receive the data. You could do this inside the FPGA using a PRBS generator and checker. You could then run the link at the highest speed the FPGA could manage. This Xilinx App Note may be useful. https://www.xilinx.com/support/documentation/application_notes/xapp884_PRBS_GeneratorChecker.pdf
e) If you were to go down this sort of route you could provide the beginnings of BERT test system, which could be used across a wide range to transmission applications. Although you won’t have transmission errors in the system you currently envisage.

I’m sorry if this is a lot to absorb, but as I was involved in the development of error correction products for SatComms this is rather my area of interest. (Although I realise this was all years before you were born! OMG I am an old man already! :open_mouth:)


#5

That sounds great, thanks for your detailed intructions!:heart_eyes:
I guess Ive got a lot of research to do now…:no_mouth: