Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control LPA via SPI #33

Open
tlnagy opened this issue Mar 21, 2019 · 3 comments
Open

Control LPA via SPI #33

tlnagy opened this issue Mar 21, 2019 · 3 comments

Comments

@tlnagy
Copy link

tlnagy commented Mar 21, 2019

This is an awesome little board, but my purposes I would love to be able to send signals to the board via serial command. I plan to use the device on a microscope and it would greatly help synchronization if the computer could send a signal that could tell which LED to turn on for how long.

My plan was use an Arduino to send SPI commands to the LPA over the 2x3 SPI pins on the LPA and rewrite the firmware of the LPA to interpret those signals and only turn on the wells that are needed and for the given length of time.

Do you all think this is reasonable? I'm worried that since SPI is already used to control the TLC chips/LEDs that this might not work. I would appreciate your all's thoughts as I'm pretty new to microcontrollers.

@castillohair
Copy link
Contributor

Hello!

Sorry for the late response. Both Karl and I are deep into thesis defense business these days.

If I'm understanding correctly, you want to use an Arduino to send SPI commands to a free SPI input in the LPA, and rewrite the firmware to use these values to update the LEDs. I think this is feasible. The SD card socket currently uses the SPI module (the LED drivers use the USART module in SPI mode). So you could remove SD card functionality from the firmware and use the now free SPI module for your purposes. The only caveat is that the Slave Select (SS) pin from the SD card module is not available through the 3x2 connector. I think you could get away with soldering a wire from the mircontroller's SS pin to ground, but I would have to look at the datasheet in more detail to be 100% sure.

The other option, if you are willing to do some electronic board redesign, is change the SPI module to manage the LED drivers and use the USART module to communicate directly with the PC without an arduino. This would require rewiring the microcontroller pins and adding a serial connector while removing the SD card connector. This may be a more robust solution depending on how many of these you want to make, how much space you have, and how robust you want it to be.

Let us know if you have any more questions. I will try to reply much faster this time.

@tlnagy
Copy link
Author

tlnagy commented Apr 5, 2019

If I'm understanding correctly, you want to use an Arduino to send SPI commands to a free SPI input in the LPA, and rewrite the firmware to use these values to update the LEDs.

This is correct.

The other option, if you are willing to do some electronic board redesign, is change the SPI module to manage the LED drivers and use the USART module to communicate directly with the PC without an arduino. This would require rewiring the microcontroller pins and adding a serial connector while removing the SD card connector.

This sounds like the approach I would take. What software would you recommend for designing PCBs? I was planning to use Fritzing.

@castillohair
Copy link
Contributor

I would recommend KiCAD, which is what we used. With it, you should be able to start from our files which should reduce the amount of work you have to do.

Good luck! Please let us know if you have any more questions. And if you're successful, it would be great to have your design available as a fork of our project so that other people with similar needs can use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants