Help needed for large crane overload warning

Hi all, as a bit of background, I'm a construction plant engineer, so the hardware of all this is straight forward but I've never done coding before (IT lessons in my school were just wordart lessons). I've installed an old Hiab crane on a pedestal in my back yard (read scrapyard) to help with moving my 'projects' around. At the moment it only has manual overload protection but I liked the idea of putting in some electrical safety devices as well. My idea is as follows:

When the Arduino is powered up, a green LED is lit next to the controls, an orange warning beacon is turned on and a solenoid is powered. The LED is just to indicate the machine is on. The beacon is for the safety of anyone else in the yard and is positioned just past the full reach of the crane. The solenoid opens a valve that allows hydraulic flow to the control levers.

When the transducer (0-4000 psi, 1-5 volts DC) in the lift ram reaches approx. 3.8 volts (I haven't calculated the exact values yet, but they are roughly right), an orange light next to the operator comes on and a warning buzzer starts beeping. This indicates you are close to full load.

When the transducer reaches approx. 4 volts, a red light next to the operator comes on, the buzzer sounds continuously and a solenoid activates the by-pass valve on the lift cylinder. This mechanically prevents any movement that would increase the load (i.e. extending the arm), but allows movements that reduce the load.

When the voltage from the transducer comes back down the lights and buzzers etc. would need to turn off again.

I understand the lights and solenoids etc will need to be run through relays, but i've got all that sorted. I don't know if this is possible with an Arduino UNO, but I had one lying around for funsies and thought I might be able to use it. Any help would be very much appreciated.

'CAD Drawing' attached...

This sounds to me far to dangerous for a DIY project. Get formal written agreement from your liability insurer before taking it any further.

...R

Hi Robin, thanks for the input, but to clarify, this is for my own personal use on private property. Also, it won't in any way override or affect the existing mechanical overload protection systems. The crane as constructed has no electronic protection whatsoever.

I'm not a lawyer nor do I pretend to be one so I can tell you is that this a very simple and basic task for an Uno which has six analog inputs that can resolve 10 bit accuracy (0 to 1023 counts). The inputs are zero to approximately 5 volts full scale. I say approximately because in order to save costs, there is no precision 5 volt reference, the board uses the on-board 5 volt regulator, the same voltage that powers the entire Uno board. That's not great for precision voltage measurements but it's more than adequate for most Uno projects.

You can use an analog input to create the alarms. You might want to use a filtered analog value, which can be easily done in software. It depends on what you find when you connect the transducer to the Uno and see what the analog readings look like from a stability standpoint. Hydraulics can create some rather "spiky" pressures, especially as solenoid valves open and close.

You'll also want some hysteresis (or deadband) in the switching points so the LEDs don't flicker close to the switching points.

You can drive standard LED's directly from a digital output pin so long as you have an appropriate value current limiting resistor in series with the LED. Digital output pins should be limited to a maximum current of 20 milliamps which is more than enough for modern, bright LED's.

Relays will need a driver circuit, usually a transistor although it is far easier to purchase relay driver boards that include the driver circuits and you simply connect digital outputs directly to board, apply the rated voltage and you're off to the races.

Thanks for the that Fred. To be honest, I think this is getting a bit beyond my cut and paste coding ability. I'm thinking of downgrading this project to something along the lines of a digital pressure gauge, say three green LED's, three orange, three red, lighting up in turn as the pressure increases. Good shout on the deadband for the LED's, I hadn't thought of that. The hydraulic pressure is supplied by an electric motor controlled by a sexy Danfoss HVAC inverter rather than the diesel engine of the truck it came off, so its a very smooth power delivery. Reading off the analogue gauge the pressure spikes are very minimal, but I suppose a 0-4000 psi gauge isn't as sensitive as the Arduino. I'm really trying hard here to justify using the Arduino for something!!!

I think it's a perfect application for an Uno even if all you do is light LED's at different pressure levels. Start there and add one additional function at a time. You'll have what you envision in short order.

Start by simulating the pressure transducer with a single turn potentiometer. Use Serial.print commands to print the "pressure" to the serial window once a second. Once you have that, it's a simple matter of adding the lights, the siren/alarm and the limit solenoid.

If you get stuck, just post your code (all of it, not just snippets) using code tags (the </> icon) in the project guidance section and explain what works and what doesn't. Yeah, you might get some people that run away with their hair on fire about the safety aspects but then not everybody understands cranes and heavy industry. It's obvious you do and most importantly, you have a vision of what you want to do. You'll get there and you'll likely have some fun along the way.

BTW, if you want a digital gauge, the easiest and best place to start with that would be one of the character mode 1602 LCD's. Add the I2C interface board that solders/plugs onto the LCD. Get some "DuPont" jumper wires, a solderless breadboard and you're on your way. eBay is by far the cheapest source for these things and if you need some guidance, just ask.

I wondering if this is a legal grey area - Arduinos are not designed for "safety-critical" systems, but its
not clear if adding extra protection counts as safety critical or not. Certainly the green light is a no-no
in my mind - that might be interpreted by someone as "ignore the mechanical overload warning", just use
another colour!

I am not a lawyer, so can't comment on whether a green light marked 'power' or similar could constitute an excuse of ignoring ones own due care. However, and I feel I need to be quite clear on this, this crane is on private, domestic property. I only use it myself for my own personal projects. The mechanical safety systems are not warnings, they physically prevent an overload taking place. The only way I could see an overload being possible is by suspending a basket and then filling it past the rated weight limit. Since the mechanical safety systems only prevent pressure entering the cylinder rather than releasing it, if you added weight it would eventually collapse. I don't have a huge amount of paperwork for this crane since its so old but I understand it to be tested to 150% of its maximum capacity. My 'dead reckoning' skills as an engineer mainly engaged in certifying and repairing powered access and site lifting equipment would support this. Of course, if this was something I was doing for my company, I would leave well alone.

Fred - thanks again, I might come back to you on the code!!!

pretengineer:
I only use it myself for my own personal projects.

"The beacon is for the safety of anyone else in the yard" ?

Yeah the kids are getting to an age now where they're getting interested in this kinda thing. My oldest is 12 and he helps out every now and then. Nothing dangerous, they know not to come into the back field where all the fun stuff happens. The inverter is under lock and key so I couldn't see it getting activated without me securing the area first, but still, is it a bad thing to have a beacon just in case?