Go Down

Topic: Treadmill Project (Read 15264 times) previous topic - next topic

Rickmc3280

Feb 06, 2014, 09:34 am Last Edit: Apr 07, 2014, 11:34 pm by Rickmc3280 Reason: 1
I know there have been a few on here from a basic search, but I need advice and some guidance for controlling a treadmill with an Arduino.  I should also specify that I will not completely replace the control board that came with it, but I will have a secondary controller until my project is complete.

I first need to find out which Arduino board I need to use.  

Second, I would like to control a treadmill board via PWM signals which I understand to be a timespan of 51ms.  I have never programmed an Arduino before, so this is an interesting first step and I welcome the challenge.  Some people have suggested using 555 ic's but I do not know how to go about that with an Arduino.


How can I write the code and program the Arduino to send the PWM to the Motor Board to control speed?  


Also, does anyone know how to copy signals from the original device and implement them into the arduino?


Richard

Edit to add:

** The project is going well, since I have not been getting any responses I've just been updating it for any other hobbyist that may be able to use what I've learned for their projects.  I have succesfully controlled the treadmill now with a PWM signal using TimerOne.h - you can find it in the arduino playground downloads

AJITnayak

You can use Arduino Board itself. Please Desciribe Image Properly.
Ur Using ANy motor Driver To interface B/w  Arduino Board and Motor. If yes Pin specifications. and voltage levels.
AMPS

Rickmc3280

#2
Feb 06, 2014, 05:02 pm Last Edit: Feb 06, 2014, 05:11 pm by Rickmc3280 Reason: 1
The motor driver board attached in the picture with the first post is the board.  I have not been able to pull the schematics for it online, the one in white is one that I found that resembled the board in a google image search.

 The white pins are:

1) S/W - Which i am assuming is the safety swithc which is either open or closed.
2) Down - This is the down for Incline motor
3) Up - Up for incline motor
4) VCC - Commons??*
5) Fast - from the upper controller to motor - Increases speed of motor.
6) Slow - Decreases speed of motor
7) GND?  Unknown
8) SPD     Unknown
9) SPD     Unknown
10) VR-1    Unknown
11) VR-2  Unknown
12) VR-3   Unknown

The black and white schematics show that the PWM signals is sent between 0-5volts and the signal interval is 51ms.

The motor itself is 90v 30amp rating.  

Other than that I do not have much information.  I was assuming that the 0-5 volt information was enough.  What other information is needed to make a conclusion?  Also I was more curious as to which Arduino would allow me to send multiple PWM signals.  I am curious if the 2 (SPD?) buttons from above have anything to do with speed and/or if they are the additional speed switches as there are 2 on the upper control board.  I have called the company and spoken with them, they do not have schematics that they offer.  Is there any other way to find out?

Richard

Rickmc3280

removed pic from original post because of its irrelevance. 

What i need to figure out is how to control the Speed pins on the board pictured using arduino. 0-5 Volt, Square Wave PWM Signal at 51ms Interval.


dave-in-nj

#4
Feb 07, 2014, 05:49 pm Last Edit: Feb 08, 2014, 04:02 pm by dave-in-nj Reason: 1
I have used treadmill motors and drivers in the pasts.  every one used a 5k pot as the speed control.
do you have a data sheet for the ALT-6330 driver board?

I found a reference on the Alatech site about dual pwm for speed control.
could not find an actual data sheet. 

need more information on the pulse requirements.





Rickmc3280

I have done google searches as well as part searchers for the ALT 6330 board, I have not found anything.

I also contacted SOLE fitness who uses the board (also Spirit fitness), and they claimed they didnt have such information when i spoke with both sales and the technicians.  Not sure if they dont want people to take trade secrets or what?  The board is very similar to the MG5220 and 28 something that controls other treadmills.  

There is another board in the console that sends a signal to the motor driver board, so unfortunately that complicates it.  If I could control the motor alone I would, however not sure how difficult it would be to control a motor with an arduino and not blow my computers circuits considering the motor is 90v 30amp. (I know I would have to create a secondary board).

What type of information is needed?  I cant make any calls today because they are not open, but hopefully I will find something.  I believe I will be purchasing my first Arduino today so hopefully soon I will be out of theoretical, to practical and experimental mode.

This project has been a bit overwhelming, but worth it in the end, I have learned a lot about electronics, soldering, etc.  Hopefully I will be designing my own boards soon.  

dave-in-nj

the ALT-6330  appears to be supplied by alatech technology
http://en.alatech.com.tw/home.php

sales info :
http://en.alatech.com.tw/products/index.php?type_id=68&top=0


It would seem that you need to intercept the existing controller signals.  easy to do, an opto can receive them and output a 5v signal that can then be send to another opto that controls a transistor.  this way everything between the opto's is board level voltage and everything outboard is powered by the system.

a relay could be used to either pass those signals, or allow you to inject your own signals.

