AgTalk Home
AgTalk Home
Search Forums | Classifieds (29) | Skins | Language
You are logged in as a guest. ( logon | register )

DIY auto boom height control
View previous thread :: View next thread
   Forums List -> Precision TalkMessage format
 
WildBuckwheat
Posted 6/13/2019 21:05 (#7557657 - in reply to #7557560)
Subject: RE: DIY auto boom height control


Middlesex County, Ontario
I'm in the same boat as Adrian. I would love to see this project work, and I've had it in mind a long time, but I don't have a lot of time to dedicate towards it. I know I couldn't dedicate enough time to the project to maintain momentum. I would also like to do what I can to help.

For the sensors in PWM mode you need digital input pins. When using a PWM signal, you need to measure how long the signal stays high for (in microseconds) very accurately. You can use the analog pins as digital input pins, but it is a waste of an analog input pin and slow. It takes 100 microseconds to read something on an analog pin, and when you're signal is 1 millimeter per microsecond your measurement is off by up to 3 inches right off the hop.

Pins 2 and 3 are interrupt pins. These are too valuable to use as a normal output pin. These are ideal for sensor input pins, like the left and right sensor which will be doing most of the work. You can use interrupts to measure that PWM signal very accurately. A standard arduino only has two interrupts available, and they are on pins 2 and 3. We can suffer a little bit of performance for the center sensor since it won't be doing much work and use a standard digital pin like pin 4 (just to keep all the sensors next to each other).

Reserving pins 0 and 1 is a good idea in case we need serial communications. In addition, when you upload to the arduino, your computer is talking to the arduino over serial over these two pins. If you connect a switch or something, you could kill the signal and now you can't upload anymore.

Reserving pin 13 is generally a good idea as well because it is hardwired to an LED on almost every arduino. You can use it to troubleshoot.

4 boom function relays/solenoid driver, use any remaining 4 digital pins as outputs.

4 switch functions, use any remaining 4 digital pins as inputs.

Mode switch, use any remaining digital pin as input.

Pins A4 and A5 are generally worth reserving as well, since they are required for I2C communications.



I would want center section up/down control and center section toggle switch reading as well. That means reading in a minimum of 6 inputs and controlling 6 outputs just for switching and solenoids, then add modes, sensors, etc. I would want and LCD and a couple of adjustment knobs. I think it'd be worth going to an Arduino Mega right from the start. The Mega has many more pins, and also has 4 serial ports. I think the sensor's PWM signal and serial signals are the best, but I would give slight preference to the serial signal since it will be the most noise resistant, and also work with the most definition. What I mean by definition is; you know you are reading the signal with 100% certainty. When you read the PWM signal (or analog signal), you don't know if you read in the signal properly with 100% certainty (unless you also have an oscilloscope hooked up). With the serial signal, you'll know for sure, because you either didn't read anything, or you read in a number. That's more of a piece of mind thing than anything.

Arduino code is super portable. You can switch to another arduino at any time without really changing any code. You can use any arduino to prototype and you can use any arduino to build a 1 or 2 hydraulic valve controller. You don't need to use a different model unless you run out of hardware (pins, serial ports, etc).
Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)