The USB-enabled STM32F405RG firmware for driving the TCD1304 is complete. The firmware is written for this custom board:
which has high speed rail-to-rail opamps on four analog inputs.
The STM32F4 MCU is identified as a virtual com port (VCP) when connected to a PC. On linux it’s attached as a ttyACM-device, just as the ST-link on a nucleo board. Unlike the nucleo’s St-link (which is setup as a USART-bridge) that has a maximum bit-rate of 115.2 kbps, the STM32F405RG is working in full speed mode (12 Mbps).
Of course high speed is also possible, but the HS-USB-OTG core of the STM32F405 is on different pins, and so require a different layout of the board, and 12 Mbps is fast enough that the real bottleneck becomes the read-out time of the CCD.
Using essentially the same VCP framework as the UART-FW, there’s not a lot of difference in the source code (except for the large USB-stack of course). so the CLI and GUI for UART work just as well for the USB-fw.
This whole ordeal was an attempt to lower noise, and here’s how that’s going:
With the good old nucleo board I would see fluctuations of about 8 mV ..and at first glance there’s no real improvement with the new board, I still see the same 8 mV. However, since the opamp on the analog input has a gain of ~2, the noise is actually down 50% 🙂
That still makes for a slightly fuzzy line though:
However the CCD’s register imbalance is now quite obvious, and subtracting 10 from the signal of every odd pixel, it looks like this:
So mission accomplished. I will update the tcd1304.wordpress site someday in the near future.
Do you update all the files – schematic and board layout included?
LikeLike
yes that’s the plan. the coming week is Roskilde Festival, so it’s going to have to wait until after that, but you can get the boards here:
http://dirtypcbs.com/store/designer/details/8475/6078/stm32f4inputs-1-zip
and the kicad project is here:
https://drive.google.com/open?id=1bMyXdtD0bdBuuV1mIPJcg8T7QJFjSLrL
LikeLike
Did you solder all them parts yourself onto the pcb? Or is there a service doing that? Seems really interesting. Nice work!
LikeLike
Thank you. I did the soldering by hand using a soldering iron with a 0.4 mm tip. I don’t know where you can get it done as a service, but surely such a thing exists.
LikeLike