Skip to content

AVRaft is a makers project to have a dev tool to easily control many common electronic devices such as servos or ultrasonic testers without the need to take out and assemble your own circuit

License

Notifications You must be signed in to change notification settings

wlwatkins/AVRaft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AVRaft

Build with PlatformIO

Build Status

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.

Featured devices release!

  • Servo
  • Stepper
  • Ultrasonic
  • Humidity
  • On/Off
  • DHT XX
  • Analog

Future integrations:

  • DC (H-bridge?)
  • Button

3D build and parts list

This first version of the AVRaft uses of the shelf electronics:

Two 3D printed parts are required. You can find all the details on thingiverse https://www.thingiverse.com/thing:4559764

Installation

From binary

A binary package is available to flash directly on the arduino.

#todo add flash instruction

From source

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.

Libraries

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.

Usage

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

Devices

The board supports a number of devices, each with their own parameters. The list of device should grow with time.

  • Servo

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.
  • Stepper

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.

  • Ultrasonic sensor (HC-SR04)

Pins:

  • Trigger: D3
  • Echo: D4
NAME DEFAULT DESCRIPTION
Max 200 Maximum distance to measure in cm.
MEASURE - Start measuring.
  • Humidity sensor (Capacitive Soil Moisture Sensor v1.2)

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.

  • On/Off (Toggle digital pin)

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...

  • DHTXX (humidity and temperature sensor e.g. DHT22)

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.

  • Analog

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...)

Todos

  • Make custom break out board (v2?)
  • Add more devices

License

GNU General Public License v3.0

Free Software, Hell Yeah!

About

AVRaft is a makers project to have a dev tool to easily control many common electronic devices such as servos or ultrasonic testers without the need to take out and assemble your own circuit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published