Question:Pulse width modulation ( 12 volt winch motor relay control)

Here you can talk about anything related to BBC BASIC, not covered in another category
michael
Posts: 43
Joined: Mon 02 Apr 2018, 17:13

Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by michael »

What I did:
In the last 2 days I adapted a 12 volt DC winch motor (8000 LB) onto my motorcycle - for pulling even the heaviest trucks out of ditches.

Problem:
Even though I put a centrifuge clutch on the drive, it is so powerful that it is quite dangerous to control.

Possible solution:

Use the Raspberry Pi3 to pulse the 12 volt using a relay.

Question can that be done using a solid state relay and could quick on/off commands allow me to have more control of the motor speed?
( the winch has its own reverse / forward switch that has solenoids and the positive 12 volt wire has huge capacitors. (controlled by the
The motor is a series wound DC motor.

This would be a engineer problem. I am not sure if I can simply use just relays with the raspberry pi and simple on/off commands with BBCSDL.
( I can provide a video showing the unit in action )
I was only laughing cus it was cool.. I wrecked my chain doing this:
[BBvideo]https://youtu.be/dN94iOqzvqg[/BBvideo]
RichardRussell

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by RichardRussell »

michael wrote: Sun 19 Jul 2020, 22:15 Possible solution:
Use the Raspberry Pi3 to pulse the 12 volt using a relay.
Isn't this overkill? There must be conventional hardware speed controllers available (which may well work by pulse-width modulation, like dimmers often do) which would be simpler and potentially much more reliable. I personally wouldn't want software involved in anything safety-critical, if it can be avoided (a powerful motor switched to full-power because of a crash or a glitch could be quite dangerous).

I'm of an age at which I invariably prefer a traditional, tried-and-tested, solution over an inappropriate use of technology.
michael
Posts: 43
Joined: Mon 02 Apr 2018, 17:13

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by michael »

Isn't this overkill? There must be conventional hardware speed controllers available (which may well work by pulse-width modulation, like dimmers often do) which would be simpler and potentially much more reliable.
There is an idea I have been using for isolating voltages in lower voltage DC batteries.

If I put say, batteries in series like so:

large deep cycle 6Volt, 6volt then I can step down my voltage by bypassing the full 12 volts in the series with just one battery and then I can also charge the 2 batteries with a solar panel and a blocking diode once the full 12 volt system has been engaged. (12 volt getting up to 14 volt once fully charged)

I have been experimenting with batteries and just remembered that this can be done.. It would avoid wearing out a dimmer switch style control (which is expensive) AND with this type of set up, I could install a emergency disconnect switch.

I could put manual switches on the batteries to switch between 6 and 12 volt . I can also reduce battery voltage on top side in case it is too much.

So perhaps 6 volt for low speed and then 3 x 2volt batteries . And then later on use the Raspberry Pi3 to manage other things cus I want it to look cool and be a presentation video .
PhilD
Posts: 6
Joined: Mon 18 May 2020, 09:44

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by PhilD »

Hmm. Unless you *need* to see precisely what's going on, I'd say the Pi is overkill when PWM can be done much more simply. An Arduino coupled with an appropriate transistor could do it very easily (and could show any info on an LCD or OLED display), as could a NEC555 chip. Neither of these is expensive.

I don't quite understand why you want to switch from 6v to 12v. The point of PWM is that it provides the device with its standard supply voltage, adjusting the duty cycle according to need. If you can find the winch's spec sheet, that should tell you what it "expects". If it already has inbuilt circuitry then sending a PWM'd power supply is very likely to lead to erratic behaviour.

Also, unless there's something you haven't mentioned, isn't it more likely that trying to pull a heavy truck from a ditch would end up with your motorcycle joining the truck in the ditch?
RichardRussell

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by RichardRussell »

PhilD wrote: Fri 24 Jul 2020, 10:28An Arduino coupled with an appropriate transistor could do it very easily
If you must use a programmed device (and I think a hardware solution would be better) at least the RPi has the advantage of being programmable in BBC BASIC - which is after all what this forum is about - whereas the Arduino cannot, as far as I know. How about an NE555 and a transistor? Smaller, cheaper and more reliable than an Arduino!
PhilD
Posts: 6
Joined: Mon 18 May 2020, 09:44

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by PhilD »

RichardRussell wrote: Fri 24 Jul 2020, 10:39If you must use a programmed device (and I think a hardware solution would be better) at least the RPi has the advantage of being programmable in BBC BASIC - which is after all what this forum is about - whereas the Arduino cannot, as far as I know.
It would certainly be beyond my abilities to create an Arduino IDE in BB4W, or even some code that would programme an Arduino, and since there's already a perfectly good Arduino IDE, it would be a bit like reinventing the wheel. It's eminently possible to use BB4W software to enable a PC (or whatever platform) to interact with an Arduino, however, since all that's required is for each device to know what serial data to expect. I'm fond of Arduinos and BB4W largely for this reason, but ...
How about an NE555 and a transistor? Smaller, cheaper and more reliable than an Arduino!
Yes, a 555 would be my first choice. It has one job and it does it well.
michael
Posts: 43
Joined: Mon 02 Apr 2018, 17:13

Re: Question:Pulse width modulation ( 12 volt winch motor relay control)

Post by michael »

How about an NE555 and a transistor? Smaller, cheaper and more reliable than an Arduino!
I will be using a Raspberry Pi3 as I have the touch screen and can easily mount it. I have Arduinos and Attiny85 chip and have programmed them both. I prefer RPI3 because its easier to program and interface with and my RPI3 has wifi. ( I also am using it as it gives the Pi3 a job and may help me in future projects)

The Pi 3 will likely be for managing the solenoids for smoother shifting and for a overdrive option.

Basically 6V will be for low gear but I may not need that now that I have worked out the layout of my sprockets.

What will end up being handy is being able to engage power beyond 12 volts.. So to keep the voltage in around 15 volts, I can use the Pi to connect to another 6 volt battery when the 12 volts drops bellow 11 volts. ( that way it gives me time to get back to home base in case I over extend my supply. I am limited for battery space. and ALSO it will help reduce heat and resistance from low voltage supply)

I will look for that NE555 and see if it may serve future purpose. ( keeping my robotics store purchases down - its more about making sure the order is exactly what I need, as post office charges me large for package weight fees.)

Once I have everything safely assembled I will make a video showing the human guinea pig (me) driving it and using the interface)
It wont be on the motor cycle as I am gonna put it on a custom creation. I will have an emergency power disconnect in case something goes wrong.

* been working on the design (fiberglass, welding) last 4 days.