Looking to hire a programmer to complete a project using Attiny10

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello not sure if this is allowed but I did not see anything forbidding it so here it goes.

I am hoping that someone on this forum will be able to help me with a project I am working on.

It is a compact dc motor controller using the Attiny10 and a Ti DRV8872
I am willing to pay a reasonable rate for a program to be written for an Attiny10

 

 

 

Here is what I need the program to do.

3 pins would be used
1 input pin
2 pwm output pins

 

The input pin would read a pulse from a radio receiver then  if the value is outside the normal radio range 1.0ms to 2.0ms then apply case 1

convert the input to a value of -255 to 255
if the value is within 30 of 0 in either direction then it would rewrite the value as 0 (we may have to experiment with this number for optimal results)

 

Then the program would follow these cases

 

Case 1: [motor stop](if Input = 0)
Output 1 = HIGH (255)
Output 2 = HIGH (255)

 

Case 2: [motor forward](if Input > 0)
Output 1 = Input (1-255)
Output 2 = LOW (0)

 

Case 3: [motor reverse](if Input < 0)
Output 1 = LOW (0)
Output 2 = Input = Input * -1 (1-255)

 

 

I have the code working on an attiny84 (would probably also work on the 85) using arduino
however I would like to make the board much smaller but still hand solderable so using the sot23-6 would be 
very nice.

 

 

I have all the chips on breakout boards so I would be able to test code.  

 

This is my working code for the Arduino

 

//RC control.
void setup()
{
  pinMode(6, OUTPUT); //AIN1
  pinMode(7, OUTPUT); //AIN2
}
void loop()
{
  int MAX_SPEED = 255;
  int PULSE_WIDTH_DEADBAND = 35;
  int PULSE_WIDTH_RANGE = 350;
  int input_speed = 0;
  int input = pulseIn(1, HIGH);
  
  if (input > 0)
  {
    // RC signals encode information in pulse width centered on 1500 us (microseconds); subtract 1500 to get a value centered on 0
    input -= 1500;
    // apply deadband
    if (abs(input) <= PULSE_WIDTH_DEADBAND){
      input = 0;
    }
    input_speed = input;  

    // cap speeds to max
    input_speed = min(max(input_speed, -MAX_SPEED), MAX_SPEED);
  }
  else
{
  // if output is outside the range of rx turn motor off
    analogWrite(6, 255); //AIN1
    analogWrite(7, 255); //AIN2
}
//Motor 1
if (input_speed >0){
    analogWrite(6, input_speed);
    analogWrite(7, 0);
  
}
else if (input_speed <0){
    analogWrite(6, 0);
    analogWrite(7, (input_speed = input_speed * -1));
  
}
else if (input_speed < PULSE_WIDTH_DEADBAND){
    analogWrite(6, 255);
    analogWrite(7, 255);
}
}
  

 

If anyone would like to help with the project please send me a PM

Thank you for your time.

Last Edited: Tue. May 3, 2016 - 07:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

A Moderator will probably move your Thread to the sub-Forum: Marketplace.

 

It wasn't clear to me if you are only asking for help writing / porting the code to the T10, or if you are also looking for someone to help with your PCB layout.

 

If you are going to use (easily) hand solderable parts, I'm not sure how much PCB space you will save, it might not be as much as you were hoping for.

If you are going to do your own PCB layout, you might want to go ahead with both layouts, just to see how much space you actually save, and then decide if it is worth the conversion to the alternative processor or not.

 

Good luck with your project!

 

Feel free to post a picture of what you are driving!

 

JC

 

Edit:

I think, now that there is a "Reply" that I can "Report" this Thread to have it moved, which with the current Forum software wasn't possible until a reply was posted...

Last Edited: Tue. May 3, 2016 - 05:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

I am using them to drive 1lb combat robots.

https://www.youtube.com/watch?v=...

 

I have done a few mockups of board layouts and it comes out much smaller and gives me more room for cooling vias.  

I am looking for help porting the code to assembly or C?   

I can handle the board layout.  

 

I mostly do mechanical stuff but there isn't much out there for the electronics so I am starting to dabble in it.

Last Edited: Tue. May 3, 2016 - 05:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The one on the left looks like a vacuum cleaner with an attitude!

 

Gotta love Battle Bots!

 

BTW, make sure your receiver antenna isn't fully enclosed in a metal box, (Faraday Cage)!

 

Good luck!

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks it sounds like one too.  the blade spins at ~8k rpm which actually is a little too fast even for single tooth but it works well when it connects.   

The receiver is trapped inside a sealed aluminum box.  however since the arena is only 8' x 8' x 4'  and its using a receiver meant to go much further I have not had any issues.