http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM

If I were making this interface board, I would have the Arduino be able to decipher the PWM so you can duplicate it. send it back out as one means of control.

an o-scope would be very useful to determine the signal. since it appears they are saying that all of their boards work the same way, you may find someone as deciphered the signals on a different board.  or, there may be notes on the controller board output to this driver board.



cadcoke5

I will mention that many speed controls accept a varying voltage from 0 to 5 volts.  For those types of controllers, if you want to go half speed, you provide 2.5volts on the signal line. 

So, my question is if you are certain that your signal is a PWM signal that jumps from 0 to 5 volts?  If not, then it may be that you need to send it a varying voltage to vary the speed.

-Joe

Rickmc3280

#8
Feb 13, 2014, 12:22 am Last Edit: Feb 13, 2014, 12:36 am by Rickmc3280 Reason: 1
Thank you Dave and Cad,

Dave, I've been looking into the Optos, and I  agree that it would be the best idea for protecting the computers end.

Also, I checked out the Alatec website and found some good stuff but I guess at my entry level electronics know-how I am overwhelmed with this stuff.  

Which Arduino should I get for this project at this stage in order to dechipher the voltages and pwm signals?  It sounds like reading those might be difficult to do?  Also I have priced Oscilloscopes...  I feel like Id be paying for a high quality audio system without the amazing sound quality lol.  I saw some cheap versions for 140$ I am interested in that, but at those point I have to find out how the treadmill is sending out the signal and I think to do that I need the Arduino.

CadCoke, I am not For sure that my pwm signal for the motor control specifically is 0-5.  It could be for the incline, I had assumped they were both similar in operation.  I have to do some testing.  Any recommendations on which arduino to get in order to intercept the signals?


I was thinking the Uno R3 would be ok but the Mega looks tempting.  I dont think I will need that many pwm signals either.

cadcoke5

Any Arduino can read an analog signal, or analyze a PWM signal (provided the frequency is not too high).  Though, you would need a voltage divider (i.e. two resistors) to cut the voltage down if necessary.

By the way,I have seen some mentions of using an Arduino as an oscilloscope.  Though, I imagine unless there is a bunch of hardware added, you would need to have prior knowledge that the voltages on the signal is withing the ratings for the Arduino.

-Joe

dave-in-nj

I have priced Oscilloscopes...  l.  I saw some cheap versions for 140$

$140.... yeah, let me save you $140....

http://www.zelscope.com/

http://makezine.com/2007/11/24/turn-your-soundcard-into-an-os/

these are software programs that use your sound card input to  display the frequency.  since frequency is a word for how often something happens.... and your pulse is how often something happens....

google free o-scope to see what is available for your platform. (not everyone uses Linux)

that helps part of the equation...

Rickmc3280

I just bought 2 Uno R3's. 

Thanks for the heads up. 

I dont use Linux, but I need to learn how.  I have an older computer that will do what I need it to with the sound card and I can probably put Linux on it tomorrow. 

Later in the project I am gonna post videos of the progress.  I've seen people with questions and answers and once they get the answers they do not follow up on t he project.  Want to help out whoever is interested. 

Thanks Dave and Cad

dave-in-nj

free o-scope versions for windows, linux and mac.  no need to load a platform you are not familiar with.
using something other than your main box is a VERY good idea.

get some opto's   90% of what is available will work,  you will have to look to find one too slow.

find a part, get the data sheet and check the propegation delay.  needs to be faster than 100ns. 
determine resistor values needed and get some resistors.  get some LED's as well.  you should be able to put one opto to receive the signal, and another to output from the first one.  and have the LED connected in between to blink at whatever rate the PWM is.  series led for sizing the resistor



Rickmc3280

I am downloading Linux anyways because sometimes folks i know only need a basic computer and I've seen tutorials for setting the theme to look like windows 7 etc and this would be a great time to start learning it.  I have done computer repair and rebuilds for 12 years, its about time I get my head back in the game.  Thank you for the advice.  I will probably try these programs on an old laptop and once i feel more comfortable I might put this linux program on a Pentium 4 that just doesnt seem to perform anymore.  I am interested to see how it does with linux. 

As far as the Optos, been looking at some on Amazon. I am gonna get them once I do a bit more research on how I am gonna set it all up. 

Do you think this program will work? http://www.zeitnitz.de/Christian/scope_en.  Also checking out this one - http://www.sillanumsoft.org/ .

Thanks for the input.  Going to continue to look more into this.  Bought a dummies book for backup  :smiley-red:

Rickmc3280

Latest Update:

Bought the 2 Arduinos, they are still on the way due to the weather in Atlanta, whereabouts I live. 

Have been watching videos and learning about the sound-card oscilloscope, and I think I get the jist of it.  Bought some 3.5mm jacks today.  I think by the end of this coming week I should be able to have learned enough to control the board.


Go Up