AVRaft is a prototyping kit that gives makers a quick way to interact with alternators such as servos, stepper motors, ultrasonic sensor, etc... quickly withouth the need to take out your breadboard, and jumperwires. The project is still in alpha and changes will acquire quite rapidly. The project was written in C++ using platformio.
- Servo
- Stepper
- Ultrasonic
- Humidity
- On/Off
- DHT XX
- Analog
Future integrations:
- DC (H-bridge?)
- Button
This first version of the AVRaft uses of the shelf electronics:
- ArduinoNano
- Breakout nano shielf
- LCD I2C 16x2 screen
- Tactil switches x3
- 10k resistor x3
- Toggle switch
- 9V battery
- Battery wire socket
- M2 and M3 screws
Two 3D printed parts are required. You can find all the details on thingiverse https://www.thingiverse.com/thing:4559764
A binary package is available to flash directly on the arduino.
#todo add flash instruction
To compile the code from source, you will need platformio installed on your favorite IDE (I used vscode). You will need to install a few dependencies though, basically every library for every supported devices. Below is a list of the libraries as well as the name of the other to elevate confusion.
NAME | VERSION | AUTHOR |
---|---|---|
LiquidCrystall_I2C | 1.1.4 | Frank de Brabander |
Servo | 1.1.6 | Michael Margolis |
Stepper | 1.1.3 | Arduino |
NewPing | 1.9.1 | Tim Eckel |
DHT sensor library | 1.3.10 | Adafruit |
Adafruit Unified Sensor | 1.1.4 | Adafruit |
You can then grab the project
git clone [email protected]:willmendil/AVRaft.git
The import the project with platformio. If all the libraries are installed correctly, you should be able to flash your arduino nano directly.
To use this program, you will need to assemble the project and 3D print the enclosure (though you can make it without). You will have to select the device you want to interact with, plug it where it tells you to (e.g. servos D3) and you are done, you are able to quickly test and interact with these devices. For details on the parameters, see below
The board supports a number of devices, each with their own parameters. The list of device should grow with time.
Pins:
- IN1: D3
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Angle | 90 | Angle in degrees to which the servo will be set. |
Delay | 5 | Delay in millisecond in for loop to move the servo (only when w/ rst is true). |
w/ rst | 1 | Stands for "with reset", will move the servo to 0 and sweep to the give value, otherwise, the servo will just move to the value given in angle. |
MOVE | - | Move the servo to the given angle. |
Pins:
- IN1: D3
- IN2: D6
- IN3: D5
- IN4: D8
NAME | DEFAULT | DESCRIPTION |
---|---|---|
CW | 1 | Set if rotation clockwise (1) or anti clockwise (0). |
Speed | 5 | Speed to move the motor (maximum value is 15 for 28BYJ-48). |
Delay | 5 | Delay in millisecond between steps. |
S/rev (not used) | 2048 | Number of steps per revolution. Small 28BYJ-48 is 2048. |
MOVE | - | Move the motor until a key is pressed. |
note: Tested on 28BYJ-48, for other type of motors, need to do some testing.
Pins:
- Trigger: D3
- Echo: D4
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Max | 200 | Maximum distance to measure in cm. |
MEASURE | - | Start measuring. |
Pins:
- IN1: A0
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Dry V | 600 | Analog max value for dry condition (when sensor is in air). |
Wet V | 250 | Analog min value for wet condition (when sensor is in water). |
MEASURE | - | Start measuring. |
note: The sensor needs so time to stabilise. Also, the output is given in raw analog value as well as a mapped percentage.
Pins:
- IN1: D3
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Delay | 500 | Delay (ms) between toggle of pin. |
Cycle | 1 | Set if we toggle on and off in an infinite loop (1) or just change state of pin (0). |
RUN | - | Start. |
note: This is a simple on/off switch which can be used to test LEDs, or relays, etc...
Pins:
- IN1: D2
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Type | 3 | Set what type of sensor you want to use (DHT11: 1 - DHT21: 2 - DHT22: 3). |
MEASURE | - | Start. |
note: This will loop and print about once a second the temperature value in celsius and humidity in percent.
Pins:
- IN1: A0
NAME | DEFAULT | DESCRIPTION |
---|---|---|
Max | 1015 | Sets the maximum value the actuator can reach |
Min | 20 | Set the minimum value the actuator can reach |
Inv | 0 | Inverse which is the max and min to calculate the percentage (in some case min is 100% (1) other cases it is max (0)) |
Measure | - | Start. |
note: This was tested with a photoresistor but it should work with any analog device (even the humidity sensor I guess...)
- Make custom break out board (v2?)
- Add more devices
GNU General Public License v3.0
Free Software, Hell Yeah!