Microblog : A very long article Wikipedia article on the orientation of toilet paper [7 jun à 22:52] [R]

Lundi, 16 mai 2011

Tyco Slot-Car Controller A/D Conversion

Traduction: [ Google | Babelfish ]

Catégories : [ Bricolage/Arduino ]

tyco_controller_adc

I hooked the Tyco slot-car controller to the Arduino's analog input with a 400 Ω pullup, and set the A/D converter's reference voltage to INTERNAL (meaning 1.1 V). The sampling rate is 100 Hz and the output values are between 0 and 1023. The movements are two successive slow squeezing-and-releasing of the trigger, followed by three quick squeeze-and-release.

  • In the lower picture (red) are the raw data.
  • In the second lower picture (green), the raw data is filtered by a 4th-order, low-pass Butterworth filter, with a 5 Hz cutoff frequency.
  • In the third lower picture (blue), a 32-levels quantization is applied to the raw data.
  • In the top picture (purple), the quantization is applied to the filtered data.

A value of 1023 (the maximum) indicates that the electrical contact is broken i.e., that the trigger is in the rest position or its maximum.

I have tried hardware filtering with capacitors (1 nF, 100 nF and 1μF), but the digital filter gives the best results. I don't doubt that more advanced hardware filters would have produced similar, if not better results, but they would have required more components, and if you can afford to do it in software, why bother with the extra hardware? Software filtering is amazing… The code for the software filter has been generated on this very useful website.

Additionally, conductive grease applied to the variable resistor may reduce quite much the noise (or shortcut the whole coil of wire…)

[ Posté le 16 mai 2011 à 21:56 | pas de commentaire | ]

Adresse de trackback

https://weber.fi.eu.org/blog/Bricolage/Arduino/tyco_controller_adc.trackback

Commentaires

Aucun commentaire

Ajouter un commentaire

Vous pouvez utiliser les balises HTML suivantes: <p>, <br>, <em> <strong>, <pre>. Les URLs commençant par http:// seront automatiquement transformées en liens hypertextes.

(optionnel)
(optionnel)


Sauver mon nom et mon URL/Email pour la prochaine fois

32 / 8 =