Categories
Node Red

Arduino – Node Red – MCP42010 control the digital potentiometer

Arduino – Node Red – MCP42010 – Sample control of the digital potentiometer

In the article Arduino – control and test digital potentiometer MCP42010 on a breadboard I showed how the MCP42010 can be controlled via the serial monitor of the Arduino IDE.
Now I want to do this more comfortably.
The operation has to take place from the browser, should look visually very appealing and it must also be possible with the smartphone.

Why with Node Red?

Node Red is included in the standard installation of the Raspberry Pi, free and intuitive to use.
By the possibility of clicking together the flow by drag and drop together, one comes very quickly to a good result.
For prototypes and also IOT applications this is a really great thing.
Where light is, is also shadow: Node Red consumes quite a lot of resources.
Nevertheless, the Raspberry Pi 2 does well and the performance with the Pi 3 should still much better.

Required functions of the flow

The flow is supposed to take over the entries, which I have done by hand in the Arduino – control and test digital potentiometer MCP42010 on a breadboard.
The flow should represent the return values in a Gauge Chart.

data input:
1:Value between 0-255
-> sets potentiometer1 to the value and returns the voltage to A0
2:Value between 0-255
-> sets potentiometer2 to the value and returns the voltage to A1

The Flow

  • copy the following flow and insert it under menu (top right) -> Import – Clipboard
[{"id":"ebf0e947.110038","type":"ui_slider","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Slider","topic":"","group":"Pot1","order":1,"min":0,"max":"255","x":225.5,"y":125,"wires":[["25bd2695.9acaf2"]]},{"id":"b755b484.2bd75","type":"ui_text","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Wert","group":"Pot1","order":1,"format":"{{msg.payload}}","x":636.5,"y":102,"wires":[]},{"id":"ed9f01b2.dfae38","type":"ui_gauge","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Spannung in V an A0","group":"Pot1","order":1,"format":"{{value}}","min":0,"max":"5","x":681.5,"y":322,"wires":[]},{"id":"25bd2695.9acaf2","type":"function","z":"8ec3bd3.cce4dc","name":"Value to Command","func":"var msg1 = { payload:\"1:\" + msg.payload +\"\\n\"};\nreturn [msg, msg1];","outputs":"2","noerr":0,"x":440.5,"y":125,"wires":[["b755b484.2bd75"],["134514.6c0042ed"]]},{"id":"134514.6c0042ed","type":"serial out","z":"8ec3bd3.cce4dc","name":"/dev/ttyUSB0","serial":"d535ccdc.123838","x":658.5,"y":148,"wires":[]},{"id":"13db30d1.da3c67","type":"serial in","z":"8ec3bd3.cce4dc","name":"/dev/ttyUSB0","serial":"43aa993f.185738","x":186.5,"y":345,"wires":[["f39416bc.0495"]]},{"id":"f39416bc.0495","type":"function","z":"8ec3bd3.cce4dc","name":"Response to value","func":"//find A0 or A1\nvar value;\nif (msg.payload.indexOf(\"A0\") != -1) {\n    value = msg.payload.split(\"A0: \");\n    value = value[1].replace(\" Volt\", \"\");\n    msg.payload = value;\n    return [msg, null];\n} else {\n    value = msg.payload.split(\"A1: \");\n    value = value[1].replace(\" Volt\", \"\");\n    msg.payload = value;\n    return [null , msg];\n}","outputs":"2","noerr":0,"x":431.5,"y":345,"wires":[["ed9f01b2.dfae38"],["ddbfff6.2bdb3"]]},{"id":"8a48ef7d.33ba9","type":"ui_slider","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Slider","topic":"","group":"Pot2","order":1,"min":0,"max":"255","x":224,"y":227,"wires":[["127d632d.c0419d"]]},{"id":"5a58be54.e6b8d8","type":"ui_text","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Wert","group":"Pot2","order":1,"format":"{{msg.payload}}","x":635,"y":204,"wires":[]},{"id":"127d632d.c0419d","type":"function","z":"8ec3bd3.cce4dc","name":"Value to Command","func":"var msg1 = { payload:\"2:\" + msg.payload +\"\\n\"};\nreturn [msg, msg1];","outputs":"2","noerr":0,"x":439,"y":227,"wires":[["5a58be54.e6b8d8"],["ee1b0407.9fbca"]]},{"id":"ee1b0407.9fbca","type":"serial out","z":"8ec3bd3.cce4dc","name":"/dev/ttyUSB0","serial":"43aa993f.185738","x":657,"y":250,"wires":[]},{"id":"ddbfff6.2bdb3","type":"ui_gauge","z":"8ec3bd3.cce4dc","tab":"147200e2.b8e19f","name":"Spannung in V an A1","group":"Pot2","order":1,"format":"{{value}}","min":0,"max":"5","x":681,"y":370,"wires":[]},{"id":"147200e2.b8e19f","type":"ui_tab","z":"","name":"Test MCP42010","icon":"dashboard","order":"1"},{"id":"d535ccdc.123838","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"43aa993f.185738","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false}]

