Hi
I have made a model elevator for a school project. Its running a 28x2 from a 5V USB power supply.
I have connected the negative pin of my motor H-Bridge to a negative pin of the Picaxe and also to negative via a 1 ohm resistor in parallel with a capacitor, creating a potential divid sort of thing.
This allows me to sense the loading on the motor and adjust the PWM to cater for different weight loadings on the elevator carriage.
For example, if no load then it will run at about 80%, if there is load it will run at full high, and if it is overloaded it will return to the ground floor.
This works accurately about 70% of the time but due to the slight fluctuations and very close (range of about 5) ADC10 debug values it isn't very accurate.
The load sensing is happening in the first second of travel when the motor is in PWM to simulate accelerating, I think this also brings the debug values down.
My current debug values are above 23 for overload, above 21 for loaded and anything below that is no load
I tried calibadc10 but that just took the values to around 220 with the same small range.
To my understanding this brings the Vref + down to 1.2V
As i have already built the PCB is there a way to bring the Vref - up a bit with software rather than adding an external voltage reference pin?
I will update later with some voltage readings for different loads, however I did take a reading at the potential divide when I had a similar test circuit on breadboard. Unfortunatly I had only tested with full speed (high command) and the potential divide voltage readings were 0.091 for no load, 0.165 for when loaded and 0.212 when I fully stoped the elevator.
Any advice appreciated
Thanks
Josh
I have made a model elevator for a school project. Its running a 28x2 from a 5V USB power supply.
I have connected the negative pin of my motor H-Bridge to a negative pin of the Picaxe and also to negative via a 1 ohm resistor in parallel with a capacitor, creating a potential divid sort of thing.
This allows me to sense the loading on the motor and adjust the PWM to cater for different weight loadings on the elevator carriage.
For example, if no load then it will run at about 80%, if there is load it will run at full high, and if it is overloaded it will return to the ground floor.
This works accurately about 70% of the time but due to the slight fluctuations and very close (range of about 5) ADC10 debug values it isn't very accurate.
The load sensing is happening in the first second of travel when the motor is in PWM to simulate accelerating, I think this also brings the debug values down.
My current debug values are above 23 for overload, above 21 for loaded and anything below that is no load
I tried calibadc10 but that just took the values to around 220 with the same small range.
To my understanding this brings the Vref + down to 1.2V
As i have already built the PCB is there a way to bring the Vref - up a bit with software rather than adding an external voltage reference pin?
I will update later with some voltage readings for different loads, however I did take a reading at the potential divide when I had a similar test circuit on breadboard. Unfortunatly I had only tested with full speed (high command) and the potential divide voltage readings were 0.091 for no load, 0.165 for when loaded and 0.212 when I fully stoped the elevator.
Any advice appreciated
Thanks
Josh