Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Asked
Resolved Resolved by ptp!

Hbridge And 10K Precision Pot For Feedback

I want to use a precision 10k pot for positioning feedback for hbridge control.  

For my R2 I'm adding lifts for the periscope, radar and zapper but im unsure how to wire it for the ADC.
User-inserted image



User-inserted image


Im using a bourns pot, i understand pin 2 goes to the white pin of my adc port, for the reading, where do i get the power from for pin 1?  I have 5 volts running the exb because that's the max my micro servos can take and i have 12v running into the hbridge for motor power.

Ive been looking through a lot of posts, and cant find reference to this, just not to get the power from the adc port.

This is a second ezb4 that will only be controlling 4 dc motors for lift, 4 micro servos for spinning the stuff, an led for the zapper and a 3v air pump for smoke.


Related Hardware EZ-Robot EZ-B v4
Related Control Read ADC
AI Support Bot
Related Content
Synthiam
#1   — Edited
POT:
PIN 1 = EZB adc's port black pin = GND
PIN 2 = EZB adc's port white pin = input
PIN 3 = EZB adc's port red pin = 3.3v
Synthiam
#2  
Use the electronics (pcb) of servo and connect it to an hbridge. It’s way easier and gives you fine control of positioning.
#3  
Dj sures, i have a couple questions.   I've been reading through the forums and can't find details on how the pcb board is connected to the hbridge, is there a post or tutorial i should read on the hook up?

This question might be answered by said post.   Once hooked up are the controls a servo or scripts?  Auto Position would sure be nice if its connected as a servo.

I have an Amazon gift card burning a hole in my pocket, is any digital servo good to use?

Thanks
#4   — Edited
Try something like this:

User-inserted image


The h-bridge requires 5v logic, so the servo PCB must be fed with 5v.
If your EZ-B is connected to a 5v power source you can connect the servo pcb directly to EZB digital port (vin/red), if not you will need a DC/DC to get the 5V from the vin.
#5   — Edited
If your motor is spinning in the opposite direction you ll need to swap the connections between the servo and h-bridge e.g. OUT1 -> IN2 / OUT2 -> IN1
Synthiam
#6  
Nice drawing ptp! You got it dead on!
#7  
That is great!  I sure hope others will see and use your drawing too.

I'll be sure to post once i get it set up.
Synthiam
#8  
Nice!! People will appreciate a demo. I’ve been saying to use hbridge with servo pcb’s for years but don’t think anyone has. It’s essentially a super powerful but cheap saber tooth. I kind of invented it on my own cause I’m a little crazy like that ... but it’d be neat to see more people adapt it
#9  
Yes for sure!   I can't wait to try it.
#10  
Thanks for that Pedro. I tried this a couple months ago but fried a bunch of servo pcbs. I see why now...was missing a step.
#11  
I have it hooked up and using servo Auto Position it just spins like a continuous servo.   I added a read digital to the port im using and it spins based on how much i changed the value, 90 or higher,  it does not spin in the reverse direction when i lower the value and does nothing 89 or below.

Here is what I've done.

Here is the servo i used.
User-inserted image


I removed the board from the case.
User-inserted image


I snipped the pot off and soldered in the wires going to my pot.

User-inserted image


I soldered the other end to my pot

User-inserted image


I removed the servo's motor wires and added wires that plug onto the In1 and In2 of the hbridge.

User-inserted image


Here i added the ground to the hbridge and to the ground of the servo cable going to the ezb

User-inserted image




Since it is only spinning in one direction, what should i test?
Synthiam
#12  
If it’s only moving one direction, one of the two wires from the servo isn’t connected correctly. 

also, you’ll have to check the data sheet but I’m pretty sure the hbridge IC doesnt want more then 5 volts. So you’ll need a voltage regulator on the servo pcb if it’s powered by the battery directly or ezb
Synthiam
#13  
If you are talking about supply voltage the H-bridge that @kashyyyk is using seems to be similar to the one EZ-Robot sells. That L298 H-bridge should have a 5V regulator on-board. You should be able to supply the board with 6V to 35V (Voltage regulator limits the min and max voltage) and it will take care of the logic supply voltage for you (if the button is switched on).

But if you are talking about signals yeah you'll want your signal voltage under 5V. Something in the 2.3V-5V range would be fine for TTL levels.
#14  
I'll have to test the wires one at a time for the servo, there are only two so should be easy.

As for power, I'm only running 5v into the ezb and I have 12v only going to the hbridge.
#15  
Hi, I just used with ARC, IO tiny, Ez-Robot battery, the H-Bridge PWM control with a tank chassis works well, forward, backward, left, right

Here are my settings:

4 Wiring
Connect L298 VCC to either your battery supply positive or EZ-B power (red) on pin D0
2) Connect L298 GND to either your battery supply positive or EZ-B power (gnd) on pin D0
3) Connect L298 IN1 to EZ-B Signal Pin D0 (white)
4) Connect L298 IN2 to EZ-B Signal Pin D1 (white)
5) Connect L298 IN3 to EZ-B Signal Pin D2 (white)
6) Connect L298 IN4 to EZ-B Signal Pin D3 (white)
7) Connect L298 ENA to EZ-B Signal Pin D4 (white)
7) Connect L298 ENB to EZ-B Signal Pin D5 (white)
9) Connect L298 OUT1 to Motor 1
10) Connect L298 OUT2 to Motor 2



User-inserted image



User-inserted image
#16  
Thanks, I need feedback because I'm not using it for movement, but as a multi turn or sail winch servo, it's just those servos are too large for the room I have.   But checking the wires, I must have damaged the PCB board, one direction for the motor isn't working.
#17  
I found the problem, the pulley on my pot is smooth causing the belt to slip, so I'm not getting any changes.  I'm off to the printer to print them again, with teeth for the belt to grab.
Synthiam
#18  
awesome! I’m super glad to see someone implement my hbridge servo pcb combo:)  

finally!:D
#19   — Edited
I keep telling everyone, ez-robot, ARC make everything "easy".

more  h-bridge activity today  -:) 

working 2  car chassis now

both cars are on the road already - cheers!