Posts: 1
Joined: Thu Nov 14, 2013 3:08 pm

Is the Raspberry for me

Thu Nov 14, 2013 4:00 pm


I work in the motorcycle industry designing drivetrain components. We are currently working on a new project which is going to involve a brain box per say of controlling solenoids via relays. System is 12V (Motorcycle/Car battery). I want to know if the Raspberry is right for me vs. the Ardunio and or should I use both?. We are looking for a system just for testing purposes is why I'm looking at the Ardunio or Raspberry

I want to be able to say start the bike; with a push button, hold say up shift button for 5 sec to arm the system, then it starts the program (which is armed and waiting for more input commands). After system (program) is running, say I press the button again would indicate that I need a solenoid to operate and then ms (milliseconds) later turn on another solenoid. These solenoids would only stay on for the duration of a motorcycle up shift (milliseconds). Then the program would start over.

Down shift button would run a similar program but operate the solenoids at different timing then the up shift side.

Please let me know your thoughts as I want the system to operate off of real world inputs / outputs and possible set it so that when it hits a certain MPH operate another solenoid holding power off or on depending on throttle sensor percentage.



Posts: 58
Joined: Sun Sep 29, 2013 4:28 pm

Re: Is the Raspberry for me

Fri Nov 15, 2013 9:54 am

Hi Chad.
Many ways to cook an egg.

The Arduino and the Raspberry, or a PIC, could all do this. When I'm designing I start by writing out my requirements in real world numbers. Specifically, number of inputs required, number of outputs required, minimum response time, interfacing to relays/solenoids requirements etc.

One thing I would say is that if yoiu are using 12V solenoids then switching them with relays is reinventing the wheel, because solenoids and relays are switched elecctromagnetically. I understand you that you may be looking to provide a degree of isolation and want to step up the switching current by using a relay, but it might be better to use solid state switching, such as a FET or a high side driver like an IPS511, to keep the timing in the 'excellent' range. Relays are slow and their switching time varies, in ms, depending on a lot of factors. They might also trigger falsely if the bike hits a pothole (I'm a biker too, I know how it goes !)

I guess you're looking to switch an upshift solenoid and a downshift solenoid, and a solenoid acting on the clutch too ? (old school gearbox crashing can still work however !).

That's 3 relatively high current devices requiring fast switching (and a diode in parallel with each one to kill the switch-off spike). 2 or 3 input buttons for the rider.

As for a control method, what about a switch on the clutch mechanism to tell the controller it is safe to shift gears - no clutch signal - no shift (good safety). The clutch is likely operate at different speeds depending on the temperature, and how well oiled the shift mechanism is.

This project doesn't need even a microcontroller, but then again you could make a sophisticated system to do a lot of monitoring and make the system very easy to tune as well as make it customisable to allow it to make it's own decision , say, to do two downshifts instead of one if you are braking hard.


User avatar
Posts: 113
Joined: Sat Jul 21, 2012 1:36 pm
Contact: Website

Re: Is the Raspberry for me

Fri Nov 15, 2013 11:53 am

I'd go Arduino for your application.
Reason being that it does less to clutter up your workflow, and has enough in/out lines for the task.
You'll need a PC to upload your programs from and debug.
You can write your programs to send out a single line of text from an arduino for debug purposes such as a line to display on your PC that arduino noticed a buttonpress.

You'll also need something for power supply from the 10 to 14V vehicle battery after you have removed the debug pc and usb.
I like DC-DC buck regulators. You can get your boss to buy ten of those on ebay. Wind the screw to select 6V and solder that to the arduino where its power socket is. The arduino has its own regulator down to the 5V or 3.3V which it uses but I did not know whether that is rated for 14V input.

You'd not press shift at a computer; you'd press a switch to one of the arduino pins, which can do whatever you had programmed it to do.

User avatar
Posts: 925
Joined: Sun Jun 10, 2012 3:57 pm

Re: Is the Raspberry for me

Fri Nov 15, 2013 12:52 pm

I have a couple of Arduino Leonardos, and the DC supply can be either 5V via microUSB, like the Raspberry Pi, or DC via a power jack. The input via the power jack is nominally 7 to 12Vdc. The upper limit is 20V, although there is a warning about possible overheating of the onboard Voltage regulator.
The purpose of a little toe is to ensure you keep your furniture in the right place.

Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Is the Raspberry for me

Fri Nov 15, 2013 3:34 pm

I think I'd suggest an arduino too - pretty quick to set up and easily changed if you want to change the timing. (plug a USB lead in.) If you're just firing a few solenoids (big ones admittedly) in a fixed sequence, a raspberry pi is well over the top, unless you need a fancy screen on the top of the tank or something 8-)

Beware of all the electronic/electric considerations - large induced currents from relays or solenoids, etc. as fixit mentioned above. It's worth having a go for a one-off thing for experiments, but if you ever considered something like this for production you'd need a proper electronic engineer who knows how to deal with all the power supply and reliability issues.

Return to “Beginners”