• Interactivity
  • project from raspberry pi to arduino, problem with voltage of sensors and fans.

Hi,
I want to modify a project from running on a raspberry pi to running on bela. The project contains a PD patch, which I can easily run on bela. I have two questions on my set-up though:
1. There is also an anemometer needing 7 to 24 Volt to function (this one https://www.adafruit.com/product/1733) , and the output voltage will range from 0.4V (0 m/s wind) up to 2.0V (for 32.4m/s wind speed). How can I connect this easily to the Bela? I used to do this with an arduino (12 volt power supply), but I assume I could connect this immediately to Bela as well in some way?
2. I also use two fans (these ones http://shop.boxtec.ch/nidec-ta450dc-fan-120x120x38mm-12vdc-two-ball-bearing-p-42482.html). In the original set-up they are also controlled by arduino, with a 12 volt power supply. Here again I do not see how I could connect this to the Bela easily with the higher voltage. (I did look at the motor tutorials, but that is with 5 volt. My main problem is how to connect fans and anemometer that use a higher voltage than the beaglebone).

I have also thought of leaving everything on the arduino and control them via bela serial output in pure data. This might be not the most elegant but perhaps the simplest solution because I do not have to set-up everything anew. Could some one give me some advice on this?

    CathyV 1. There is also an anemometer needing 7 to 24 Volt to function (this one https://www.adafruit.com/product/1733) , and the output voltage will range from 0.4V (0 m/s wind) up to 2.0V (for 32.4m/s wind speed). How can I connect this easily to the Bela? I used to do this with an arduino (12 volt power supply), but I assume I could connect this immediately to Bela as well in some way?

    You'll need a 12V supply for that. Bela has no 12V rail and you cannot power it up with a 12V supply. The signal voltage range is within Bela's analog input range (which goes from 0V to 4.096V), so there should be no problem with that.

    CathyV 2. I also use two fans (these ones http://shop.boxtec.ch/nidec-ta450dc-fan-120x120x38mm-12vdc-two-ball-bearing-p-42482.html). In the original set-up they are also controlled by arduino, with a 12 volt power supply. Here again I do not see how I could connect this to the Bela easily with the higher voltage. (I did look at the motor tutorials, but that is with 5 volt. My main problem is how to connect fans and anemometer that use a higher voltage than the beaglebone).

    What voltage is the PWM signal supposed to be? What voltage is the RPM signal? I cannot find any indication of that in the page you linked.

    Hi Giulio, thank you so much for your really fast reply. My electronics knowledge is not well... the software side I understand, but I do not understand how I can connect the 12 Volt supply to the sensor and at the same time read the input of the sensor with the Bela. Should they have a common ground for this? And if yes, the same would probably the case for the fans? At the moment I try to avoid this (with several arduinos) because the readings of the sensor become noisy and chaotic, when the fans are connected to the same microcontroller.

    Yes you'd need to share a ground between Bela and the sensors. Yes it can cause noise issues. A properly designed device (fan or anemometer) would have a dedicated ground pin for the power supply and a separate one for the signal I/O. Not sure if it's the case here. Do you know the voltage levels of the RPM and PWM pins of the fan?

    Hi Giulio, thanks again for your help. I do not have the voltages for the PWM and RPM, just tried to look them up and I can't find anything. But I am happy to use other fans ( I will look for some more suitable, in fact I would be super happy if I can get this project working on a Bela, which is much more convenient for me than a raspberry. The anemometer is not having a separate ground for power, and I have to use this one. I will see if I can find a solution for that.

    Are you using Bela or BelaMini? We could assume the voltages are 0V:5V, as that's what the Arduino has. Bela would have 5V outputs from the analog outs that could be used to drive the PWM, otherwise the digital I/Os on Bela and BelaMini are 0V:3.3V . We can divide the RPM down to a safe range with a resistor divider.

    Bela for this project (ordered several BelaMini some days ago for another project, looking forward using them!). And that seems to be indeed a good solution, to use the analog outs for the PWM, thank you so much for this!