Hi everyone,
Part of my Dragonshark (Link here on the forum) "redesign" project included a DIY Piston Tank. Naturally a controller was required to control the DIY contraption
Although I had not ventured into Arduino programming before I decided that this little computer would be the perfect candidate for the job.
First step in a new project = An ambitious feature list !!!
Here is what the little board was supposed to do.
Feature List
Arduino of choice: the small Arduino Nano. While a pro mini would work as well, the USB connector of the nano makes it so much easier to troubleshoot and play around with features.
Here is what you need:
A preview of how it looks in action (this tank does not use the trim function)
The pins are configured in the code to allow installation of plug connectors on the arduino for secure connection and easy maintenance as shown below.
Part of my Dragonshark (Link here on the forum) "redesign" project included a DIY Piston Tank. Naturally a controller was required to control the DIY contraption
Although I had not ventured into Arduino programming before I decided that this little computer would be the perfect candidate for the job.
First step in a new project = An ambitious feature list !!!
Here is what the little board was supposed to do.
Feature List
- Read PWM Signal from RC Receiver
- Control H-Bridge or ESC to drive DC motor to flood and drain piston tank
- Piston tank motor speed can be adjusted by changing the RC endpoints:
- Monitors 3 end stops as follows:
#1: Flood end stop - prevents motor from further flooding when the piston has reached full flood position
#2: Drain end stop - prevents motor from further draining when the piston has reached full drained position
#3: Trim end stop stops the motor when triggered. RC Switch needs to be reset to neutral to enable further flooding or draining
- Automatic failsafe drain - tank is automatically drained when a RC Signal drops below a certain point. Failsafe is not affected by the trim end stop ensuring the trank is completely drained when triggered
Arduino of choice: the small Arduino Nano. While a pro mini would work as well, the USB connector of the nano makes it so much easier to troubleshoot and play around with features.
Here is what you need:
- 1x Arduino Nano Board - ~2 USD
(purchase of ebay. Example: http://www.ebay.com/itm/1-2-5-10PCS-...o/282228063941 )
- Motor Speed Controller:
Option 1 – H-Bridge (use the first code sample and wiring diagram below) – NOTE: current is limited with the below module to 2A. My tank pulled more amps so I want with the ESC instead.
1x H-Bridge – L298N - ~2 USD
(purchase of ebay. Example: http://www.ebay.com/itm/Stepper-Moto...o/170926726867 )
Option 2 – brush speed controller or brushless ESC (use 2nd code sample and wiring diagram below)
1x Brush or Brushless speed controller depending on your motor. Ensure it has a reverse function (100% throttle in both directions).
(many sources: www.hobbyking.com, www.banggood.com, support local: your local hobby shop)
- 3x Micro switches - ~1 USD
(Note: might not be required if your piston tank has them already – also select a size suitable for your tank. 3 Options below)
(purchase of ebay.
Example Micro Size: http://www.ebay.com/itm/5-x-Ultra-Mi...e/152366837947
Example Standard Size: http://www.ebay.com/itm/141685433695 )
Example Large Size: http://www.ebay.com/itm/10PCS-Micro-...5/331813598295 )
- 3x 10k Resistor - ~1 USD
(purchase of ebay. Example: http://www.ebay.com/itm/100pcs-1-4w-...-/381374783687 )
- Wires and power connectors (size depending on your setup, 24 AWG wires will do for the limit switch and RC connections)
- Drive battery, UBEC (in case your drive motor ESC and piston tank motor ESC both do not supply 5v to the receiver and Arduino)
A preview of how it looks in action (this tank does not use the trim function)
The pins are configured in the code to allow installation of plug connectors on the arduino for secure connection and easy maintenance as shown below.
Comment