HST21 DC Current Sensor


I have selected the HST21 to measure DC current, But I couldn’t get the correct value to measured current.

Is there anyone has used it before, so can he help me, Please?

As in attached figure>>>

HST21 has 4 Pins (+15,-15,0V,Vout).

Thanks for all…

So how are you wiring it up the the Arduino?

What software are you running?

When you say the reading is wrong, what is it and what do you expect?

So post your code, your schematic and results.

I'm wiring it up with Arduino.

I have no problem with programming.

I think my problem is in HST21 Pins connection or something with HST21

Pathetic, are you serious about wanting help.
Read the how to use this forum sticky post at the start of this section.

I'm sorry if I wrote something tactless, But I preferred to get on problem directly.

I'm so sorry again...

But I preferred to get on problem directly.

Yes but you are not giving me anything to go on.

You have done something wrong otherwise it would work. But unless you say what you have done then no one stands a chance of spotting what it is. Sure we can guess, my guess is that it is wired up wrong and you don't have a 15V split supply, but it is a guess.

Also it would be good to have a link to that current sensor, or even a part number as that picture you posted is not so informative.


This link has useful information on HST21…

The Arduino program is in Attached

Thank you again

HST21.ino (454 Bytes)

OK last time then I am out of here because you do not seem to be cooperating.

How have you wired this up to the Arduino and the power supply? Please post a schematic.

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

#include <SPI.h>
#include <SD.h>
File myFile;

double x,y;
void setup() {
  // put your setup code here, to run once:


void loop() {
// put your main code here, to run repeatedly:
 // myFile = SD.open("test.csv", FILE_WRITE);
 y = 0;
 for(int k=0; k<=1000; k++){
 x = analogRead(A5);
 y = y+x*5/1023;



What sort of current are you trying to measure?

Tom.... :slight_smile:


Id like to measure DC current.


Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

!(http://C:\Users\me\Desktop\The Circuit.jpg)

Are you taking the piss?

I'm sorry, I didn't understand what you mean

OK it seems like you don't actually want help it seems to me like you are totally wasting time.

I have asked many times for a schematic, eventually you send a photograph, which is no fu**ing use because it has totally unidentified bits in it and you can't see where all the wires go. What is wrong with you?

So let me say this:-
The HST21 needs a 15 volt split supply, that means +15V ground -15V.
The HSTS21 can operate on just a single 5V supply line.

Which do you have a HST21 or a HSTS21? Have you connected it up to the right power supply for the device you have.

When you do eventually get the right power to your device you will only get a reading of 1 for a current of 58mA. Normally an analogue read has 1 bit of noise so this sensor is useless for measuring anything under 200mA.

It is amusing to me that you put "communications enginner" in your message space, because first off that should be "communications engineer" and second you don't appear to be able to communicate at all.

Wow Grumpy Mike. Does it take a lot of effort to be that level of jackass or does that just come natural to you? I came here in search of answers similar to this guy as I live off grid and want to use a YHDC HSTS21 Hall Split-core Current Sensor to determine what current I'm producing/consuming. People come here to learn and this guy was nothing less than respectful, and you beat him down like someone who doesn't deserve your time. We can learn elsewhere from people with more knowledge, patience and kindness than you posses, much less comprehend. I'm sure you have a snarky come-back because in your world whoever is the snarkiest wins. That gets you no where in a world where people look to you for answers. You're a shame to the flame you carry. Good day sir.

I suspect you are a sock puppet as you registers today just to criticise me on a year old post.

People come here to learn and this guy was nothing less than respectful,

He was constantly asked to post a schematic and provided. He did post one but then he deleted it. It was such that I thought he was taking the piss. It was so bad I used it in a talk I gave, I did save it so I can show you the disrespect he showed.