Hacking a Nespresso Machine! | Brewno

I think that since I don’t need position control, I might find a DC MOTOR / GEAR that will produce more torque than a Stepper???

Yeah, gear motors are strong and maybe cheaper. Screw steppers are strong as well, and you can control the travel a little easier. With a gear motor you’d probably need a limit switch on each end position, or one end and time it going the other way.

I will try a servo motor once again… If it does not work, il go to gear motors with potentiometers or limit switches as you recommend.

For moving the handle it’s a question of torque. If I had to measure it, I’d go the old fashioned way:

  1. Tie string to handle
  2. Run string over pulley centered on coffee machine COM (assumption: your device won’t be much larger than the coffee machine)
  3. Add weight to other end of string until handle completes motion

This will get you, therefore, a ballpark (read: sketchy) estimate on average torque required when you go shopping for motors:

T = M*g*R

M = mass required to pull handle (kg)
g = 9.81 (m*s^-2)
R = radius of handle (m)

Because when you consider geometries of applying this torque, you can tweak your radius and required force, but the critical torque (enough to rotate the axle) should be a conserved quantity.

A worm drive (or worm gear) might be what you need - you have a motor attached essentially to a screw thread, which meshes in the teeth of a gear wheel. It’s a compact way of achieving very high torque (at the expense of rotational speed). There seem to be a few likely looking ones available on eBay, with the gears enclosed in a nice solid-looking box. Note you’d need some limit switches (or an optical sensor) to control the travel (unlike a stepper motor).

I’m wondering why it needs torque. Is it because it’s off-balance or difficult to move? If it’s off balance, then a spring or counter-balance could be used. Or if it’s lift, then as @msolters said, a counter-weight like an elevator, or a torsion spring like garage doors or car windows might do it. Or does it need to shut really tight?

It needs force because at the end it has a click it needs in order to seal the water from coming out upon pumping…

The coulterweight don’t seem feasible… At least in my imagination…

Right now I am on either the geared motor or the worm drive…

Have you thought about changing the design? Like have the top slide in/out like a CD tray and seal a different way, or just the way the lid seals without snapping?

I am taking a look at that but it will involve a major dissambly…


I think the force is pushing the capsule onto the spikes that puncture the aluminum, three on on the back and a mesh arrangement at the front. I wonder if a solenoid would be best? they generally have a very fast action, you could use PWM to reduce the holding power once its moved fully.
Something like this one

Thank you all. I am worklng in a direct drive straight coupled to the machine first. I am using two high torque servos. If that works it would be the simplest solution… If it does not, il try the solenoid and the worm drive ideas.

Il keep everyone posted!
Thanks for the help!

How do you envision we can get more travel than what it is depicted in the specs?

I think it will need something like 30 to 40 mm

it depends where you attach it, if you can move it closer to the pivot point it doesn’t need to move as far. maybe one on each side? and a spring to pull it back up? or remove the mechanism and mount it internally, all the bar does is pulls the front in by 5-10mm to puncture the capsule…

and is the pivot point a single bar? can you drive it from just one side? or are there 2 separate drive mechanisms?

Check out how people make DIY cnc routers, etc. Attach a motor to a threaded rod, then attach a nut to the handle. As the motor turns one way, the nut will push open the handle, as the motor turns the other, it will pull it closed. The motor will need to pivot some, which just means more 3d printing :smiley: . You don’t really need a “servo” that’s overkill, you need 2 limit switches, because all you need to know is when your handle is all the way open and all the way closed.

Check out this page if you still want to think about a servo - there’s not much to a servo but a dc motor, an h-bridge motor driver, a potentiometer, and some gears. The only thing that’s all that smart is a servo is taking the PWM signal and converting that into angular degrees. With the Photon, you can just read the pot value directly and turn off power to the motor when you are near that value. Servos use PID algorithms to slow the speed of rotation as they near their setpoint, but that also seems like overkill.

1 Like

@jrubins and everyone!! Great recommendation!! I’m finishing a print tonight… If everything goes according to plan… I am testing the solution of the servo tonight… I know it’s an overkill… But it’s what I have on hand‼️

@msolters I appreciate the formula and the method… This is now safe in my formula notebook for future use‼️ Question: will this result be the torque required at the radius of the handle or at the center of the axle or pivot point, where the handle applies force… Eg: will the torque contemplates the lever or not… Thanks!!

@frlobo Torque is a cross product between an applied force, and some radius vector. As such, the same torque can be accomplished with different combinations of force and radius.

In the example I gave, we are seeking to determine the critical torque required to complete the pod-pressing action by using the handle, in which case we are computing our estimate by considering the radius of the handle from the axis it rotates when you push it.

If you rotate the axle directly with some form of electromagnetically propelled device, like a motor, then your acting radius is much smaller, and your effective force will be linearly greater in order to produce that same torque.

In practice, it doesn’t matter, as long as the motor can supply the right torque, and you do not construct too elaborate of an intermediate simple machine that dissipates all that work.

I am not recommending a counter-weight as a mechanism to power this motion, I am recommending it as a trivially simple way to measure how strong of a motor you would need to buy to do the same, directly at the axle. Whatever torque gravity tugging on a string applied at the radius of the handle generates, that’s the same torque you’d need at the axle, and the same torque you’d need using a lever twice as big!


I thought of your issue this morning - the best model for what you are trying to do is a garage door opener. Take a look at the screw drive type, that’s pretty much what you are trying to do in a smaller scale. Best of luck!

1 Like

Ok. So this is my next attempt before moving to something more radical like things suggested here…

The whitish model is the coffee machine… The rest is the rig I am working on… Will be printed tonight!

Il let you know how it goes!


awesome! excited to see how it goes.

Ok… So the design works! Thank God I didn’t have to go to the other complex designs to achieve more torque… As you know this big servos where needed to go beyond the clicking at the end of the travel of the mechanism… And I needed in both sides to get both sides to click, since if one doesn’t the water can leak from one side or both.

I still need to trim the servos position to eliminate the buzzing… (Both servos and then each in respect to the other side) I am also thinking on detaching the servos via software (Servo.Detach) once the servos move to the desired position to eliminate the constant applied force and thus the buzzing… Since the servos are not very precise they tend to buzz no matter how I calibrate them or trim the position… This can happen immediately or at random closings and openings…

I also need to fix the bottom part of the base (or servo support platform) into the machine itself with screws to eliminate the wobbling/flexing of the plastic base. This will make calibration of the servo positions a nightmare!

The design might be an overkill… But it works… I will continue tomorrow with the dispenser mechanism and post videos as I move forward.

Thanks everyone for your help! I learned a lot!

Here’s the video: