HCSR04, 500 powerboost basic, attiny85

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
abonechitkara
 
Posts: 9
Joined: Wed Sep 17, 2014 5:51 pm

HCSR04, 500 powerboost basic, attiny85

Post by abonechitkara »

Using a Attiny85, powerboost 500 basic, Lithium 1200mAh and HCSR04 and 3v pancake vibrator (to convey distance) setup; not working properly. But when i use supply from arduino mega board it works. Also getting 5.1V with powerboost and 4.98 with Arduino Mega. No clue what's the problem. Stuck up! Need urgent help.

Problem with sensing: HCSR04 does not give proper variations in vibration with change in distance. Once attiny85 is powered with arduino mega 5v power supply everything works fine.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: HCSR04, 500 powerboost basic, attiny85

Post by adafruit_support_mike »

Post a photo of your hardware and connections and we'll take a look.

User avatar
abonechitkara
 
Posts: 9
Joined: Wed Sep 17, 2014 5:51 pm

Re: HCSR04, 500 powerboost basic, attiny85

Post by abonechitkara »

One more point in case of powerboost the sensor is reliable for distance below 1m but beyond that it probably gives the same output as the vibration is constant whether the obstacle is at 2 m or 5m. Does not happen with Mega power supply. Tried the 500 powerboost charger also same problem.
Swapped powerboost with another, swapped powerboost charger with another, swapped the battery, charged the battery till green light in adafruit USB charger, burnt the code several times, no clue whats the issue.

In the picture while using the powerboost the sensor is at 5.02 V and while using the Mega board it is at 4.98V. The power consumption of the setup is not crossing 50mA.

Some ideas:
1. Is it to do with the power supply in the mega having a capacitor across or something? That might be preventing the reverse current from motor or surges from motor current draw?
Attachments
WP_20150216_14_46_49_Pro.jpg
WP_20150216_14_46_49_Pro.jpg (362.11 KiB) Viewed 268 times

User avatar
abonechitkara
 
Posts: 9
Joined: Wed Sep 17, 2014 5:51 pm

Re: HCSR04, 500 powerboost basic, attiny85

Post by abonechitkara »

Yes the setup works with 470micro Farad capacitor across the Attiny85 :/ It is too huge to fit in my project though. Any better idea. Tried a BC547 transistor to run the motor, Behaving in a differnet manner but still idiotic. Please help :/
Further i cant see any major capacitor on the mega board. How does it manage to work?
Attachments
WP_20150216_15_42_20_Pro.jpg
WP_20150216_15_42_20_Pro.jpg (382.2 KiB) Viewed 265 times
Last edited by abonechitkara on Mon Feb 16, 2015 6:19 am, edited 2 times in total.

User avatar
abonechitkara
 
Posts: 9
Joined: Wed Sep 17, 2014 5:51 pm

Re: HCSR04, 500 powerboost basic, attiny85

Post by abonechitkara »

Further i cant see any major capacitor on the mega board. How does it manage to work?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: HCSR04, 500 powerboost basic, attiny85

Post by adafruit_support_mike »

1) Connect the 5v and GND wires from the PowerBoost to rows in the breadboard that don't connect to the ATtiny85.

2) Put a 10uF capacitor between those rows. That will absorb noise on the supply rails in general.

3) Run wires from those rows to the ATtiny85 and any other components. Don't connect any other wires to the rows for the ATtiny85's VCC and GND pins.

4) Put a 100nF capacitor between the VCC and GND pins on the ATtiny85. That will absorb noise from the ATtiny85 itself, and will provide a second layer of smoothing for noise on the rails.

5) Connect a reverse-biased diode from the pin that feeds power to the motor to the positive leg of the 10uF capacitor. That will shunt flyback voltage from the motor back into the smoothing cap rather than dumping it directly into the ATtiny85.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”