<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Maple Mini the right device for my multi-sensor-readout project?</title>
		<link>http://forums.leaflabs.com/topic.php?id=1565</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:57 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1565" rel="self" type="application/rss+xml" />

		<item>
			<title>ventosus on "Maple Mini the right device for my multi-sensor-readout project?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1565#post-10291</link>
			<pubDate>Fri, 20 Apr 2012 02:38:52 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">10291@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@gbulmer and @Rod, thanks a lot, this helps me to plan my little project.&#60;/p&#62;
&#60;p&#62;The simplest setup seems to be a good one, 8x4051 mux and with one software triggered A/D using DMA.&#60;/p&#62;
&#60;p&#62;I'll have to read up a bit more on DMA, this seems to be really useful.&#60;/p&#62;
&#60;p&#62;@gbulmer, I've not yet decided which hall-effect sensors to use, but as I know now how I want to read out the signals I hope to find a suitable one, which fits into the setup. The sensors will be used for distance sensing (distance to a magnet). The distance will not vary that fast over time, but I'd like to get the 12bits ok.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rod on "Maple Mini the right device for my multi-sensor-readout project?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1565#post-10238</link>
			<pubDate>Tue, 17 Apr 2012 16:42:03 +0000</pubDate>
			<dc:creator>Rod</dc:creator>
			<guid isPermaLink="false">10238@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I agree with gbulmer, 4051's are a good direction.&#60;/p&#62;
&#60;p&#62;I'd suggest using one A/D set up to start via software trigger with 8 consecutive channels in a burst, with DMA on done to a 1 Kbyte circular memory buffer. Set up a clock service interrupt at 24 kHz and in the interrupt routine output 3 bits of address to all 8 of your 4051's (same addresses to all), start the A/D and return. Set up a second interrupt service on DMA full/half full to extract and process your data. In that routine just set  a full or half full flag and return.&#60;/p&#62;
&#60;p&#62;Then in your main routine (i.e. not at interrupt time) wait for a buffer done flag and process each half buffer of data as it fills and then clear the flag after you are done processing. Watch for overruns where the other flag comes up before you clear the one for the buffer you are working on.&#60;/p&#62;
&#60;p&#62;You'll need to get your processing completed in a couple of microseconds per sample, but you won't be wasting time on loop structures this way.&#60;/p&#62;
&#60;p&#62;I'd guess you'll be able to do all 128 sensors, depending on your &#34;parametric equations&#34;.  I/O won't be a problem.&#60;/p&#62;
&#60;p&#62;Don't be afraid of the DMA. Its clean and simple on the F1 processor in the Maple Mini.&#60;/p&#62;
&#60;p&#62;Do keep the interrupt routines really short and simple as I suggest. It makes the program much less prone to complex errors.&#60;/p&#62;
&#60;p&#62;Also, I'd suggest not trying to use the second A/D channel as you don't really need it and I've certainly found that more complex than I expected.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Maple Mini the right device for my multi-sensor-readout project?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1565#post-10235</link>
			<pubDate>Tue, 17 Apr 2012 11:03:40 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">10235@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ventosus - Would you give a bit more information about the quality of signal you have, and the resolution you are aiming for?&#60;/p&#62;
&#60;p&#62;The simplest approach, which would cost very little to try, would use 'standard' 8x1 analogue multiplexers, e.g. 74xx4051&#60;br /&#62;
They are about $0.30 each. They don't use SPI. They take 3 'bits' (input pins) which select the input to be sampled. So they are much simpler than SPI. You should look at the STM32F manuals to see how to write 3 bits to 3 I/O pins simultaneously, rather than 1 pin at a time. &#60;/p&#62;
&#60;p&#62;There are two Analogue to Digital Converters (ADCs) in a Maple Mini, so for 64 samples at 3KHz, you'll need about 64/2 3KHZ Samples/second = about 100Ksamples/s which is perfectly feasible with Maples library, but it only supports one ADC. So you can get off the ground with very little effort, but you will need to dig into the documentation for the ADC peripherals to get the full performance you specify.&#60;/p&#62;
&#60;p&#62;The ADCs have a theoretical conversion rate (when the processor is running at 72MHz) of 14/12MHz = 1.17useconds. )This is only feasible with a reasonably low-impedance signal source. See &#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00161566.pdf&#34;&#62;STM32F103x8 STM32F103xB Datasheet&#60;/a&#62;  Section 5.3.17 &#34;12-bit ADC characteristics&#34;). There should be very little problem achieving 100KHz. Typically, the quality of the input signal is the constraint. &#60;/p&#62;
&#60;p&#62;You could use external ADCs, but It doesn't sound, so far, like there is any reason to do that. It will also be a bit more complex to debug that sort of setup.&#60;/p&#62;
&#60;p&#62;You could probably get initial experiments, with 32 sensors, working over USB with the standard library.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Maple Mini the right device for my multi-sensor-readout project?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1565#post-10228</link>
			<pubDate>Tue, 17 Apr 2012 03:40:15 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">10228@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hi list&#60;/p&#62;
&#60;p&#62;This is more a kind of hardware question, how to best connect a lot of analog sensors to a maple mini (as this board has the right form factor and computing power for my project).&#60;/p&#62;
&#60;p&#62;Imagine you've got an array of 64 (maybe even 128 in a next step) linear hall effect sensors that you'd like to read out, do some calculation (solving a couple of parabolic equations) and then send some output via ethernet. I'd like to reach a minimum cycle rate of 3kHz, is this feasible?&#60;/p&#62;
&#60;p&#62;The simplest approach would be to use 8 8-channel analog multiplexers hooked up to one common SPI port connected to 8 analog inputs on the maple mini. The second SPI port would be used for the ethernet. In a first step I'd use the single sofware analog readout, in a second step I'd use the dual read out capabilities with dma of the chip (there's some working code around for that in the forum).&#60;/p&#62;
&#60;p&#62;But maybe it would make more sens to use external multi-channel (8/16) ADCs hooked up to a common SPI port?&#60;/p&#62;
&#60;p&#62;I'm an artist and sofware engineer and have no idea on what the best approach would be on the hardware side. Maybe someone can guide me in the right direction?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
