Jump to content

Junkyard Hall Effect Sensor


mikey

Recommended Posts

Sweet. I have one of those easydriver stepper motor drivers or something, and used an AVR to drive it at Max speed and couldn't even get the needle to move at all. Would be keen to help out if you want a hand. I've been playing with it for myself anyway and 2 brains are often better than one. Also happy to leave you to it if you would rather attempt it on your own first

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Definitely keen on a hand, as you know my electronics is pretty basic. First step is to just get the motor turning. Then see what speed I can get it to do and whether it's fast enough for the speedo. But from what you've said it probably wont be. But that driver chip I'm using can drive a range of motors. 

 

So I guess I'll need to track down a 12v BLDC which can spin at around 4,000 RPM. I had a quick google today and couldn't find much locally. 

 

I've already written some code for sensing the hall sensor input and recording the timing.

Link to comment
Share on other sites

I have a few RC motors that will do those speeds easy plus they arent that expensive.

Havent looked into it a lot, but because it's a BLDC, the motor will move at the speed you change which coils are energised. Not sure if theres anythign else to it, like somehow reading position by measuring the un-energised coil or something, but most of those hobby RC BLDC speed controllers have an AVR on them to control it all, so no need to make fancy hardware, just get a controller and a motor from hobbyking or ali-express and that SHOULD all work pretty good. Make up a square rod or buy some small key material to drive the speedo (assuming its square shaft needed like the toyota ones) and use one of those cheap flexy joiners they use on 3D printers etc and connect it to the motor, mount it behind the gauge and away you go! Those BLDC controllers will happily run on 12V as well, so thats nice and easy too.

if you do want to go that way, and want to order a motor to play with, the KV rating of the motor means RPM per Volt. So a 1400KV motor will do 1400 RPM with only a 1V input, so try get a small one. I only have big 2200KV motors here i think but for testing that shouldnt be a problem. You'll just be able to get better resolution out of a low KV motor

Link to comment
Share on other sites

Lol if it works, you won't want to run that stepper motor behind the dash. They hum, especially at high speed. It's not really the right motor.

 

Brushless DC would be more suited. You can get heaps of break out motor controls boards / shields for the arduino.

As there is no load on the motor you could just run it in a simple open loop and assume that the motor will keep up.

 

 

If you think that's hard, most new vehicles run CAN network. All the information is sent down a single wire, rather than having 40 pin plugs. This means there is only like 3 wires that go into the instrument cluster.

Link to comment
Share on other sites

That sounds like a good idea, but I thought they only spun at up to 2000rpm? Worth a shot though and you can always run it on a couple extra volts to get some more speed out of it if you need it haha

Link to comment
Share on other sites

Hmmm, not really in junkyard mode. I'm tempted to go and buy one of these: http://rcb.shopnz.biz/catalog/product_info.php?cPath=51_77_28417&products_id=2493&osCsid=1cc0ef2a6fa7b82d2ed81605ed64d76a

 

Only concern is the control for them. I've not been able to find definitely how I'm supposed to controll it given the three wires. 

 

I suspect it's just like a three phase motor and I just alternate through the three wires with my motor controller. But it's just a guess... 

Link to comment
Share on other sites

That's the rc motor I talked about earlier. The controllers for those run AVR micros and a guy called Simon K has written some firmware for them that everyone uses so there might be some source code available as well. If not, you just energise 2 coils at a time to get it to move

Link to comment
Share on other sites

Yes, similar to 3 phase in operation.

 

They make heaps of DC motor control boards and I assumed they would also make heaps for brushless but it appears everyone just uses ESCs from RC planes and control it with the servo library in Arduino.

edit What Ned said :)

 

Both speedo and pulse from driveshaft are linear so it shouldn't be too hard to sort out a conversion in the code.

Link to comment
Share on other sites

You don't have to spend 65.

 

I would buy an ESC also rather than trying to control the motor directly from the Arduino.

 

With an ESC it's like one line of code.  servo.write(angle from 0-180 which will relate to speed on a brushless).

 

http://www.ebay.com/itm/Brushless-Motor-Outrunner-Motor-KV3500-for-RC-Airplane-Model-450-MH761-/360571781115?pt=Radio_Control_Parts_Accessories&hash=item53f3c0bffb

 

http://www.ebay.com/itm/NEW-20A-Electronic-Speed-Controller-RC-ESC-For-Brushless-Motor-Part-DR-/300915836870?pt=Radio_Control_Parts_Accessories&hash=item460ffb47c6

Link to comment
Share on other sites

You don't have to spend 65.

 

I would buy an ESC also rather than trying to control the motor directly from the Arduino.

 

With an ESC it's like one line of code.  servo.write(angle from 0-180 which will relate to speed on a brushless).

 

http://www.ebay.com/itm/Brushless-Motor-Outrunner-Motor-KV3500-for-RC-Airplane-Model-450-MH761-/360571781115?pt=Radio_Control_Parts_Accessories&hash=item53f3c0bffb

 

http://www.ebay.com/itm/NEW-20A-Electronic-Speed-Controller-RC-ESC-For-Brushless-Motor-Part-DR-/300915836870?pt=Radio_Control_Parts_Accessories&hash=item460ffb47c6

 

You're right, I will enjoy life a lot more if I just use an ESC. I'll do that. Ned's gonna lend me one to play with. 

 

I'm not using an arduino BTW, just gonna stick with the PIC. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...