Video Controlling MCP42010 with Node Red

Categories
Stirling Engine

Solar Low Temperature Stirling Engine

A very interesting project to build in the student of grade 7/8 a Stirling engine for watering your school garden.
All this is supported with many images, PDF files and an easily understandable theory.
An ideal project for more school gardens and a nice resource for personal knowledge base.

… 12 students of the Montessori High School have done something very special. They want to water their school garden with innovative technology. In cooperation with the Stirling Institute of Technology a non-profit company from Potsdam will to be built a solar low temperature Stirling engine. The invention is based on the patent of the Institute with the no. 100 16 707.

http://s-tip.org/html/for_mont.htm#studienarbeit

selfmade Wooden Generator 1 – Experiment 2 with rectifier

Wooden Generator 1 with rectifier

Based on Wooden Generator Experiment 1, the circuit was now extended by a bridge rectifier.

For this I used BAT48 Schottky diodes because they consume only 0.2 volts.
A 1000 μF electrolytic capacitor is used as a stabilizing element.
The capacitor buffers the whole a little and the LED should light up longer and more stable.
With a small LED as a consumer, I get a current of approx. 5 mA and a voltage of approx. 1.7 V with fast speeds.
The result is a proud performance of 8.5 milliwatts.
So there is still much room for improvement :-)

Wooden Generator Schaltplan Experiment 2 Wooden Generator Versuchsaufbau Exeperiment 2

The following video gives a brief impression of the rather poor yield.

https://youtube.com/watch?v=SH9jxq0oGrw%26hl%3Den%26fs%3D1

(Deutsch) Wooden Generator 1 – Experiment 1

Sorry, this entry is only available in German.

Dimensioning – own construction VAWT vertical axis wind turbine

From the beginning I wanted to build a vertically running wind turbine since it does not have to be oriented towards the wind. A vertical turbine usually starts at low wind speeds and withstand strong winds.

For vertical turbines there are several popular approaches, such as the Darrieus rotor, the Savonius rotor and various modifications.
Since I do not have the tools and possibilities of a production company as a private person, the rotor should be as simple as possible from the structure, so that I am able to implement it from home.
After much research on the net, I found an Excel list for dimensioning a Lenz2 rotor.

According to the inventor of the wing profile, it has a quite high efficiency, with manageable construction complexity.

Now, where it was clarified, what kind of rotor it should become, the dimensions had to be determined.
As can be inferred from this study, the average wind speed in Saxony is 10 meters above the ground at approx. 5 m / s.
My windmill is about 4 – 5 meters above the ground and at a distance of about 10 meters there are a few bushes, which surmount the wind wheel.
So the 5 m / s average wind speed is not achievable.
My assumption is an average wind speed of 3m / s, which would be immediately the end for a location for a productive plant.
But unfortunately I don’t have a beach property with 10 meters high mast available.

The wind turbine is supposed to feed a significant output of more than 10 KW / h per year into the battery. This is much more than I could generate in 2012 with my small solar cells.
I’ve played a little with the Excel list for the dimensioning of Lenz2 rotors around and I decided at the end for 70cm diameter and 70cm height with 3 wings.
This corresponds to almost half a square meter area where air flows through.
If I assume the 2.65 watts, which can be generated with the 70/70 rotor at average 3m / s within a year, I come to 23.2 KWh per year. This is equivalent to 3.5 times my electricity generation from 2012.

