New project, a 4 wheel drive electric bike. NEED help either free or not

Hello,

I'm new to this forum and fairly new to arduino. I read the book and have decent electronics background and some programming. I am building a 4 hub motor car driven by arduino (Acceleration sensor(installed and working), Hall sensors to measure speed(giving me crazy readings), 3 axis gyro and accelerometers to control slip) ....

I need help with several aspects of the project, electronics as well as programming. I'm willing to pay 50$/hour for someone (hopefully fluent in arduino) to give me some skype time to help me troubleshoot the problems that i'm having....

Thanks
Mo

photo 2-11.JPG

photo 1-11.JPG

looks crazy, i mean, fun. can give you some IM time, not really hoping for $$:) preferably jabber tho as i always forget my skype passwords along with usernames :stuck_out_tongue_closed_eyes:

Hi Koo5,

That's awesome, I will take all the help. The only problem, is what's Jabber ? I have msn, and skype, but never heard of jabber ...

Mo

Wow, that's v. interesting... I've been meaning to do something similar at some point. What kind of motor controllers are you using/building? Are the hubs the "Golden Motors" ones?

That is pretty cool looking, how fast would that be able to go when its finished?

What's your plan for steering? Mechanical, or electronic?

With servo steering you have the possibility for remote control, note :wink:

Hall sensors to measure speed(giving me crazy readings)

Your motors magnetic fields, or the power wires are probably interfering with your sensors.

I talked to guy Saturday that had similar plans with hub motors. It sounds like it could be a lot of fun!

Hey Guys,

Thank you all for the feedback and the help. Here is some more detail about the project:

  • 4 1000 Watts motors (Golden Motors 901) for a total 4000Watts
  • We just ran the car on the road last week, and top speed is roughly 60 KM/h under the current configuration. We plan on limiting the speed by software to 50.
  • the acceleration is amazing. No exact figures yet, but compares nicely to a healthy car
  • Total weight of the frame with 2 48volt batteries (20 AH each) is less than 100KG
  • 200 Watts of flexible solar panel is planned for the car, this should allow 10-20 km of driving per day without ever having to plug the car in for recharging
  • The current steering is similar to that of a go kart. I'll post some pics soon
  • The plan is to include a (Steering sensor (pot), gyros, accelerometers, and 4 wheel rpm sensors (My plan for using the hall sensors in the hub motor if failing :frowning: ). These sensors will allow me to detect slip and use the amazing electronic regen breaking and independant motor control to correct the slip better than most of the existing system. Since breaking is true electric, the reaction times are much better.

Now as for the current problem at hand, i am about to give up. It seems that the 3 sensors that are inside each golden motor 901 wheel will fire in a very unstable way if the motor is receiving or generating current. Too bad, because with no current, it's a super accurate way to measure rpm 23 times in each rotation, so slip could be detected really quickly. Can someone recommend an alternative ?

mo

Hi 4motorcar,

I run a professional software company that specializes in safety-critical software development, and tools for developing same. We also taken on small hardware design and prototyping contracts. Your project looks very interesting! I'm happy to give some free advice (as I often do on this forum). If you want software developed then we can do that on a contract basis.

Can you explain how you have connected the built-in Hall sensors to your Arduino, and more details of the software are using to read them and symptoms of the problem? It seems a shame to add extra sensors if the hub motors already have them built-in.

Hi DC42,

Thank you very much for your help. I have prepared a 4 min video that explains the problem and shows the method of connection. Let me know if this is clear enough...

Mo

Good, clear explanation of the Hall sensor problem. I don't know how to solve it, but I did want to chime and say that your project looks very interesting. We are doing something similar, but with a full-size car. Hope you continue to post some video on the forum so we can see this as you develop it.

I have a couple of ideas:

Could the counter be over flowing or wrong variable type? I am thinking along the lines of how to get proper timing info using the mills function.

Could the problem be related to how fast the data is coming? You can only spin it so fast by hand but the motor can move it self much faster.

Any protection or analog processing on the hal sensor lines between the motor and the MCU?

Have you looked at the sensor output using an O scope?

Hi again,

The problem is almost certainly capacitive coupling between the Hall sensor connections and the motor power connections. This problem can almost certainly be solved. In the video, you show that the motor cable contains 3 thick power lines and 5 thin Hall sensor lines. Can you confirm that the 5 Hall sensor lines are not connected to the motor controllers at all? If you can confirm this, here are my suggestions:

  1. Don't run the Hall sensor lines and the motor power lines in the same cable. I guess you don't have any choice about the short cable that goes into the motor because that cable is part of the motor assembly. However, where you make the connection to that cable, use one cable for the power lines and a separate cable for the Hall sensor lines. I suggest you use shielded cable, 2-core + shield (the sort of cable used for connecting stereo microphones etc. will do). Run the ground connection through the shield, and run the Hall signal and +5v through the 2 cores.

  2. Make sure that the ground connection to the Hall sensor is connected to ground (through the shield of the cable) close to the Arduino and nowhere else - definitely not anywhere near the motor controller. Similarly for the +5v supply to the Hall sensor.

  3. It sounds as if you are using the internal pullup resistor in the Arduino. While this is normally adequate, if the signal is picking up interference then a lower value pullup resistor is better. I suggest you use an external pull resistor instead. Preferably, find out the maximum current sinking capacity of the Hall sensor and choose a resistor to provide somewhat less current than that. If you can't find that data, then guess or experiment. For example, the popular US1881 hall sensor has an absolute maximum output current rating of 50mA and its saturation voltage is specified at 20mA. For that sensor, a value of 220 ohms (giving 20mA sink current or slightly over) would be a good choice in an electrically-noisy environment.

  4. Doing all of the above may solve the problem. If it doesn't, then connect an R-C filter between the Hall sensor and the Arduino input pin. This should be physically located close to the Arduino. Insert a series resistor between the Arduino pin and the junction of the Hall sensor and pullup resistor. Also connect a capacitor between the Arduino input pin and ground (again, use a ground connection close to the Arduino). Start with 10K and 0.1uF. If that doesn't fix the problem, increase either the resistor or the capacitor. Too high a value will make the sensor unresponsive at high RPM.

Hope that helps - dc42

Hi DC42,

Thank you so much for taking the time, this all makes alot of sense. I will give this a try this week and post an update...

fingers crossed ...

Mo

can you get a scope on the output of the hall sensor

i think you are getting noise from the motors

simple solution is to fit separate optical sensors on the rim of the wheel - problem solved !

Its important not to route the hall signals anywhere near the high current wiring.