Calculated output (according to Lenz)
Wind speed km/h Wind speed m/s Speed loaded rpm Speed idle rpm Electrical power in W
4 1 22 44 0,10
7 2 44 87 0,79
11 3 65 131 2,65
14 4 87 175 6,29
18 5 109 218 12,28
22 6 131 262 21,22
25 7 153 306 33,70
29 8 175 349 50,30
32 9 196 393 71,62
36 10 218 437 98,25
40 11 240 480 130,77
43 12 262 524 169,78
47 13 284 567 215,86
50 14 306 611 269,60
54 15 327 655 331,59
58 16 349 698 402,43
61 17 371 742 482,70
65 18 393 786 573,00
68 19 415 829 673,90
72 20 437 873 786,00
76 21 458 917 909,90
79 22 480 960 1.046,17
83 23 502 1004 1.195,41
86 24 524 1048 1.358,21
90 25 546 1091 1.535,16
94 26 567 1135 1.726,85
97 27 589 1179 1.933,86
101 28 611 1222 2.156,79
104 29 633 1266 2.396,22
108 30 655 1310 2.652,76
112 31 677 1353 2.926,97
115 32 698 1397 3.219,46
119 33 720 1441 3.530,82
122 34 742 1484 3.861,63
126 35 764 1528 4.212,48
130 36 786 1572 4.583,96
133 37 808 1615 4.976,67
137 38 829 1659 5.391,19
140 39 851 1702 5.828,11
144 40 873 1746 6.288,01
Rotor diameter: 0,7 m
Rotor height: 0,7 m
Number of blades: 3 pcs
Efficiency according to Lenz: 41 %
Efficiency generator: 80 %

The 2.65 watts are, however, also the lower end of the scale as far as power generation is concerned.
The generator should perform well in the speed range 60 – 500 rpm.
Typically, the power that can be delivered should increase as described in the table.

Radius of the slats: 66 mm
Length entire blade: 280 mm

A look at the back of the table, but also shows what can work beyond the 15m / s for forces.
On one site, the wind turbine does not provide much more than 20 KW / h per year, but the design must be stable enough to withstand several thousand watts of wind power.
The lighter the construction is, the better.
It is relatively easy to see that such a project has a certain claim.

I have decided to use aluminum for the construction of the rotor, since this on the one hand it is a lightweight material and on the other has not to be protected against corrosion.
Aluminum is available anodised. I chose brown colored metal sheets, because it dark colors are reflecting very little sunlight from my point of view.
Naked aluminum looks like a mirror and I do not want to risk that the neighbors will be disturbed by sunshine reflections.
Except for the mast, I trust glue and screw connections.
The wing profiles are glued with UHU Endfest 300 (300 Kg / cm² adhesive force).
The connections up to the hub are screwed so that there is the possibility to align the rotor, since at relatively high revolutions a unbalance would lead to problems.
The structure in detail I will explain in the following pages (see page navigation – top right of the page).

And finally the drawing of the profile started with the project 2011:

Zeichnung Fluegelprofil

(Deutsch) Kreissägeblatt – Generator – Experiment 1

Sorry, this entry is only available in German.

selfmade disc generator on circular saw blade – electric power generation

Sorry, this entry is only available in German.

(Deutsch) Eigenbau Wooden Generator 1

Sorry, this entry is only available in German.

Categories
measurement and control

(Deutsch) Drehzahlmessung und Datenerfassung durch Videobeweis

Sorry, this entry is only available in German.

construction of the blades for the selfmade VAWT

blades VAWT Visually :-)

The pictures show the construction of the wings quite well.
It is best to click on the first one to enlarge it and then use the arrow to the right to view one image at a time.

Under each picture there is a brief explanation.

Preview Profile sheet metal wing 3Preview Blade 4Preview Blade 5

Material selection and fitting

I have decided for aluminum because it is light, weather resistant and easy to process. For the wings, aluminum was used, as is also seen on many roofs. I chose a dark (brown) color because I would not want to someone is being blinded with the windmill. If the sun is unfavorably reflected, that is not good.
The connection between wing plate and profile plates was glued with UHU Endfest 300.
(After half a year of continuous operation and a survived winter, I must say that the glue is not suitable!)
I have concentrated too much on the fact that the windmill can withstand strong wind and I was mainly concerned to use an adhesive with an extremely high bond force.
But UHU Endfest is rigid. A flexible adhesive is more suitable. I will bond the profiles again with a good silicone and test the next winter.
!—The profiles hold with Endfest of UHU, but I see smaller cracks after half a year—!

Größe und Maße

Zeichnung FluegelprofilThe size of the wing profiles is derived from the preliminary considerations of the page Dimensioning – own construction VAWT vertical axis wind turbine.
I have transferred the enclosed drawing to 3mm thick aluminum sheet and sawn using a decuping saw with sawblades for soft metal.
With a little patience, this goes quite well.
2 profiles per wing, were still provided with 2 holes (9mm diameter) to allow connection to the bracket at the hub.
Another 2 profiles per wing each received a 9mm hole in the center of the circle arc to reinforce the profiles on the top and bottom of the wing.